Skip to main content

MaybeSend

Trait MaybeSend 

Source
pub trait MaybeSend: Send + Sync { }
Expand description

Auto-trait bound that is Send + Sync on native and empty on browser.

Lets the pure-core types be written once; the Send-ness divergence (browser futures are not Send) is confined here. ∀ T on browser; Send + Sync elsewhere.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T: Send + Sync> MaybeSend for T

Available on non-crate feature browser only.