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.
It's very easy to break API accidently by use of data structures that drop blanket implementations, especially
Send
andSync
. 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
(ormust-implement-trait
if we want something small/specific) andasync_auto_traits::assert
API to ensure this in an automated way.