Skip to main content

Snapshot

Trait Snapshot 

Source
pub trait Snapshot {
    // Required methods
    fn snapshot(&self, snapshot_id: &str) -> bool;
    fn restore(&self, snapshot_id: &str) -> bool;
    fn list(&self) -> Result<Vec<String>>;
    fn cleanup(&self, older_than_days: u32) -> Result<()>;
}

Required Methods§

Source

fn snapshot(&self, snapshot_id: &str) -> bool

创建状态快照

Source

fn restore(&self, snapshot_id: &str) -> bool

从快照恢复状态

Source

fn list(&self) -> Result<Vec<String>>

列出所有快照

Source

fn cleanup(&self, older_than_days: u32) -> Result<()>

清理过期数据

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§