pub struct Tolerance {
pub min_score: Option<f64>,
pub max_outliers: Option<f64>,
pub channel_delta: u8,
}snapshot only.Expand description
How closely a frame must match its snapshot.
Every gate this names must pass. A gate left as None is one whose verdict
would be meaningless for this snapshot’s content, and leaving it out says so
rather than naming a threshold that either never passes or never fails.
The two gates catch different mistakes. The perceptual score notices a change spread thinly over the whole frame, which moves every pixel a little. The outlier allowance notices a change confined to a few pixels, which moves those a lot — the kind a second implementation of the same pipeline produces where it resolves an edge or an occlusion differently, and the kind an average over the frame barely registers.
Fields§
§min_score: Option<f64>The perceptual score the frame must reach, on SSIMULACRA2’s 0–100 scale,
or None to judge the frame only by its outlier pixels.
max_outliers: Option<f64>The fraction of pixels that may differ from the baseline by more than
channel_delta, or None to judge the frame
only by its score.
channel_delta: u8The per-channel difference, in 0–255 units, within which a pixel counts as matching however far the frame’s score falls.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Tolerance
impl Freeze for Tolerance
impl RefUnwindSafe for Tolerance
impl Send for Tolerance
impl Sync for Tolerance
impl Unpin for Tolerance
impl UnsafeUnpin for Tolerance
impl UnwindSafe for Tolerance
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more