pub enum Error {
Protocol(Violation),
Validation(ValidationError),
Parse(ParseError),
Io(Error),
HandshakeTimeout,
WriteTimeout,
PublicationQueueFull,
PublicationWorkerFailed,
}Expand description
Anything that can go wrong while running a session.
Variants§
Protocol(Violation)
The wire contract was broken.
Validation(ValidationError)
A snapshot failed validation before it was sent.
Parse(ParseError)
An incoming message could not be parsed.
Io(Error)
The transport failed.
HandshakeTimeout
The driver did not answer the handshake in time.
WriteTimeout
The driver did not read a frame within the write deadline.
Distinct from Error::Io so a caller can tell a slow driver — drop
the frame, keep rendering — from a snapshot refused as invalid, which
will be refused again for the same tree. Part of a length-prefixed
frame may already be on the wire, so the session is over, not delayed.
PublicationQueueFull
A bounded asynchronous publication queue had no free slot. The rejected frame consumed no revision and must receive no marker.
PublicationWorkerFailed
The asynchronous publication worker failed or was closed. No later revision can be admitted.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()