pub struct SnapshotDiff {
pub identical: bool,
pub difference_count: usize,
pub difference_percent: f64,
pub diff_data: Vec<u8>,
}Expand description
Result of comparing two snapshots
Fields§
§identical: boolWhether snapshots are identical
difference_count: usizeNumber of differing bytes/pixels
difference_percent: f64Percentage of difference
diff_data: Vec<u8>Visual diff data (highlighted differences)
Implementations§
Source§impl SnapshotDiff
impl SnapshotDiff
Sourcepub const fn is_identical(&self) -> bool
pub const fn is_identical(&self) -> bool
Check if snapshots are identical
Sourcepub fn within_threshold(&self, threshold: f64) -> bool
pub fn within_threshold(&self, threshold: f64) -> bool
Check if difference is within threshold
Trait Implementations§
Source§impl Clone for SnapshotDiff
impl Clone for SnapshotDiff
Source§fn clone(&self) -> SnapshotDiff
fn clone(&self) -> SnapshotDiff
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SnapshotDiff
impl RefUnwindSafe for SnapshotDiff
impl Send for SnapshotDiff
impl Sync for SnapshotDiff
impl Unpin for SnapshotDiff
impl UnsafeUnpin for SnapshotDiff
impl UnwindSafe for SnapshotDiff
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