pub enum SubscriptionEvent {
Confirmed(String),
EventAppeared(ResolvedEvent),
Checkpoint(Position),
FirstStreamPosition(u64),
LastStreamPosition(u64),
LastAllPosition(Position),
CaughtUp(Option<CaughtUp>),
FellBehind(Option<FellBehind>),
}
Expand description
Events related to a subscription.
Variants§
Confirmed(String)
Indicates the subscription has been confirmed by the server. The String value represents the subscription id.
EventAppeared(ResolvedEvent)
An event notification from the server.
Checkpoint(Position)
Indicates a checkpoint has been created. Related to subscription to $all when filters are used.
FirstStreamPosition(u64)
If running a regular subscription, indicates the first’s event position.
LastStreamPosition(u64)
If running a regular subscription, indicates the last’s event position.
LastAllPosition(Position)
If running a subscription to $all, indicates the position of the $all last’s event.
CaughtUp(Option<CaughtUp>)
Indicates the subscription has reached the head of the stream. Is None
if the server
doesn’t support sending checkpoint information.
FellBehind(Option<FellBehind>)
Indicates the subscription has fell behind, meaning it’s no longer keeping up with the
stream’s pace. Is None
if the server doesn’t support sending checkpoint information.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SubscriptionEvent
impl RefUnwindSafe for SubscriptionEvent
impl Send for SubscriptionEvent
impl Sync for SubscriptionEvent
impl Unpin for SubscriptionEvent
impl UnwindSafe for SubscriptionEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request