macro_rules! lists { (@single $($x:tt)*) => { ... }; (@count $($rest:expr),*) => { ... }; ($($key:expr => $value:expr,)+) => { ... }; ($($key:expr => $value:expr),*) => { ... }; }
Expand description
Convenience macro to construct a ParameterListMap
with map literal
syntax. Example:
let plist = ParameterList {
objects: Default::default(),
lists: lists!(
"somelist" => ParameterList::new()
)
};
Adapted from https://github.com/bluss/maplit/blob/master/src/lib.rs