pub enum VisionError {
}Expand description
Errors that can occur during vision/OCR processing.
Variants§
ModelLoad(String)
Failed to load the model.
ModelNotLoaded
Model is not loaded.
ImageProcessing(String)
Failed to process the image.
InvalidFormat(String)
Invalid image format.
ImageDecode(String)
Image decoding error.
OcrEngine(String)
OCR engine error.
OnnxRuntime(String)
ONNX runtime error.
Tesseract(String)
Tesseract error.
Config(String)
Configuration error.
UnsupportedProvider(String)
Unsupported provider.
Timeout(u64)
Timeout error.
ResourceExhaustion(String)
Resource exhaustion.
Io(Error)
I/O error.
Other(String)
Other error.
Implementations§
Source§impl VisionError
impl VisionError
Sourcepub fn model_load(msg: impl Into<String>) -> Self
pub fn model_load(msg: impl Into<String>) -> Self
Create a model load error.
Sourcepub fn image_processing(msg: impl Into<String>) -> Self
pub fn image_processing(msg: impl Into<String>) -> Self
Create an image processing error.
Sourcepub fn ocr_engine(msg: impl Into<String>) -> Self
pub fn ocr_engine(msg: impl Into<String>) -> Self
Create an OCR engine error.
Sourcepub fn onnx_runtime(msg: impl Into<String>) -> Self
pub fn onnx_runtime(msg: impl Into<String>) -> Self
Create an ONNX runtime error.
Sourcepub fn unsupported_provider(provider: impl Into<String>) -> Self
pub fn unsupported_provider(provider: impl Into<String>) -> Self
Create an unsupported provider error.
Sourcepub fn diagnostic(&self) -> ErrorDiagnostic
pub fn diagnostic(&self) -> ErrorDiagnostic
Get diagnostic information for this error.
Returns helpful suggestions, documentation links, and system diagnostics to help troubleshoot the error.
Sourcepub fn with_diagnostics(&self) -> String
pub fn with_diagnostics(&self) -> String
Get a user-friendly error message with diagnostic information.
This includes the error message plus suggestions and system diagnostics.
Trait Implementations§
Source§impl Debug for VisionError
impl Debug for VisionError
Source§impl Display for VisionError
impl Display for VisionError
Source§impl Error for VisionError
impl Error for VisionError
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
Auto Trait Implementations§
impl Freeze for VisionError
impl !RefUnwindSafe for VisionError
impl Send for VisionError
impl Sync for VisionError
impl Unpin for VisionError
impl !UnwindSafe for VisionError
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.