Skip to main content

MaybeSend

Trait MaybeSend 

Source
pub trait MaybeSend: Send { }
Expand description

Send on native targets, nothing on wasm32.

Browser futures (JS promises, timers) are !Send, and wasm32-unknown-unknown is single-threaded, so bounds use MaybeSend instead of Send to stay satisfiable there.

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.