Type Alias parking_lot::mutex::MutexGuard

source ·
pub type MutexGuard<'a, T> = MutexGuard<'a, RawMutex, T>;
Expand description

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.

Aliased Type§

struct MutexGuard<'a, T> {
    mutex: &'a Mutex<RawMutex, T>,
    marker: PhantomData<(&'a mut T, GuardNoSend)>,
}

Fields§

§mutex: &'a Mutex<RawMutex, T>§marker: PhantomData<(&'a mut T, GuardNoSend)>

Trait Implementations§

source§

impl<'a, R, T> Deref for MutexGuard<'a, R, T>where R: RawMutex + 'a, T: 'a + ?Sized,

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &T

Dereferences the value.