pub struct AccessGuard<'a, T> { /* private fields */ }
Expand description
A resolved access to the guarded item.
Implementations§
Source§impl<'a, T> AccessGuard<'a, T>
impl<'a, T> AccessGuard<'a, T>
Sourcepub fn hold_indefinitely(self) -> &'a T
pub fn hold_indefinitely(self) -> &'a T
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.
Sourcepub fn reenqueue(self) -> Access<'a, T> ⓘ
pub fn reenqueue(self) -> Access<'a, T> ⓘ
Release the current access and re-enqueue to wait for another access.
Sourcepub fn hold_and_reenqueue(self) -> (&'a T, Access<'a, T>)
pub fn hold_and_reenqueue(self) -> (&'a T, Access<'a, T>)
Hold this access indefinitely while also re-enqueuing
Trait Implementations§
Source§impl<'a, T: Debug> Debug for AccessGuard<'a, T>
impl<'a, T: Debug> Debug for AccessGuard<'a, T>
Source§impl<'a, T> Deref for AccessGuard<'a, T>
impl<'a, T> Deref for AccessGuard<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for AccessGuard<'a, T>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more