Macro enumset::enum_set
[−]
[src]
macro_rules! enum_set { () => { ... }; ($enum_name:ty, $($value:path)|* $(|)*) => { ... }; }
Creates a EnumSet literal, which can be used in const contexts.
The format used is enum_set!(Type, Type::A | Type::B | Type::C)
, where Type
is the type of
the variants that are expected to follow. When the nightly
feature is enabled, that parameter
can be omitted.
Examples
const CONST_SET: EnumSet<Enum> = enum_set!(Enum, Enum::A | Enum::B); assert_eq!(CONST_SET, Enum::A | Enum::B);