Struct loom::sync::Mutex[][src]

pub struct Mutex<T> { /* fields omitted */ }
Expand description

Mock implementation of std::sync::Mutex.

Implementations

Creates a new mutex in an unlocked state ready for use.

Acquires a mutex, blocking the current thread until it is able to do so.

Attempts to acquire this lock.

If the lock could not be acquired at this time, then Err is returned. Otherwise, an RAII guard is returned. The lock will be unlocked when the guard is dropped.

This function does not block.

Consumes this mutex, returning the underlying data.

Trait Implementations

Formats the value using the given formatter. Read more

Creates a Mutex<T>, with the Default value for T.

Creates a new mutex in an unlocked state ready for use. This is equivalent to Mutex::new.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more