Struct checkpoint::storage::FileStorage
[−]
[src]
pub struct FileStorage { /* fields omitted */ }
Provides checkpoint storage via the file system.
Methods
impl FileStorage
[src]
pub fn open(path: &Path) -> Result<GuardWrapper<Self>>
[src]
Creates a FileStorage
object around a new or existing file path and wraps the object in a
GuardWrapper
.
If path
already exists it must point to a directory which contains two sub-folders,
"committed" and "uncommitted".
Trait Implementations
impl Debug for FileStorage
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Storage for FileStorage
[src]
type Committed = Committed
The type representing committed checkpoints.
type Uncommitted = Uncommitted
The type representing uncommitted checkpoints.
fn create_checkpoint(&mut self, identifier: &str) -> Result<Self::Uncommitted>
[src]
Creates a new checkpoint with the specified identifier.
The checkpoint will not be saved permanently until it has been committed via the
commit_checkpoint
method.
Note: The provided identifier must be a valid filename.
fn commit_checkpoint(
&mut self,
uncommitted: Self::Uncommitted
) -> Result<Self::Committed>
[src]
&mut self,
uncommitted: Self::Uncommitted
) -> Result<Self::Committed>
Commits an uncommitted checkpoint, permanently saving its data to the underlying storage medium. Read more
fn load_checkpoint(&mut self, identifier: &str) -> Result<Self::Committed>
[src]
Loads the committed checkpoint associated with the provided identifier, allowing its data to be retrieved. Read more
fn remove_checkpoint(&mut self, identifier: &str) -> Result<()>
[src]
Removes the committed checkpoint associated with the provided identifier. Read more
fn checkpoint_identifiers(&mut self) -> Result<Vec<String>>
[src]
Returns a list of all committed checkpoint identifiers in the underlying storage medium.