pub struct AnyTokenType(/* private fields */);Expand description
Type-erased token kind represented as a raw ordinal.
Use this in grammar-agnostic paths where concrete token enums are unknown.
Implementations§
Trait Implementations§
Source§impl Clone for AnyTokenType
impl Clone for AnyTokenType
Source§fn clone(&self) -> AnyTokenType
fn clone(&self) -> AnyTokenType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AnyTokenType
impl Debug for AnyTokenType
Source§impl From<AnyTokenType> for u32
impl From<AnyTokenType> for u32
Source§fn from(t: AnyTokenType) -> u32
fn from(t: AnyTokenType) -> u32
Converts to this type from the input type.
Source§impl From<TokenType> for AnyTokenType
impl From<TokenType> for AnyTokenType
Source§fn from(t: TokenType) -> AnyTokenType
fn from(t: TokenType) -> AnyTokenType
Converts to this type from the input type.
Source§impl GrammarTokenType for AnyTokenType
impl GrammarTokenType for AnyTokenType
Source§fn from_token_type(raw: AnyTokenType) -> Option<Self>
fn from_token_type(raw: AnyTokenType) -> Option<Self>
Convert a type-erased
AnyTokenType into this grammar’s typed token
variant, or None if the ordinal is out of range.Source§impl Hash for AnyTokenType
impl Hash for AnyTokenType
Source§impl PartialEq for AnyTokenType
impl PartialEq for AnyTokenType
impl Copy for AnyTokenType
impl Eq for AnyTokenType
impl StructuralPartialEq for AnyTokenType
Auto Trait Implementations§
impl Freeze for AnyTokenType
impl RefUnwindSafe for AnyTokenType
impl Send for AnyTokenType
impl Sync for AnyTokenType
impl Unpin for AnyTokenType
impl UnsafeUnpin for AnyTokenType
impl UnwindSafe for AnyTokenType
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