#[non_exhaustive]pub enum PumpFailure<E> {
Step(E),
Io(Error),
NeedsRandomAccess(InputRequest),
WindowLimit {
needed: usize,
limit: usize,
},
Protocol(ProtocolViolation),
Input(InputError),
}Expand description
Failure of a drive over a sequential std::io::Read stream.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Step(E)
The stage failed.
Io(Error)
Reading the stream failed.
NeedsRandomAccess(InputRequest)
The stage asked for bytes behind the stream position, or for the
total length before the stream ended. A stream cannot serve
either; wrap it in BufferedReadAt and
use a ReadAtCursor.
WindowLimit
The stage needs more contiguous bytes than max_window allows.
Protocol(ProtocolViolation)
The stage broke the protocol.
Input(InputError)
Fallible input allocation or address admission failed.
Trait Implementations§
Source§impl<E: Debug> Debug for PumpFailure<E>
impl<E: Debug> Debug for PumpFailure<E>
Source§impl<E: Display> Display for PumpFailure<E>
impl<E: Display> Display for PumpFailure<E>
Source§impl<E: Error + 'static> Error for PumpFailure<E>
impl<E: Error + 'static> Error for PumpFailure<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()
Auto Trait Implementations§
impl<E> !RefUnwindSafe for PumpFailure<E>
impl<E> !UnwindSafe for PumpFailure<E>
impl<E> Freeze for PumpFailure<E>where
E: Freeze,
impl<E> Send for PumpFailure<E>where
E: Send,
impl<E> Sync for PumpFailure<E>where
E: Sync,
impl<E> Unpin for PumpFailure<E>where
E: Unpin,
impl<E> UnsafeUnpin for PumpFailure<E>where
E: UnsafeUnpin,
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<E> CodecErrorExt for Ewhere
E: Error + 'static,
impl<E> CodecErrorExt for Ewhere
E: Error + 'static,
Source§fn unsupported_operation(&self) -> Option<&UnsupportedOperation>
fn unsupported_operation(&self) -> Option<&UnsupportedOperation>
Find an
UnsupportedOperation in this error’s cause chain.Source§fn limit_exceeded(&self) -> Option<&LimitExceeded>
fn limit_exceeded(&self) -> Option<&LimitExceeded>
Find a
LimitExceeded in this error’s cause chain.Source§fn codec_error(&self) -> Option<&CodecError>
fn codec_error(&self) -> Option<&CodecError>
Recover the shared
CodecError envelope from this error’s chain — after
any erasure (Box<dyn Error>, anyhow::Error, a mapped wrapper) — by
downcasting to the concrete At<CodecError> (or a bare CodecError),
tolerating a single Box layer (Box<At<CodecError>> etc., so a codec may
use an 8-byte boxed type Error). It gives the
category and the originating
codec name, so a consumer can tell codecs apart
without naming any codec-specific type. Read moreSource§fn find_cause<T>(&self) -> Option<&T>where
T: Error + 'static,
fn find_cause<T>(&self) -> Option<&T>where
T: Error + 'static,
Find a cause of arbitrary type
T in this error’s cause chain.Source§fn error_category(&self) -> Option<ErrorCategory>
fn error_category(&self) -> Option<ErrorCategory>
Shortcut for
codec_error().map(CodecError::category) — the
coarse axis app/lib code routes on.