pub struct TemporalCheckpointManager { /* private fields */ }Expand description
The main checkpoint manager
Implementations§
Source§impl TemporalCheckpointManager
impl TemporalCheckpointManager
Sourcepub fn new(storage: Rc<dyn CheckpointStorage>, session_id: SessionId) -> Self
pub fn new(storage: Rc<dyn CheckpointStorage>, session_id: SessionId) -> Self
Create a new checkpoint manager
Sourcepub fn checkpoint(&self, message: impl Into<String>) -> Result<CheckpointId>
pub fn checkpoint(&self, message: impl Into<String>) -> Result<CheckpointId>
Create a manual checkpoint
Sourcepub fn auto_checkpoint(
&self,
trigger: AutoTrigger,
) -> Result<Option<CheckpointId>>
pub fn auto_checkpoint( &self, trigger: AutoTrigger, ) -> Result<Option<CheckpointId>>
Create an automatic checkpoint (if appropriate)
Sourcepub fn list(&self) -> Result<Vec<CheckpointSummary>>
pub fn list(&self) -> Result<Vec<CheckpointSummary>>
List all checkpoints for this session
Sourcepub fn get(&self, id: &CheckpointId) -> Result<Option<TemporalCheckpoint>>
pub fn get(&self, id: &CheckpointId) -> Result<Option<TemporalCheckpoint>>
Get a checkpoint by ID
Sourcepub fn list_by_session(
&self,
session_id: &SessionId,
) -> Result<Vec<CheckpointSummary>>
pub fn list_by_session( &self, session_id: &SessionId, ) -> Result<Vec<CheckpointSummary>>
List checkpoints for a specific session
Sourcepub fn list_by_tag(&self, tag: &str) -> Result<Vec<CheckpointSummary>>
pub fn list_by_tag(&self, tag: &str) -> Result<Vec<CheckpointSummary>>
List checkpoints with a specific tag
Create a checkpoint with tags
Sourcepub fn restore(
&self,
checkpoint: &TemporalCheckpoint,
) -> Result<DebugStateSnapshot>
pub fn restore( &self, checkpoint: &TemporalCheckpoint, ) -> Result<DebugStateSnapshot>
Restore state from a checkpoint
Sourcepub fn get_summary(
&self,
id: &CheckpointId,
) -> Result<Option<CheckpointSummary>>
pub fn get_summary( &self, id: &CheckpointId, ) -> Result<Option<CheckpointSummary>>
Get a summary of a checkpoint by ID
Sourcepub fn delete(&self, id: &CheckpointId) -> Result<()>
pub fn delete(&self, id: &CheckpointId) -> Result<()>
Delete a checkpoint by ID
Sourcepub fn compact(&self, keep_recent: usize) -> Result<usize>
pub fn compact(&self, keep_recent: usize) -> Result<usize>
Compact checkpoints, keeping only the most recent N
Sourcepub fn compact_with_policy(&self, policy: CompactionPolicy) -> Result<usize>
pub fn compact_with_policy(&self, policy: CompactionPolicy) -> Result<usize>
Compact checkpoints using a specific policy
Auto Trait Implementations§
impl !Freeze for TemporalCheckpointManager
impl !RefUnwindSafe for TemporalCheckpointManager
impl !Send for TemporalCheckpointManager
impl !Sync for TemporalCheckpointManager
impl Unpin for TemporalCheckpointManager
impl UnsafeUnpin for TemporalCheckpointManager
impl !UnwindSafe for TemporalCheckpointManager
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
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 more