After Rust 1.75, we still need to use async_trait?
The first section of the docs explain why you might still prefer using async_trait:
The stabilization of async functions in traits in Rust 1.75 did not include support for using traits containing async functions as
dyn Trait.
So if you want your trait with async functions to be dyn compatible (used to be called object safe), async_trait is a a viable option to achieve that.
@jofas: Thanks for the quick reply.
The compiler team has any plan to work out for the dyn support as well?
Judging from the landing page of the async fundamentals initiative, an RFC is in the drafting process. Not sure how much traction the topic has at the moment. If you are interested in more details about the difficulties, Niko Matsakis has written a whole series of blog posts about this: Dyn Async Traits · baby steps
Note that for most cases, you should prefer dynosaur - Rust for that. While less mature, its advantage is that it allows you to leverage static dispatch and only use Box/dyn Future when you actually need dyn Trait.