Trait FromLaTeXToken

Source
pub trait FromLaTeXToken<'a, Pos: SourcePos, Str: StringOrStr<'a>>: Sized + Debug {
    // Required methods
    fn from_comment(r: SourceRange<Pos>) -> Option<Self>;
    fn from_group(r: SourceRange<Pos>, children: Vec<Self>) -> Option<Self>;
    fn from_math(
        display: bool,
        r: SourceRange<Pos>,
        children: Vec<Self>,
    ) -> Option<Self>;
    fn from_control_sequence(start: Pos, name: Str) -> Option<Self>;
    fn from_text(r: SourceRange<Pos>, text: Str) -> Option<Self>;
    fn from_macro_application(m: Macro<'a, Pos, Str>) -> Option<Self>;
    fn from_environment(e: Environment<'a, Pos, Str, Self>) -> Option<Self>;
}

Required Methods§

Source

fn from_comment(r: SourceRange<Pos>) -> Option<Self>

Source

fn from_group(r: SourceRange<Pos>, children: Vec<Self>) -> Option<Self>

Source

fn from_math( display: bool, r: SourceRange<Pos>, children: Vec<Self>, ) -> Option<Self>

Source

fn from_control_sequence(start: Pos, name: Str) -> Option<Self>

Source

fn from_text(r: SourceRange<Pos>, text: Str) -> Option<Self>

Source

fn from_macro_application(m: Macro<'a, Pos, Str>) -> Option<Self>

Source

fn from_environment(e: Environment<'a, Pos, Str, Self>) -> Option<Self>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, P: SourcePos> FromLaTeXToken<'a, P, &'a str> for STeXToken<P>

Source§

impl<'a, Pos: SourcePos, Str: StringOrStr<'a>> FromLaTeXToken<'a, Pos, Str> for LaTeXToken<'a, Pos, Str>