#[non_exhaustive]pub enum CodecErrorKind {
Io,
UnexpectedEof,
InvalidEncoding(InvalidEncodingReason),
}Expand description
Classifies an error reported by a protocol codec.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Io
An I/O error other than an unexpected end of input occurred.
UnexpectedEof
A read ended before the codec received all required bytes.
InvalidEncoding(InvalidEncodingReason)
The data could not be decoded or encoded according to the codec’s format or limits.
Trait Implementations§
Source§impl Clone for CodecErrorKind
impl Clone for CodecErrorKind
Source§fn clone(&self) -> CodecErrorKind
fn clone(&self) -> CodecErrorKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CodecErrorKind
Source§impl Debug for CodecErrorKind
impl Debug for CodecErrorKind
impl Eq for CodecErrorKind
Source§impl Hash for CodecErrorKind
impl Hash for CodecErrorKind
Source§impl PartialEq for CodecErrorKind
impl PartialEq for CodecErrorKind
impl StructuralPartialEq for CodecErrorKind
Auto Trait Implementations§
impl Freeze for CodecErrorKind
impl RefUnwindSafe for CodecErrorKind
impl Send for CodecErrorKind
impl Sync for CodecErrorKind
impl Unpin for CodecErrorKind
impl UnsafeUnpin for CodecErrorKind
impl UnwindSafe for CodecErrorKind
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