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]

[src]

Executes the destructor for this type. Read more

impl<'a, T: MutexProtected + ?Sized + 'a> Deref for MutexGuard<'a, T>
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<'a, T: MutexProtected + ?Sized + 'a> DerefMut for MutexGuard<'a, T>
[src]

[src]

Mutably dereferences the value.

Auto Trait Implementations

impl<'a, T> !Send for MutexGuard<'a, T>