async-trait
async-trait copied to clipboard
Type erasure for async trait methods
The paragraph describing non-threadsafe futures is a bit confusing. Clarify that one may use `#[async_trait(?Send)]` to create _non-threadsafe_ methods. ---- CC: @fitzthum
`Arc` generates a `where Self: Send` bound, but for `Arc` it is not enough - it requires also `T: Sync` to be `Send`. This make the following code failing to...
[Playground demo](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=e523d98ae81610bc2bfbc2a9e28aa2e4) This code: ```rust pub struct ArgWithDropGlue; impl Drop for ArgWithDropGlue { fn drop(&mut self) { println!("dropped"); } } #[async_trait] pub(crate) trait Create: Sized { async fn create(arg: ArgWithDropGlue)...
Has there been any thinking in terms of supporting `Stream` aka `AsyncIterator`, or will that come down to some future syntax like `yield SomeType`? Thanks.
I have some async code with a collection of futures that I have called `join_all` on. It seems to work fine, but when I try to call that code call...
I'm trying to implement trait with `async fn` for all `async fn`s. Simplified example: ```rust #[async_trait] trait Trait { async fn run(&self); } #[async_trait] impl Trait for F where F:...
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...
Hi, me again. I found using `type` in trait will cause some problems... 1. mismatched types 2. cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements...
I have a trait in an existing crate of mine that I'm trying to convert to an async-trait, but am running into a problem with the order in which proc...
I have a trait where I have to use `#[async_trait(?Send)]` because of some methods and data structures they return, but at the same time I want boxed future to be...