[−][src]Macro idmap::idmap
Creates an IdMap
from a list of key-value pairs
Example
#[macro_use] extern crate idmap; let map = idmap! { 1 => "a", 25 => "b" }; assert_eq!(map[1], "a"); assert_eq!(map[25], "b"); assert_eq!(map.get(26), None); // 1 is the first key assert_eq!(map.keys().next(), Some(&1));