pub struct Snapshot { /* private fields */ }Expand description
A helper to work with file snapshots.
Implementations§
Source§impl Snapshot
impl Snapshot
Sourcepub fn module_name(&self) -> &str
pub fn module_name(&self) -> &str
Returns the module name.
Sourcepub fn snapshot_name(&self) -> Option<&str>
pub fn snapshot_name(&self) -> Option<&str>
Returns the snapshot name.
Sourcepub fn contents(&self) -> &SnapshotContents
pub fn contents(&self) -> &SnapshotContents
The snapshot contents
Sourcepub fn as_text(&self) -> Option<&TextSnapshotContents>
pub fn as_text(&self) -> Option<&TextSnapshotContents>
Returns the text contents if this is a text snapshot.
pub fn build_binary_path(&self, path: impl Into<PathBuf>) -> Option<PathBuf>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Snapshot
impl RefUnwindSafe for Snapshot
impl !Send for Snapshot
impl !Sync for Snapshot
impl Unpin for Snapshot
impl UnsafeUnpin for Snapshot
impl UnwindSafe for Snapshot
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