8000 Option to bypass generating Send when mocking async functions · Issue #655 · asomers/mockall · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Option to bypass generating Send when mocking async functions #655
Open
@OscarTHZhang

Description

@OscarTHZhang

Currently when passing #[automock] to a trait with async functions, it automatically generates Send for its return value to ensure thread safety. However, I am working on an async runtime that guarantees to be run on a single thread, so it does not require Send for its return value.

I'd like to request a feature to add a flag in #[automock] or something similar to not generate Send for mocked functions' return value.

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

      0