pub trait MathElement{
// 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)
fn add_attribute<K, V>(&mut self, key: K, value: V)
Add an attribute to the operator.
Sourcefn with_attribute<K, V>(self, key: K, value: V) -> Self
fn with_attribute<K, V>(self, key: K, value: V) -> Self
Add an attribute to the operator.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".