Bitmask-Enum
A bitmask enum attribute macro.
A bitmask can have unsigned integer types, the default type is usize
.
Don't know how to document in proc-macro
crates so if you want see a better documentation run cargo doc --open
and select your Bitmask
enum.
// usize
// u8
Example
use bitmask;
// bitmask has const bitwise operator methods
const CONST_BM: Bitmask = Flag2.or;
Custom Values
You can assign every flag a custom value, but every flag requires a unique value that only contains one 1
bit.
use bitmask;