macro_rules! map { (@single $($x:tt)*) => { ... }; (@count $($rest:expr),*) => { ... }; ($($key:expr => $value:expr,)+) => { ... }; ($($key:expr => $value:expr),*) => { ... }; }
Expand description
Convenience macro to construct a Byml
map using map literal syntax.
Example:
let bmap = map!(
"SomeKey" => Byml::Bool(true),
"AnotherKey" => Byml::I32(0)
);
Adapted from https://github.com/bluss/maplit/blob/master/src/lib.rs