pub enum ReadableError {
Io(Error),
DecodeError(DecodeError),
}Expand description
Error returned when reading a value from a Read source fails.
Wraps either an I/O error from the underlying reader or a DecodeError produced
when the bytes are valid I/O but do not represent a valid value of the target type.
Variants§
Io(Error)
An I/O error occurred while reading bytes from the underlying reader.
DecodeError(DecodeError)
The bytes were read successfully but could not be decoded into the target type.
Trait Implementations§
Source§impl Debug for ReadableError
impl Debug for ReadableError
Source§impl Display for ReadableError
impl Display for ReadableError
Source§impl Error for ReadableError
impl Error for ReadableError
1.30.0 · 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<DecodeError> for ReadableError
impl From<DecodeError> for ReadableError
Source§fn from(value: DecodeError) -> Self
fn from(value: DecodeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ReadableError
impl !UnwindSafe for ReadableError
impl Forget for ReadableError
impl Freeze for ReadableError
impl Move for ReadableError
impl Send for ReadableError
impl Sync for ReadableError
impl Unpin for ReadableError
impl UnsafeUnpin for ReadableError
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