pub struct SnapshotManager { /* private fields */ }Expand description
Snapshot manager for organizing and comparing snapshots
Implementations§
Source§impl SnapshotManager
impl SnapshotManager
Sourcepub fn with_update_mode(self, update: bool) -> Self
pub fn with_update_mode(self, update: bool) -> Self
Enable update mode (overwrite snapshots on mismatch)
Sourcepub fn snapshot_dir(&self) -> &Path
pub fn snapshot_dir(&self) -> &Path
Get the snapshot directory
Sourcepub fn snapshot_path(&self, name: &str) -> PathBuf
pub fn snapshot_path(&self, name: &str) -> PathBuf
Get the path for a named snapshot
Sourcepub fn save(&self, snapshot: &TuiSnapshot) -> ProbarResult<()>
pub fn save(&self, snapshot: &TuiSnapshot) -> ProbarResult<()>
Save a snapshot
Sourcepub fn load(&self, name: &str) -> ProbarResult<TuiSnapshot>
pub fn load(&self, name: &str) -> ProbarResult<TuiSnapshot>
Load a snapshot
Sourcepub fn assert_snapshot(&self, name: &str, frame: &TuiFrame) -> ProbarResult<()>
pub fn assert_snapshot(&self, name: &str, frame: &TuiFrame) -> ProbarResult<()>
Assert a frame matches a snapshot (or create if missing)
Sourcepub fn list(&self) -> ProbarResult<Vec<String>>
pub fn list(&self) -> ProbarResult<Vec<String>>
List all snapshots in the directory
Sourcepub fn delete(&self, name: &str) -> ProbarResult<()>
pub fn delete(&self, name: &str) -> ProbarResult<()>
Delete a snapshot
Trait Implementations§
Source§impl Debug for SnapshotManager
impl Debug for SnapshotManager
Auto Trait Implementations§
impl Freeze for SnapshotManager
impl RefUnwindSafe for SnapshotManager
impl Send for SnapshotManager
impl Sync for SnapshotManager
impl Unpin for SnapshotManager
impl UnsafeUnpin for SnapshotManager
impl UnwindSafe for SnapshotManager
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
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>
Converts
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>
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().