#[non_exhaustive]pub enum CoroutineError {
Storage(StorageError),
InputRangeOverflow,
InputSpanLimit {
limit: usize,
},
Control(ControlError),
RowAllocation,
Source(SourceError),
Sink(SinkError),
Cancelled(StopReason),
Finished,
Stalled,
RowsBeforeHeader,
ReadExceedsInputCap {
len: usize,
cap: usize,
},
}Expand description
Failure inside a coroutine decode, convertible into the codec’s error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Storage(StorageError)
Input payload, range index or row staging could not be admitted.
InputRangeOverflow
An absolute byte range overflowed the source address space.
InputSpanLimit
The admitted input range index cannot represent another disjoint span.
Control(ControlError)
A required interpretation boundary was violated.
RowAllocation
A row buffer size overflowed or its allocation failed.
Source(SourceError)
A read could not be satisfied (past the announced end).
Sink(SinkError)
The sink refused rows.
Cancelled(StopReason)
The driver’s stop token tripped.
Finished
The decoder was stepped after it finished or failed.
Stalled
The coroutine suspended without asking for anything (author bug).
RowsBeforeHeader
The coroutine wrote rows before setting the image info and output descriptor, so the sink could not be told the geometry (author bug).
ReadExceedsInputCap
One read asked for more bytes than the decoder’s input cap can hold, so it could never complete.
Trait Implementations§
Source§impl Debug for CoroutineError
impl Debug for CoroutineError
Source§impl Display for CoroutineError
impl Display for CoroutineError
Source§impl Error for CoroutineError
impl Error for CoroutineError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ControlError> for CoroutineError
impl From<ControlError> for CoroutineError
Source§fn from(error: ControlError) -> Self
fn from(error: ControlError) -> Self
Source§impl From<SourceError> for CoroutineError
impl From<SourceError> for CoroutineError
Source§fn from(e: SourceError) -> Self
fn from(e: SourceError) -> Self
Source§impl From<StopReason> for CoroutineError
impl From<StopReason> for CoroutineError
Source§impl From<StorageError> for CoroutineError
impl From<StorageError> for CoroutineError
Source§fn from(e: StorageError) -> Self
fn from(e: StorageError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for CoroutineError
impl !UnwindSafe for CoroutineError
impl Freeze for CoroutineError
impl Send for CoroutineError
impl Sync for CoroutineError
impl Unpin for CoroutineError
impl UnsafeUnpin for CoroutineError
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
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>
UnsupportedOperation in this error’s cause chain.Source§fn limit_exceeded(&self) -> Option<&LimitExceeded>
fn limit_exceeded(&self) -> Option<&LimitExceeded>
LimitExceeded in this error’s cause chain.Source§fn codec_error(&self) -> Option<&CodecError>
fn codec_error(&self) -> Option<&CodecError>
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,
T in this error’s cause chain.Source§fn error_category(&self) -> Option<ErrorCategory>
fn error_category(&self) -> Option<ErrorCategory>
codec_error().map(CodecError::category) — the
coarse axis app/lib code routes on.