Trait mathml_core::MathElement
source · pub trait MathElementwhere
Self: Clone + Display,{
// Required methods
fn tag_name(&self) -> &'static str;
fn get_attributes(&self) -> &BTreeMap<String, String>;
fn mut_attributes(&mut self) -> &mut BTreeMap<String, String>;
// Provided methods
fn add_attribute<K, V>(&mut self, key: K, value: V)
where K: ToString,
V: ToString { ... }
fn with_attribute<K, V>(self, key: K, value: V) -> Self
where K: ToString,
V: ToString { ... }
}
Expand description
A trait for all MathML elements.
Required Methods§
sourcefn get_attributes(&self) -> &BTreeMap<String, String>
fn get_attributes(&self) -> &BTreeMap<String, String>
Get all attributes directly
sourcefn mut_attributes(&mut self) -> &mut BTreeMap<String, String>
fn mut_attributes(&mut self) -> &mut BTreeMap<String, String>
Modify all attributes directly
Provided Methods§
sourcefn add_attribute<K, V>(&mut self, key: K, value: V)where
K: ToString,
V: ToString,
fn add_attribute<K, V>(&mut self, key: K, value: V)where K: ToString, V: ToString,
Add an attribute to the operator.
sourcefn with_attribute<K, V>(self, key: K, value: V) -> Selfwhere
K: ToString,
V: ToString,
fn with_attribute<K, V>(self, key: K, value: V) -> Selfwhere K: ToString, V: ToString,
Add an attribute to the operator.