Macro impl_flags

Source
macro_rules! impl_flags {
    ($(#[$outer:meta])* $vis:vis $name:ident: $bin_type:ty {
        $($(#[$inner:ident $($tt:tt)*])* $var:ident = $const:expr),*
        $(,)?
    }) => { ... };
}
Expand description

Implement a container for bit flag enums using the bitflags crate.

§Usage

use neli::neli_enum;

neli::impl_flags!(
    pub MyFlags: u16 {
        ThisFlag = 1,
        ThatFlag = 2,
    }
);

See here for the methods that are autogenerated by bitflags on the struct.