pub struct StateStore { /* private fields */ }Expand description
State store for workflow persistence
Implementations§
Source§impl StateStore
impl StateStore
Sourcepub fn save_step(
&self,
workflow_id: &str,
step_id: &str,
output: &StepOutput,
) -> Result<()>
pub fn save_step( &self, workflow_id: &str, step_id: &str, output: &StepOutput, ) -> Result<()>
Save step output
Sourcepub fn load_step(
&self,
workflow_id: &str,
step_id: &str,
) -> Result<Option<StepOutput>>
pub fn load_step( &self, workflow_id: &str, step_id: &str, ) -> Result<Option<StepOutput>>
Load step output
Sourcepub fn save_context(&self, ctx: &StepContext) -> Result<()>
pub fn save_context(&self, ctx: &StepContext) -> Result<()>
Save workflow context
Sourcepub fn load_context(&self, workflow_id: &str) -> Result<Option<StepContext>>
pub fn load_context(&self, workflow_id: &str) -> Result<Option<StepContext>>
Load workflow context
Sourcepub fn clear_workflow(&self, workflow_id: &str) -> Result<()>
pub fn clear_workflow(&self, workflow_id: &str) -> Result<()>
Clear workflow state
Sourcepub fn save_execution(&self, state: &ExecutionState) -> Result<()>
pub fn save_execution(&self, state: &ExecutionState) -> Result<()>
Save execution state
Sourcepub fn load_execution(
&self,
workflow_id: &str,
) -> Result<Option<ExecutionState>>
pub fn load_execution( &self, workflow_id: &str, ) -> Result<Option<ExecutionState>>
Load execution state
Sourcepub fn delete_execution(&self, workflow_id: &str) -> Result<()>
pub fn delete_execution(&self, workflow_id: &str) -> Result<()>
Delete execution state
Sourcepub fn list_active(&self) -> Result<Vec<ExecutionState>>
pub fn list_active(&self) -> Result<Vec<ExecutionState>>
List all active workflows (Running or Paused)
Sourcepub fn list_by_status(
&self,
status: WorkflowStatus,
) -> Result<Vec<ExecutionState>>
pub fn list_by_status( &self, status: WorkflowStatus, ) -> Result<Vec<ExecutionState>>
List all workflows by status
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StateStore
impl !RefUnwindSafe for StateStore
impl Send for StateStore
impl Sync for StateStore
impl Unpin for StateStore
impl !UnwindSafe for StateStore
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