Trait concurrency_traits::AsyncTimeoutRwLock [−][src]
pub trait AsyncTimeoutRwLock<'a>: AsyncRwLock<'a> { type ReadTimeoutFuture: Future<Output = Option<Self::AsyncReadGuard>>; type WriteTimeoutFuture: Future<Output = Option<Self::AsyncWriteGuard>>; fn read_timeout_async(
&'a self,
timeout: Duration
) -> Self::ReadTimeoutFuture; fn write_timeout_async(
&'a self,
timeout: Duration
) -> Self::WriteTimeoutFuture; }
An async RwLock that can be timed out on
Implementation
It is recommended to implement AsyncTimeoutRwLockSized
if the
implement-ee can be sized.
Associated Types
type ReadTimeoutFuture: Future<Output = Option<Self::AsyncReadGuard>>
[src]
The future returned by AsyncTimeoutRwLock::read_timeout_async
type WriteTimeoutFuture: Future<Output = Option<Self::AsyncWriteGuard>>
[src]
The future returned by AsyncTimeoutRwLock::write_timeout_async
Required methods
fn read_timeout_async(&'a self, timeout: Duration) -> Self::ReadTimeoutFuture
[src]
Reads from the lock with a timeout asynchronously
fn write_timeout_async(&'a self, timeout: Duration) -> Self::WriteTimeoutFuture
[src]
Writes to the lock with a timeout asynchronously
Implementations on Foreign Types
impl<'__a, 'a, T: ?Sized> AsyncTimeoutRwLock<'__a> for &'a T where
T: AsyncTimeoutRwLock<'__a>,
[src]
impl<'__a, 'a, T: ?Sized> AsyncTimeoutRwLock<'__a> for &'a T where
T: AsyncTimeoutRwLock<'__a>,
[src]type ReadTimeoutFuture = T::ReadTimeoutFuture
type WriteTimeoutFuture = T::WriteTimeoutFuture
fn read_timeout_async(&'__a self, timeout: Duration) -> Self::ReadTimeoutFuture
[src]
fn write_timeout_async(
&'__a self,
timeout: Duration
) -> Self::WriteTimeoutFuture
[src]
&'__a self,
timeout: Duration
) -> Self::WriteTimeoutFuture
impl<'__a, 'a, T: ?Sized> AsyncTimeoutRwLock<'__a> for &'a mut T where
T: AsyncTimeoutRwLock<'__a>,
[src]
impl<'__a, 'a, T: ?Sized> AsyncTimeoutRwLock<'__a> for &'a mut T where
T: AsyncTimeoutRwLock<'__a>,
[src]type ReadTimeoutFuture = T::ReadTimeoutFuture
type WriteTimeoutFuture = T::WriteTimeoutFuture
fn read_timeout_async(&'__a self, timeout: Duration) -> Self::ReadTimeoutFuture
[src]
fn write_timeout_async(
&'__a self,
timeout: Duration
) -> Self::WriteTimeoutFuture
[src]
&'__a self,
timeout: Duration
) -> Self::WriteTimeoutFuture
impl<'__a, T: ?Sized> AsyncTimeoutRwLock<'__a> for ManuallyDrop<T> where
T: AsyncTimeoutRwLock<'__a>,
[src]
impl<'__a, T: ?Sized> AsyncTimeoutRwLock<'__a> for ManuallyDrop<T> where
T: AsyncTimeoutRwLock<'__a>,
[src]type ReadTimeoutFuture = T::ReadTimeoutFuture
type WriteTimeoutFuture = T::WriteTimeoutFuture
fn read_timeout_async(&'__a self, timeout: Duration) -> Self::ReadTimeoutFuture
[src]
fn write_timeout_async(
&'__a self,
timeout: Duration
) -> Self::WriteTimeoutFuture
[src]
&'__a self,
timeout: Duration
) -> Self::WriteTimeoutFuture
impl<'__a, T> AsyncTimeoutRwLock<'__a> for AssertUnwindSafe<T> where
T: AsyncTimeoutRwLock<'__a>,
[src]
impl<'__a, T> AsyncTimeoutRwLock<'__a> for AssertUnwindSafe<T> where
T: AsyncTimeoutRwLock<'__a>,
[src]type ReadTimeoutFuture = T::ReadTimeoutFuture
type WriteTimeoutFuture = T::WriteTimeoutFuture
fn read_timeout_async(&'__a self, timeout: Duration) -> Self::ReadTimeoutFuture
[src]
fn write_timeout_async(
&'__a self,
timeout: Duration
) -> Self::WriteTimeoutFuture
[src]
&'__a self,
timeout: Duration
) -> Self::WriteTimeoutFuture
impl<'__a, T: ?Sized> AsyncTimeoutRwLock<'__a> for Rc<T> where
T: AsyncTimeoutRwLock<'__a>,
[src]
impl<'__a, T: ?Sized> AsyncTimeoutRwLock<'__a> for Rc<T> where
T: AsyncTimeoutRwLock<'__a>,
[src]type ReadTimeoutFuture = T::ReadTimeoutFuture
type WriteTimeoutFuture = T::WriteTimeoutFuture
fn read_timeout_async(&'__a self, timeout: Duration) -> Self::ReadTimeoutFuture
[src]
fn write_timeout_async(
&'__a self,
timeout: Duration
) -> Self::WriteTimeoutFuture
[src]
&'__a self,
timeout: Duration
) -> Self::WriteTimeoutFuture
impl<'__a, T: ?Sized> AsyncTimeoutRwLock<'__a> for Arc<T> where
T: AsyncTimeoutRwLock<'__a>,
[src]
impl<'__a, T: ?Sized> AsyncTimeoutRwLock<'__a> for Arc<T> where
T: AsyncTimeoutRwLock<'__a>,
[src]type ReadTimeoutFuture = T::ReadTimeoutFuture
type WriteTimeoutFuture = T::WriteTimeoutFuture
fn read_timeout_async(&'__a self, timeout: Duration) -> Self::ReadTimeoutFuture
[src]
fn write_timeout_async(
&'__a self,
timeout: Duration
) -> Self::WriteTimeoutFuture
[src]
&'__a self,
timeout: Duration
) -> Self::WriteTimeoutFuture
impl<'__a, T: ?Sized> AsyncTimeoutRwLock<'__a> for Box<T> where
T: AsyncTimeoutRwLock<'__a>,
[src]
impl<'__a, T: ?Sized> AsyncTimeoutRwLock<'__a> for Box<T> where
T: AsyncTimeoutRwLock<'__a>,
[src]type ReadTimeoutFuture = T::ReadTimeoutFuture
type WriteTimeoutFuture = T::WriteTimeoutFuture
fn read_timeout_async(&'__a self, timeout: Duration) -> Self::ReadTimeoutFuture
[src]
fn write_timeout_async(
&'__a self,
timeout: Duration
) -> Self::WriteTimeoutFuture
[src]
&'__a self,
timeout: Duration
) -> Self::WriteTimeoutFuture
impl<'__a, 'a, T> AsyncTimeoutRwLock<'__a> for Cow<'a, T> where
T: AsyncTimeoutRwLock<'__a> + Clone,
[src]
impl<'__a, 'a, T> AsyncTimeoutRwLock<'__a> for Cow<'a, T> where
T: AsyncTimeoutRwLock<'__a> + Clone,
[src]type ReadTimeoutFuture = T::ReadTimeoutFuture
type WriteTimeoutFuture = T::WriteTimeoutFuture
fn read_timeout_async(&'__a self, timeout: Duration) -> Self::ReadTimeoutFuture
[src]
fn write_timeout_async(
&'__a self,
timeout: Duration
) -> Self::WriteTimeoutFuture
[src]
&'__a self,
timeout: Duration
) -> Self::WriteTimeoutFuture
impl<'a, T> AsyncTimeoutRwLock<'a> for Pin<T> where
T: Deref,
T::Target: AsyncTimeoutRwLock<'a>,
[src]
impl<'a, T> AsyncTimeoutRwLock<'a> for Pin<T> where
T: Deref,
T::Target: AsyncTimeoutRwLock<'a>,
[src]type ReadTimeoutFuture = <T::Target as AsyncTimeoutRwLock<'a>>::ReadTimeoutFuture
type WriteTimeoutFuture = <T::Target as AsyncTimeoutRwLock<'a>>::WriteTimeoutFuture
fn read_timeout_async(&'a self, timeout: Duration) -> Self::ReadTimeoutFuture
[src]
fn write_timeout_async(&'a self, timeout: Duration) -> Self::WriteTimeoutFuture
[src]
Implementors
impl<'a, T, R> AsyncTimeoutRwLock<'a> for CustomRwLock<T, R> where
T: 'a,
R: RawAsyncTimeoutRwLock + 'a,
[src]
impl<'a, T, R> AsyncTimeoutRwLock<'a> for CustomRwLock<T, R> where
T: 'a,
R: RawAsyncTimeoutRwLock + 'a,
[src]