Struct o::sync::MutexGuard1.0.0 [] [src]

#[must_use]
pub struct MutexGuard<'a, T> where
    T: 'a + ?Sized
{ /* 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 the lock and try_lock methods on Mutex.

Trait Implementations

impl<'a, T> Sync for MutexGuard<'a, T> where
    T: Sync + ?Sized
1.19.0
[src]

impl<'a, T> Debug for MutexGuard<'a, T> where
    T: Debug + ?Sized
1.16.0
[src]

[src]

Formats the value using the given formatter. Read more

impl<'mutex, T> DerefMut for MutexGuard<'mutex, T> where
    T: ?Sized
[src]

Important traits for &'a mut W
[src]

Mutably dereferences the value.

impl<'mutex, T> Deref for MutexGuard<'mutex, T> where
    T: ?Sized
[src]

The resulting type after dereferencing.

Important traits for &'a mut W
[src]

Dereferences the value.

impl<'a, T> Display for MutexGuard<'a, T> where
    T: Display + ?Sized
1.20.0
[src]

[src]

Formats the value using the given formatter. Read more

impl<'a, T> Drop for MutexGuard<'a, T> where
    T: ?Sized
[src]

[src]

Executes the destructor for this type. Read more

impl<'a, T> !Send for MutexGuard<'a, T> where
    T: ?Sized
[src]