Closed JakkuSakura closed 1 year ago
Hi,
Since GAT is now stabilized, what's the status of GAT of async_trait?
I'm building a library that utilizes GAT heavily. It will be nice just write
#[async_trait] trait Foo { async fn foo(&self); } struct F; #[async_trait] trait Foo { async fn foo(&self) {} }
Rather than
trait Foo { type Future<'a>: Future<Output = ()> + 'a; fn foo(&self) -> self::Future<'_>; } struct F; trait Foo { type Future<'a> = impl Future<Output = ()> + 'a; fn foo(&self) -> self::Future<'_> {} }
GAT can eliminate Boxes, but harder to write and not object-safe. So it's better to have an option to opt-in the GAT version.
A GAT implementation is not being considered for this crate.
But why?
Hi,
Since GAT is now stabilized, what's the status of GAT of async_trait?
I'm building a library that utilizes GAT heavily. It will be nice just write
Rather than
GAT can eliminate Boxes, but harder to write and not object-safe. So it's better to have an option to opt-in the GAT version.