Struct r3::sync::recursive_mutex::GenericMutexGuard
source · pub struct GenericMutexGuard<'a, Cell, Mutex, T>where
Cell: Deref<Target = MaybeUninit<MutexInner<T>>>,
Mutex: MutexHandle,{ /* private fields */ }
Available on crate feature
sync
only.Expand description
An RAII implementation of a “scoped lock” of a mutex. When this structure is dropped, the lock will be released.
This structure is created by the lock
and try_lock
methods of
GenericRecursiveMutex
.
Trait Implementations§
source§impl<Cell, Mutex, T: Debug> Debug for GenericMutexGuard<'_, Cell, Mutex, T>where
Cell: Deref<Target = MaybeUninit<MutexInner<T>>>,
Mutex: MutexHandle,
impl<Cell, Mutex, T: Debug> Debug for GenericMutexGuard<'_, Cell, Mutex, T>where Cell: Deref<Target = MaybeUninit<MutexInner<T>>>, Mutex: MutexHandle,
source§impl<Cell, Mutex, T> Deref for GenericMutexGuard<'_, Cell, Mutex, T>where
Cell: Deref<Target = MaybeUninit<MutexInner<T>>>,
Mutex: MutexHandle,
impl<Cell, Mutex, T> Deref for GenericMutexGuard<'_, Cell, Mutex, T>where Cell: Deref<Target = MaybeUninit<MutexInner<T>>>, Mutex: MutexHandle,
source§impl<Cell, Mutex, T: Display> Display for GenericMutexGuard<'_, Cell, Mutex, T>where
Cell: Deref<Target = MaybeUninit<MutexInner<T>>>,
Mutex: MutexHandle,
impl<Cell, Mutex, T: Display> Display for GenericMutexGuard<'_, Cell, Mutex, T>where Cell: Deref<Target = MaybeUninit<MutexInner<T>>>, Mutex: MutexHandle,
source§impl<Cell, Mutex, T> Drop for GenericMutexGuard<'_, Cell, Mutex, T>where
Cell: Deref<Target = MaybeUninit<MutexInner<T>>>,
Mutex: MutexHandle,
impl<Cell, Mutex, T> Drop for GenericMutexGuard<'_, Cell, Mutex, T>where Cell: Deref<Target = MaybeUninit<MutexInner<T>>>, Mutex: MutexHandle,
The destructor of GenericMutexGuard
that releases the lock. It will panic if
CPU Lock is active.