logo
pub struct Attribute<NS, ATT, VAL> where
    NS: PartialEq<NS> + Clone + Debug,
    ATT: PartialEq<ATT> + Clone + Debug,
    VAL: PartialEq<VAL> + Clone + Debug
{ pub namespace: Option<NS>, pub name: ATT, pub value: Vec<VAL, Global>, }
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, Global>

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

map the msg

transform the callback of this attribute

return the callback values of this attribute

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 !=.

render instance to a writable buffer with indention

render the node to a writable buffer

no new_lines, no indents

render compressed html to string

render to string with nice indention

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)

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.