pub struct MathNode {
pub node_type: MathNodeType,
pub attributes: KeyMap<String, String>,
pub children: Vec<MathDomNode>,
pub classes: ClassList,
}
Expand description
General purpose MathML node of any type
Fields§
§node_type: MathNodeType
The type of MathML node
attributes: KeyMap<String, String>
Attributes of the MathML node
children: Vec<MathDomNode>
Child nodes of the MathML node
classes: ClassList
CSS classes applied to the MathML node
Implementations§
Source§impl MathNode
impl MathNode
Sourcepub fn with_children(
node_type: MathNodeType,
children: Vec<MathDomNode>,
) -> Self
pub fn with_children( node_type: MathNodeType, children: Vec<MathDomNode>, ) -> Self
Create a new MathNode with the given type and children
Sourcepub fn add_child(&mut self, child: MathDomNode)
pub fn add_child(&mut self, child: MathDomNode)
Add a child to this node
Sourcepub fn set_attribute<K, V>(&mut self, key: K, value: V)
pub fn set_attribute<K, V>(&mut self, key: K, value: V)
Set an attribute on this node
Sourcepub fn builder() -> MathNodeBuilder
pub fn builder() -> MathNodeBuilder
Create a new MathNode with the given type
Trait Implementations§
Source§impl From<MathNode> for MathDomNode
impl From<MathNode> for MathDomNode
Source§impl VirtualNode for MathNode
impl VirtualNode for MathNode
Source§fn write_markup(&self, fmt: &mut Formatter<'_>) -> Result<(), ParseError>
fn write_markup(&self, fmt: &mut Formatter<'_>) -> Result<(), ParseError>
Convert into HTML markup by writing into the provided formatter.
Auto Trait Implementations§
impl Freeze for MathNode
impl RefUnwindSafe for MathNode
impl Send for MathNode
impl Sync for MathNode
impl Unpin for MathNode
impl UnwindSafe for MathNode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more