Implement fast async API with asynchronous traits #290
Labels
api:Rust
This affects the api
async:Rust
Unblock your code
futures:Rust
Wait better times
Rust
The most hype language
Implement async
Doublets
trait without dynFuture
traitPin<Box<...>>
from async_trait eats a lot of time, but it can be fixedHow to be
As you know, traits do not support non-dyn return
-> impl Trait
, but we can write:We also write [via #![feature(type_alias_impl_trait)] feature]:
But
It's a wrong code:
Also, not work
Hm… Use more features and magic!
Forward all generic params to
trait-type
(use #![feature(generic_associated_types)] feature)Oh, Miracle
Ok, use
Future
The text was updated successfully, but these errors were encountered: