#[non_exhaustive]pub enum BytesErrorKind {
Primitive(PrimitiveError),
UnexpectedNull,
NegativeLength {
length: i32,
},
TooLong {
length: usize,
max: usize,
},
}Expand description
Specific reason a bytes read/write failed.
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.
Primitive(PrimitiveError)
Underlying primitive read failed (length prefix).
UnexpectedNull
Non-nullable variant got the null marker.
NegativeLength
Length prefix is negative on a non-nullable encoding.
TooLong
Bytes payload exceeds the maximum encodable length.
Trait Implementations§
Source§impl Debug for BytesErrorKind
impl Debug for BytesErrorKind
Source§impl Display for BytesErrorKind
impl Display for BytesErrorKind
Source§impl Error for BytesErrorKind
impl Error for BytesErrorKind
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<BytesErrorKind> for BytesError
impl From<BytesErrorKind> for BytesError
Source§fn from(kind: BytesErrorKind) -> Self
fn from(kind: BytesErrorKind) -> Self
Converts to this type from the input type.
Source§impl From<PrimitiveError> for BytesErrorKind
impl From<PrimitiveError> for BytesErrorKind
Source§fn from(source: PrimitiveError) -> Self
fn from(source: PrimitiveError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BytesErrorKind
impl RefUnwindSafe for BytesErrorKind
impl Send for BytesErrorKind
impl Sync for BytesErrorKind
impl Unpin for BytesErrorKind
impl UnsafeUnpin for BytesErrorKind
impl UnwindSafe for BytesErrorKind
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