pub enum ClientEvent {
Welcome(Box<VerifiedWelcome>),
WelcomeRejected(WelcomeError),
Response(Response),
Retrying {
request_id: RequestId,
kind: &'static str,
error: ErrorBody,
retry_at_ms: u64,
},
GaveUp {
request_id: RequestId,
kind: &'static str,
},
Event(Box<ReceivedEvent>),
Gap(Gap),
ResyncRequired {
stream: Stream,
channel_id: Option<ChannelId>,
},
ProtocolError(ProtocolError),
}Expand description
One outcome for the application.
Variants§
Welcome(Box<VerifiedWelcome>)
The welcome verified: commands may be sent (§6.2).
WelcomeRejected(WelcomeError)
The welcome failed verification; the session is dead and SHOULD alert the user.
Response(Response)
A final response to a command.
Retrying
A transient error (BUSY, RATE_LIMITED, SLOWMODE_ACTIVE, INTERNAL): the same
request is resent at retry_at_ms (§7.3). For the session’s own sync.ack refused
with RATE_LIMITED (kind "sync.ack", a request_id the application never saw) a
new ack with the cursors current at retry_at_ms is sent instead (§10.5); nothing
needs doing.
Fields
GaveUp
No response within the give-up time (24 h, §7.3); the request is abandoned.
Event(Box<ReceivedEvent>)
A catalogue event applied in stream order (§9.4, §10).
Gap(Gap)
A sequence gap; the session has sent sync.resume to repair it (§10).
ResyncRequired
A stream is older than the host’s retention: take a snapshot (member stream) or page
message.history (channel), then reset its cursor (§10.2).
ProtocolError(ProtocolError)
Something was received and ignored safely.
Trait Implementations§
Source§impl Clone for ClientEvent
impl Clone for ClientEvent
Source§fn clone(&self) -> ClientEvent
fn clone(&self) -> ClientEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more