Enum reproto_lexer::Token
[−]
[src]
pub enum Token<'input> { Identifier(Cow<'input, str>), TypeIdentifier(Cow<'input, str>), PackageDocComment(Vec<Cow<'input, str>>), DocComment(Vec<Cow<'input, str>>), Number(RpNumber), LeftCurly, RightCurly, LeftBracket, RightBracket, LeftParen, RightParen, SemiColon, Colon, Equal, Comma, Dot, Scope, QuestionMark, Hash, Bang, RightArrow, CodeOpen, CodeClose, CodeContent(Cow<'input, str>), QuotedString(String), Any, As, Boolean, Bytes, Datetime, Enum, Float, Double, I32, I64, Interface, Service, Stream, String, Tuple, Type, U32, U64, Use, }
Variants
Identifier(Cow<'input, str>)
TypeIdentifier(Cow<'input, str>)
PackageDocComment(Vec<Cow<'input, str>>)
DocComment(Vec<Cow<'input, str>>)
Number(RpNumber)
LeftCurly
RightCurly
LeftBracket
RightBracket
LeftParen
RightParen
SemiColon
Colon
Equal
Comma
Dot
Scope
QuestionMark
Hash
Bang
RightArrow
CodeOpen
CodeClose
CodeContent(Cow<'input, str>)
QuotedString(String)
Any
As
Boolean
Bytes
Datetime
Enum
Float
Double
I32
I64
Interface
Service
Stream
String
Tuple
Type
U32
U64
Use
Methods
impl<'input> Token<'input>
[src]
pub fn keyword_safe(&self) -> Option<&'static str>
[src]
Get the keywords-safe variant of the given keyword.
pub fn as_ident(&self) -> Option<&str>
[src]
Trait Implementations
impl<'input> Clone for Token<'input>
[src]
fn clone(&self) -> Token<'input>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'input> Debug for Token<'input>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'input> PartialEq for Token<'input>
[src]
fn eq(&self, __arg_0: &Token<'input>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Token<'input>) -> bool
[src]
This method tests for !=
.