pub struct ReentrantMutexGuard<'a, T: 'a> { /* private fields */ }
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 implementation.

Mutability

Unlike MutexGuard, ReentrantMutexGuard does not implement DerefMut, because implementation of the trait would violate Rust’s reference aliasing rules. Use interior mutability (usually RefCell) in order to mutate the guarded data.

Trait Implementations

The resulting type after dereferencing.
Dereferences the value.
Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.