Struct flexible_locks::MutexGuard
[−]
[src]
#[must_use]pub struct MutexGuard<'a, T: MutexProtected + ?Sized + 'a> { /* fields omitted */ }
An RAII implementation of a "scoped lock" of a mutex. When this structure is dropped (falls out of scope), the lock will be unlocked.
The data protected by the mutex can be accessed through this guard via its
[Deref
] and [DerefMut
] implementations.
This structure is created by [Mutex::lock
] and [MutexWrap::lock
].
Trait Implementations
impl<'a, T: MutexProtected + ?Sized + Sync> Sync for MutexGuard<'a, T>
[src]
impl<'a, T: MutexProtected + ?Sized + 'a> Drop for MutexGuard<'a, T>
[src]
impl<'a, T: MutexProtected + ?Sized + 'a> Deref for MutexGuard<'a, T>
[src]
type Target = T::DataType
The resulting type after dereferencing.
fn deref(&self) -> &T::DataType
[src]
Dereferences the value.