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

Loading content...

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

Loading content...

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 mut T where
    T: AsyncTimeoutRwLock<'__a>, 
[src]

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

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

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

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

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

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

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

Loading content...

Implementors

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

type ReadTimeoutFuture = Pin<Box<dyn Future<Output = Option<Self::AsyncReadGuard>> + 'a>>

type WriteTimeoutFuture = Pin<Box<dyn Future<Output = Option<Self::AsyncWriteGuard>> + 'a>>

Loading content...