Post #2612502
2023-11-25 21:18 UTC
@janriemer@floss.social unfortunately, AFIT is often not that helpful because it's not possible to specify Send bounds, so you probably end up writing the desugared version anyway. But yes, without RPITIT, this would not be possible at all.
Replies (1)
-
@janriemer@floss.social 2023-11-25 22:14
@matze@mastodon.social Yes, that's true. However, writing the desugared version in the trait is still compatible with using async fn in the _trait impl_, so the "burden" is more on lib maintainers. Also this problem only applies when the Self type is generic. And `Send` is only required, if one decides to use a multithreaded rt. I highly recommend the following article by @notgull@hachyderm.io about smol: Why you might actually want async in your project https://notgull.net/why-you-want-async/ #Rust #RustLang #RustAsync #AsyncRust