pub struct MovableRwLock(_);
Expand description

An SGX-based reader-writer lock.

This rwlock cleans up its resources in its Drop implementation and may safely be moved (when not borrowed).

This rwlock does not implement poisoning.

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

Implementations

Creates a new reader-writer lock for use.

Acquires shared access to the underlying lock, blocking the current thread to do so.

Attempts to acquire shared access to this lock, returning whether it succeeded or not.

This function does not block the current thread.

Acquires write access to the underlying lock, blocking the current thread to do so.

Behavior is undefined if the rwlock has been moved between this and any previous method call.

Attempts to acquire exclusive access to this lock, returning whether it succeeded or not.

This function does not block the current thread.

Behavior is undefined if the rwlock has been moved between this and any previous method call.

Unlocks previously acquired shared access to this lock.

Behavior is undefined if the current thread does not have shared access.

Unlocks previously acquired exclusive access to this lock.

Behavior is undefined if the current thread does not currently have exclusive access.

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.