Trait MathElement

Source
pub trait MathElement
where 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§

Source

fn tag_name(&self) -> &'static str

Get the tag name of the element.

Source

fn get_attributes(&self) -> &BTreeMap<String, String>

Get all attributes directly

Source

fn mut_attributes(&mut self) -> &mut BTreeMap<String, String>

Modify all attributes directly

Provided Methods§

Source

fn add_attribute<K, V>(&mut self, key: K, value: V)
where K: ToString, V: ToString,

Add an attribute to the operator.

Source

fn with_attribute<K, V>(self, key: K, value: V) -> Self
where K: ToString, V: ToString,

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", so this trait is not object safe.

Implementors§