#[non_exhaustive]pub enum Event {
Show 13 variants
Connected(Connected),
Disconnected(Disconnected),
Paused(Paused),
Subscribed(Subscribed),
Gap(Gap),
ServerError(ServerError),
Resync(Resync),
Continuity(TopicContinuity),
CheckpointRejected(CheckpointRejected),
Delivered(Vec<String>),
NotDelivered(NotDelivered),
StorageFailed(StorageFailed),
Closed(Option<Error>),
}Expand description
Something that happened to the connection.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Connected(Connected)
The server took the connection (server_ready). Topics are
subscribed again from where the client left off.
Disconnected(Disconnected)
The connection was lost, or an attempt to make it again failed; the
next attempt comes after retry_in.
Paused(Paused)
The application paused the client (Client::pause): the
connection ended and no attempt is made until the last reason is
cleared; topics and positions stay.
Subscribed(Subscribed)
The server’s answer to a subscription request.
Gap(Gap)
Messages of a topic that will not come: reload what depends on them.
ServerError(ServerError)
An error message from the server.
Resync(Resync)
recover-or-resync (Config::delivery): the topics wait for the
application to bring its state of them up to date;
Client::resynced with the round then hands on what they held.
Continuity(TopicContinuity)
A topic’s continuity changed: its messages run without a break, or they broke off and the application’s state of it is to be brought up to date.
CheckpointRejected(CheckpointRejected)
The checkpoint the delivery was given is not this client’s (its realm, user, consumer or schema differs), or not one at all: recovery starts without it.
Delivered(Vec<String>)
The server took these messages of the outbox (their ids): it confirmed them, or, a server older than 3.2, they were written.
NotDelivered(NotDelivered)
These messages of the outbox will not be delivered: the server refused them, they waited too long, or the user changed or signed out.
StorageFailed(StorageFailed)
The outbox’s file (Config::offline) could not be opened or
written: what is kept stays in memory, and may not outlive the
application.
Closed(Option<Error>)
The client stopped for good: closed by the application (None), or
the reason.