[][src]Enum lber::ConsumerState

pub enum ConsumerState<O, E = (), M = ()> {
    Done(M, O),
    Error(E),
    Continue(M),
}

Stores a consumer's current computation state

Variants

Done(M, O)

A value of type O has been produced

Error(E)

An error of type E has been encountered

Continue(M)

Continue applying, and pass a message of type M to the data source

Methods

impl<O, E, M> ConsumerState<O, E, M> where
    E: Copy,
    M: Copy,
    O: Clone
[src]

pub fn map<P, F>(&self, f: F) -> ConsumerState<P, E, M> where
    F: FnOnce(O) -> P, 
[src]

pub fn flat_map<P, F>(&self, f: F) -> ConsumerState<P, E, M> where
    F: FnOnce(M, O) -> ConsumerState<P, E, M>, 
[src]

Trait Implementations

impl<O, E, M> Clone for ConsumerState<O, E, M> where
    E: Clone,
    M: Clone,
    O: Clone
[src]

impl<O, E, M> Debug for ConsumerState<O, E, M> where
    E: Debug,
    M: Debug,
    O: Debug
[src]

Auto Trait Implementations

impl<O, E, M> RefUnwindSafe for ConsumerState<O, E, M> where
    E: RefUnwindSafe,
    M: RefUnwindSafe,
    O: RefUnwindSafe

impl<O, E, M> Send for ConsumerState<O, E, M> where
    E: Send,
    M: Send,
    O: Send

impl<O, E, M> Sync for ConsumerState<O, E, M> where
    E: Sync,
    M: Sync,
    O: Sync

impl<O, E, M> Unpin for ConsumerState<O, E, M> where
    E: Unpin,
    M: Unpin,
    O: Unpin

impl<O, E, M> UnwindSafe for ConsumerState<O, E, M> where
    E: UnwindSafe,
    M: UnwindSafe,
    O: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.