hamlet::attrs! [] [src]

macro_rules! attrs {
    () => { ... };
    ($($name:ident = $value:expr),+) => { ... };
}

A convenience macro for AttributeList construction. It does not check for duplicates in attribute names. Attribute names with hyphens should be camel-cased.

Example

let attrs = attrs!(dataFoo = "bar");
assert_eq!(attrs.get("data-foo"), Some("bar"));