Struct std::sys_common::remutex::ReentrantMutexGuard[][src]

pub struct ReentrantMutexGuard<'a, T: 'a> {
    lock: Pin<&'a ReentrantMutex<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 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.

Fields

lock: Pin<&'a ReentrantMutex<T>>

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

Performs the conversion.

Performs the conversion.

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.