pub enum LaTeXNode<'i> {
Show 13 variants ArticleRoot { children: Vec<LaTeXNode<'i>>, }, ArticleText { text: &'i str, }, MathRoot { children: Vec<LaTeXNode<'i>>, }, Row { children: Vec<LaTeXNode<'i>>, }, Block(LaTeXBlock<'i>), Command(LaTeXCommand<'i>), MathText { text: &'i str, }, Number { number: &'i str, }, Operation { operator: &'i str, }, Superscript { lhs: Box<LaTeXNode<'i>>, rhs: Box<LaTeXNode<'i>>, }, Letter { identifier: &'i str, }, NewLine, Ampersand,
}

Variants§

§

ArticleRoot

Fields

§children: Vec<LaTeXNode<'i>>
§

ArticleText

Fields

§text: &'i str
§

MathRoot

Fields

§children: Vec<LaTeXNode<'i>>
§

Row

Fields

§children: Vec<LaTeXNode<'i>>
§

Block(LaTeXBlock<'i>)

§

Command(LaTeXCommand<'i>)

§

MathText

Fields

§text: &'i str
§

Number

Fields

§number: &'i str
§

Operation

Fields

§operator: &'i str
§

Superscript

Fields

§lhs: Box<LaTeXNode<'i>>
§rhs: Box<LaTeXNode<'i>>
§

Letter

Fields

§identifier: &'i str
§

NewLine

\\

§

Ampersand

&

Implementations§

source§

impl<'i> LaTeXNode<'i>

source

pub fn as_mathml(&self, context: &LaTeXEngine) -> MathML

Converts the LaTeX node into a MathML node.

source§

impl<'i> LaTeXNode<'i>

source

pub fn as_identifier(&self) -> &'i str

source§

impl<'i> LaTeXNode<'i>

source

pub fn is_super_script(&self) -> bool

source§

impl<'i> LaTeXNode<'i>

source

pub fn refine(self) -> Self

source§

impl<'i> LaTeXNode<'i>

source

pub fn parse(input: ParseState<'i>) -> ParseResult<'_, LaTeXNode<'i>>

source

pub fn parse_letter(input: ParseState<'i>) -> ParseResult<'_, LaTeXNode<'i>>

a ax

Trait Implementations§

source§

impl<'i> Clone for LaTeXNode<'i>

source§

fn clone(&self) -> LaTeXNode<'i>

Returns a copy 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<'i> Debug for LaTeXNode<'i>

source§

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

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

impl<'i> Display for LaTeXNode<'i>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'i> RefUnwindSafe for LaTeXNode<'i>

§

impl<'i> Send for LaTeXNode<'i>

§

impl<'i> Sync for LaTeXNode<'i>

§

impl<'i> Unpin for LaTeXNode<'i>

§

impl<'i> UnwindSafe for LaTeXNode<'i>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere 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 Twhere T: Clone,

§

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 Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

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

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

§

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 Twhere U: TryFrom<T>,

§

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.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more