pub enum MathDomNode {
Math(MathNode),
Text(TextNode),
Space(SpaceNode),
Fragment(Box<MathDomFragment>),
}
Expand description
MathML DOM node enum for type-safe node representation
Variants§
Math(MathNode)
MathML element node
Text(TextNode)
Text content node
Space(SpaceNode)
Space node
Fragment(Box<MathDomFragment>)
Document fragment node
Implementations§
Source§impl MathDomNode
impl MathDomNode
Sourcepub const fn as_math_node(&self) -> Option<&MathNode>
pub const fn as_math_node(&self) -> Option<&MathNode>
Type-safe access to MathNode variant
Sourcepub const fn as_text_node(&self) -> Option<&TextNode>
pub const fn as_text_node(&self) -> Option<&TextNode>
Type-safe access to TextNode variant
Sourcepub const fn as_space_node(&self) -> Option<&SpaceNode>
pub const fn as_space_node(&self) -> Option<&SpaceNode>
Type-safe access to SpaceNode variant
Sourcepub const fn as_math_node_mut(&mut self) -> Option<&mut MathNode>
pub const fn as_math_node_mut(&mut self) -> Option<&mut MathNode>
Mutable type-safe access to MathNode variant
Sourcepub const fn as_text_node_mut(&mut self) -> Option<&mut TextNode>
pub const fn as_text_node_mut(&mut self) -> Option<&mut TextNode>
Mutable type-safe access to TextNode variant
Sourcepub const fn as_space_node_mut(&mut self) -> Option<&mut SpaceNode>
pub const fn as_space_node_mut(&mut self) -> Option<&mut SpaceNode>
Mutable type-safe access to SpaceNode variant
Sourcepub const fn as_fragment(&self) -> Option<&MathDomFragment>
pub const fn as_fragment(&self) -> Option<&MathDomFragment>
Type-safe access to Fragment variant
Sourcepub const fn as_fragment_mut(&mut self) -> Option<&mut MathDomFragment>
pub const fn as_fragment_mut(&mut self) -> Option<&mut MathDomFragment>
Mutable type-safe access to Fragment variant
Trait Implementations§
Source§impl Clone for MathDomNode
impl Clone for MathDomNode
Source§fn clone(&self) -> MathDomNode
fn clone(&self) -> MathDomNode
Returns a duplicate 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 From<DocumentFragment<MathDomNode>> for MathDomNode
impl From<DocumentFragment<MathDomNode>> for MathDomNode
Source§fn from(fragment: MathDomFragment) -> Self
fn from(fragment: MathDomFragment) -> Self
Converts to this type from the input type.
Source§impl From<MathNode> for MathDomNode
impl From<MathNode> for MathDomNode
Source§impl From<SpaceNode> for MathDomNode
impl From<SpaceNode> for MathDomNode
Source§impl From<TextNode> for MathDomNode
impl From<TextNode> for MathDomNode
Source§impl VirtualNode for MathDomNode
impl VirtualNode for MathDomNode
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 MathDomNode
impl RefUnwindSafe for MathDomNode
impl Send for MathDomNode
impl Sync for MathDomNode
impl Unpin for MathDomNode
impl UnwindSafe for MathDomNode
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