pub enum ReadError<E> {
Range(RangeError),
Source(E),
ShortRead {
range: Range<usize>,
expected: usize,
actual: usize,
},
}Expand description
A read-through failure.
Variants§
Range(RangeError)
Invalid range or cache payload.
Source(E)
Source-specific failure.
ShortRead
The source returned fewer or more bytes than requested.
Trait Implementations§
Source§impl<E> Error for ReadError<E>
impl<E> Error for ReadError<E>
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> From<RangeError> for ReadError<E>
impl<E> From<RangeError> for ReadError<E>
Source§fn from(source: RangeError) -> Self
fn from(source: RangeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<E> Freeze for ReadError<E>where
E: Freeze,
impl<E> RefUnwindSafe for ReadError<E>where
E: RefUnwindSafe,
impl<E> Send for ReadError<E>where
E: Send,
impl<E> Sync for ReadError<E>where
E: Sync,
impl<E> Unpin for ReadError<E>where
E: Unpin,
impl<E> UnsafeUnpin for ReadError<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for ReadError<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