macro_rules! params { (@single $($x:tt)*) => { ... }; (@count $($rest:expr),*) => { ... }; ($($key:expr => $value:expr,)+) => { ... }; ($($key:expr => $value:expr),*) => { ... }; }
Available on crate feature
aamp
only.Expand description
Convenience macro to construct a ParameterObject
with map literal syntax.
Example:
let pobj = params!(
"somekey" => Parameter::Bool(true)
);
Adapted from https://github.com/bluss/maplit/blob/master/src/lib.rs