map

Macro map 

Source
macro_rules! map {
    {$($key:expr => $value:expr),*} => { ... };
    {$($key:expr => $value:expr),+ ,} => { ... };
}
Expand description

Build a hash map

§Examples

let m: HashMap<String, String> = map!{
    "key1" => "value1",
    "key2" => "value2",
};

§Remarks

Keys and Values are converted with Into::into to build the map. Because of that, type annotations are usually required.