[][src]Macro im_rc::hashmap

macro_rules! hashmap {
    () => { ... };
    ( $( $key:expr => $value:expr ),* ) => { ... };
    ( $( $key:expr => $value:expr ,)* ) => { ... };
}

Construct a hash map from a sequence of key/value pairs.

Examples

assert_eq!(
  hashmap!{
    1 => 11,
    2 => 22,
    3 => 33
  },
  HashMap::from(vec![(1, 11), (2, 22), (3, 33)])
);