Struct seed::virtual_dom::attrs::Attrs
source · pub struct Attrs {
pub vals: IndexMap<At, AtValue>,
}
Expand description
A thinly-wrapped HashMap
holding DOM attributes
Fields§
§vals: IndexMap<At, AtValue>
Implementations§
source§impl Attrs
impl Attrs
pub const fn new(vals: IndexMap<At, AtValue>) -> Self
pub fn empty() -> Self
sourcepub fn from_id(name: impl Into<AtValue>) -> Self
pub fn from_id(name: impl Into<AtValue>) -> Self
Convenience function. Ideal when there’s one id, and no other attrs. Generally called with the id! macro.
sourcepub fn add_multiple(&mut self, key: At, items: &[&str])
pub fn add_multiple(&mut self, key: At, items: &[&str])
Add multiple values for a single attribute. Useful for classes.
Trait Implementations§
source§impl PartialEq<Attrs> for Attrs
impl PartialEq<Attrs> for Attrs
impl Eq for Attrs
impl StructuralEq for Attrs
impl StructuralPartialEq for Attrs
Auto Trait Implementations§
impl RefUnwindSafe for Attrs
impl Send for Attrs
impl Sync for Attrs
impl Unpin for Attrs
impl UnwindSafe for Attrs
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.