Enum reproto_semver::lexer::Token
[−]
[src]
pub enum Token<'input> {
Eq,
Gt,
Lt,
LtEq,
GtEq,
Caret,
Tilde,
Star,
Dot,
Comma,
Hyphen,
Plus,
Or,
Whitespace(usize, usize),
Numeric(u64),
AlphaNumeric(&'input str),
}Semver tokens.
Variants
Eq=
Gt>
Lt<
LtEq<=
GtEq>=
Caret'^`
Tilde'~`
Star'*`
Dot.
Comma,
Hyphen-
Plus+
Or'||'
Whitespace(usize, usize)any number of whitespace (\t\r\n) and its span.
Numeric(u64)Numeric component, like 0 or 42.
AlphaNumeric(&'input str)Alphanumeric component, like alpha1 or 79deadbe.
Methods
impl<'input> Token<'input>[src]
pub fn is_whitespace(&self) -> bool[src]
Check if the current token is a whitespace token.
pub fn is_wildcard(&self) -> bool[src]
Check if the current token is a wildcard token.
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 !=.
impl<'input> Eq for Token<'input>[src]
impl<'input> PartialOrd for Token<'input>[src]
fn partial_cmp(&self, __arg_0: &Token<'input>) -> Option<Ordering>[src]
This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, __arg_0: &Token<'input>) -> bool[src]
This method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, __arg_0: &Token<'input>) -> bool[src]
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, __arg_0: &Token<'input>) -> bool[src]
This method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, __arg_0: &Token<'input>) -> bool[src]
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl<'input> Ord for Token<'input>[src]
fn cmp(&self, __arg_0: &Token<'input>) -> Ordering[src]
This method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
Compares and returns the minimum of two values. Read more