pub enum DecodeError {
Io(Error),
MissingFrame,
UnexpectedSentinel,
FrameOverflow,
}
Expand description
Error while decoding.
Variants§
Io(Error)
An error occured while reading from the underlying IO object.
This variant is not used by this crate itself
since decoding does not interact with IO,
but is required to implement Decoder
because FramedRead
wraps both the decoder and the IO object and needs
to present a single error type.
MissingFrame
A frame was found to start with a sentinel byte.
This variant indicates corrupted data, either by the sender or during transmission.
UnexpectedSentinel
The sentinel byte was found in an invalid position.
This variant indicates corrupted data, either by the sender or during transmission.
FrameOverflow
The frame was longer than the limit.
This variant is never returned by unlimited decoders.
Either the data was corrupted during transmission, or the sender encoded a frame that exceeds the limit.