pub enum SnapshotMode {
Compare,
Update,
}Expand description
Whether a snapshot assertion compares against the stored file or rewrites it.
Variants§
Compare
Compare actual against the stored snapshot. A missing file is a
failure: the snapshot has to be created deliberately, in Update
mode, not conjured by the first passing run.
Update
Write actual to the snapshot file, creating or overwriting it. This is
how a new snapshot is recorded and how an intentional change is
accepted.
Implementations§
Source§impl SnapshotMode
impl SnapshotMode
Sourcepub fn from_env() -> SnapshotMode
pub fn from_env() -> SnapshotMode
Trait Implementations§
Source§impl Clone for SnapshotMode
impl Clone for SnapshotMode
Source§fn clone(&self) -> SnapshotMode
fn clone(&self) -> SnapshotMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SnapshotMode
impl Debug for SnapshotMode
Source§impl PartialEq for SnapshotMode
impl PartialEq for SnapshotMode
Source§fn eq(&self, other: &SnapshotMode) -> bool
fn eq(&self, other: &SnapshotMode) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for SnapshotMode
impl Eq for SnapshotMode
impl StructuralPartialEq for SnapshotMode
Auto Trait Implementations§
impl Freeze for SnapshotMode
impl RefUnwindSafe for SnapshotMode
impl Send for SnapshotMode
impl Sync for SnapshotMode
impl Unpin for SnapshotMode
impl UnsafeUnpin for SnapshotMode
impl UnwindSafe for SnapshotMode
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