pub enum MathML {
Show 20 variants
Root(Box<MathRoot>),
Row(Box<MathRow>),
Space(Box<MathSpace>),
Number(Box<MathNumber>),
Identifier(Box<MathIdentifier>),
Text(Box<MathText>),
Operator(Box<MathOperator>),
MultiScripts(Box<MathMultiScript>),
UnderOver(Box<MathUnderOver>),
Function(Box<MathFunction>),
Sqrt(Box<MathSqrt>),
Frac(Box<MathFraction>),
Phantom(Box<MathPhantom>),
Style(Box<MathStyle>),
Fenced(Box<MathFenced>),
Table(Box<MathTable>),
Undefined(Box<MathError>),
Ampersand,
NewLine,
Nothing,
}
Expand description
Represent the MathML AST node, For semantic considerations, not exactly the same as the standard.
Variants§
Root(Box<MathRoot>)
Row(Box<MathRow>)
Space(Box<MathSpace>)
Number(Box<MathNumber>)
Identifier(Box<MathIdentifier>)
Text(Box<MathText>)
Operator(Box<MathOperator>)
MultiScripts(Box<MathMultiScript>)
<msub>
/ <msup>
/ <msubsup>
/ <mmultiscripts>
UnderOver(Box<MathUnderOver>)
Function(Box<MathFunction>)
Used for compatibility of \operatorname
in LaTeX
Sqrt(Box<MathSqrt>)
Frac(Box<MathFraction>)
Phantom(Box<MathPhantom>)
Style(Box<MathStyle>)
Fenced(Box<MathFenced>)
Table(Box<MathTable>)
Undefined(Box<MathError>)
Used for unknown element
Ampersand
Used for compatibility of &
in LaTeX
NewLine
Used for compatibility of \\
in LaTeX
Nothing
Used for compatibility of
in HTML
Implementations§
Source§impl MathML
impl MathML
Sourcepub fn identifier<S>(text: S) -> Selfwhere
S: ToString,
pub fn identifier<S>(text: S) -> Selfwhere
S: ToString,
Creates a new MathIdentifier
with the FontVariant::Italic
variant.
Sourcepub fn text<S>(text: S) -> Selfwhere
S: ToString,
pub fn text<S>(text: S) -> Selfwhere
S: ToString,
Creates a new MathText
with the FontVariant::Normal
variant.
Sourcepub fn string<S>(text: S) -> Selfwhere
S: ToString,
pub fn string<S>(text: S) -> Selfwhere
S: ToString,
Creates a new MathText
with the FontVariant::Normal
variant.
Source§impl MathML
impl MathML
Sourcepub fn number<N>(n: N) -> Selfwhere
N: Into<MathNumber>,
pub fn number<N>(n: N) -> Selfwhere
N: Into<MathNumber>,
Creates a new MathNumber
with the given number.
Sourcepub fn fraction<N, D>(numerator: N, denominator: D) -> Self
pub fn fraction<N, D>(numerator: N, denominator: D) -> Self
Creates a new MathFraction
with the given numerator and denominator.
Trait Implementations§
Source§impl From<MathFenced> for MathML
impl From<MathFenced> for MathML
Source§fn from(value: MathFenced) -> Self
fn from(value: MathFenced) -> Self
Converts to this type from the input type.
Source§impl From<MathFraction> for MathML
impl From<MathFraction> for MathML
Source§fn from(value: MathFraction) -> Self
fn from(value: MathFraction) -> Self
Converts to this type from the input type.
Source§impl From<MathFunction> for MathML
impl From<MathFunction> for MathML
Source§fn from(value: MathFunction) -> Self
fn from(value: MathFunction) -> Self
Converts to this type from the input type.
Source§impl From<MathIdentifier> for MathML
impl From<MathIdentifier> for MathML
Source§fn from(value: MathIdentifier) -> Self
fn from(value: MathIdentifier) -> Self
Converts to this type from the input type.
Source§impl From<MathMultiScript> for MathML
impl From<MathMultiScript> for MathML
Source§fn from(value: MathMultiScript) -> Self
fn from(value: MathMultiScript) -> Self
Converts to this type from the input type.
Source§impl From<MathNumber> for MathML
impl From<MathNumber> for MathML
Source§fn from(value: MathNumber) -> Self
fn from(value: MathNumber) -> Self
Converts to this type from the input type.
Source§impl From<MathOperator> for MathML
impl From<MathOperator> for MathML
Source§fn from(value: MathOperator) -> Self
fn from(value: MathOperator) -> Self
Converts to this type from the input type.
Source§impl From<MathPhantom> for MathML
impl From<MathPhantom> for MathML
Source§fn from(value: MathPhantom) -> Self
fn from(value: MathPhantom) -> Self
Converts to this type from the input type.
Source§impl From<MathUnderOver> for MathML
impl From<MathUnderOver> for MathML
Source§fn from(value: MathUnderOver) -> Self
fn from(value: MathUnderOver) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for MathML
Auto Trait Implementations§
impl Freeze for MathML
impl RefUnwindSafe for MathML
impl Send for MathML
impl Sync for MathML
impl Unpin for MathML
impl UnwindSafe for MathML
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