pub struct MovableMutex(_);
Expand description

An SGX-based mutual exclusion lock.

This mutex cleans up its resources in its Drop implementation, may safely be moved (when not borrowed), and does not cause UB when used reentrantly.

This mutex does not implement poisoning.

This is either a wrapper around LazyBox<imp::Mutex> or imp::Mutex, depending on the platform. It is boxed on platforms where imp::Mutex may not be moved.

Implementations

Creates a new mutex.

Locks the mutex blocking the current thread until it is available.

Attempts to lock the mutex without blocking, returning whether it was successfully acquired or not.

Unlocks the mutex.

Behavior is undefined if the current thread does not actually hold the mutex.

Trait Implementations

Returns the “default value” for a 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

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.