bitflags-derive
This project is a set of custom derive attributes for bitflags that generates flags-aware implementations.
Usage
Add bitflags-derive to your Cargo.toml alongside bitflags:
[]
= "0.0.3"
[]
= "2"
Inside the bitflags! macro, add a #[derive] attribute with any traits from bitflags-derive that you'd like to support:
extern crate bitflags;
extern crate bitflags_derive;
bitflags!
let flags = "A | B".?;
assert_eq!;
See the docs for details on all supported attributes.