Macro roead::objs

source ·
macro_rules! objs {
    (@single $($x:tt)*) => { ... };
    (@count $($rest:expr),*) => { ... };
    ($($key:expr => $value:expr,)+) => { ... };
    ($($key:expr => $value:expr),*) => { ... };
}
Expand description

Convenience macro to construct a ParameterObjectMap with map literal syntax. Example:

let plist = ParameterList {
    objects: objs!(
        "someobj" => params!(
            "someparam" => Parameter::Bool(true)
        )
    ),
    lists: Default::default()
};

Adapted from https://github.com/bluss/maplit/blob/master/src/lib.rs