Skip to main content

Checkpoints

Trait Checkpoints 

Source
pub trait Checkpoints: Send + Sync {
    // Required methods
    fn snapshot(&self, label: &str) -> Result<CheckpointId>;
    fn list(&self) -> Vec<Checkpoint>;
    fn rewind(&self, to: CheckpointId) -> Result<()>;
    fn diff(&self, id: &CheckpointId) -> Result<String>;
    fn prune(&self, older_than_days: u64) -> Result<usize>;
}
Expand description

Snapshot and rewind workspace state.

Required Methods§

Source

fn snapshot(&self, label: &str) -> Result<CheckpointId>

Source

fn list(&self) -> Vec<Checkpoint>

Source

fn rewind(&self, to: CheckpointId) -> Result<()>

Source

fn diff(&self, id: &CheckpointId) -> Result<String>

Show unified diff between HEAD and a checkpoint ref.

Source

fn prune(&self, older_than_days: u64) -> Result<usize>

Delete checkpoint refs older than older_than_days days. Returns the number of refs deleted.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§