Struct nom::MapConsumer [] [src]

pub struct MapConsumer<'a, C: 'a, R, S, T, E, M, F> {
    // some fields omitted
}

MapConsumer takes a function S -> T and applies it on a consumer producing values of type S

Methods

impl<'a, R, S: Clone, T, E: Clone, M: Clone, F: Fn(S) -> T, C: Consumer<R, S, E, M>> MapConsumer<'a, C, R, S, T, E, M, F>

fn new(c: &'a mut C, f: F) -> MapConsumer<'a, C, R, S, T, E, M, F>

Trait Implementations

impl<'a, R, S: Clone, T, E: Clone, M: Clone, F: Fn(S) -> T, C: Consumer<R, S, E, M>> Consumer<R, T, E, M> for MapConsumer<'a, C, R, S, T, E, M, F>

fn handle(&mut self, input: Input<R>) -> &ConsumerState<T, E, M>

fn state(&self) -> &ConsumerState<T, E, M>