pub enum SyncError {
Io(Error),
UnknownPeer,
IndexOutOfRange,
EncodingError(String),
CursorMismatch {
expected_idx: u64,
actual_idx: u64,
},
CodecError(CodecError),
Backend(Box<dyn Error + Send + Sync>),
}Expand description
The sync subsystem’s error: reading a log (LogSource),
applying entries (LogProcessor), or writing the
local log (FileLogSink). Backends erase their own
errors into SyncError::Backend, so the object-safe traits share one fixed
error type instead of an associated one.
Variants§
Io(Error)
An underlying I/O error.
UnknownPeer
A peer id that this source/sink does not know.
IndexOutOfRange
A requested entry index lay outside the peer’s log.
EncodingError(String)
A value could not be encoded for transport/storage.
CursorMismatch
The pull cursor’s expected next index disagreed with the source — the streams are out of sync.
Fields
CodecError(CodecError)
A wire-format error decoding a peer’s log entries.
Backend(Box<dyn Error + Send + Sync>)
A backend failure erased behind a boxed error, letting a concrete replica surface its own error type through the fixed trait boundary.
Trait Implementations§
Source§impl Error for SyncError
impl Error for SyncError
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()