pub enum Token<'input> {
Show 33 variants
Error,
WhiteSpace,
DocComment(&'input str),
Comment,
Identifier(&'input str),
LiteralFiniteSize(&'input str),
LiteralName(&'input str),
Omega,
Theta,
Semicolon,
Comma,
Colon,
OpenCurly,
CloseCurly,
OpenParen,
CloseParen,
OpenBracket,
CloseBracket,
Add,
ThinArrow,
ThinBackArrow,
FatArrow,
FatBackArrow,
FatTwowayArrow,
Bang,
Ces,
Vis,
Sat,
Caps,
Unbounded,
Weights,
Inhibit,
Hold,
}Variants§
Error
WhiteSpace
DocComment(&'input str)
Comment
Identifier(&'input str)
LiteralFiniteSize(&'input str)
LiteralName(&'input str)
Omega
Theta
Semicolon
Comma
Colon
OpenCurly
CloseCurly
OpenParen
CloseParen
OpenBracket
CloseBracket
Add
ThinArrow
ThinBackArrow
FatArrow
FatBackArrow
FatTwowayArrow
Bang
Ces
Vis
Sat
Caps
Unbounded
Weights
Inhibit
Hold
Trait Implementations§
Source§impl<'s> Logos<'s> for Token<'s>
impl<'s> Logos<'s> for Token<'s>
Source§const SIZE: usize = 33usize
const SIZE: usize = 33usize
SIZE is simply a number of possible variants of the Logos enum. The
derive macro will make sure that all variants don’t hold values larger
or equal to SIZE. Read moreSource§type Extras = ()
type Extras = ()
Associated type
Extras for the particular lexer. Those can handle things that
aren’t necessarily tokens, such as comments or Automatic Semicolon Insertion
in JavaScript.Source§type Source = str
type Source = str
Source type this token can be lexed from. This will default to
str,
unless one of the defined patterns explicitly uses non-unicode byte values
or byte slices, in which case that implementation will use [u8].impl<'input> Copy for Token<'input>
impl<'input> StructuralPartialEq for Token<'input>
Auto Trait Implementations§
impl<'input> Freeze for Token<'input>
impl<'input> RefUnwindSafe for Token<'input>
impl<'input> Send for Token<'input>
impl<'input> Sync for Token<'input>
impl<'input> Unpin for Token<'input>
impl<'input> UnwindSafe for Token<'input>
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,
Source§impl<Reference, Outer, OuterFieldType, Inner> HasPart<Nested<Outer, Inner>> for Reference
impl<Reference, Outer, OuterFieldType, Inner> HasPart<Nested<Outer, Inner>> for Reference
Source§unsafe fn part_ptr(
ptr: *const <Reference as PartialRefTarget>::RawTarget,
) -> <<Inner as Part>::PartType as PartType>::Ptr
unsafe fn part_ptr( ptr: *const <Reference as PartialRefTarget>::RawTarget, ) -> <<Inner as Part>::PartType as PartType>::Ptr
Given a constant pointer to a target, produce a constant pointer to a part of it.
Source§unsafe fn part_ptr_mut(
ptr: *mut <Reference as PartialRefTarget>::RawTarget,
) -> <<Inner as Part>::PartType as PartType>::PtrMut
unsafe fn part_ptr_mut( ptr: *mut <Reference as PartialRefTarget>::RawTarget, ) -> <<Inner as Part>::PartType as PartType>::PtrMut
Given a mutable pointer to a target, produce a mutable pointer to a part of it.