#[non_exhaustive]pub enum ErrorKind {
UnsupportedInput,
DimensionMismatch,
TooSmall,
InvalidInput,
Degenerate,
InvalidConfig,
NoMap,
UnsupportedRequest,
Stopped(StopReason),
Resource,
Backend,
Internal,
}Expand description
Coarse, metric-agnostic classification of a failure. Fixed when the error is created, so routing (retry, skip cell, alert) never parses messages.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnsupportedInput
The input’s pixel format/layout/transfer isn’t one the metric accepts natively.
DimensionMismatch
Reference and distorted (or successive frames, or a warm reference and a candidate) disagree on dimensions.
TooSmall
The image is below the metric’s minimum size.
InvalidInput
Input values the metric can’t score (non-finite samples, a buffer shorter than its declared geometry).
Degenerate
Well-formed input whose content the metric can’t characterise — e.g. a featureless image that makes a fitted statistic NaN where the reference implementation raises.
InvalidConfig
The metric’s configuration or a request parameter is invalid (a zero subsample factor, a non-positive p-norm).
NoMap
A map was requested from a metric that publishes none.
UnsupportedRequest
A well-formed request this metric doesn’t implement (an unknown diagnostic request).
Stopped(StopReason)
Stopped through the caller’s Stop/Pulse — cancelled or past
its deadline.
Resource
Allocation failure or a resource ceiling.
Backend
A compute backend (GPU device, thread pool) failed.
Internal
A broken invariant inside the metric. Always a code defect.