[][src]Struct may::sync::RwLock

pub struct RwLock<T: ?Sized> { /* fields omitted */ }

A reader-writer lock

The priority policy of the lock is that readers have weak priority

Methods

impl<T> RwLock<T>[src]

pub fn new(t: T) -> RwLock<T>[src]

impl<T: ?Sized> RwLock<T>[src]

pub fn read(&self) -> LockResult<RwLockReadGuard<T>>[src]

pub fn try_read(&self) -> TryLockResult<RwLockReadGuard<T>>[src]

pub fn write(&self) -> LockResult<RwLockWriteGuard<T>>[src]

pub fn try_write(&self) -> TryLockResult<RwLockWriteGuard<T>>[src]

pub fn is_poisoned(&self) -> bool[src]

pub fn into_inner(self) -> LockResult<T> where
    T: Sized
[src]

pub fn get_mut(&mut self) -> LockResult<&mut T>[src]

Trait Implementations

impl<T: Default> Default for RwLock<T>[src]

fn default() -> RwLock<T>[src]

Creates a new RwLock<T>, with the Default value for T.

impl<T: ?Sized + Send + Sync> Send for RwLock<T>[src]

impl<T: ?Sized + Send + Sync> Sync for RwLock<T>[src]

impl<T: ?Sized + Debug> Debug for RwLock<T>[src]

impl<T: ?Sized> UnwindSafe for RwLock<T>[src]

impl<T: ?Sized> RefUnwindSafe for RwLock<T>[src]

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.