Trait SingleThread

Source
pub unsafe trait SingleThread { }
Expand description

A type T implements SingleThread if at any time there is a single thread from which all values/references to values of this type may be accessed.

Usually, it is sufficient that T is !Sync and Singleton.

Since Sending T denies access in the original thread, this property is maintained regardless of Sendability.

Implementations on Foreign Types§

Source§

impl<'a, T: SingleThread> SingleThread for &'a T

Source§

impl<'a, T: SingleThread> SingleThread for &'a mut T

Source§

impl<T: SingleThread> SingleThread for [T; 1]

Source§

impl<T: SingleThread> SingleThread for Cell<T>

Implementors§