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

Trait Implementations

impl<'a, T: 'a, M: OwnedMutex<T>> Deref for OwnedMutexGuard<'a, T, M>

type Target = T

fn deref<'b>(&'b self) -> &'b T

impl<'a, T: 'a, M: OwnedMutex<T>> DerefMut for OwnedMutexGuard<'a, T, M>

fn deref_mut<'b>(&'b mut self) -> &'b mut T

impl<'a, T: 'a, M: OwnedMutex<T>> Drop for OwnedMutexGuard<'a, T, M>

fn drop(&mut self)