Skip to main content

MaybeSync

Trait MaybeSync 

Source
pub trait MaybeSync: Sync { }
Expand description

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

Use this in generic bounds that need Sync on native but should compile on web without the bound.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T: Sync> MaybeSync for T

Available on non-web only.