Struct mt_dom::Attribute[][src]

pub struct Attribute<NS, ATT, VAL> where
    NS: PartialEq + Clone + Debug,
    ATT: PartialEq + Clone + Debug,
    VAL: PartialEq + Clone + Debug
{ pub namespace: Option<NS>, pub name: ATT, pub value: Vec<VAL>, }
Expand description

These are the plain attributes of an element

Fields

namespace: Option<NS>

namespace of an attribute. This is specifically used by svg attributes such as xlink-href

name: ATT

the attribute name, optional since style attribute doesn’t need to have an attribute name

value: Vec<VAL>

the attribute value, which could be a simple value, and event or a function call

Implementations

create a plain attribute with namespace

create from multiple values

return the name of this attribute

return the value of this attribute

return the namespace of this attribute

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.