[−][src]Macro bidir_map::bidir_map
Create a BidirMap
from a set of K/V-K/V pairs.
Examples
#[macro_use] extern crate bidir_map; let map = bidir_map!( "a" => 1, "b" => 2, ); assert_eq!(map.get_by_first(&"a"), Some(&1)); assert_eq!(map.get_by_second(&2), Some(&"b")); assert_eq!(map.get_by_first(&"c"), None);