pub struct Atom<T, U> { /* private fields */ }Expand description
A wrapper that allows an instance of type T to be treated as though it is
an atomic integer type (in the style of a C/C++ union). Use
atomic_try_update to access the data of type T stored in an Atom<T>.
The generic parameter U is the smallest unsigned integer type that is large
enough to hold an instance of T. (Typically: u64 or u128)
Trait Implementations§
impl<T, U> Send for Atom<T, U>
impl<T, U> Sync for Atom<T, U>
Auto Trait Implementations§
impl<T, U> !Freeze for Atom<T, U>
impl<T, U> RefUnwindSafe for Atom<T, U>where
T: RefUnwindSafe,
impl<T, U> Unpin for Atom<T, U>
impl<T, U> UnwindSafe for Atom<T, U>where
T: UnwindSafe,
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