Macro roead::params

source ·
macro_rules! params {
    (@single $($x:tt)*) => { ... };
    (@count $($rest:expr),*) => { ... };
    ($($key:expr => $value:expr,)+) => { ... };
    ($($key:expr => $value:expr),*) => { ... };
}
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