pub enum Token<'input> {
}
Expand description
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
.
Implementations§
Source§impl<'input> Token<'input>
impl<'input> Token<'input>
Sourcepub fn is_whitespace(&self) -> bool
pub fn is_whitespace(&self) -> bool
Check if the current token is a whitespace token.
Sourcepub fn is_wildcard(&self) -> bool
pub fn is_wildcard(&self) -> bool
Check if the current token is a wildcard token.
Trait Implementations§
Source§impl<'input> Ord for Token<'input>
impl<'input> Ord for Token<'input>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'input> PartialOrd for Token<'input>
impl<'input> PartialOrd for Token<'input>
impl<'input> Eq for Token<'input>
impl<'input> StructuralPartialEq for Token<'input>
Auto Trait Implementations§
impl<'input> Freeze for Token<'input>
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§
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