Trait Checkpointer
pub trait Checkpointer<R>: Send + Syncwhere
R: Checkpoint,{
// Required methods
fn save(&self, epoch: usize, record: R) -> Result<(), CheckpointerError>;
fn delete(&self, epoch: usize) -> Result<(), CheckpointerError>;
fn restore(&self, epoch: usize) -> Result<R, CheckpointerError>;
}Expand description
The trait for checkpointer.
Required Methods§
fn save(&self, epoch: usize, record: R) -> Result<(), CheckpointerError>
fn save(&self, epoch: usize, record: R) -> Result<(), CheckpointerError>
fn delete(&self, epoch: usize) -> Result<(), CheckpointerError>
fn delete(&self, epoch: usize) -> Result<(), CheckpointerError>
Delete the checkpoint saved at the given epoch if present.
fn restore(&self, epoch: usize) -> Result<R, CheckpointerError>
fn restore(&self, epoch: usize) -> Result<R, CheckpointerError>
Restore the record from the checkpoint saved at the given epoch.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".