macro_rules! attr_map {
    ($($key:expr => $val:expr),* ,) => { ... };
    ($($key:expr => $val:expr),*) => { ... };
}
Expand description

Makes it easy to create a Response where all the values are attributes, like a HashMap.

example:

attr_map!{ “color” => “orange”, “amount” => 2 }

is equivilent to Response::new() .add_attribute(“color”, “orange”) .add_attribute(“amount”, 2)