[][src]Trait eventstore::types::SubscriptionEnv

pub trait SubscriptionEnv {
    fn push_ack(&mut self, _: Uuid);
fn push_nak_with_message<S: AsRef<str>>(
        &mut self,
        _: Vec<Uuid>,
        _: NakAction,
        _: S
    );
fn current_event_retry_count(&self) -> usize; fn push_nak(&mut self, ids: Vec<Uuid>, action: NakAction) { ... } }

Set of operations supported when consumming events from a subscription. Most of those operations are only available for persistent subscription, and will be no-op when used with either volatile or catchup subscriptions.

  • Notes All the buffers used by SubscriptionEnv will get flushed once the instance goes out of scope.

Required methods

fn push_ack(&mut self, _: Uuid)

Add an event id to ack list.

  • Notes For persistent subscription only.

fn push_nak_with_message<S: AsRef<str>>(
    &mut self,
    _: Vec<Uuid>,
    _: NakAction,
    _: S
)

Add an event ids to the nak list. It asks for Vec so you can have different NakAction for different event set.

  • Notes For persistent subscription only.

fn current_event_retry_count(&self) -> usize

Get the number of time that event has been retried.

  • Notes For persistent subscription only.
Loading content...

Provided methods

fn push_nak(&mut self, ids: Vec<Uuid>, action: NakAction)

Like push_nak_with_message but uses an empty message for NakAction.

Loading content...

Implementors

Loading content...