[−][src]Trait eventstore::types::SubscriptionConsumer
Represents the lifecycle of a subscription.
Required methods
fn when_event_appeared<E>(
&mut self,
_: &mut E,
_: Box<ResolvedEvent>
) -> OnEventAppeared where
E: SubscriptionEnv,
&mut self,
_: &mut E,
_: Box<ResolvedEvent>
) -> OnEventAppeared where
E: SubscriptionEnv,
Called when the subscription has received an event from the server.
Provided methods
fn when_confirmed(
&mut self,
_id: Uuid,
_last_commit_position: i64,
_last_event_number: i64
)
&mut self,
_id: Uuid,
_last_commit_position: i64,
_last_event_number: i64
)
Called when the subscription has been confirmed by the server. Usually, it's the first out of all callbacks to be called.
- Notes
It's possible to have
when_event_appeared
called beforewhen_confirmed
for catchup subscriptions as catchup subscriptions mixes several operations at the same time.
fn when_dropped(&mut self)
Called when the subscrition has been dropped whether by the server or the user themself.