pub enum CodecError {
Truncated {
wanted: usize,
available: usize,
},
BadTypeCode(char),
BadSignature(String),
BadUtf8,
BadArrayLength(usize),
}Expand description
A malformed or unexpected message.
Variants§
Truncated
The peer’s length field ran past the end of the buffer.
BadTypeCode(char)
A type code that is not in the specification.
BadSignature(String)
A signature that does not parse.
BadUtf8
A string field that was not valid UTF-8.
BadArrayLength(usize)
An array claimed a length that is not a whole number of elements.
Trait Implementations§
Source§impl Clone for CodecError
impl Clone for CodecError
Source§impl Debug for CodecError
impl Debug for CodecError
Source§impl Display for CodecError
impl Display for CodecError
Source§impl Error for CodecError
impl Error for CodecError
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<CodecError> for Error
impl From<CodecError> for Error
Source§fn from(e: CodecError) -> Self
fn from(e: CodecError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CodecError
impl PartialEq for CodecError
impl StructuralPartialEq for CodecError
Auto Trait Implementations§
impl Forget for CodecError
impl Freeze for CodecError
impl Move for CodecError
impl RefUnwindSafe for CodecError
impl Send for CodecError
impl Sync for CodecError
impl Unpin for CodecError
impl UnsafeUnpin for CodecError
impl UnwindSafe for CodecError
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