#[non_exhaustive]pub enum VisionError {
ImageLoadFailed(String),
RequestFailed(String),
InvalidArgument(String),
Unknown {
code: i32,
message: String,
},
}Expand description
Top-level error type returned by Vision APIs in this crate.
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.
ImageLoadFailed(String)
Image at the supplied path could not be loaded.
RequestFailed(String)
VNImageRequestHandler.perform returned an error.
InvalidArgument(String)
Caller supplied an invalid argument (NUL byte in path, etc.).
Unknown
Catch-all for unmapped statuses from the Swift bridge.
Trait Implementations§
Source§impl Clone for VisionError
impl Clone for VisionError
Source§fn clone(&self) -> VisionError
fn clone(&self) -> VisionError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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
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()
Source§impl PartialEq for VisionError
impl PartialEq for VisionError
Source§fn eq(&self, other: &VisionError) -> bool
fn eq(&self, other: &VisionError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for VisionError
impl StructuralPartialEq for VisionError
Auto Trait Implementations§
impl Freeze for VisionError
impl RefUnwindSafe for VisionError
impl Send for VisionError
impl Sync for VisionError
impl Unpin for VisionError
impl UnsafeUnpin 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
Mutably borrows from an owned value. Read more