pub enum DecodeError<Err> {
Parse(Err),
Unconsumed(UnconsumedError),
}Expand description
An error that can occur when decoding from a byte slice.
Variants§
Parse(Err)
Provided slice failed to correctly decode as a type.
Unconsumed(UnconsumedError)
Bytes remained unconsumed after completing decoding.
Trait Implementations§
Source§impl<Err: Clone> Clone for DecodeError<Err>
impl<Err: Clone> Clone for DecodeError<Err>
Source§fn clone(&self) -> DecodeError<Err>
fn clone(&self) -> DecodeError<Err>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Err: Debug> Debug for DecodeError<Err>
impl<Err: Debug> Debug for DecodeError<Err>
Source§impl<Err> Display for DecodeError<Err>where
Err: Display,
impl<Err> Display for DecodeError<Err>where
Err: Display,
Source§impl<Err> Error for DecodeError<Err>where
Err: Error + 'static,
Available on crate feature std only.
impl<Err> Error for DecodeError<Err>where
Err: Error + 'static,
Available on crate feature
std only.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<Err> From<Infallible> for DecodeError<Err>
impl<Err> From<Infallible> for DecodeError<Err>
Source§fn from(never: Infallible) -> Self
fn from(never: Infallible) -> Self
Converts to this type from the input type.
Source§impl<Err: PartialEq> PartialEq for DecodeError<Err>
impl<Err: PartialEq> PartialEq for DecodeError<Err>
impl<Err: Eq> Eq for DecodeError<Err>
impl<Err> StructuralPartialEq for DecodeError<Err>
Auto Trait Implementations§
impl<Err> Freeze for DecodeError<Err>where
Err: Freeze,
impl<Err> RefUnwindSafe for DecodeError<Err>where
Err: RefUnwindSafe,
impl<Err> Send for DecodeError<Err>where
Err: Send,
impl<Err> Sync for DecodeError<Err>where
Err: Sync,
impl<Err> Unpin for DecodeError<Err>where
Err: Unpin,
impl<Err> UnsafeUnpin for DecodeError<Err>where
Err: UnsafeUnpin,
impl<Err> UnwindSafe for DecodeError<Err>where
Err: 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