pub struct WorkflowCheckpointService { /* private fields */ }Expand description
Workflow checkpoint storage service.
Provides save/load functionality for workflow checkpoints using bincode serialization for fast snapshots. Uses separate namespace (“workflow:”) to distinguish from debugging checkpoints.
§Note
This is a basic in-memory implementation for Phase 9 Task 2. Future tasks will integrate with forge-reasoning CheckpointStorage for persistent storage using SQLiteGraph backend.
Implementations§
Source§impl WorkflowCheckpointService
impl WorkflowCheckpointService
Sourcepub fn new(namespace: impl Into<String>) -> Self
pub fn new(namespace: impl Into<String>) -> Self
Creates a new workflow checkpoint service.
§Arguments
namespace- Namespace prefix for checkpoints (default: “workflow”)
Sourcepub fn save(&self, checkpoint: &WorkflowCheckpoint) -> Result<(), WorkflowError>
pub fn save(&self, checkpoint: &WorkflowCheckpoint) -> Result<(), WorkflowError>
Sourcepub fn load(
&self,
id: &CheckpointId,
) -> Result<Option<WorkflowCheckpoint>, WorkflowError>
pub fn load( &self, id: &CheckpointId, ) -> Result<Option<WorkflowCheckpoint>, WorkflowError>
Sourcepub fn get_latest(
&self,
workflow_id: &str,
) -> Result<Option<WorkflowCheckpoint>, WorkflowError>
pub fn get_latest( &self, workflow_id: &str, ) -> Result<Option<WorkflowCheckpoint>, WorkflowError>
Sourcepub fn list_by_workflow(
&self,
workflow_id: &str,
) -> Result<Vec<CheckpointSummary>, WorkflowError>
pub fn list_by_workflow( &self, workflow_id: &str, ) -> Result<Vec<CheckpointSummary>, WorkflowError>
Sourcepub fn delete(&self, id: &CheckpointId) -> Result<(), WorkflowError>
pub fn delete(&self, id: &CheckpointId) -> Result<(), WorkflowError>
Trait Implementations§
Source§impl Clone for WorkflowCheckpointService
impl Clone for WorkflowCheckpointService
Source§fn clone(&self) -> WorkflowCheckpointService
fn clone(&self) -> WorkflowCheckpointService
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WorkflowCheckpointService
impl RefUnwindSafe for WorkflowCheckpointService
impl Send for WorkflowCheckpointService
impl Sync for WorkflowCheckpointService
impl Unpin for WorkflowCheckpointService
impl UnsafeUnpin for WorkflowCheckpointService
impl UnwindSafe for WorkflowCheckpointService
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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