pub enum Error {
Image(ImageError),
InvalidRange(InvalidRange),
SizeMismatch(SizeMismatch),
ExampleGuideMismatch(u32, u32),
Io(Error),
UnsupportedOutputFormat(String),
NoExamples,
MapsCountMismatch(u32, u32),
}
Variants§
Image(ImageError)
An error in the image library occurred, eg failed to load/save
InvalidRange(InvalidRange)
An input parameter had an invalid range specified
SizeMismatch(SizeMismatch)
When using inpaint, the input and output sizes must match
ExampleGuideMismatch(u32, u32)
If more than 1 example guide is provided, then all examples must have a guide
Io(Error)
Io is notoriously error free with no problems, but we cover it just in case!
UnsupportedOutputFormat(String)
The user specified an image format we don’t support as the output
NoExamples
There are no examples to source pixels from, either because no examples were added, or all of them used SampleMethod::Ignore
MapsCountMismatch(u32, u32)
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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<ImageError> for Error
impl From<ImageError> for Error
Source§fn from(ie: ImageError) -> Self
fn from(ie: ImageError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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