Skip to main content

MaybeSend

Trait MaybeSend 

Source
pub trait MaybeSend: Send { }
Expand description

Send on native targets; a vacuous marker on wasm32.

On native it has Send as a supertrait with a blanket impl for every Send type, so a bound of MaybeSend is byte-for-byte equivalent to Send (including making dyn Trait: MaybeSend trait objects Send). On wasm it is implemented for all types and imposes nothing.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: Send + ?Sized> MaybeSend for T

Available on non-WebAssembly only.