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
pub fn with_multiple_values(
namespace: Option<NS>,
name: ATT,
value: impl IntoIterator<Item = VAL>
) -> Self
pub fn with_multiple_values(
namespace: Option<NS>,
name: ATT,
value: impl IntoIterator<Item = VAL>
) -> Self
create from multiple values
Trait Implementations
Auto Trait Implementations
impl<NS, ATT, VAL> RefUnwindSafe for Attribute<NS, ATT, VAL> where
ATT: RefUnwindSafe,
NS: RefUnwindSafe,
VAL: RefUnwindSafe,
impl<NS, ATT, VAL> UnwindSafe for Attribute<NS, ATT, VAL> where
ATT: UnwindSafe,
NS: UnwindSafe,
VAL: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more