Enum apollo_parser::TokenKind
source · #[repr(u16)]pub enum TokenKind {
Show 22 variants
Whitespace = 0,
Comment = 1,
Bang = 2,
Dollar = 3,
Amp = 4,
Spread = 5,
Comma = 6,
Colon = 7,
Eq = 8,
At = 9,
LParen = 10,
RParen = 11,
LBracket = 12,
RBracket = 13,
LCurly = 14,
RCurly = 15,
Pipe = 16,
Eof = 17,
Name = 18,
StringValue = 19,
Int = 20,
Float = 21,
}
Expand description
Tokens generated by the lexer.
TokenKinds are Lexical Tokens outlined in the GraphQL specification.
Punctuator
§! $ & … , : = @ ( ) [ ] { } |
Name IntValue FloatValue StringValue
TokenKinds can be accessed by a convenience macro, T!
. For example to
access the Bang TokenKind, you may match with TokenKind::Bang
, or use the
macro T![!]
.
Variants§
Whitespace = 0
Comment = 1
Bang = 2
Dollar = 3
Amp = 4
Spread = 5
Comma = 6
Colon = 7
Eq = 8
At = 9
LParen = 10
RParen = 11
LBracket = 12
RBracket = 13
LCurly = 14
RCurly = 15
Pipe = 16
Eof = 17
Name = 18
StringValue = 19
Int = 20
Float = 21
Trait Implementations§
source§impl PartialEq for TokenKind
impl PartialEq for TokenKind
impl Copy for TokenKind
impl Eq for TokenKind
impl StructuralPartialEq for TokenKind
Auto Trait Implementations§
impl Freeze for TokenKind
impl RefUnwindSafe for TokenKind
impl Send for TokenKind
impl Sync for TokenKind
impl Unpin for TokenKind
impl UnwindSafe for TokenKind
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