Automated way to ensure Send and/or Sync impls
It's very easy to break API accidently by use of data structures that drop blanket implementations, especially Send
and Sync
. For named types (struct and enums) you can manually check by looking at the generated docs (not at all a reliable method as you can forget to do so) but for futures returned by async functions, there is no way that I know.
Hence, we should make use of static_assertions::assert_impl_all
(or must-implement-trait
if we want something small/specific) and async_auto_traits::assert
API to ensure this in an automated way.
Edited by Zeeshan Ali Khan