Enum Token

Source
pub enum Token {
Show 29 variants OpenParen, CloseParen, Comma, Semicolon, Colon, Whitespace, GreaterThan, LessThan, Exclamation, Quote, DoubleQuote, Equal, Plus, Dash, Slash, Star, Percent, Ampersand, Pipe, Caret, Tilde, Dot, Question, At, Hash, Dollar, Backslash, Underscore, Sharp,
}
Expand description

The token type

Variants§

§

OpenParen

The “(” character

§

CloseParen

The ) character

§

Comma

The , character

§

Semicolon

The ; character

§

Colon

The : character

§

Whitespace

The whitespace character

§

GreaterThan

The > character

§

LessThan

The < character

§

Exclamation

The ! character

§

Quote

The ' character

§

DoubleQuote

The " character

§

Equal

The = character

§

Plus

The + character

§

Dash

The - character

§

Slash

The / character

§

Star

The * character

§

Percent

The % character

§

Ampersand

The & character

§

Pipe

The | character

§

Caret

The ^ character

§

Tilde

The ~ character

§

Dot

The . character

§

Question

The ? character

§

At

The @ character

§

Hash

The # character

§

Dollar

The $ character

§

Backslash

The \\ character

§

Underscore

The _ character

§

Sharp

The # character

Trait Implementations§

Source§

impl Match<u8> for Token

Source§

fn matcher(&self, data: &[u8]) -> (bool, usize)

Returns true if the data matches the pattern. Read more
Source§

impl MatchSize for Token

Source§

fn size(&self) -> usize

Returns the size of the matchable object.

Auto Trait Implementations§

§

impl Freeze for Token

§

impl RefUnwindSafe for Token

§

impl Send for Token

§

impl Sync for Token

§

impl Unpin for Token

§

impl UnwindSafe for Token

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<'a, T, M> Recognizable<'a, T, &'a [T]> for M
where M: Match<T> + MatchSize,

Source§

fn recognize( self, scanner: &mut Scanner<'a, T>, ) -> Result<Option<&'a [T]>, ParseError>

Try to recognize the object for the given scanner. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.