Struct jotdown::Attributes
source · pub struct Attributes<'s>(_);Expand description
A collection of attributes, i.e. a key-value map.
Implementations§
source§impl<'s> Attributes<'s>
impl<'s> Attributes<'s>
sourcepub fn insert(&mut self, key: &'s str, val: Cow<'s, str>)
pub fn insert(&mut self, key: &'s str, val: Cow<'s, str>)
Insert an attribute. If the attribute already exists, the previous value will be overwritten, unless it is a “class” attribute. In that case the provided value will be appended to the existing value.
Trait Implementations§
source§impl<'s> Clone for Attributes<'s>
impl<'s> Clone for Attributes<'s>
source§fn clone(&self) -> Attributes<'s>
fn clone(&self) -> Attributes<'s>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<'s> Debug for Attributes<'s>
impl<'s> Debug for Attributes<'s>
source§impl<'s> Default for Attributes<'s>
impl<'s> Default for Attributes<'s>
source§fn default() -> Attributes<'s>
fn default() -> Attributes<'s>
Returns the “default value” for a type. Read more
source§impl<'s> PartialEq<Attributes<'s>> for Attributes<'s>
impl<'s> PartialEq<Attributes<'s>> for Attributes<'s>
source§fn eq(&self, other: &Attributes<'s>) -> bool
fn eq(&self, other: &Attributes<'s>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.