perplex_runtime

Struct IterInput

Source
pub struct IterInput<I: Iterator> { /* private fields */ }
Expand description

A wrapper for using iterators as parser input.

Implementations§

Source§

impl<I: Iterator> IterInput<I>

Source

pub fn new(iter: I) -> IterInput<I>

Create a new iterator input.

Trait Implementations§

Source§

impl<I: Iterator> ParserInput for IterInput<I>

Source§

type Item = Option<<I as Iterator>::Item>

The token type produced by the stream.
Source§

fn peek(&mut self) -> &Self::Item

Peek at the next item in the stream.
Source§

fn next(&mut self) -> Self::Item

Consume the next item in the stream.
Source§

fn marker() -> Self::Item

Returns the end-of-stream marker. Read more

Auto Trait Implementations§

§

impl<I> Freeze for IterInput<I>
where I: Freeze, <I as Iterator>::Item: Freeze,

§

impl<I> RefUnwindSafe for IterInput<I>

§

impl<I> Send for IterInput<I>
where I: Send, <I as Iterator>::Item: Send,

§

impl<I> Sync for IterInput<I>
where I: Sync, <I as Iterator>::Item: Sync,

§

impl<I> Unpin for IterInput<I>
where I: Unpin, <I as Iterator>::Item: Unpin,

§

impl<I> UnwindSafe for IterInput<I>
where I: UnwindSafe, <I as Iterator>::Item: UnwindSafe,

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, 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.