Skip to main content

TokenNumber

Struct TokenNumber 

Source
pub struct TokenNumber;

Trait Implementations§

Source§

impl Default for TokenNumber

Source§

fn default() -> TokenNumber

Returns the “default value” for a type. Read more
Source§

impl Match<u8> for TokenNumber

Implement the Match trait for the token number.

Source§

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

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

fn size(&self) -> usize

Returns the size of the matchable object.
Source§

impl PeekableImplementation for TokenNumber

Auto Trait Implementations§

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<T, M> PeekSize<T> for M
where M: Match<T>,

Source§

fn peek_size(&self) -> usize

The peek_size method should return the size of the Peekable.
Source§

impl<'a, T, V> Peekable<'a, T> for V

Source§

fn peek(&self, data: &Scanner<'a, T>) -> Result<PeekResult, ParseError>

Attempt to match the Peekable against the current position of the Scanner. Read more
Source§

impl<'a, T, M> Recognizable<'a, T, M> for M
where M: Match<T>,

Source§

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

Try to recognize the object for the given scanner. Return the slice of elements that were recognized.

Source§

fn recognize( self, scanner: &mut Scanner<'a, T>, ) -> Result<Option<M>, 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<'a, T, R> Visitor<'a, T> for R
where R: Recognizable<'a, T, R> + Default,

Source§

fn accept(scanner: &mut Scanner<'a, T>) -> Result<R, ParseError>

Try to accept the Scanner and return the result of the visit. Read more