pub struct CheckpointStore {
pub dir: PathBuf,
pub max_keep: usize,
}Available on crate feature
std only.Expand description
Filesystem storage configuration for kernel checkpoints.
Fields§
§dir: PathBufDirectory containing checkpoint snapshots and metadata.
max_keep: usizeMaximum number of checkpoints retained by cleanup operations.
Implementations§
Source§impl CheckpointStore
impl CheckpointStore
Sourcepub fn beside_state(state_path: &Path) -> Self
pub fn beside_state(state_path: &Path) -> Self
Performs beside state for this type.
Sourcepub fn save(
&self,
label: &str,
step: u64,
avg_err: f64,
damping: f64,
snapshot: &KernelSnapshot,
) -> Result<CheckpointMeta>
pub fn save( &self, label: &str, step: u64, avg_err: f64, damping: f64, snapshot: &KernelSnapshot, ) -> Result<CheckpointMeta>
Saves the current value.
Sourcepub fn save_with_privacy(
&self,
label: &str,
step: u64,
avg_err: f64,
damping: f64,
snapshot: &KernelSnapshot,
redact_user_content: bool,
) -> Result<CheckpointMeta>
pub fn save_with_privacy( &self, label: &str, step: u64, avg_err: f64, damping: f64, snapshot: &KernelSnapshot, redact_user_content: bool, ) -> Result<CheckpointMeta>
Save a checkpoint, optionally redacting known user-provided content.
Sourcepub fn list(&self) -> Result<Vec<CheckpointMeta>>
pub fn list(&self) -> Result<Vec<CheckpointMeta>>
Performs list for this type.
Sourcepub fn load_snapshot(&self, id: Uuid) -> Result<KernelSnapshot>
pub fn load_snapshot(&self, id: Uuid) -> Result<KernelSnapshot>
Loads snapshot.
Auto Trait Implementations§
impl Forget for CheckpointStore
impl Freeze for CheckpointStore
impl Move for CheckpointStore
impl RefUnwindSafe for CheckpointStore
impl Send for CheckpointStorewhere
RawVecInner: Send,
impl Sync for CheckpointStorewhere
RawVecInner: Sync,
impl Unpin for CheckpointStore
impl UnsafeUnpin for CheckpointStore
impl UnwindSafe for CheckpointStorewhere
RawVecInner: UnwindSafe,
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