pub trait AtomicRepr: Copy + 'static {
type Atomic: 'static + Send + Sync;
// Required methods
fn new_atomic(val: Self) -> Self::Atomic;
fn load(atomic: &Self::Atomic) -> Self;
fn store(atomic: &Self::Atomic, val: Self);
fn into_inner(atomic: Self::Atomic) -> Self;
}Expand description
Trait for types that can be stored in a RelaxedAtomic.
Implemented for bool, u8, u16, u32, usize, i8, i16, i32, isize.
Required Associated Types§
Required Methods§
Sourcefn new_atomic(val: Self) -> Self::Atomic
fn new_atomic(val: Self) -> Self::Atomic
Create a new atomic instance for the given value.
Sourcefn into_inner(atomic: Self::Atomic) -> Self
fn into_inner(atomic: Self::Atomic) -> Self
Unwrap the atomic and return the contained value (no atomic instruction).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".