Macro rin::gl::hash_map [−][src]
macro_rules! hash_map { (@single $($x:tt)*) => { ... }; (@count $($rest:expr),*) => { ... }; ($($key:expr => $value:expr,)+) => { ... }; ($($key:expr => $value:expr),*) => { ... }; }
Create an IndexMap
from a list of key-value pairs
Example
use indexmap::indexmap; let map = indexmap!{ "a" => 1, "b" => 2, }; assert_eq!(map["a"], 1); assert_eq!(map["b"], 2); assert_eq!(map.get("c"), None); // "a" is the first key assert_eq!(map.keys().next(), Some(&"a"));