pub struct ThreadMap<T> { /* private fields */ }
Expand description
This is a structure that lets you define a map with thread local variables, but also gives you access to all them behind a Mutex.
Implementations§
source§impl<T> ThreadMap<T>
impl<T> ThreadMap<T>
sourcepub fn register(&'static self, val: T) -> PerThread<T>where
T: 'static + Sync,
pub fn register(&'static self, val: T) -> PerThread<T>where
T: 'static + Sync,
Register a new per-thread value with the thread map.
Trait Implementations§
impl<T> Send for ThreadMap<T>
impl<T> Sync for ThreadMap<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for ThreadMap<T>
impl<T> Unpin for ThreadMap<T>
impl<T> UnwindSafe for ThreadMap<T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more