pub struct LocalRawMutex { /* private fields */ }
Expand description
A mutex that allows borrowing data in local context.
This acts similar to a RefCell, with scoped access patterns, though without being able to borrow the data twice.
Implementations§
Source§impl LocalRawMutex
impl LocalRawMutex
Trait Implementations§
Source§impl ScopedRawMutex for LocalRawMutex
impl ScopedRawMutex for LocalRawMutex
Source§fn try_with_lock<R>(&self, f: impl FnOnce() -> R) -> Option<R>
fn try_with_lock<R>(&self, f: impl FnOnce() -> R) -> Option<R>
Lock this
ScopedRawMutex
, calling f()
after the lock has been acquired, and releasing
the lock after the completion of f()
. Read moreimpl Send for LocalRawMutex
Auto Trait Implementations§
impl !Freeze for LocalRawMutex
impl RefUnwindSafe for LocalRawMutex
impl !Sync for LocalRawMutex
impl Unpin for LocalRawMutex
impl UnwindSafe for LocalRawMutex
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