Trait concurrency_traits::TimeoutRwLock [−][src]
pub trait TimeoutRwLock<'a>: RwLock<'a> { fn read_timeout(&'a self, timeout: Duration) -> Option<Self::ReadGuard>; fn write_timeout(&'a self, timeout: Duration) -> Option<Self::WriteGuard>; }
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]
Reads from the lock with a timeout
fn write_timeout(&'a self, timeout: Duration) -> Option<Self::WriteGuard>
[src]
Writes to the lock with a timeout
Implementations on Foreign Types
impl<'__a, 'a, T: ?Sized> TimeoutRwLock<'__a> for &'a T where
T: TimeoutRwLock<'__a>,
[src]
impl<'__a, 'a, T: ?Sized> TimeoutRwLock<'__a> for &'a T where
T: TimeoutRwLock<'__a>,
[src]fn read_timeout(&'__a self, timeout: Duration) -> Option<Self::ReadGuard>
[src]
fn write_timeout(&'__a self, timeout: Duration) -> Option<Self::WriteGuard>
[src]
impl<'__a, 'a, T: ?Sized> TimeoutRwLock<'__a> for &'a mut T where
T: TimeoutRwLock<'__a>,
[src]
impl<'__a, 'a, T: ?Sized> TimeoutRwLock<'__a> for &'a mut T where
T: TimeoutRwLock<'__a>,
[src]fn read_timeout(&'__a self, timeout: Duration) -> Option<Self::ReadGuard>
[src]
fn write_timeout(&'__a self, timeout: Duration) -> Option<Self::WriteGuard>
[src]
impl<'__a, T: ?Sized> TimeoutRwLock<'__a> for ManuallyDrop<T> where
T: TimeoutRwLock<'__a>,
[src]
impl<'__a, T: ?Sized> TimeoutRwLock<'__a> for ManuallyDrop<T> where
T: TimeoutRwLock<'__a>,
[src]fn read_timeout(&'__a self, timeout: Duration) -> Option<Self::ReadGuard>
[src]
fn write_timeout(&'__a self, timeout: Duration) -> Option<Self::WriteGuard>
[src]
impl<'__a, T> TimeoutRwLock<'__a> for AssertUnwindSafe<T> where
T: TimeoutRwLock<'__a>,
[src]
impl<'__a, T> TimeoutRwLock<'__a> for AssertUnwindSafe<T> where
T: TimeoutRwLock<'__a>,
[src]fn read_timeout(&'__a self, timeout: Duration) -> Option<Self::ReadGuard>
[src]
fn write_timeout(&'__a self, timeout: Duration) -> Option<Self::WriteGuard>
[src]
impl<'__a, T: ?Sized> TimeoutRwLock<'__a> for Rc<T> where
T: TimeoutRwLock<'__a>,
[src]
impl<'__a, T: ?Sized> TimeoutRwLock<'__a> for Rc<T> where
T: TimeoutRwLock<'__a>,
[src]fn read_timeout(&'__a self, timeout: Duration) -> Option<Self::ReadGuard>
[src]
fn write_timeout(&'__a self, timeout: Duration) -> Option<Self::WriteGuard>
[src]
impl<'__a, T: ?Sized> TimeoutRwLock<'__a> for Arc<T> where
T: TimeoutRwLock<'__a>,
[src]
impl<'__a, T: ?Sized> TimeoutRwLock<'__a> for Arc<T> where
T: TimeoutRwLock<'__a>,
[src]fn read_timeout(&'__a self, timeout: Duration) -> Option<Self::ReadGuard>
[src]
fn write_timeout(&'__a self, timeout: Duration) -> Option<Self::WriteGuard>
[src]
impl<'__a, T: ?Sized> TimeoutRwLock<'__a> for Box<T> where
T: TimeoutRwLock<'__a>,
[src]
impl<'__a, T: ?Sized> TimeoutRwLock<'__a> for Box<T> where
T: TimeoutRwLock<'__a>,
[src]fn read_timeout(&'__a self, timeout: Duration) -> Option<Self::ReadGuard>
[src]
fn write_timeout(&'__a self, timeout: Duration) -> Option<Self::WriteGuard>
[src]
impl<'__a, 'a, T> TimeoutRwLock<'__a> for Cow<'a, T> where
T: TimeoutRwLock<'__a> + Clone,
[src]
impl<'__a, 'a, T> TimeoutRwLock<'__a> for Cow<'a, T> where
T: TimeoutRwLock<'__a> + Clone,
[src]fn read_timeout(&'__a self, timeout: Duration) -> Option<Self::ReadGuard>
[src]
fn write_timeout(&'__a self, timeout: Duration) -> Option<Self::WriteGuard>
[src]
impl<'a, T> TimeoutRwLock<'a> for Pin<T> where
T: Deref,
T::Target: TimeoutRwLock<'a>,
[src]
impl<'a, T> TimeoutRwLock<'a> for Pin<T> where
T: Deref,
T::Target: TimeoutRwLock<'a>,
[src]fn read_timeout(&'a self, timeout: Duration) -> Option<Self::ReadGuard>
[src]
fn write_timeout(&'a self, timeout: Duration) -> Option<Self::WriteGuard>
[src]
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]