pub enum BaseToken<C: CharType> {
CS(TeXStr<C>),
Char(C, CategoryCode),
}
Expand description
Variants§
CS(TeXStr<C>)
A control sequence token with the provided name
Char(C, CategoryCode)
An active character token with the provided character
Trait Implementations§
Source§impl<C: CharType> Token for BaseToken<C>
impl<C: CharType> Token for BaseToken<C>
type Char = C
Source§fn new(
base: BaseToken<C>,
sourceref: Option<(Ptr<String>, (usize, usize), (usize, usize))>,
) -> Self
fn new( base: BaseToken<C>, sourceref: Option<(Ptr<String>, (usize, usize), (usize, usize))>, ) -> Self
Source§fn with_ref(&self, _: &Ptr<Self>, _: &Ptr<Command<Self>>) -> Self
fn with_ref(&self, _: &Ptr<Self>, _: &Ptr<Command<Self>>) -> Self
Clone this
Token
with a new SourceReference
of type SourceReference::Expansion
(if the Token
is a TokenWithSourceref
).fn sourceref_trace(&self) -> Option<String>
Source§fn from_str(s: String) -> Vec<Self>
fn from_str(s: String) -> Vec<Self>
Parse a string into a list of
Token
s of CategoryCode::Other
Source§fn catcode(&self) -> CategoryCode
fn catcode(&self) -> CategoryCode
The
CategoryCode
of the Token
impl<C: CharType> StructuralPartialEq for BaseToken<C>
Auto Trait Implementations§
impl<C> Freeze for BaseToken<C>where
C: Freeze,
impl<C> RefUnwindSafe for BaseToken<C>where
C: RefUnwindSafe,
impl<C> !Send for BaseToken<C>
impl<C> !Sync for BaseToken<C>
impl<C> Unpin for BaseToken<C>where
C: Unpin,
impl<C> UnwindSafe for BaseToken<C>where
C: UnwindSafe + RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more