Enum semver_parser::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]
impl<'input> Token<'input>pub fn is_whitespace(&self) -> bool[src]
pub fn is_whitespace(&self) -> boolCheck if the current token is a whitespace token.
pub fn is_wildcard(&self) -> bool[src]
pub fn is_wildcard(&self) -> boolCheck if the current token is a wildcard token.
Trait Implementations
impl<'input> Debug for Token<'input>[src]
impl<'input> Debug for Token<'input>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<'input> PartialEq for Token<'input>[src]
impl<'input> PartialEq for Token<'input>fn eq(&self, other: &Token<'input>) -> bool[src]
fn eq(&self, other: &Token<'input>) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Token<'input>) -> bool[src]
fn ne(&self, other: &Token<'input>) -> boolThis method tests for !=.
impl<'input> Eq for Token<'input>[src]
impl<'input> Eq for Token<'input>impl<'input> PartialOrd for Token<'input>[src]
impl<'input> PartialOrd for Token<'input>fn partial_cmp(&self, other: &Token<'input>) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &Token<'input>) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &Token<'input>) -> bool[src]
fn lt(&self, other: &Token<'input>) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &Token<'input>) -> bool[src]
fn le(&self, other: &Token<'input>) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &Token<'input>) -> bool[src]
fn gt(&self, other: &Token<'input>) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &Token<'input>) -> bool[src]
fn ge(&self, other: &Token<'input>) -> boolThis 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]
impl<'input> Ord for Token<'input>fn cmp(&self, other: &Token<'input>) -> Ordering[src]
fn cmp(&self, other: &Token<'input>) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more