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§
source§impl<Ns, Att, Val> Attribute<Ns, Att, Val>
impl<Ns, Att, Val> Attribute<Ns, Att, Val>
sourcepub fn new(namespace: Option<Ns>, name: Att, value: Val) -> Self
pub fn new(namespace: Option<Ns>, name: Att, value: Val) -> Self
create a plain attribute with namespace
sourcepub 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§
source§impl<Ns, Att, Val> PartialEq for Attribute<Ns, Att, Val>
impl<Ns, Att, Val> PartialEq for Attribute<Ns, Att, Val>
impl<Ns, Att, Val> Eq for Attribute<Ns, Att, Val>
impl<Ns, Att, Val> StructuralPartialEq for Attribute<Ns, Att, Val>
Auto Trait Implementations§
impl<Ns, Att, Val> RefUnwindSafe for Attribute<Ns, Att, Val>
impl<Ns, Att, Val> Send for Attribute<Ns, Att, Val>
impl<Ns, Att, Val> Sync for Attribute<Ns, Att, Val>
impl<Ns, Att, Val> Unpin for Attribute<Ns, Att, Val>
impl<Ns, Att, Val> UnwindSafe for Attribute<Ns, Att, Val>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more