double icon indicating copy to clipboard operation
double copied to clipboard

Async trait functions

Open pms1969 opened this issue 5 years ago • 0 comments

I have a trait like so:

#[async_trait]
pub trait RetryMove {
    fn map_accessor(&self) -> &HashMap<String, String>;
    async fn method_1(&self, test: &str);
}

when I try and use mock_method! on method_1 I start getting compile errors like so

133 |         mock_method!(method_1(&self, test: &str));
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetimes do not match method in trait

My running assumption is that double does not deal in async functions? Any plans to implement? Or am I missing something obvious?

pms1969 avatar May 20 '20 21:05 pms1969