Crate atomic_enums

Source
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> { ... } and Atomize. You must implement the trait impl TryFrom<youre base type> for YourStruct to use the enumeration.

Structs§

AtomicEnum
The AtomicEnum is used to store values of an C like enumeration in an atomic type.

Traits§

AtomicOps
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 traits Into<u16> and TryFrom<u16> have to be implemented.

Type Aliases§

AtomicEnumU8
AtomicEnumU16
AtomicEnumU32
AtomicEnumU64
AtomicEnumUsize