Struct lrs::sync::MutexGuard

A mutex-guard.

Syntax

struct MutexGuard<'a, T>
    where T: 'a,
{
    /* private fields */
}

Methods

ReceiverNameDescription
&selfas_lock_guard

Returns a reference to the underlying lock-guard.

&selfas_mutex

Returns a reference to the underlying mutex.

selfinto_lock_guard

Turns the mutex-guard into the underlying lock-guard.

selfunlock

Unlocks the mutex and returns a reference to it.

Trait implementations

NameDescription
Debug

Objects that can be formatted in a "debug" form.

Deref

Objects that implement the immutable dereference operator.

DerefMut

Objects that implement the mutable dereference operator.

Send

Objects whose ownership can be moved from one thread to another.

Sync

Objects that allow immutable access from threads other than their owning thread.

Remarks

This guard automatically unlocks the mutex when it goes out of scope.