pub struct Local<T> { /* private fields */ }Expand description
A thread-local implementation of Lock.
This type is very similar to core::cell::RefCell but because it only supports
exclusive locking it can be smaller.
Implementations
Trait Implementations
sourceimpl<T> Lock for Local<T>
impl<T> Lock for Local<T>
sourcefn lock_exclusive(&self) -> <Self as Lifetime<'_>>::ExclusiveGuard
fn lock_exclusive(&self) -> <Self as Lifetime<'_>>::ExclusiveGuard
Acquire an exclusive lock. Read more
Acquire a shared lock. Read more
Auto Trait Implementations
impl<T> !RefUnwindSafe for Local<T>
impl<T> Send for Local<T> where
T: Send,
impl<T> !Sync for Local<T>
impl<T> Unpin for Local<T> where
T: Unpin,
impl<T> UnwindSafe for Local<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more