pub enum DecodeExactError<E, I> {
Early(I, usize),
Inner(E),
}Expand description
The error of a DecodeExact.
The inner decoder is limited in the number of bytes it can read. It errors with UnexpectedEof
when it tries to read more than the allowed amount of bytes.
Variants§
Early(I, usize)
The inner decoder finished decoding too early, after the contained number of bytes. This error also contains the decoded item.
Inner(E)
The inner decoder errored.
Trait Implementations§
Source§impl<E: Display, I> Display for DecodeExactError<E, I>
impl<E: Display, I> Display for DecodeExactError<E, I>
Source§impl<E: Error, I: Debug> Error for DecodeExactError<E, I>
impl<E: Error, I: Debug> Error for DecodeExactError<E, I>
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§impl<E, I> From<E> for DecodeExactError<E, I>
impl<E, I> From<E> for DecodeExactError<E, I>
Source§fn from(err: E) -> DecodeExactError<E, I>
fn from(err: E) -> DecodeExactError<E, I>
Converts to this type from the input type.
Auto Trait Implementations§
impl<E, I> Freeze for DecodeExactError<E, I>
impl<E, I> RefUnwindSafe for DecodeExactError<E, I>where
I: RefUnwindSafe,
E: RefUnwindSafe,
impl<E, I> Send for DecodeExactError<E, I>
impl<E, I> Sync for DecodeExactError<E, I>
impl<E, I> Unpin for DecodeExactError<E, I>
impl<E, I> UnwindSafe for DecodeExactError<E, I>where
I: UnwindSafe,
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
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