#[non_exhaustive]pub enum VisionError {
Io {
path: PathBuf,
source: Error,
},
Decode(ImageError),
Json(Error),
Invalid(String),
Limit(RustTorchError),
Tensor(TchError),
}Expand description
Image decoding, annotation, I/O or tensor failure.
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.
Io
A local file could not be read.
Decode(ImageError)
Image codec failure.
Json(Error)
Invalid annotation JSON.
Invalid(String)
Invalid metadata or transform configuration.
Limit(RustTorchError)
Resource ceiling was exceeded.
Tensor(TchError)
LibTorch rejected tensor construction or transformation.
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)>
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()
Source§impl From<Error> for VisionError
impl From<Error> for VisionError
Source§impl From<ImageError> for VisionError
impl From<ImageError> for VisionError
Source§fn from(source: ImageError) -> Self
fn from(source: ImageError) -> Self
Converts to this type from the input type.
Source§impl From<RustTorchError> for VisionError
impl From<RustTorchError> for VisionError
Source§fn from(source: RustTorchError) -> Self
fn from(source: RustTorchError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for VisionError
impl !UnwindSafe for VisionError
impl Forget for VisionError
impl Freeze for VisionError
impl Send for VisionError
impl Sync for VisionError
impl Unpin for VisionError
impl UnsafeUnpin 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
Mutably borrows from an owned value. Read more