Enum nakadion::CommitStrategy [−][src]
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
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: u32 | |
after_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: u32 | |
after_seconds: Option<u16> |
Trait Implementations
impl Debug for CommitStrategy
[src]
impl Debug for CommitStrategy
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for CommitStrategy
[src]
impl Clone for CommitStrategy
fn clone(&self) -> CommitStrategy
[src]
fn clone(&self) -> CommitStrategy
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[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 Copy for CommitStrategy
Auto Trait Implementations
impl Send for CommitStrategy
impl Send for CommitStrategy
impl Sync for CommitStrategy
impl Sync for CommitStrategy