pub struct VisualTestConfig {
pub golden_dir: PathBuf,
pub update_mode: bool,
pub color_tolerance: u8,
pub generate_diff: bool,
pub fail_on_missing: bool,
pub include_styles: bool,
pub include_colors: bool,
}Expand description
Configuration for visual regression tests
Fields§
§golden_dir: PathBufBase directory for golden files
update_mode: boolWhether to update golden files instead of comparing
color_tolerance: u8Tolerance for color differences (0-255)
generate_diff: boolWhether to generate diff images
fail_on_missing: boolWhether to fail on missing golden files
include_styles: boolInclude style information (bold, italic, etc.)
include_colors: boolInclude color information
Implementations§
Source§impl VisualTestConfig
impl VisualTestConfig
Sourcepub fn tolerance(self, tolerance: u8) -> Self
pub fn tolerance(self, tolerance: u8) -> Self
Set color tolerance (0 = exact match, 255 = any color matches)
Sourcepub fn generate_diff(self, enable: bool) -> Self
pub fn generate_diff(self, enable: bool) -> Self
Enable or disable diff generation
Sourcepub fn include_styles(self, enable: bool) -> Self
pub fn include_styles(self, enable: bool) -> Self
Enable or disable style comparison
Sourcepub fn include_colors(self, enable: bool) -> Self
pub fn include_colors(self, enable: bool) -> Self
Enable or disable color comparison
Trait Implementations§
Source§impl Clone for VisualTestConfig
impl Clone for VisualTestConfig
Source§fn clone(&self) -> VisualTestConfig
fn clone(&self) -> VisualTestConfig
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 VisualTestConfig
impl Debug for VisualTestConfig
Auto Trait Implementations§
impl Freeze for VisualTestConfig
impl RefUnwindSafe for VisualTestConfig
impl Send for VisualTestConfig
impl Sync for VisualTestConfig
impl Unpin for VisualTestConfig
impl UnsafeUnpin for VisualTestConfig
impl UnwindSafe for VisualTestConfig
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