[−][src]Struct nakadion::consumer::ConsumptionOutcome
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
impl !RefUnwindSafe for ConsumptionOutcome
[src]
impl Send for ConsumptionOutcome
[src]
impl Sync for ConsumptionOutcome
[src]
impl Unpin for ConsumptionOutcome
[src]
impl !UnwindSafe for ConsumptionOutcome
[src]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
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.
pub 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.
pub 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>,