pub enum RawMessageError {
Incomplete,
Garbled,
InvalidChecksum {
frame_len: usize,
},
}Expand description
Why raw_message could not frame a message.
The split tells a caller reading from a socket what to do with its buffer;
see raw_message for how it bounds that buffer.
Variants§
Incomplete
A well-formed prefix that stops short. Keep the bytes and read more.
Garbled
The bytes are not a message and no further input can make them one. Drop them and resynchronize.
InvalidChecksum
Framing held, but CheckSum(10) disagrees with the bytes it covers.
The frame is complete and its extent is known: skip frame_len
bytes and resume parsing right behind it - no need to scan for the
next message start.
Trait Implementations§
Source§impl Debug for RawMessageError
impl Debug for RawMessageError
Source§impl Display for RawMessageError
impl Display for RawMessageError
Source§impl Error for RawMessageError
impl Error for RawMessageError
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<RawMessageError> for DeserializeErrorKind
impl From<RawMessageError> for DeserializeErrorKind
Source§fn from(error: RawMessageError) -> Self
fn from(error: RawMessageError) -> Self
Converts to this type from the input type.
Source§impl From<RawMessageError> for DeserializeError
impl From<RawMessageError> for DeserializeError
Source§fn from(error: RawMessageError) -> Self
fn from(error: RawMessageError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Forget for RawMessageError
impl Freeze for RawMessageError
impl RefUnwindSafe for RawMessageError
impl Send for RawMessageError
impl Sync for RawMessageError
impl Unpin for RawMessageError
impl UnsafeUnpin for RawMessageError
impl UnwindSafe for RawMessageError
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