Macro enumset::enum_set_type
[−]
[src]
macro_rules! enum_set_type { ($(#[$enum_attr:meta])* pub enum $enum_name:ident { $($(#[$attr:meta])* $variant:ident),* $(,)* } $($rest:tt)*) => { ... }; ($(#[$enum_attr:meta])* enum $enum_name:ident { $($(#[$attr:meta])* $variant:ident),* $(,)* } $($rest:tt)*) => { ... }; () => { ... }; }
Defines enums which can be used with EnumSet.
While attributes and documentation can be attached to the enums, the variants may not contain data.
Examples
enum_set_type! { enum Enum { A, B, C, D, E, F, G } /// Documentation pub enum Enum2 { A, B, C, D, E, F, G, #[doc(hidden)] __NonExhaustive, } }