Trait concurrency_traits::rw_lock::TryUpgradeReadGuard[][src]

pub trait TryUpgradeReadGuard<'a>: Sized + Deref<Target = Self::Item> {
    type Item: ?Sized;
    type WriteGuard: DerefMut<Target = Self::Item>;
    fn try_upgrade(self) -> Result<Self::WriteGuard, Self>;
}
Expand description

A read guard that can be try to be upgraded to a write guard

Associated Types

type Item: ?Sized[src]

Item guarded by this guard

type WriteGuard: DerefMut<Target = Self::Item>[src]

The write guard that this is upgraded to

Required methods

fn try_upgrade(self) -> Result<Self::WriteGuard, Self>[src]

Tries to upgrade this guard, returning Err if cannot immediately

Implementors

impl<'a, T, R> TryUpgradeReadGuard<'a> for CustomReadGuard<'a, T, R> where
    R: RawTryUpgradeRwLock
[src]

type Item = T

type WriteGuard = CustomWriteGuard<'a, T, R>

fn try_upgrade(self) -> Result<Self::WriteGuard, Self>[src]