[][src]Struct access_queue::AccessGuard

pub struct AccessGuard<'a, T> { /* fields omitted */ }

A resolved access to the guarded item.

Implementations

impl<'a, T> AccessGuard<'a, T>[src]

pub fn hold_indefinitely(self) -> &'a T[src]

Hold this guard indefinitely, without ever releasing it.

Normaly, when an AccessGuard drops, it releases one access in the AccessQueue so that another Access can resolve. If this method is called, instead it is downgraded into a normal reference and the access is never released.

pub fn reenqueue(self) -> Access<'a, T>[src]

Release the current access and re-enqueue to wait for another access.

pub fn hold_and_reenqueue(self) -> (&'a T, Access<'a, T>)[src]

Hold this access indefinitely while also re-enqueuing

Trait Implementations

impl<'a, T: Debug> Debug for AccessGuard<'a, T>[src]

impl<'a, T> Deref for AccessGuard<'a, T>[src]

type Target = T

The resulting type after dereferencing.

impl<'a, T> Drop for AccessGuard<'a, T>[src]

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for AccessGuard<'a, T> where
    T: RefUnwindSafe

impl<'a, T> Send for AccessGuard<'a, T> where
    T: Sync

impl<'a, T> Sync for AccessGuard<'a, T> where
    T: Sync

impl<'a, T> Unpin for AccessGuard<'a, T>

impl<'a, T> UnwindSafe for AccessGuard<'a, T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.