#[non_exhaustive]pub struct Comparison {
pub same_size: bool,
pub over: u32,
pub worst: u8,
pub first: Option<(u32, u32)>,
pub diff: Image,
pub tolerance: Tolerance,
}Expand description
What compare found. Over pictures of different sizes, every field
but same_size covers the top-left area both share.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.same_size: boolWhether the two pictures are the same size.
over: u32How many pixels differ by more than tolerance.channel in some
colour channel (alpha is ignored: a window has none).
worst: u8The largest difference in any colour channel of any pixel.
first: Option<(u32, u32)>The first pixel counted in over, in row order.
diff: ImageThe reference with every colour channel halved, and each pixel
counted in over in MISSING_COLOR.
tolerance: ToleranceThe tolerance compared with.
Implementations§
Trait Implementations§
Source§impl Clone for Comparison
impl Clone for Comparison
Source§fn clone(&self) -> Comparison
fn clone(&self) -> Comparison
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 Comparison
impl Debug for Comparison
impl Eq for Comparison
Source§impl PartialEq for Comparison
impl PartialEq for Comparison
impl StructuralPartialEq for Comparison
Auto Trait Implementations§
impl Freeze for Comparison
impl RefUnwindSafe for Comparison
impl Send for Comparison
impl Sync for Comparison
impl Unpin for Comparison
impl UnsafeUnpin for Comparison
impl UnwindSafe for Comparison
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