[−][src]Struct nakadion::consumer::ConsumptionOutcome
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 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
impl !RefUnwindSafe for ConsumptionOutcome
impl Send for ConsumptionOutcome
impl Sync for ConsumptionOutcome
impl Unpin for ConsumptionOutcome
impl !UnwindSafe for ConsumptionOutcome
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,