Struct r3::sync::mutex::GenericMutexGuard
source · pub struct GenericMutexGuard<'a, Cell, 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
GenericMutex
.
Trait Implementations§
source§impl<Cell, Mutex, T: Debug> Debug for GenericMutexGuard<'_, Cell, Mutex>where
Cell: Deref<Target = UnsafeCell<MaybeUninit<T>>>,
Mutex: MutexHandle,
impl<Cell, Mutex, T: Debug> Debug for GenericMutexGuard<'_, Cell, Mutex>where Cell: Deref<Target = UnsafeCell<MaybeUninit<T>>>, Mutex: MutexHandle,
source§impl<Cell, Mutex, T> Deref for GenericMutexGuard<'_, Cell, Mutex>where
Cell: Deref<Target = UnsafeCell<MaybeUninit<T>>>,
Mutex: MutexHandle,
impl<Cell, Mutex, T> Deref for GenericMutexGuard<'_, Cell, Mutex>where Cell: Deref<Target = UnsafeCell<MaybeUninit<T>>>, Mutex: MutexHandle,
source§impl<Cell, Mutex, T> DerefMut for GenericMutexGuard<'_, Cell, Mutex>where
Cell: Deref<Target = UnsafeCell<MaybeUninit<T>>>,
Mutex: MutexHandle,
impl<Cell, Mutex, T> DerefMut for GenericMutexGuard<'_, Cell, Mutex>where Cell: Deref<Target = UnsafeCell<MaybeUninit<T>>>, Mutex: MutexHandle,
source§impl<Cell, Mutex, T: Display> Display for GenericMutexGuard<'_, Cell, Mutex>where
Cell: Deref<Target = UnsafeCell<MaybeUninit<T>>>,
Mutex: MutexHandle,
impl<Cell, Mutex, T: Display> Display for GenericMutexGuard<'_, Cell, Mutex>where Cell: Deref<Target = UnsafeCell<MaybeUninit<T>>>, Mutex: MutexHandle,
source§impl<Cell, Mutex> Drop for GenericMutexGuard<'_, Cell, Mutex>where
Mutex: MutexHandle,
impl<Cell, Mutex> Drop for GenericMutexGuard<'_, Cell, Mutex>where Mutex: MutexHandle,
The destructor of GenericMutexGuard
that releases the lock. It will panic if
CPU Lock is active.