#[non_exhaustive]pub enum ProtocolError {
Io(Error),
Codec(FrameError),
Timeout(&'static str),
UnexpectedAck {
version: u8,
frame_type: u8,
acked_seq: u32,
expected_seq: u32,
},
PartialAck {
acked: u32,
sent: u32,
},
NoHostsConfigured,
AllHostsFailed(Box<Self>),
WindowTooLarge {
kind: &'static str,
requested: usize,
limit: usize,
},
Tls(String),
}Expand description
Errors emitted by the high-level client.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
I/O error while reading from or writing to the network.
Codec(FrameError)
Codec error (frame parse / encode failure).
Timeout(&'static str)
Operation timed out (connect, write, or ACK read).
UnexpectedAck
The receiver’s ACK had an unexpected version or frame type, or its sequence number didn’t match what the client just sent.
Fields
PartialAck
The receiver acknowledged fewer events than were sent (partial ACK). Surfaces so the caller can decide whether to retry the unacked tail.
Fields
NoHostsConfigured
No hosts were configured for the client.
AllHostsFailed(Box<Self>)
All configured hosts have been tried and all failed; the wrapped error is the most recent failure.
WindowTooLarge
A peer declared, or streamed, a window that exceeds the server’s
configured aggregate limits — either the declared event count
or the accumulated event count / byte total grew past the cap.
Surfaces the per-window resource-exhaustion (memory-growth)
defence, complementing the per-frame FrameError::PayloadTooLarge
/ FrameError::DecompressedTooLarge caps. The server stops
reading and returns this error rather than accumulating further.
Fields
Tls(String)
tls only.TLS configuration error (key/cert load, server-name parse, …).
Trait Implementations§
Source§impl Debug for ProtocolError
impl Debug for ProtocolError
Source§impl Display for ProtocolError
impl Display for ProtocolError
Source§impl Error for ProtocolError
impl Error for ProtocolError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()