pub struct MutexGuard<'a, T: ?Sized + 'a> { /* private fields */ }Expand description
Exclusive access to a mutex’s value, which unlocks the mutex on drop.
Like std’s guard, it cannot be sent to another thread. Sharing it between
threads needs the value to be Send as well as Sync, one bound more than
std’s guard needs.
Trait Implementations§
Source§impl<T: ?Sized> Deref for MutexGuard<'_, T>
impl<T: ?Sized> Deref for MutexGuard<'_, T>
Source§impl<T: ?Sized> DerefMut for MutexGuard<'_, T>
impl<T: ?Sized> DerefMut for MutexGuard<'_, T>
Auto Trait Implementations§
impl<'a, T> !Send for MutexGuard<'a, T>
impl<'a, T> Freeze for MutexGuard<'a, T>
impl<'a, T> RefUnwindSafe for MutexGuard<'a, T>
impl<'a, T> Sync for MutexGuard<'a, T>
impl<'a, T> Unpin for MutexGuard<'a, T>
impl<'a, T> UnsafeUnpin for MutexGuard<'a, T>
impl<'a, T> UnwindSafe for MutexGuard<'a, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more