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.
Implementations on Foreign Types
impl<'__a, T: ?Sized> RwLock<'__a> for ManuallyDrop<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> RwLock<'__a> for AssertUnwindSafe<T> where
T: RwLock<'__a>,
[src]Implementors
impl<'a, T, R> RwLock<'a> for CustomRwLock<T, R> where
T: 'a,
R: RawRwLock + 'a,
[src]
impl<'a, T, R> RwLock<'a> for CustomRwLock<T, R> where
T: 'a,
R: RawRwLock + 'a,
[src]