Expand description
A simple library for flags like enums.
Unlike crates like enumset
or bitflags
,
this crate relies entirely on rust’s type system to function,
with no derive macros required.
This crate does not provide derive functionalities but instead rely on
the user to implement the ReprEnum
trait. The user can choose to use
crates like num_enum
and
strum
to provide additional functionalities.
Macros
- An opt-in derive that adds
Into<ESet<T>>
for T and operatorBitOr<T, Output=ESet<T>>
. - Create an
ESet
with the|
syntax.
Structs
- An enum set for a fieldless enum T.
- Enum iterator for ESet
Traits
- A trait indicating a type is a enum and can be made into an enum set.