Macro imbl::ordmap::ordmap

source ·
macro_rules! ordmap {
    () => { ... };
    ( $( $key:expr => $value:expr ),* ) => { ... };
}
Expand description

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

§Examples

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