[][src]Enum nakadion::CommitStrategy

pub enum CommitStrategy {
    AllBatches,
    Latest,
    AfterSeconds {
        seconds: u16,
    },
    Batches {
        after_batches: u32,
        after_seconds: Option<u16>,
    },
    Events {
        after_events: u32,
        after_seconds: Option<u16>,
    },
}

Strategy for committing cursors

Variants

AllBatches

Commit all cursors immediately

Serialization(JSON)

"AllBatches"
Latest

Commit as late as possible

Serialization(JSON)

"Latest"
AfterSeconds

Commit latest after seconds seconds since a batch was received.

Serialization(JSON)

{
    "AfterSeconds": {
        "seconds": 42
    }
}

Fields of AfterSeconds

seconds: u16
Batches

Commit latest after after_batches batches have been received or after after_seconds seconds have elapsed since a batch was received.

Serialization(JSON)

{
    "Batches": {
        "after_batches": 12,
        "after_seconds": 13
    }
}

Fields of Batches

after_batches: u32after_seconds: Option<u16>
Events

Commit latest after after_events events have been received or after after_seconds seconds have elapsed since a batch was received.

This requires the BatchHandler to return the number of processed events to work properly.

Serialization(JSON)

{
    "Events": {
        "after_events": 12,
        "after_seconds": 13
    }
}

Fields of Events

after_events: u32after_seconds: Option<u16>

Trait Implementations

impl Clone for CommitStrategy[src]

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

Performs copy-assignment from source. Read more

impl Copy for CommitStrategy[src]

impl Debug for CommitStrategy[src]

impl Serialize for CommitStrategy[src]

impl<'de> Deserialize<'de> for CommitStrategy[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<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Erased for T

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

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