Skip to content

Async trait functions #24

@pms1969

Description

@pms1969

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions