Struct ordered_locks::MutexGuard
source · [−]Expand description
An RAII implementation of a “scoped lock” of a mutex. When this structure is dropped (falls out of scope), the lock will be unlocked.
The data protected by the mutex can be accessed through this guard via its
Deref and DerefMut implementations.
Implementations
sourceimpl<'a, L: Level, T: ?Sized + 'a> MutexGuard<'a, L, T>
impl<'a, L: Level, T: ?Sized + 'a> MutexGuard<'a, L, T>
sourcepub fn token_split(&mut self) -> (&mut T, LockToken<'_, L>)
pub fn token_split(&mut self) -> (&mut T, LockToken<'_, L>)
Split the guard into two parts, the first a mutable reference to the held content
the second a LockToken that can be used for further locking
Trait Implementations
sourceimpl<'a, L: Level, T: ?Sized + 'a> Deref for MutexGuard<'a, L, T>
impl<'a, L: Level, T: ?Sized + 'a> Deref for MutexGuard<'a, L, T>
Auto Trait Implementations
impl<'a, L, T: ?Sized> RefUnwindSafe for MutexGuard<'a, L, T>where
L: RefUnwindSafe,
impl<'a, L, T> !Send for MutexGuard<'a, L, T>
impl<'a, L, T: ?Sized> Sync for MutexGuard<'a, L, T>where
L: Sync,
T: Sync,
impl<'a, L, T: ?Sized> Unpin for MutexGuard<'a, L, T>
impl<'a, L, T> !UnwindSafe for MutexGuard<'a, L, T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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