Skip to main content
Rust4PM

Attrs

Escape-hatch attributes available on every drawable.

The renderer drops attribute names that do not match the XML name shape
[A-Za-z_:][A-Za-z0-9_.:-]* and escapes every value, so neither can break out of the
attribute and inject markup.
Used as Input

0

functions accept this type(+1 nested)

Used as Output

0

functions return this type(+8 nested)

Type Definition

12 nested items
struct— Escape-hatch attributes available on every drawable.
class:Vec<String>— Class names, joined with spaces into one class attribute.
[items]:String
data:Vec<(String, String)>— (name, value) pairs, each emitted as data-<name>="<value>".
extra:Vec<(String, String)>— Free-form attributes, escaped but otherwise untouched.
id:Option<String>— The element's id.
style:Option<String>— Inline CSS, emitted as the style attribute.

Example JSON Value

{}