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
=
>
<
<=
>=
’^`
’~`
’*`
.
,
-
+
‘||’
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.
Implementations
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> Debug for Token<'input>[src][+]
impl<'input> Eq for Token<'input>[src]
impl<'input> Ord for Token<'input>[src][+]
impl<'input> PartialEq<Token<'input>> for Token<'input>[src][+]
impl<'input> PartialOrd<Token<'input>> for Token<'input>[src][+]
impl<'input> StructuralEq for Token<'input>[src]
impl<'input> StructuralPartialEq for Token<'input>[src]
Auto Trait Implementations
impl<'input> RefUnwindSafe for Token<'input>
impl<'input> Send for Token<'input>
impl<'input> Sync for Token<'input>
impl<'input> Unpin for Token<'input>
impl<'input> UnwindSafe for Token<'input>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src][+]
T: ?Sized,
impl<T> From<T> for T[src][+]
impl<T, U> Into<U> for T where
U: From<T>, [src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src][+]
U: TryFrom<T>,