pub unsafe trait ThreadSafety<F>: SealedThreadSafety { }Expand description
Sealed trait enforcing the required Send / Sync bounds on a closure F for a given
thread-safety marker (Local, SendOnly, or SendSync).
§Safety
- If
Self: Send, anyFfor whichSelf: ThreadSafety<F>is implemented must satisfyF: Send. - If
Self: Sync, anyFfor whichSelf: ThreadSafety<F>is implemented must satisfyF: Send + Sync.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".