pub enum HostEvent {
Ready(Negotiated),
Response {
id: u32,
method: Method,
result: Result<Reply, Error>,
},
Event(Event),
OutOfSync {
stream: Stream,
expected: u64,
received: u64,
},
Resynced {
stream: Stream,
seq: u64,
},
ResyncFailed {
stream: Stream,
error: Error,
},
FrameTooLarge(Oversized),
Closed(DisconnectReason),
}Expand description
What happened on a HostSession.
Variants§
Ready(Negotiated)
The handshake completed.
Response
The answer to a request: the agent’s, or an error the session reports on its behalf (a passed deadline, an oversized frame, a lost connection).
Event(Event)
An event, in order.
OutOfSync
A lossless stream skipped or repeated a sequence number; its events are dropped until the resync the session requested completes.
Resynced
The stream is in sync again: seq is the last number the agent sent
on it before its state was reset.
ResyncFailed
The agent could not resynchronize the stream, which stays out of sync: a resync asked for on demand failed, or an automatic one failed in a way no retry fixes. An automatic resync that fails in a way a retry can fix, such as a busy agent, is sent again after a backoff instead, until the stream is in sync.
FrameTooLarge(Oversized)
A frame over the limit that answered no pending request.
Closed(DisconnectReason)
The session closed; later requests fail at once.