Enum Node
pub enum Node {
Show 13 variants
Char(char),
Frac {
num: Vec<Node>,
den: Vec<Node>,
},
Sup {
exp: Vec<Node>,
},
Sub {
sub: Vec<Node>,
},
SubSup {
sub: Vec<Node>,
sup: Vec<Node>,
},
Sqrt {
index: Option<Vec<Node>>,
radicand: Vec<Node>,
},
Paren {
body: Vec<Node>,
},
Delimited {
open: Option<char>,
close: Option<char>,
body: Vec<Node>,
},
Func {
name: String,
arg: Vec<Node>,
},
Text(String),
Accent {
base: Vec<Node>,
mark: char,
over: bool,
},
UnderOver {
base: Vec<Node>,
under: Option<Vec<Node>>,
over: Option<Vec<Node>>,
},
Table {
rows: Vec<Vec<Vec<Node>>>,
},
}Expand description
One element of a Row.
Variants§
Char(char)
A single character placed directly in a row: a digit 0-9, a ., a
letter (identifiers are stored as runs of Char letters so the caret
can sit between letters), or an operator glyph (+ - * / · ^ etc.).
Frac
A fraction: numerator over denominator with a centered bar.
Sup
A power: the base is whatever precedes this node in the row; the exponent is the raised, smaller child row.
Sub
A lowered, smaller child row attached to the preceding base.
SubSup
Paired lower and upper scripts sharing one horizontal script column.
Sqrt
A radical: √ with an overbar spanning radicand, optional index
(the small number in the crook, e.g. cube root).
Paren
A parenthesized group ( body ).
Delimited
A group with explicit scalable delimiters. None represents TeX’s
invisible . delimiter, used by cases and one-sided constructions.
Func
A function call name( arg ) — name is upright (sin, cos, ln, …).
Text(String)
Upright mathematical text, such as a unit or an <mtext> label.
Accent
A close-fitting accent constructed over or under its base.
UnderOver
A base with optional limits stacked directly below and above it.
Table
A rectangular table of mathematical cells (matrices, cases, arrays).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl UnwindSafe for Node
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more