[][src]Enum semver_parser::lexer::Token

pub enum Token<'input> {
    Eq,
    Gt,
    Lt,
    LtEq,
    GtEq,
    Caret,
    Tilde,
    Star,
    Dot,
    Comma,
    Hyphen,
    Plus,
    Or,
    Whitespace(usizeusize),
    Numeric(u64),
    AlphaNumeric(&'input str),
}

Semver tokens.

Variants

Eq

=

Gt

>

Lt

<

LtEq

<=

GtEq

>=

Caret

'^`

Tilde

'~`

Star

'*`

Dot

.

Comma

,

Hyphen

-

Plus

+

Or

'||'

Whitespace(usizeusize)

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.