portable_atomic_enum
This crate is a fork of atomic_enum and optionally uses
portable-atomic to support more targets.
An attribute to create an atomic wrapper around a C-style enum.
Internally, the generated wrapper uses an AtomicUsize to store the value.
The atomic operations have the same semantics as the equivalent operations
of AtomicUsize.
Example
# use atomic_enum;
# use Ordering;
let state = new;
state.store;
assert_eq!;
This attribute does not use or generate any unsafe code.
The crate can be used in a #[no_std] environment.
Cargo features
portable-atomic: polyfill atomic types usingportable-atomic