Trait concurrency_traits::rw_lock::AsyncTimoutUpgradeReadGuard[][src]

pub trait AsyncTimoutUpgradeReadGuard<'a>: Sized + TryUpgradeReadGuard<'a> {
    #[must_use]
    fn upgrade_timeout_async<'async_trait>(
        self,
        timeout: Duration
    ) -> Pin<Box<dyn Future<Output = Result<Self::WriteGuard, Self>> + Send + 'async_trait>>
    where
        Self: 'async_trait
; }
Expand description

A read guard that can be upgraded to a write guard asynchronously with a timeout.

Required methods

#[must_use]
fn upgrade_timeout_async<'async_trait>(
    self,
    timeout: Duration
) -> Pin<Box<dyn Future<Output = Result<Self::WriteGuard, Self>> + Send + 'async_trait>> where
    Self: 'async_trait, 
[src]

Upgrades this guard asynchronously, returning a future that will contain the upgraded guard or times out.

Implementors

impl<'a, T, R> AsyncTimoutUpgradeReadGuard<'a> for CustomReadGuard<'a, T, R> where
    T: 'a + Send + Sync,
    R: RawAsyncTimeoutUpgradeRwLock + 'a + Send + Sync
[src]

fn upgrade_timeout_async<'async_trait>(
    self,
    timeout: Duration
) -> Pin<Box<dyn Future<Output = Result<Self::WriteGuard, Self>> + Send + 'async_trait>> where
    Self: 'async_trait, 
[src]