Trait lber::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

Implementations on Foreign Types

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

[src]

[src]

impl<'a, 'b, R, S, T, E, M, C1, C2> Consumer<R, T, E, M> for ChainConsumer<'a, 'b, C1, C2, R, S, T, E, M> where
    C1: Consumer<R, S, E, M>,
    C2: Consumer<S, T, E, M>,
    E: Clone,
    M: Clone,
    S: Clone,
    T: Clone
[src]

[src]

[src]

Implementors