pub enum MathElement {
Show 20 variants
Run(MathRun),
Fraction(Fraction),
Radical(Radical),
Nary(Nary),
Subscript(Script),
Superscript(Script),
SubSuperscript(SubSuperscript),
PreScript(PreScript),
Delimiter(Delimiter),
Matrix(Matrix),
Function(Function),
Accent(Accent),
Bar(Bar),
Box(MathBox),
BorderBox(BorderBox),
EquationArray(EquationArray),
LowerLimit(Limit),
UpperLimit(Limit),
GroupChar(GroupChar),
Phantom(Phantom),
}Expand description
A math element - one of the possible OMML constructs.
Variants§
Run(MathRun)
Text run (m:r).
Fraction(Fraction)
Fraction (m:f).
Radical(Radical)
Radical/root (m:rad).
Nary(Nary)
N-ary operator like sum or integral (m:nary).
Subscript(Script)
Subscript (m:sSub).
Superscript(Script)
Superscript (m:sSup).
SubSuperscript(SubSuperscript)
Subscript and superscript (m:sSubSup).
PreScript(PreScript)
Pre-subscript/superscript (m:sPre).
Delimiter(Delimiter)
Delimiter/parentheses (m:d).
Matrix(Matrix)
Matrix (m:m).
Function(Function)
Function like sin, cos (m:func).
Accent(Accent)
Accent like hat, tilde (m:acc).
Bar(Bar)
Bar over/under (m:bar).
Box(MathBox)
Box (m:box).
BorderBox(BorderBox)
Border box (m:borderBox).
EquationArray(EquationArray)
Equation array (m:eqArr).
LowerLimit(Limit)
Lower limit (m:limLow).
UpperLimit(Limit)
Upper limit (m:limUpp).
GroupChar(GroupChar)
Group character/brace (m:groupChr).
Phantom(Phantom)
Phantom (m:phant).
Implementations§
Trait Implementations§
Source§impl Clone for MathElement
impl Clone for MathElement
Source§fn clone(&self) -> MathElement
fn clone(&self) -> MathElement
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 Debug for MathElement
impl Debug for MathElement
Source§impl MathElementExt for MathElement
impl MathElementExt for MathElement
Source§fn is_fraction(&self) -> bool
fn is_fraction(&self) -> bool
Check if this is a fraction element.
Source§fn is_radical(&self) -> bool
fn is_radical(&self) -> bool
Check if this is a radical (root) element.
Source§fn is_script(&self) -> bool
fn is_script(&self) -> bool
Check if this is any kind of script (sub, sup, sub+sup, or pre-script).
Source§fn is_delimiter(&self) -> bool
fn is_delimiter(&self) -> bool
Check if this is a delimiter (parentheses, brackets, etc.).
Source§fn operator_count(&self) -> usize
fn operator_count(&self) -> usize
Count the number of operator elements (Nary, Fraction, Radical) in this
element recursively.
Auto Trait Implementations§
impl Freeze for MathElement
impl RefUnwindSafe for MathElement
impl Send for MathElement
impl Sync for MathElement
impl Unpin for MathElement
impl UnsafeUnpin for MathElement
impl UnwindSafe for MathElement
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