pub struct StaticMutex(_);
Expand description

An SGX-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().

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

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.