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

A value pf type O has been produced

Error

An error of type E has been encountered

Continue

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>

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

Derived Implementations

impl<O: Clone, E: Clone, M: Clone> Clone for ConsumerState<O, E, M>

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

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

impl<O: Debug, E: Debug, M: Debug> Debug for ConsumerState<O, E, M>

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