Trait concurrency_traits::rw_lock::TimeoutRwLock [−][src]
pub trait TimeoutRwLock<'a>: TryRwLock<'a> { fn read_timeout(&'a self, timeout: Duration) -> Option<Self::ReadGuard>; fn write_timeout(&'a self, timeout: Duration) -> Option<Self::WriteGuard>; }
Expand description
An RwLock that can be timed out on
Implementation
It is recommended to implement TimeoutRwLockSized
if the implement-ee
can be sized.
Required methods
fn read_timeout(&'a self, timeout: Duration) -> Option<Self::ReadGuard>
[src]
fn read_timeout(&'a self, timeout: Duration) -> Option<Self::ReadGuard>
[src]Reads from the lock with a timeout
fn write_timeout(&'a self, timeout: Duration) -> Option<Self::WriteGuard>
[src]
fn write_timeout(&'a self, timeout: Duration) -> Option<Self::WriteGuard>
[src]Writes to the lock with a timeout
Implementors
impl<'a, T, R> TimeoutRwLock<'a> for CustomRwLock<T, R> where
T: 'a,
R: RawTimeoutRwLock + 'a,
[src]
impl<'a, T, R> TimeoutRwLock<'a> for CustomRwLock<T, R> where
T: 'a,
R: RawTimeoutRwLock + 'a,
[src]