[][src]Struct sgx_tstd::sync::SgxThreadRwLock

pub struct SgxThreadRwLock(_);

An OS-based reader-writer lock.

This structure is entirely unsafe and serves as the lowest layer of a cross-platform binding of system rwlocks. It is recommended to use the safer types at the top level of this crate instead of this type.

Methods

impl SgxThreadRwLock[src]

pub const fn new() -> Self[src]

Creates a new reader-writer lock for use.

pub unsafe fn read(&self) -> SysError[src]

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

pub unsafe fn try_read(&self) -> SysError[src]

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

This function does not block the current thread.

pub unsafe fn write(&self) -> SysError[src]

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

pub unsafe fn try_write(&self) -> SysError[src]

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

This function does not block the current thread.

pub unsafe fn read_unlock(&self) -> SysError[src]

Unlocks previously acquired shared access to this lock.

pub unsafe fn write_unlock(&self) -> SysError[src]

Unlocks previously acquired exclusive access to this lock.

pub unsafe fn destroy(&self) -> SysError[src]

Destroys OS-related resources with this RWLock.

Trait Implementations

impl Send for SgxThreadRwLock[src]

impl Sync for SgxThreadRwLock[src]

Auto Trait Implementations

impl !RefUnwindSafe for SgxThreadRwLock

impl Unpin for SgxThreadRwLock

impl UnwindSafe for SgxThreadRwLock

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.