Macro amplify::map

source ·
macro_rules! map {
    { } => { ... };
    { owned: $($key:expr => $value:expr),+ $(,)? } => { ... };
    { $($key:expr => $value:expr),+ $(,)? } => { ... };
}
Expand description

Macro for creating std::collections::HashMap in the same manner as vec! is used for Vec:

#[macro_use]
extern crate amplify;

let map = map! {
    s!("key") => 5,
    s!("other_key") => 10
};