encap_enum-0.2.0 has been yanked.
Encap_Enum
Encap_Enum provides the encap_enum! macro for defining enumerations, bitflags and groups of constants.
Usage
Add this to your Cargo.toml:
[]
= "0.2.0"
and this to your crate root:
extern crate encap_enum;
Features
- iterators.
- bit flags.
- encapsulated flag values.
- change
enumvisibility for both internal values and the enum itself.
- change
- supports any number of attributes.
- This includes doc comments,
#[repr(C)],#[derive], and many others.
- This includes doc comments,
- No std dependency
Example
encap_enum!
note: The internal data structure is a tuple struct.
License
encap_enum is licenced under the MIT Licence.
- fixed prefix negation bug.
- added
core::ops::Neg - Breaking Changes:
- initialization with local constants outside enum has been changed from
::global_const_nameto C cast syntax, which looks like(enum ClassStyle) global_const_name. - forced enumerations under a
modnamespace to get rid of prior limitations.
- initialization with local constants outside enum has been changed from