pub trait MaybeSync: Sync { }Expand description
A portability bound that requires Sync on native targets.
Native executors may share storage sessions between tasks, so session and
error values at storage boundaries must be Sync. Browser IndexedDB
handles may contain JavaScript values that are not Sync; centralizing the
conditional requirement here keeps the native contract unchanged.
The browser exemption deliberately applies only to
wasm32-unknown-unknown. It does not use target_family = "wasm", which
would incorrectly exempt threaded targets such as wasm32-wasip1-threads.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".