NodeType

Enum NodeType 

Source
pub enum NodeType {
Show 58 variants Array, OrdGroup, SupSub, Genfrac, LeftRight, LeftRightRight, Sqrt, Atom, MathOrd, Op, Spacing, Text, Styling, Font, Color, Accent, Overline, Underline, Phantom, Hphantom, Vphantom, Rule, CdLabel, CdLabelParent, ColorToken, Raw, Size, Tag, Url, Verb, TextOrd, AccentToken, OpToken, AccentUnder, Cr, Delimsizing, Enclose, Environment, Hbox, HorizBrace, Href, Html, HtmlMathMl, Includegraphics, Infix, Internal, Kern, Lap, MathChoice, Middle, Mclass, OperatorName, Pmb, Raisebox, Sizing, Smash, Vcenter, XArrow,
}
Expand description

Discriminant type for runtime type checking of parse nodes

Variants§

§

Array

§Structural Nodes

Array/matrix environments with rows and columns

§

OrdGroup

Ordered groups of expressions (parentheses, etc.)

§

SupSub

Superscript/subscript combinations

§

Genfrac

Generalized fractions (fractions, binomials)

§

LeftRight

Left-right delimiter pairs

§

LeftRightRight

Right delimiters in left-right delimiter pairs (\left…\right).

§

Sqrt

Square roots and nth roots

§

Atom

§Symbol Nodes

Atomic symbols with specific mathematical meaning

§

MathOrd

Ordinary mathematical symbols

§

Op

Mathematical operators

§

Spacing

Explicit spacing elements

§

Text

§Text and Styling

Text content within math

§

Styling

Style changes (bold, italic, etc.)

§

Font

Font family changes

§

Color

Color specifications

§

Accent

§Functions and Commands

Accents over symbols (hats, bars, etc.)

§

Overline

Horizontal lines on top of expressions

§

Underline

Horizontal lines below expressions

§

Phantom

Invisible content for spacing or alignment

§

Hphantom

Horizontal phantom content for spacing (\hphantom{…}).

§

Vphantom

Vertical phantom content for spacing (\vphantom{…}).

§

Rule

Horizontal/vertical rules

§

CdLabel

§Miscellaneous Nodes

Labels for arrows in commutative diagram environments (\begin{CD}…\end{CD}).

§

CdLabelParent

Parent containers for CD labels in commutative diagrams.

§

ColorToken

Color tokens for setting current color context (\color{name}).

§

Raw

Raw content passed through without mathematical processing.

§

Size

Size specifications for spacing and dimensions (\rule, spacing commands).

§

Tag

Tagged equations with labels (\tag{label} or automatic numbering).

§

Url

Hyperlinks in mathematical expressions (\url{…}).

§

Verb

Verbatim text preserving exact formatting (\verb|text| or \begin{verbatim}…\end{verbatim}).

§

TextOrd

Ordinary text symbols in math mode (letters, punctuation).

§

AccentToken

Accent symbols for diacritical marks (\hat, \bar, \tilde, etc.).

§

OpToken

Operator symbols with special positioning (\sum, \int, \lim, etc.).

§

AccentUnder

Accent marks placed below expressions (\underline, \underbar, etc.).

§

Cr

Carriage returns and line breaks (\, \newline).

§

Delimsizing

Delimiter sizing for proper enclosure (\big, \Big, \bigg, etc.).

§

Enclose

Enclosed expressions with styling (\boxed, \colorbox, etc.).

§

Environment

Custom mathematical environments (\begin{env}…\end{env}).

§

Hbox

Horizontal boxes for grouping content (\hbox{…}).

§

HorizBrace

Horizontal braces above/below expressions (\overbrace, \underbrace).

§

Href

Hyperlinks with custom text (\href{url}{text}).

§

Html

Embedded HTML content within math expressions.

§

HtmlMathMl

Content renderable in both HTML and MathML formats.

§

Includegraphics

Included graphics/images (\includegraphics{…}).

§

Infix

Custom infix operators between operands.

§

Internal

Internal parser nodes for implementation details.

§

Kern

Explicit kerning/spacing adjustments (\kern, \mkern).

§

Lap

Overlapping content for annotations (\rlap, \llap, \clap).

§

MathChoice

Different renderings for display/text/script modes (\mathchoice{…}{…}{…}{…}).

§

Middle

Middle delimiters in expressions (\middle|).

§

Mclass

Math class specifications for spacing and rendering (mord, mbin, mrel, etc.).

§

OperatorName

Operator names with special formatting (\operatorname{…}).

§

Pmb

Poor man’s bold text formatting (\pmb{…}).

§

Raisebox

Raised or lowered content (\raisebox{…}{…}).

§

Sizing

Size changes for expressions (\scriptsize, \large, etc.).

§

Smash

Smashed content ignoring height/depth (\smash{…}).

§

Vcenter

Vertically centered content (\vcenter{…}).

§

XArrow

Extensible arrows with labels (\xleftarrow{…}, \xrightarrow{…}).

Trait Implementations§

Source§

impl AsRef<str> for NodeType

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for NodeType

Source§

fn clone(&self) -> NodeType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NodeType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for NodeType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'_enum> From<&'_enum AnyParseNode> for NodeType

Source§

fn from(val: &'_enum AnyParseNode) -> NodeType

Converts to this type from the input type.
Source§

impl From<AnyParseNode> for NodeType

Source§

fn from(val: AnyParseNode) -> NodeType

Converts to this type from the input type.
Source§

impl Hash for NodeType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for NodeType

Source§

fn eq(&self, other: &NodeType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for NodeType

Source§

impl Eq for NodeType

Source§

impl StructuralPartialEq for NodeType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.