macro_rules! hash_map {
{$($k: expr => $v: expr),* $(,)?} => { ... };
}Available on crate feature
std only.Expand description
Macro for creating a HashMap.
Syntactic sugar for HashMap::from.
§Examples
use map_macro::hash_map;
let goodbye = hash_map! {
"en" => "Goodbye",
"de" => "Auf Wiedersehen",
"fr" => "Au revoir",
"es" => "Adios",
"cat" => "Adéu",
};