pub enum OcrError {
UnresolvedProvenance {
labels: Vec<String>,
},
InvalidProvenance,
UnsafeArtifactPath {
path: PathBuf,
},
MissingArtifact {
path: PathBuf,
},
DigestMismatch {
path: PathBuf,
expected: String,
actual: String,
},
Runtime(String),
BackendUnavailable(String),
NoFallbackConfigured(String),
}Variants§
UnresolvedProvenance
InvalidProvenance
UnsafeArtifactPath
MissingArtifact
DigestMismatch
Runtime(String)
The requested backend cannot run on this machine (capability verdict).
NoFallbackConfigured(String)
A fallback ONNX engine was needed but no OnnxConfig was supplied.
Implementations§
Source§impl OcrError
impl OcrError
Sourcepub fn kind(&self) -> OcrErrorKind
pub fn kind(&self) -> OcrErrorKind
The typed kind to key on. Each variant maps to one kind; BackendUnavailable is refined
by its backend prefix when it has one, so a Vision verdict reports
OcrErrorKind::MacosVisionUnavailable. NoFallbackConfigured stays its own kind even
when its message carries the native cause. Worker-level kinds such as WorkerTimeout
reach callers through WorkerFailure::kind and surface here as Runtime.
Trait Implementations§
impl Eq for OcrError
Source§impl Error for OcrError
impl Error for OcrError
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()
impl StructuralPartialEq for OcrError
Auto Trait Implementations§
impl Freeze for OcrError
impl RefUnwindSafe for OcrError
impl Send for OcrError
impl Sync for OcrError
impl Unpin for OcrError
impl UnsafeUnpin for OcrError
impl UnwindSafe for OcrError
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