pub enum DecodeError<ProducerError> {
Producer(ProducerError),
InvalidInput,
U64DoesNotFitUsize,
}
Expand description
Everything that can go wrong when decoding a value.
Variants§
Producer(ProducerError)
The producer of the bytes to be decoded errored somehow.
InvalidInput
The bytes produced by the producer cannot be decoded into anything meaningful.
U64DoesNotFitUsize
Tried to use a u64 as a usize when the current compilation target’s usize is not big enough.
Trait Implementations§
Source§impl<ProducerError: Clone> Clone for DecodeError<ProducerError>
impl<ProducerError: Clone> Clone for DecodeError<ProducerError>
Source§fn clone(&self) -> DecodeError<ProducerError>
fn clone(&self) -> DecodeError<ProducerError>
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<ProducerError: Debug> Debug for DecodeError<ProducerError>
impl<ProducerError: Debug> Debug for DecodeError<ProducerError>
Source§impl<E> Display for DecodeError<E>
impl<E> Display for DecodeError<E>
Source§impl<E> Error for DecodeError<E>where
E: 'static + Error,
impl<E> Error for DecodeError<E>where
E: 'static + Error,
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<F, E> From<OverwriteFullSliceError<F, E>> for DecodeError<E>
impl<F, E> From<OverwriteFullSliceError<F, E>> for DecodeError<E>
Source§fn from(value: OverwriteFullSliceError<F, E>) -> Self
fn from(value: OverwriteFullSliceError<F, E>) -> Self
Converts to this type from the input type.
Source§impl<ProducerError> From<TryFromIntError> for DecodeError<ProducerError>
impl<ProducerError> From<TryFromIntError> for DecodeError<ProducerError>
Source§fn from(_: TryFromIntError) -> Self
fn from(_: TryFromIntError) -> Self
Converts to this type from the input type.
Source§impl<ProducerError: PartialEq> PartialEq for DecodeError<ProducerError>
impl<ProducerError: PartialEq> PartialEq for DecodeError<ProducerError>
impl<ProducerError: Eq> Eq for DecodeError<ProducerError>
impl<ProducerError> StructuralPartialEq for DecodeError<ProducerError>
Auto Trait Implementations§
impl<ProducerError> Freeze for DecodeError<ProducerError>where
ProducerError: Freeze,
impl<ProducerError> RefUnwindSafe for DecodeError<ProducerError>where
ProducerError: RefUnwindSafe,
impl<ProducerError> Send for DecodeError<ProducerError>where
ProducerError: Send,
impl<ProducerError> Sync for DecodeError<ProducerError>where
ProducerError: Sync,
impl<ProducerError> Unpin for DecodeError<ProducerError>where
ProducerError: Unpin,
impl<ProducerError> UnwindSafe for DecodeError<ProducerError>where
ProducerError: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more