Struct namedlock::ownedmutexguard::OwnedMutexGuard
[−]
[src]
pub struct OwnedMutexGuard<'a, T: 'a, M: OwnedMutex<T>> { // some 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, and the owner of the Mutex will be dropped.
Alternatively, call into_inner
to drop the guard and reclaim the owner.
The data protected by the mutex can be accessed through this guard via its Deref and DerefMut implementations.
Methods
impl<'a, T: 'a, M: OwnedMutex<T>> OwnedMutexGuard<'a, T, M>
fn into_inner(self) -> M
Drops the guard and returns the associated OwnedMutex