pub enum DecoderError {
InvalidInput,
Interrupted,
InputUnderflow,
InvalidTag,
}
Expand description
Contains error options that can be encountered while performing the decoding operations.
Variants§
InvalidInput
Indicates that the decoder received an invalid stream of bytes that can not be decoded.
Interrupted
Indicates that the decoder encountered an I/O interruption. Interrupted operations can typically be retried.
InputUnderflow
Indicates that the buffer from which an item was supposed to be decoded does not contain enough octets to complete the decoding.
InvalidTag
Indicates that the decoder encountered an invalid tag number of a key.
A tag number must be unique per message and the value can be between 1
and 2^29 - 1
.
Trait Implementations§
Source§impl Debug for DecoderError
impl Debug for DecoderError
Source§impl Display for DecoderError
impl Display for DecoderError
Source§impl Error for DecoderError
impl Error for DecoderError
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<Error> for DecoderError
impl From<Error> for DecoderError
Source§impl From<Infallible> for DecoderError
impl From<Infallible> for DecoderError
Source§fn from(_: Infallible) -> Self
fn from(_: Infallible) -> Self
Converts to this type from the input type.
Source§impl PartialEq for DecoderError
impl PartialEq for DecoderError
impl StructuralPartialEq for DecoderError
Auto Trait Implementations§
impl Freeze for DecoderError
impl RefUnwindSafe for DecoderError
impl Send for DecoderError
impl Sync for DecoderError
impl Unpin for DecoderError
impl UnwindSafe for DecoderError
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