pub enum Catcode {
Show 19 variants
ESCAPE,
BEGIN,
END,
MATH,
ALIGN,
EOL,
PARAM,
SUPER,
SUB,
IGNORE,
SPACE,
LETTER,
OTHER,
ACTIVE,
COMMENT,
INVALID,
CS,
MARKER,
ARG,
}Expand description
A Token category code, as in TeX
Variants§
ESCAPE
BEGIN
END
MATH
ALIGN
EOL
PARAM
SUPER
SUB
IGNORE
SPACE
LETTER
OTHER
ACTIVE
COMMENT
INVALID
CS
MARKER
ARG
Implementations§
Source§impl Catcode
impl Catcode
Sourcepub fn name_sym(self) -> SymStr
pub fn name_sym(self) -> SymStr
SymStr form of name() — each variant caches its interned
symbol via pin!. Used by Token::get_cs_name /
pin_cs_name to avoid a per-call pin_static hash probe
(fires on every primitive-token definition lookup).
Sourcepub fn short_name(self) -> &'static str
pub fn short_name(self) -> &'static str
a short name helpful for Token debugging
Sourcepub fn is_primitive(self) -> bool
pub fn is_primitive(self) -> bool
TeX-primitive codes
Sourcepub fn is_executable(self) -> bool
pub fn is_executable(self) -> bool
Catcodes with associated primitives
Sourcepub fn is_neutralizable(self) -> bool
pub fn is_neutralizable(self) -> bool
Catcodes which can be neutralized
Sourcepub fn is_active_or_cs(self) -> bool
pub fn is_active_or_cs(self) -> bool
Shorthand to match the “active” and “command sequence” catcodes
Sourcepub fn is_absorbable(self) -> bool
pub fn is_absorbable(self) -> bool
Tokens which can be absorbed without side-effects
Sourcepub fn is_gullet_holdable(self) -> bool
pub fn is_gullet_holdable(self) -> bool
Gullet can only hold comment and marker tokens
Sourcepub fn is_balanced_interesting(self) -> bool
pub fn is_balanced_interesting(self) -> bool
Catcodes that are of note for balanced reads.
Trait Implementations§
impl Copy for Catcode
impl Eq for Catcode
impl StructuralPartialEq for Catcode
Source§impl ToTokens for Catcode
Available on crate feature codegen only.
impl ToTokens for Catcode
Available on crate feature
codegen only.Source§fn to_tokens(&self, stream: &mut TokenStream)
fn to_tokens(&self, stream: &mut TokenStream)
Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
Auto Trait Implementations§
impl Freeze for Catcode
impl RefUnwindSafe for Catcode
impl Send for Catcode
impl Sync for Catcode
impl Unpin for Catcode
impl UnsafeUnpin for Catcode
impl UnwindSafe for Catcode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more