[−][src]Macro maybe_sync::dyn_maybe_send_sync
Expands to dyn $traits
with Sync
marker trait
added when "sync" feature is enabled.
Expands to dyn $traits
without Sync
marker trait
added "sync" feature is not enabled.
Example
fn foo<T: MaybeSend + MaybeSync + ?Sized>(_: &T) {} // `x` will implement `MaybeSend` and `MaybeSync` whether "sync" feature is enabled or not. let x: &dyn_maybe_send_sync!(AsRef<str>) = &"qwerty"; foo(x);