pub struct MutexGuard<'a, T> { /* private fields */ }Expand description
A guard that provides exclusive access to the data protected by a Mutex.
Implementations§
Source§impl<'a, T> MutexGuard<'a, T>
impl<'a, T> MutexGuard<'a, T>
Source§impl<T> MutexGuard<'_, T>
impl<T> MutexGuard<'_, T>
Source§impl<'a, T> MutexGuard<'a, T>
impl<'a, T> MutexGuard<'a, T>
Sourcepub exec fn get_lock(guard: &MutexGuard<'a, T>) -> ret : &'a Mutex<T>
pub exec fn get_lock(guard: &MutexGuard<'a, T>) -> ret : &'a Mutex<T>
ensures
guard.rel_mutex(*ret),Returns the Mutex associated with this guard.
Trait Implementations§
Source§impl<T> Deref for MutexGuard<'_, T>
impl<T> Deref for MutexGuard<'_, T>
Source§impl<T> DerefMut for MutexGuard<'_, T>
impl<T> DerefMut for MutexGuard<'_, T>
impl<T> !Send for MutexGuard<'_, T>
impl<T: Sync> Sync for MutexGuard<'_, T>
Auto Trait Implementations§
impl<'a, T> Freeze for MutexGuard<'a, T>
impl<'a, T> !RefUnwindSafe for MutexGuard<'a, T>
impl<'a, T> Unpin for MutexGuard<'a, T>where
T: Unpin,
impl<'a, T> UnsafeUnpin for MutexGuard<'a, T>
impl<'a, T> !UnwindSafe for MutexGuard<'a, T>
Blanket Implementations§
§impl<T> DerefSpec for Twhere
T: Deref,
impl<T> DerefSpec for Twhere
T: Deref,
§fn deref_spec(&self) -> &<T as Deref>::Target
fn deref_spec(&self) -> &<T as Deref>::Target
👎Deprecated: If you can, do not use this module as it adds assumptions about the core of Rust’s deref semantics.
§fn deref_spec_eq(&self)
fn deref_spec_eq(&self)
👎Deprecated: If you can, do not use this module as it adds assumptions about the core of Rust’s deref semantics.
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