dtolnay / async-trait

Type erasure for async trait methods
Apache License 2.0
1.81k stars 84 forks source link

Add per-method #[async_trait(?Send)] #190

Closed RoGryza closed 1 year ago

RoGryza commented 2 years ago

Fixes #131

Allow adding #[async_trait(?Send)] to specific methods instead of the whole trait for cases where only some methods require Send bounds.

I could add #[async_trait(Send)] as well for convenience when most methods on a trait should be ?Send but a few shouldn't, depending on your opnion on that.