Expand description
This crate provides an AtomicEnum.
This can only be used with C like enumerations.
The gen_atomic_enum! macro is provided which can be used to create a valid enumeration.
Macros§
- gen_
atomic_ enum - This macro can be used to generate a C like enumeration,
which automaticly implements
impl From<YourStruct> for <youre base type> { ... }andAtomize. You must implement the traitimpl TryFrom<youre base type> for YourStructto use the enumeration.
Structs§
- Atomic
Enum - The
AtomicEnumis used to store values of an C like enumeration in an atomic type.
Traits§
- Atomic
Ops - This trait must be implemented for the underlying atomic type.
- Atomize
- The trait must be implemented for enumerations which shall be used with an
AtomicEnum. Additionally the traitsInto<u16>andTryFrom<u16>have to be implemented.