pub enum SsimError {
SizeMismatch {
img1_width: u32,
img1_height: u32,
img2_width: u32,
img2_height: u32,
},
InputTooSmall {
width: u32,
height: u32,
minimum: u32,
},
Options(String),
}Expand description
Why a metric could not produce a score.
The messages are the ones blazediff’s front-ends have always printed, so a caller wrapping this in its own error type can forward them verbatim.
Variants§
SizeMismatch
The two inputs are not the same size.
InputTooSmall
The input is smaller than the chosen metric can work on.
Options(String)
The metric was configured with values it cannot honour.
Trait Implementations§
impl Eq for SsimError
Source§impl Error for SsimError
impl Error for SsimError
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()
impl StructuralPartialEq for SsimError
Auto Trait Implementations§
impl Freeze for SsimError
impl RefUnwindSafe for SsimError
impl Send for SsimError
impl Sync for SsimError
impl Unpin for SsimError
impl UnsafeUnpin for SsimError
impl UnwindSafe for SsimError
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