Skip to main content

imap

Macro imap 

Source
macro_rules! imap {
    [$($tail:tt)*] => { ... };
}
Expand description

Create a map using syntax like imap![key1 => val1, key2 => val, ...].

This is equivalent to IMap::empty().insert(key1, val1).insert(key2, val2)....

Note that this does not require all keys to be distinct. In the case that two or more keys are equal, the resulting map uses the value of the rightmost entry.