Struct std::sync::MutexGuard
1.0.0·
source ·
[−]pub struct MutexGuard<'a, T: ?Sized + 'a> { /* fields omitted */ }
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.
This structure is created by the lock
and try_lock
methods on
Mutex
.