pub struct SnapshotConfig {
pub update_snapshots: bool,
pub threshold: f64,
pub snapshot_dir: String,
}Expand description
Configuration for snapshot testing
Fields§
§update_snapshots: boolWhether to update snapshots on mismatch
threshold: f64Difference threshold (0.0-1.0)
snapshot_dir: StringDirectory to store snapshots
Implementations§
Source§impl SnapshotConfig
impl SnapshotConfig
Sourcepub const fn with_update(self, update: bool) -> Self
pub const fn with_update(self, update: bool) -> Self
Set update mode
Sourcepub const fn with_threshold(self, threshold: f64) -> Self
pub const fn with_threshold(self, threshold: f64) -> Self
Set threshold
Trait Implementations§
Source§impl Clone for SnapshotConfig
impl Clone for SnapshotConfig
Source§fn clone(&self) -> SnapshotConfig
fn clone(&self) -> SnapshotConfig
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 SnapshotConfig
impl Debug for SnapshotConfig
Auto Trait Implementations§
impl Freeze for SnapshotConfig
impl RefUnwindSafe for SnapshotConfig
impl Send for SnapshotConfig
impl Sync for SnapshotConfig
impl Unpin for SnapshotConfig
impl UnsafeUnpin for SnapshotConfig
impl UnwindSafe for SnapshotConfig
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