pub enum ValueReadError<E: RmpReadErr = Error> {
InvalidMarkerRead(E),
InvalidDataRead(E),
TypeMismatch(Marker),
}
Expand description
An error which can occur when attempting to read a MessagePack value from the reader.
Variants§
InvalidMarkerRead(E)
Failed to read the marker.
InvalidDataRead(E)
Failed to read the data.
TypeMismatch(Marker)
The type decoded isn’t match with the expected one.
Trait Implementations§
Source§impl<E: Debug + RmpReadErr> Debug for ValueReadError<E>
impl<E: Debug + RmpReadErr> Debug for ValueReadError<E>
Source§impl Display for ValueReadError
impl Display for ValueReadError
Source§impl Error for ValueReadError
impl Error for ValueReadError
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<E: RmpReadErr> From<MarkerReadError<E>> for ValueReadError<E>
impl<E: RmpReadErr> From<MarkerReadError<E>> for ValueReadError<E>
Source§fn from(err: MarkerReadError<E>) -> ValueReadError<E>
fn from(err: MarkerReadError<E>) -> ValueReadError<E>
Converts to this type from the input type.
Source§impl<'a, E: RmpReadErr> From<ValueReadError<E>> for DecodeStringError<'a, E>
impl<'a, E: RmpReadErr> From<ValueReadError<E>> for DecodeStringError<'a, E>
Source§fn from(err: ValueReadError<E>) -> DecodeStringError<'a, E>
fn from(err: ValueReadError<E>) -> DecodeStringError<'a, E>
Converts to this type from the input type.
Source§impl<E: RmpReadErr> From<ValueReadError<E>> for NumValueReadError<E>
impl<E: RmpReadErr> From<ValueReadError<E>> for NumValueReadError<E>
Source§fn from(err: ValueReadError<E>) -> NumValueReadError<E>
fn from(err: ValueReadError<E>) -> NumValueReadError<E>
Converts to this type from the input type.
Auto Trait Implementations§
impl<E> Freeze for ValueReadError<E>where
E: Freeze,
impl<E> RefUnwindSafe for ValueReadError<E>where
E: RefUnwindSafe,
impl<E> Send for ValueReadError<E>where
E: Send,
impl<E> Sync for ValueReadError<E>where
E: Sync,
impl<E> Unpin for ValueReadError<E>where
E: Unpin,
impl<E> UnwindSafe for ValueReadError<E>where
E: UnwindSafe,
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