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

pub struct ConsumptionOutcome { /* fields omitted */ }

Returned once a Consumer has stopped. It contains the original consumer and a ConsumerAbort which gives more insight on why the consumer was stopped.

Implementations

impl ConsumptionOutcome[src]

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

true if the consumption was aborted by the user via the handle.

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

true if the consumption was afrom internally.

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 into_reason(self) -> ConsumerAbort[src]

Turns this into the reason loosing the consumer

pub fn as_reason(&self) -> &ConsumerAbort[src]

pub fn spilt(self) -> (Consumer, ConsumerAbort)[src]

Split this outcome into the Consumer and the reason.

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