pub enum ReplicaError {
HandshakeRejected,
AckMalformed,
Truncated,
Frame(WireError),
OffsetGap {
expected: u64,
got: u64,
},
UnexpectedInSnapshot,
SnapshotInProgress,
Io(Error),
}Expand description
Errors a replica client can surface to its driver loop.
Variants§
HandshakeRejected
Primary closed the connection or never replied during the
handshake / +ACK exchange.
AckMalformed
+ACK line was malformed (didn’t start with +ACK , didn’t
parse the offset).
Truncated
Peer closed the connection mid-frame; reconnect to resume.
Frame(WireError)
Wire-level decode error (envelope shape wrong, payload malformed, etc.).
OffsetGap
Frame arrived with an offset other than the expected next. Caller should trigger a full snapshot resync (T1.22).
Fields
UnexpectedInSnapshot
While streaming a snapshot, the primary sent bytes that were
neither a snapshot chunk nor +SNAPSHOT_END. v1.18.0 forbids
interleaving live frames inside a snapshot (see docs/snapshot.md).
SnapshotInProgress
next_frame was called but the next event is a snapshot
marker / chunk. Callers that want the snapshot-aware surface
must use ReplicaClient::next_event.
Io(Error)
Underlying socket I/O failure.
Trait Implementations§
Source§impl Debug for ReplicaError
impl Debug for ReplicaError
Source§impl Display for ReplicaError
impl Display for ReplicaError
Source§impl Error for ReplicaError
impl Error for ReplicaError
1.30.0 · 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()