Struct iota_stronghold::types::SnapshotPath
source · pub struct SnapshotPath { /* private fields */ }
Expand description
A handle for snapshot file locations.
§Examples
use iota_stronghold::SnapshotPath;
// set path to a known location for a snapshot file
let named = SnapshotPath::named("snapshot-file");
// set path to an absolute location for a snapshot file
let path = SnapshotPath::from_path("/path/to/snapshot/file");
Implementations§
source§impl SnapshotPath
impl SnapshotPath
sourcepub fn named<P>(name: P) -> Self
pub fn named<P>(name: P) -> Self
Creates a SnapshotPath
by a known location for Snapshot
files.
That is the home directory in most cases.
§Example
sourcepub fn from_path<P>(path: P) -> Self
pub fn from_path<P>(path: P) -> Self
Creates a SnapshotPath
by an absolute path for Snapshot
files.
§Example
Trait Implementations§
source§impl Clone for SnapshotPath
impl Clone for SnapshotPath
source§fn clone(&self) -> SnapshotPath
fn clone(&self) -> SnapshotPath
Returns a copy 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 SnapshotPath
impl Debug for SnapshotPath
Auto Trait Implementations§
impl Freeze for SnapshotPath
impl RefUnwindSafe for SnapshotPath
impl Send for SnapshotPath
impl Sync for SnapshotPath
impl Unpin for SnapshotPath
impl UnwindSafe for SnapshotPath
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