[−][src]Macro multi_map::multimap
Create a MultiMap
from a list of key-value tuples
Example
#[macro_use] extern crate multi_map; use multi_map::MultiMap; #[derive(Hash,Clone,PartialEq,Eq)] enum ThingIndex { IndexOne, IndexTwo, IndexThree, }; let map = multimap!{ 1, ThingIndex::IndexOne => "Chicken Fried Steak", 2, ThingIndex::IndexTwo => "Blueberry Pancakes", }; assert!(*map.get_alt(&ThingIndex::IndexOne).unwrap() == "Chicken Fried Steak"); assert!(*map.get(&2).unwrap() == "Blueberry Pancakes");