Struct nom::MapConsumer
[−]
[src]
pub struct MapConsumer<'a, C: 'a, R, S, T, E, M, F> { /* 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>
[src]
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>
[src]
fn handle(&mut self, input: Input<R>) -> &ConsumerState<T, E, M>
implement handle for the current computation, returning the new state of the consumer
fn state(&self) -> &ConsumerState<T, E, M>
returns the current state