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
sourceimpl<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,
sourceimpl<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,
sourceimpl<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,
sourceimpl<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,
sourceimpl<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.
impl<Cell, Mutex, T> StableDeref for GenericMutexGuard<'_, Cell, Mutex>where
Cell: Deref<Target = UnsafeCell<MaybeUninit<T>>>,
Mutex: MutexHandle,
impl<Cell, Mutex, T: Sync> Sync for GenericMutexGuard<'_, Cell, Mutex>where
Cell: Deref<Target = UnsafeCell<MaybeUninit<T>>>,
Mutex: MutexHandle,
Auto Trait Implementations
impl<'a, Cell, Mutex> RefUnwindSafe for GenericMutexGuard<'a, Cell, Mutex>where
Cell: RefUnwindSafe,
Mutex: RefUnwindSafe,
impl<'a, Cell, Mutex> !Send for GenericMutexGuard<'a, Cell, Mutex>
impl<'a, Cell, Mutex> Unpin for GenericMutexGuard<'a, Cell, Mutex>
impl<'a, Cell, Mutex> UnwindSafe for GenericMutexGuard<'a, Cell, Mutex>where
Cell: RefUnwindSafe,
Mutex: RefUnwindSafe,
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