Skip to main content

MaybeSend

Trait MaybeSend 

Source
pub trait MaybeSend: Send { }
Expand description

Send on native targets; no bound on web (where there’s only one thread).

Use this in generic bounds that need Send on native but should compile on web without the bound. Combined with run_detached, this lets a single function body support both targets.

Implementors§

Source§

impl<T: Send> MaybeSend for T

Available on non-web only.