pub enum Error {
Protocol(Violation),
Validation(ValidationError),
Parse(ParseError),
Io(Error),
HandshakeTimeout,
WriteTimeout,
}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.
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(inner: ParseError) -> Self
fn from(inner: ParseError) -> Self
Converts to this type from the input type.
Source§impl From<ValidationError> for Error
impl From<ValidationError> for Error
Source§fn from(inner: ValidationError) -> Self
fn from(inner: ValidationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more