macro_rules! parameters {
(
$($key:expr => $value:tt),* $(,)?
) => { ... };
(@val [$($val:expr),* $(,)?]) => { ... };
(@val $val:expr) => { ... };
}Expand description
Easier Parameters construction.
let vec = vec!["".into()];
parameters! {
"language" => "en",
String::from("sort-as") => [String::from("foo"), "bar"],
"vec" => vec,
};