[][src]Enum nakadion::ProcessingStatus

pub enum ProcessingStatus {
    Processed(Option<usize>),
    Failed {
        reason: String,
    },
}

This struct must be returned after processing a batch to tell nakadion how to continue.

Variants

Processed(Option<usize>)

The cursor of the just processed batch can be committed to make progrss on the stream.

Optionally the number of processed events can be provided to help with deciding on when to commit the cursor.

The number of events should be the number of events that were in the batch.

Failed

Processing failed. Do not commit the cursor. This always ends in the streaming being aborted for the current stream.

A reason must be given which will be logged.

Fields of Failed

reason: String

Methods

impl ProcessingStatus[src]

pub fn processed_no_hint() -> ProcessingStatus[src]

Cursor can be committed and no information on how many events were processed is given.

pub fn processed(num_events_hint: usize) -> ProcessingStatus[src]

Cursor can be committed and a hint on how many events were processed is given.

pub fn failed<T: Into<String>>(reason: T) -> ProcessingStatus[src]

Processing events failed with the given reason.

Trait Implementations

impl Clone for ProcessingStatus[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Eq for ProcessingStatus[src]

impl PartialEq<ProcessingStatus> for ProcessingStatus[src]

impl Debug for ProcessingStatus[src]

Auto Trait Implementations

Blanket Implementations

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.

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

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

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

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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