pub enum NegotiationError {
Io(Error),
ConnectionClosed,
FrameTooLarge(u32),
Json(Error),
}Expand description
Errors from the negotiation framing reader/writer.
ConnectionClosed is returned (rather than Io) when read_frame hits
a clean UnexpectedEof reading either the length prefix or the body —
the peer closed the stream cleanly rather than failing the transport.
Variants§
Io(Error)
Underlying transport I/O error (not a clean EOF).
ConnectionClosed
The peer closed the stream cleanly (unexpected EOF on the length prefix or the body).
FrameTooLarge(u32)
The frame length exceeded MAX_CHUNK_LEN. A malformed length
prefix can’t trigger an oversized allocation.
Json(Error)
JSON parse error on the negotiation frame or error response.
Trait Implementations§
Source§impl Debug for NegotiationError
impl Debug for NegotiationError
Source§impl Display for NegotiationError
impl Display for NegotiationError
Source§impl Error for NegotiationError
impl Error for NegotiationError
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<Error> for NegotiationError
impl From<Error> for NegotiationError
Source§impl From<Error> for NegotiationError
impl From<Error> for NegotiationError
Source§impl From<NegotiationError> for TtySessionError
impl From<NegotiationError> for TtySessionError
Source§fn from(source: NegotiationError) -> Self
fn from(source: NegotiationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for NegotiationError
impl !UnwindSafe for NegotiationError
impl Freeze for NegotiationError
impl Send for NegotiationError
impl Sync for NegotiationError
impl Unpin for NegotiationError
impl UnsafeUnpin for NegotiationError
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