pub struct AtomGuard<'a, T> { /* private fields */ }Expand description
RAII guard returned by Atom::load().
Dereferences to &T. The referenced value is guaranteed to remain valid
(not reclaimed) for the lifetime of this guard.
This is the cheapest way to read from an Atom — it avoids cloning
and holds a kovan critical-section guard internally.
Trait Implementations§
impl<T: Send + Sync> Send for AtomGuard<'_, T>
impl<T: Send + Sync> Sync for AtomGuard<'_, T>
Auto Trait Implementations§
impl<'a, T> Freeze for AtomGuard<'a, T>
impl<'a, T> RefUnwindSafe for AtomGuard<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Unpin for AtomGuard<'a, T>
impl<'a, T> UnwindSafe for AtomGuard<'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