amplify

Macro bmap

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

Macro for creating alloc::collections::BTreeMap in the same manner as vec! is used for Vec:

#[macro_use]
extern crate amplify;
extern crate alloc;

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