Trait combine::StreamOnce [] [src]

pub trait StreamOnce {
    type Item: Clone + PartialEq;
    type Range: Clone + PartialEq;
    type Position: Clone + Ord;
    type Error: ParseError<Self::Item, Self::Range, Self::Position>;
    fn uncons<E>(&mut self) -> Result<Self::Item, E>
    where
        E: StreamError<Self::Item, Self::Range>
; }

StreamOnce represents a sequence of items that can be extracted one by one.

Associated Types

The type of items which is yielded from this stream.

The type of a range of items yielded from this stream. Types which do not a have a way of yielding ranges of items should just use the Self::Item for this type.

Type which represents the position in a stream. Ord is required to allow parsers to determine which of two positions are further ahead.

Required Methods

Takes a stream and removes its first item, yielding the item and the rest of the elements. Returns Err if no element could be retrieved.

Implementations on Foreign Types

impl<'a> StreamOnce for &'a str
[src]

[src]

impl<'a, T> StreamOnce for &'a [T] where
    T: Clone + PartialEq
[src]

[src]

Implementors