Struct combine::primitives::State [] [src]

pub struct State<I> where I: Stream {
    pub position: I::Item::Position,
    pub input: I,
}

The State<I> struct keeps track of the current position in the stream I

Fields

position: I::Item::Position input: I

Methods

impl<I: Stream> State<I>
[src]

fn new(input: I) -> State<I>

fn as_empty(&self) -> State<I>

fn uncons(self) -> ParseResult<I::Item, I>

uncons is the most general way of extracting and item from a stream It takes a function f as argument which should update the position according to the item that was extracted Usually you want to use uncons_char instead which works directly on character streams

fn update(self, i: I::Item, rest: I) -> ParseResult<I::Item, I>

Trait Implementations

impl<I: PartialEq> PartialEq for State<I> where I: Stream, I::Item: PartialEq
[src]

fn eq(&self, __arg_0: &State<I>) -> bool

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

fn ne(&self, __arg_0: &State<I>) -> bool

This method tests for !=.

impl<I: Clone> Clone for State<I> where I: Stream, I::Item: Clone
[src]

fn clone(&self) -> State<I>

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl<I> Debug for State<I> where I: Stream + Debug, I::Item::Position: Debug
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.