Trait concurrency_traits::RwLock[][src]

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

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.

Loading content...

Implementations on Foreign Types

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

impl<'__a, 'a, T: ?Sized> RwLock<'__a> for &'a T where
    T: RwLock<'__a>, 
[src]

impl<'__a, 'a, T: ?Sized> RwLock<'__a> for &'a mut T where
    T: RwLock<'__a>, 
[src]

impl<'__a, T: ?Sized> RwLock<'__a> for ManuallyDrop<T> where
    T: RwLock<'__a>, 
[src]

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

impl<'__a, T: ?Sized> RwLock<'__a> for Rc<T> where
    T: RwLock<'__a>, 
[src]

impl<'__a, T: ?Sized> RwLock<'__a> for Arc<T> where
    T: RwLock<'__a>, 
[src]

impl<'__a, T: ?Sized> RwLock<'__a> for Box<T> where
    T: RwLock<'__a>, 
[src]

impl<'__a, 'a, T> RwLock<'__a> for Cow<'a, T> where
    T: RwLock<'__a> + Clone
[src]

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

Loading content...

Implementors

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

Loading content...