pub enum ImageOpsError {
DimensionMismatch {
lhs: (u32, u32, u32),
rhs: (u32, u32, u32),
},
UnsupportedPixelFormat(PixelFormat),
UnsupportedConversion {
src: PixelFormat,
dst: PixelFormat,
},
InvalidParameter(&'static str),
EmptyInput,
Backend(String),
}Expand description
Errors produced by crate::ImageOpsPort.
Variants§
DimensionMismatch
Two inputs did not agree on (width, height, channels).
Fields
UnsupportedPixelFormat(PixelFormat)
The operation does not support the input’s pixel format.
UnsupportedConversion
The operation does not support the requested source/destination conversion.
InvalidParameter(&'static str)
A parameter was out of range or otherwise invalid.
EmptyInput
The input buffer was empty where a non-empty one was required.
Backend(String)
A backend-specific error surfaced as a string.
Trait Implementations§
Source§impl Debug for ImageOpsError
impl Debug for ImageOpsError
Source§impl Display for ImageOpsError
impl Display for ImageOpsError
Source§impl Error for ImageOpsError
impl Error for ImageOpsError
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 From<ImageOpsError> for OpenCvError
impl From<ImageOpsError> for OpenCvError
Source§fn from(source: ImageOpsError) -> OpenCvError
fn from(source: ImageOpsError) -> OpenCvError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ImageOpsError
impl RefUnwindSafe for ImageOpsError
impl Send for ImageOpsError
impl Sync for ImageOpsError
impl Unpin for ImageOpsError
impl UnsafeUnpin for ImageOpsError
impl UnwindSafe for ImageOpsError
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