Trait concurrency_traits::rw_lock::RwLock[][src]

pub trait RwLock<'a>: TryRwLock<'a> {
    fn read(&'a self) -> Self::ReadGuard;
fn write(&'a self) -> Self::WriteGuard; }
Expand description

A generic blocking reader-writer lock trait

Implementation

It is recommended to implement RwLockSized if the implement-ee can be sized.

Required methods

fn read(&'a self) -> Self::ReadGuard[src]

Reads from the lock, blocking until able.

fn write(&'a self) -> Self::WriteGuard[src]

Writes to the lock, blocking until able.

Implementations on Foreign Types

impl<'a, T> RwLock<'a> for RwLock<T> where
    T: 'a, 
[src]

fn read(&'a self) -> Self::ReadGuard[src]

fn write(&'a self) -> Self::WriteGuard[src]

Implementors

impl<'a, T, R> RwLock<'a> for CustomRwLock<T, R> where
    T: 'a,
    R: RawRwLock + 'a, 
[src]

fn read(&'a self) -> Self::ReadGuard[src]

fn write(&'a self) -> Self::WriteGuard[src]