[][src]Struct nakadion::consumer::ConsumptionOutcome

pub struct ConsumptionOutcome { /* fields omitted */ }

Returned once a Consumer has stopped. It contains the original consumer and if the Consumer was stopped for other reasons than the stream ending a ConsumerError.

Methods

impl ConsumptionOutcome[src]

pub fn is_aborted(&self) -> bool[src]

true if the consumption was aborted.

pub fn into_consumer(self) -> Consumer[src]

Turn the outcome into the contained Consumer

pub fn try_into_err(self) -> Result<ConsumerError, Self>[src]

If there was an error return the error as OK otherwise return self as an error.

pub fn spilt(self) -> (Consumer, Option<ConsumerError>)[src]

Split this outcome into the Consumer and maybe an error.

pub fn error(&self) -> Option<&ConsumerError>[src]

If there was an error return a reference to it.

pub fn into_result(self) -> Result<Consumer, ConsumerError>[src]

Turn this outcome into a Result.

If there was an error the Err case will contain the error. Otherwise the OK case will contain the Consumer´. If there was an error the Consumer` will be lost.

Auto Trait Implementations

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, 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,