Struct std::sync::MutexGuardExperimental [-]  [+] [src]

pub struct MutexGuard<'a, T: 'a> {
    // 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.

The data protected by the mutex can be access through this guard via its Deref and DerefMut implementations

Trait Implementations

impl<'mutex, T> AsMutexGuard for MutexGuard<'mutex, T>

unsafe fn as_mutex_guard(&self) -> &StaticMutexGuard

impl<'mutex, T> Deref<T> for MutexGuard<'mutex, T>

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

impl<'mutex, T> DerefMut<T> for MutexGuard<'mutex, T>

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