pub struct CheckpointManager { /* private fields */ }Expand description
Session-scoped checkpoint store.
Implementations§
Source§impl CheckpointManager
impl CheckpointManager
Sourcepub fn save(
&mut self,
label: String,
description: Option<String>,
status: Status,
) -> &CheckpointEntry
pub fn save( &mut self, label: String, description: Option<String>, status: Status, ) -> &CheckpointEntry
Store a snapshot under label. If the label already exists, the
new snapshot overwrites it (and moves to the front of the FIFO
order — treat re-saving as a “touch”). Returns the entry’s
position-from-newest, for observability.
Sourcepub fn get(&self, label: &str) -> Result<&Status, BasicError>
pub fn get(&self, label: &str) -> Result<&Status, BasicError>
Look up a snapshot’s Status without consuming it. Returns
Err(BasicError::CheckpointNotFound) if the label is unknown
(fail-loud per design).
Sourcepub fn delete(&mut self, label: &str) -> bool
pub fn delete(&mut self, label: &str) -> bool
Remove a checkpoint by label. Returns true if it existed.
Sourcepub fn list(&self) -> Vec<CheckpointMeta>
pub fn list(&self) -> Vec<CheckpointMeta>
List all checkpoints, newest-first. Excludes the Status
payload — callers only need the labels and metadata.
Trait Implementations§
Source§impl Debug for CheckpointManager
impl Debug for CheckpointManager
Source§impl Default for CheckpointManager
impl Default for CheckpointManager
Source§fn default() -> CheckpointManager
fn default() -> CheckpointManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for CheckpointManager
impl !Send for CheckpointManager
impl !Sync for CheckpointManager
impl Freeze for CheckpointManager
impl Unpin for CheckpointManager
impl UnsafeUnpin for CheckpointManager
impl UnwindSafe for CheckpointManager
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.