#[non_exhaustive]pub enum DecodingErrorDetails {
UnknownResponseCode(u32),
MissingKey(&'static str),
TypeMismatch {
expected: &'static str,
actual: Cow<'static, str>,
},
InvalidTupleLength {
expected: usize,
actual: usize,
},
Serde(Error),
MessagePack(Error),
}
Expand description
Details of DecodingError
.
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.
UnknownResponseCode(u32)
Unknown response code.
MissingKey(&'static str)
Certain key missing in response.
TypeMismatch
Value have different type than expected for that key or field.
InvalidTupleLength
Tuple have invalid length
Serde(Error)
Error while deserializing rmpv::Value
into concrete type.
MessagePack(Error)
Error while decoding data from MessagePack format.
Trait Implementations§
Source§impl Debug for DecodingErrorDetails
impl Debug for DecodingErrorDetails
Source§impl Display for DecodingErrorDetails
impl Display for DecodingErrorDetails
Source§impl Error for DecodingErrorDetails
impl Error for DecodingErrorDetails
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<DecodingErrorDetails> for DecodingError
impl From<DecodingErrorDetails> for DecodingError
Source§fn from(value: DecodingErrorDetails) -> Self
fn from(value: DecodingErrorDetails) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DecodingErrorDetails
impl RefUnwindSafe for DecodingErrorDetails
impl Send for DecodingErrorDetails
impl Sync for DecodingErrorDetails
impl Unpin for DecodingErrorDetails
impl UnwindSafe for DecodingErrorDetails
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