Enum Token

Source
pub enum Token {
Show 16 variants SpecialMacro(SpecialMacro), Macro(Macro), FullComment(FullComment), Group(Group), DollarInlineMath(DollarInlineMath), AlignmentTab(AlignmentTab), ParBreak(ParBreak), MacroParameter(MacroParameter), Ignore(Ignore), Number(Number), Whitespace(Whitespace), Punctuation(Punctuation), CharTokens(CharTokens), BeginGroup(BeginGroup), EndGroup(EndGroup), MathShift(MathShift),
}

Variants§

§

SpecialMacro(SpecialMacro)

§

Macro(Macro)

§

FullComment(FullComment)

§

Group(Group)

§

DollarInlineMath(DollarInlineMath)

§

AlignmentTab(AlignmentTab)

§

ParBreak(ParBreak)

§

MacroParameter(MacroParameter)

§

Ignore(Ignore)

§

Number(Number)

§

Whitespace(Whitespace)

§

Punctuation(Punctuation)

§

CharTokens(CharTokens)

§

BeginGroup(BeginGroup)

§

EndGroup(EndGroup)

§

MathShift(MathShift)

Implementations§

Source§

impl Token

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 group(&self) -> Option<&Group>

Source

pub fn group_mut(&mut self) -> Option<&mut Group>

Source

pub fn into_group(self) -> Option<Group>

Source

pub fn dollar_inline_math(&self) -> Option<&DollarInlineMath>

Source

pub fn dollar_inline_math_mut(&mut self) -> Option<&mut DollarInlineMath>

Source

pub fn into_dollar_inline_math(self) -> Option<DollarInlineMath>

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 par_break(&self) -> Option<&ParBreak>

Source

pub fn par_break_mut(&mut self) -> Option<&mut ParBreak>

Source

pub fn into_par_break(self) -> Option<ParBreak>

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 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 number(&self) -> Option<&Number>

Source

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

Source

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

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 punctuation(&self) -> Option<&Punctuation>

Source

pub fn punctuation_mut(&mut self) -> Option<&mut Punctuation>

Source

pub fn into_punctuation(self) -> Option<Punctuation>

Source

pub fn char_tokens(&self) -> Option<&CharTokens>

Source

pub fn char_tokens_mut(&mut self) -> Option<&mut CharTokens>

Source

pub fn into_char_tokens(self) -> Option<CharTokens>

Source

pub fn begin_group(&self) -> Option<&BeginGroup>

Source

pub fn begin_group_mut(&mut self) -> Option<&mut BeginGroup>

Source

pub fn into_begin_group(self) -> Option<BeginGroup>

Source

pub fn end_group(&self) -> Option<&EndGroup>

Source

pub fn end_group_mut(&mut self) -> Option<&mut EndGroup>

Source

pub fn into_end_group(self) -> Option<EndGroup>

Source

pub fn math_shift(&self) -> Option<&MathShift>

Source

pub fn math_shift_mut(&mut self) -> Option<&mut MathShift>

Source

pub fn into_math_shift(self) -> Option<MathShift>

Trait Implementations§

Source§

impl Clone for Token

Source§

fn clone(&self) -> Token

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 Token

Source§

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

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

impl GetPos for Token

Source§

fn pos(&self) -> Pos

Source§

impl Serialize for Token

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
Source§

impl<'a> SplitCharTokensIterHelper for &'a Token

Source§

type Item = Cow<'a, Token>

Source§

fn next<I: Iterator<Item = Self>>( this: &mut SplitCharTokensIter<I>, ) -> Option<Self::Item>

Source§

impl SplitCharTokensIterHelper for Token

Source§

type Item = Token

Source§

fn next<I: Iterator<Item = Self>>( this: &mut SplitCharTokensIter<I>, ) -> Option<Self::Item>

Auto Trait Implementations§

§

impl Freeze for Token

§

impl RefUnwindSafe for Token

§

impl Send for Token

§

impl Sync for Token

§

impl Unpin for Token

§

impl UnwindSafe for Token

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.