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§
source§impl<'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