Trait nom::Consumer [] [src]

pub trait Consumer<I, O, E, M> {
    fn handle(&mut self, input: Input<I>) -> &ConsumerState<O, E, M>;
    fn state(&self) -> &ConsumerState<O, E, M>;
}

The Consumer trait wraps a computation and its state

it depends on the input type I, the produced value's type O, the error type E, and the message type M

Required Methods

implement handle for the current computation, returning the new state of the consumer

returns the current state

Implementors