macro_rules! hash_set_e {
{$($v: expr),* $(,)?} => { ... };
}Available on crate feature
std only.Expand description
Explicitly typed equivalent of hash_set!.
See the explicity typed macros section.
ยงExamples
use std::collections::HashSet;
use map_macro::hash_set_e;
enum Foo { A, B, C, D }
let x: HashSet<u8> = hash_set_e! { Foo::A, Foo::B, Foo::C, Foo::C, Foo::D };
assert_eq!(x.len(), 4);