pub enum TokenKind {
Show 15 variants
Keyword,
Identifier,
QuotedIdentifier,
StringLiteral,
DollarStringLiteral,
NumberLiteral,
BlobLiteral,
UuidLiteral,
BooleanLiteral,
Operator,
Punctuation,
Whitespace,
LineComment,
BlockComment,
Unknown,
}Expand description
Classification of a CQL token.
Variants§
Keyword
A CQL keyword (SELECT, FROM, WHERE, etc.). Determined by context — words
in identifier position (after FROM, after dot, etc.) are Identifier instead.
Identifier
An unquoted identifier (table name, column name, keyspace name, etc.).
QuotedIdentifier
A double-quoted identifier ("MyTable").
StringLiteral
A single-quoted string literal ('hello').
DollarStringLiteral
A dollar-quoted string literal ($$body$$).
NumberLiteral
A numeric literal (integer or decimal: 42, 3.14, -1).
BlobLiteral
A blob literal (0xDEADBEEF).
UuidLiteral
A UUID literal (550e8400-e29b-41d4-a716-446655440000).
BooleanLiteral
A boolean literal (true, false).
Operator
An operator (=, <, >, <=, >=, !=, +, -, etc.).
Punctuation
Punctuation (;, ,, (, ), ., *, ?).
Whitespace
Whitespace (spaces, tabs, newlines).
LineComment
A line comment (-- ...).
BlockComment
A block comment (/* ... */), possibly nested.
Unknown
Unrecognized character.
Trait Implementations§
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
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
§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
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more