Struct tokenizer_lib::BufferedTokenQueue[][src]

pub struct BufferedTokenQueue<T: PartialEq, TData> { /* fields omitted */ }
Expand description

A queue which can be used as a sender and reader. Use this for buffering all the tokens before reading

Implementations

Constructs a new BufferedTokenQueue

Trait Implementations

Returns a reference to next token but does not advance current position

Returns the next token and advances

Runs the closure (cb) over upcoming tokens. Passes the value behind the Token to the closure. Will stop and return a reference to the next Token from when the closure returns true. Returns None if scanning finishes before closure returns true. Does not advance the reader. Read more

Tests that next token matches an expected type. Will return error if does not match. The Ok value contains the data of the valid token. Else it will return the Err with the expected token type and the token that did not match Read more

Appends a new Token Will return false if could not push token Read more

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

Performs the conversion.

Performs the conversion.

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.