pub struct Tokens<'i, T> where
    T: Logos<'i>, 
{ /* private fields */ }
Expand description

A logos::Lexer wrapper than can be used as an input for nom.

You can find an example in the module-level docs.

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

The current input type is a sequence of that Item type. Read more

An iterator over the input type, producing the item and its position for use with Slice. If we’re iterating over &str, the position corresponds to the byte index of the character Read more

An iterator over the input type, producing the item

Returns an iterator over the elements and their byte offsets

Returns an iterator over the elements

Finds the byte position of the element

Get the byte offset from the element’s position in the stream

Calculates the input length, as indicated by its name, and the name of the trait itself Read more

Returns a slice of count bytes. panics if count > length

Split the stream at the count byte offset. panics if count > length

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.