Struct std::sys_common::mutex::StaticMutex[][src]

pub struct StaticMutex(Mutex);
Expand description

An OS-based mutual exclusion lock, meant for use in static variables.

This mutex has a const constructor (StaticMutex::new), does not implement Drop to cleanup resources, and causes UB when used reentrantly.

This mutex does not implement poisoning.

This is a wrapper around imp::Mutex that does not call init() and destroy().

Tuple Fields

0: Mutex

Implementations

Creates a new mutex for use.

Calls raw_lock() and then returns an RAII guard to guarantee the mutex will be unlocked.

It is undefined behaviour to call this function while locked by the same thread.

Trait Implementations

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.