macro_rules! hash_map_e {
{$($k: expr => $v: expr),* $(,)?} => { ... };
}Available on crate feature
hashbrown only.Expand description
Explicitly typed equivalent of hash_map!.
See the explicity typed macros section.
§Examples
use std::fmt::Debug;
use hashbrown::HashMap;
use map_macro::hashbrown::hash_map_e;
let goodbye: HashMap<&str, &dyn Debug> = hash_map_e! {
"en" => &"Goodbye",
"de" => &"Auf Wiedersehen",
"fr" => &"Au revoir",
"es" => &"Adios",
"cat" => &"Adéu",
};
println!("{:?}", goodbye);