pub unsafe trait AtomicInteger: Sync + Send {
    type V;
    fn new(v: Self::V) -> Self;
    fn load(&self, order: Ordering) -> Self::V;
    fn store(&self, val: Self::V, order: Ordering);
}
Expand description

Safety

Objects that implement this trait must consist exclusively of atomic types from std::sync::atomic, except for AtomicPtr<T> and AtomicBool.

Associated Types

The raw value type associated with the atomic integer (i.e. u16 for AtomicU16).

Required methods

Create a new instance of Self.

Loads a value from the atomic integer.

Stores a value into the atomic integer.

Implementations on Foreign Types

Implementors