[−][src]Macro idmap::direct_idmap
Creates an DirectIdMap
from a list of key-value pairs
Example
#[macro_use] extern crate idmap; let map = direct_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));