Trait parser_combinators::primitives::Stream
[−]
[src]
pub trait Stream: Clone { type Item: Positioner; fn uncons(self) -> Result<(Self::Item, Self), Error<Self::Item>>; }
A stream is a sequence of items that can be extracted one by one
Associated Types
type Item: Positioner
Required Methods
fn uncons(self) -> Result<(Self::Item, Self), Error<Self::Item>>
Takes a stream and removes its first item, yielding the item and the rest of the elements
Returns Err
when no more elements could be retrieved
Implementors
impl<'a> Stream for &'a str
impl<'a, T> Stream for &'a [T] where
T: Positioner,impl<I: Iterator + Clone> Stream for IteratorStream<I> where
I::Item: Positioner,