Enum nom::ConsumerState [] [src]

pub enum ConsumerState<O, E = (), M = ()> {
    Done(M, O),
    Error(E),
    Continue(M),
}

Stores a consumer's current computation state

Variants

Done(M, O)

A value of type O has been produced

Error(E)

An error of type E has been encountered

Continue(M)

Continue applying, and pass a message of type M to the data source

Methods

impl<O: Clone, E: Copy, M: Copy> ConsumerState<O, E, M>
[src]

fn map<P, F>(&self, f: F) -> ConsumerState<P, E, M> where F: FnOnce(O) -> P

fn flat_map<P, F>(&self, f: F) -> ConsumerState<P, E, M> where F: FnOnce(M, O) -> ConsumerState<P, E, M>

Trait Implementations

impl<O: Clone, E: Clone, M: Clone> Clone for ConsumerState<O, E, M>
[src]

fn clone(&self) -> ConsumerState<O, E, M>

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<O: Debug, E: Debug, M: Debug> Debug for ConsumerState<O, E, M>
[src]

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

Formats the value using the given formatter.