pub struct InMemoryWorkflowStore { /* private fields */ }Expand description
In-memory WorkflowStore for tests and the standalone OSS
runner. Two HashMaps wrapped in one struct — the trait surface
stays singular regardless of the internal layout.
Implementations§
Trait Implementations§
Source§impl Default for InMemoryWorkflowStore
impl Default for InMemoryWorkflowStore
Source§fn default() -> InMemoryWorkflowStore
fn default() -> InMemoryWorkflowStore
Returns the “default value” for a type. Read more
Source§impl WorkflowStore for InMemoryWorkflowStore
impl WorkflowStore for InMemoryWorkflowStore
Source§fn create_run<'life0, 'async_trait>(
&'life0 self,
state: WorkflowExecutionState,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_run<'life0, 'async_trait>(
&'life0 self,
state: WorkflowExecutionState,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Insert a new run record. Existing record under the same
run_task_id is overwritten (treat the call as create-or-resume).Source§fn get_run<'life0, 'life1, 'async_trait>(
&'life0 self,
run_task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkflowExecutionState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_run<'life0, 'life1, 'async_trait>(
&'life0 self,
run_task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkflowExecutionState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load the run-level state for a workflow.
Source§fn update_context<'life0, 'life1, 'async_trait>(
&'life0 self,
run_task_id: &'life1 str,
context: Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_context<'life0, 'life1, 'async_trait>(
&'life0 self,
run_task_id: &'life1 str,
context: Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update the shared
context bag (called after step results
merge in). Other run-level fields are immutable for the life
of the run.Source§fn delete_run<'life0, 'life1, 'async_trait>(
&'life0 self,
run_task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_run<'life0, 'life1, 'async_trait>(
&'life0 self,
run_task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Drop a run and all its step rows.
Source§fn upsert_step<'life0, 'life1, 'async_trait>(
&'life0 self,
run_task_id: &'life1 str,
step: WorkflowStepState,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn upsert_step<'life0, 'life1, 'async_trait>(
&'life0 self,
run_task_id: &'life1 str,
step: WorkflowStepState,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Insert or update one step’s state under a run.
Source§fn get_step<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_task_id: &'life1 str,
step_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkflowStepState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_step<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_task_id: &'life1 str,
step_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkflowStepState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Load one step’s state.
Source§fn list_steps<'life0, 'life1, 'async_trait>(
&'life0 self,
run_task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowStepState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_steps<'life0, 'life1, 'async_trait>(
&'life0 self,
run_task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowStepState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List all step states for a run, in insertion order.
Auto Trait Implementations§
impl !Freeze for InMemoryWorkflowStore
impl RefUnwindSafe for InMemoryWorkflowStore
impl Send for InMemoryWorkflowStore
impl Sync for InMemoryWorkflowStore
impl Unpin for InMemoryWorkflowStore
impl UnsafeUnpin for InMemoryWorkflowStore
impl UnwindSafe for InMemoryWorkflowStore
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