pub struct Guard<'a, T> { /* private fields */ }Expand description
A protected reference to a hazard-pointer-guarded value.
While a Guard exists, the underlying pointer is published in a hazard slot,
preventing any concurrent Domain::collect from reclaiming it.
Implements Deref for ergonomic access to the protected value.
Dropping the guard (or calling clear) releases the hazard slot.
Implementations§
Trait Implementations§
impl<T: Send + Sync> Send for Guard<'_, T>
impl<T: Send + Sync> Sync for Guard<'_, T>
Auto Trait Implementations§
impl<'a, T> Freeze for Guard<'a, T>
impl<'a, T> RefUnwindSafe for Guard<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Unpin for Guard<'a, T>
impl<'a, T> UnsafeUnpin for Guard<'a, T>
impl<'a, T> UnwindSafe for Guard<'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