Trait concurrency_traits::UpgradeReadGuard[][src]

pub trait UpgradeReadGuard<'a>: Sized {
    type Item: ?Sized;
    type WriteGuard: DerefMut<Target = Self::Item>;
    fn upgrade(self) -> Self::WriteGuard;
fn try_upgrade(self) -> Result<Self::WriteGuard, Self>; }

A read guard that can 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

Loading content...

Required methods

fn upgrade(self) -> Self::WriteGuard[src]

Upgrades this read guard into a write guard, blocking until done

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

Tries to upgrade this guard, returning Err if cannot immediately

Loading content...

Implementors

Loading content...