[][src]Macro kg_utils::linkedhashmap

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

Creates an LinkedHashMap containing the provided key => value pairs.

Examples

let ratings = linkedhashmap![
    "The Fellowship of the Ring" => 3,
    "The Two Towers" => 5,
    "The Return of the King" => 4,
];

assert_eq!(ratings["The Fellowship of the Ring"], 3);
assert_eq!(ratings.len(), 3);