Enum MathToken

Source
pub enum MathToken {
    SpecialMacro(SpecialMacro),
    Macro(Macro),
    FullComment(FullComment),
    MathGroup(MathGroup),
    AlignmentTab(AlignmentTab),
    MacroParameter(MacroParameter),
    Superscript(Superscript),
    Subscript(Subscript),
    Ignore(Ignore),
    Whitespace(Whitespace),
    Number(Number),
    AnyChar(AnyChar),
}

Variants§

§

SpecialMacro(SpecialMacro)

§

Macro(Macro)

§

FullComment(FullComment)

§

MathGroup(MathGroup)

§

AlignmentTab(AlignmentTab)

§

MacroParameter(MacroParameter)

§

Superscript(Superscript)

§

Subscript(Subscript)

§

Ignore(Ignore)

§

Whitespace(Whitespace)

§

Number(Number)

§

AnyChar(AnyChar)

Implementations§

Source§

impl MathToken

Source

pub fn special_macro(&self) -> Option<&SpecialMacro>

Source

pub fn special_macro_mut(&mut self) -> Option<&mut SpecialMacro>

Source

pub fn into_special_macro(self) -> Option<SpecialMacro>

Source

pub fn verb(&self) -> Option<&Verb>

Source

pub fn verb_mut(&mut self) -> Option<&mut Verb>

Source

pub fn into_verb(self) -> Option<Verb>

Source

pub fn verbatim_environment(&self) -> Option<&VerbatimEnvironment>

Source

pub fn verbatim_environment_mut(&mut self) -> Option<&mut VerbatimEnvironment>

Source

pub fn into_verbatim_environment(self) -> Option<VerbatimEnvironment>

Source

pub fn display_math(&self) -> Option<&DisplayMath>

Source

pub fn display_math_mut(&mut self) -> Option<&mut DisplayMath>

Source

pub fn into_display_math(self) -> Option<DisplayMath>

Source

pub fn parenthesized_inline_math(&self) -> Option<&ParenthesizedInlineMath>

Source

pub fn parenthesized_inline_math_mut( &mut self, ) -> Option<&mut ParenthesizedInlineMath>

Source

pub fn into_parenthesized_inline_math(self) -> Option<ParenthesizedInlineMath>

Source

pub fn math_environment(&self) -> Option<&MathEnvironment>

Source

pub fn math_environment_mut(&mut self) -> Option<&mut MathEnvironment>

Source

pub fn into_math_environment(self) -> Option<MathEnvironment>

Source

pub fn environment(&self) -> Option<&Environment>

Source

pub fn environment_mut(&mut self) -> Option<&mut Environment>

Source

pub fn into_environment(self) -> Option<Environment>

Source

pub fn macro_(&self) -> Option<&Macro>

Source

pub fn macro_mut(&mut self) -> Option<&mut Macro>

Source

pub fn into_macro(self) -> Option<Macro>

Source

pub fn full_comment(&self) -> Option<&FullComment>

Source

pub fn full_comment_mut(&mut self) -> Option<&mut FullComment>

Source

pub fn into_full_comment(self) -> Option<FullComment>

Source

pub fn math_group(&self) -> Option<&MathGroup>

Source

pub fn math_group_mut(&mut self) -> Option<&mut MathGroup>

Source

pub fn into_math_group(self) -> Option<MathGroup>

Source

pub fn alignment_tab(&self) -> Option<&AlignmentTab>

Source

pub fn alignment_tab_mut(&mut self) -> Option<&mut AlignmentTab>

Source

pub fn into_alignment_tab(self) -> Option<AlignmentTab>

Source

pub fn macro_parameter(&self) -> Option<&MacroParameter>

Source

pub fn macro_parameter_mut(&mut self) -> Option<&mut MacroParameter>

Source

pub fn into_macro_parameter(self) -> Option<MacroParameter>

Source

pub fn superscript(&self) -> Option<&Superscript>

Source

pub fn superscript_mut(&mut self) -> Option<&mut Superscript>

Source

pub fn into_superscript(self) -> Option<Superscript>

Source

pub fn subscript(&self) -> Option<&Subscript>

Source

pub fn subscript_mut(&mut self) -> Option<&mut Subscript>

Source

pub fn into_subscript(self) -> Option<Subscript>

Source

pub fn ignore(&self) -> Option<&Ignore>

Source

pub fn ignore_mut(&mut self) -> Option<&mut Ignore>

Source

pub fn into_ignore(self) -> Option<Ignore>

Source

pub fn whitespace(&self) -> Option<&Whitespace>

Source

pub fn whitespace_mut(&mut self) -> Option<&mut Whitespace>

Source

pub fn into_whitespace(self) -> Option<Whitespace>

Source

pub fn number(&self) -> Option<&Number>

Source

pub fn number_mut(&mut self) -> Option<&mut Number>

Source

pub fn number_char(self) -> Option<Number>

Source

pub fn any_char(&self) -> Option<&AnyChar>

Source

pub fn any_char_mut(&mut self) -> Option<&mut AnyChar>

Source

pub fn into_any_char(self) -> Option<AnyChar>

Trait Implementations§

Source§

impl Clone for MathToken

Source§

fn clone(&self) -> MathToken

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 MathToken

Source§

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

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

impl GetPos for MathToken

Source§

fn pos(&self) -> Pos

Source§

impl Serialize for MathToken

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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, 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.