pub struct InMemoryStore { /* private fields */ }Expand description
In-memory store for testing.
Implementations§
Source§impl InMemoryStore
impl InMemoryStore
Trait Implementations§
Source§impl Default for InMemoryStore
impl Default for InMemoryStore
Source§impl WorkflowStateStore for InMemoryStore
impl WorkflowStateStore for InMemoryStore
Source§fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkflowRun>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkflowRun>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load a run by workflow ID.
Source§fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
run: &'life1 WorkflowRun,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
run: &'life1 WorkflowRun,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Save the full run state.
Source§fn commit_step<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
step_index: usize,
result: StepResult,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn commit_step<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
step_index: usize,
result: StepResult,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update a specific step’s result and advance the run.
Source§fn save_checkpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_workflow_id: &'life1 str,
_step_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<CheckpointMeta, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save_checkpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_workflow_id: &'life1 str,
_step_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<CheckpointMeta, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Save a named checkpoint snapshot. Default: not supported.
Source§fn load_checkpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_workflow_id: &'life1 str,
_checkpoint_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkflowRun>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn load_checkpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_workflow_id: &'life1 str,
_checkpoint_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkflowRun>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Load a checkpoint by ID. Default: not supported.
Source§fn list_checkpoints<'life0, 'life1, 'async_trait>(
&'life0 self,
_workflow_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<CheckpointMeta>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_checkpoints<'life0, 'life1, 'async_trait>(
&'life0 self,
_workflow_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<CheckpointMeta>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List available checkpoints. Default: empty.
Auto Trait Implementations§
impl !Freeze for InMemoryStore
impl RefUnwindSafe for InMemoryStore
impl Send for InMemoryStore
impl Sync for InMemoryStore
impl Unpin for InMemoryStore
impl UnsafeUnpin for InMemoryStore
impl UnwindSafe for InMemoryStore
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