Macro eset::eset

source ·
macro_rules! eset {
    ($expr: path) => { ... };
    ($expr: path | $($exprs: path)|*) => { ... };
    ($sep: literal, $expr: path) => { ... };
    ($sep: literal $expr: path | $($exprs: path)|*) => { ... };
}
Expand description

Create an ESet with the | syntax.

This does not require the [derive_eset] macro being invoked.

Example

 enum A {
    Foo,
    Bar,
 }

 assert_eq!(eset!(A::Foo | A::Bar), ESet::new_flags([A::Foo, A::Bar]));