pub struct VisualRegressionConfig {
pub threshold: f64,
pub color_threshold: u8,
pub baseline_dir: String,
pub diff_dir: String,
pub update_baselines: bool,
}Expand description
Configuration for visual regression testing
Fields§
§threshold: f64Difference threshold (0.0-1.0) - percentage of pixels that can differ
color_threshold: u8Per-pixel color difference threshold (0-255)
baseline_dir: StringDirectory to store baseline images
diff_dir: StringDirectory to store diff images on failure
update_baselines: boolWhether to update baselines automatically
Implementations§
Source§impl VisualRegressionConfig
impl VisualRegressionConfig
Sourcepub const fn with_threshold(self, threshold: f64) -> Self
pub const fn with_threshold(self, threshold: f64) -> Self
Set the threshold
Sourcepub const fn with_color_threshold(self, threshold: u8) -> Self
pub const fn with_color_threshold(self, threshold: u8) -> Self
Set the color threshold
Sourcepub fn with_baseline_dir(self, dir: impl Into<String>) -> Self
pub fn with_baseline_dir(self, dir: impl Into<String>) -> Self
Set the baseline directory
Sourcepub const fn with_update_baselines(self, update: bool) -> Self
pub const fn with_update_baselines(self, update: bool) -> Self
Enable baseline updates
Trait Implementations§
Source§impl Clone for VisualRegressionConfig
impl Clone for VisualRegressionConfig
Source§fn clone(&self) -> VisualRegressionConfig
fn clone(&self) -> VisualRegressionConfig
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 moreSource§impl Debug for VisualRegressionConfig
impl Debug for VisualRegressionConfig
Auto Trait Implementations§
impl Freeze for VisualRegressionConfig
impl RefUnwindSafe for VisualRegressionConfig
impl Send for VisualRegressionConfig
impl Sync for VisualRegressionConfig
impl Unpin for VisualRegressionConfig
impl UnsafeUnpin for VisualRegressionConfig
impl UnwindSafe for VisualRegressionConfig
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