pub trait FlowFrameMutator: Sealed {
// Required methods
fn start_frame<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
spec: &'life3 FrameSpec,
) -> Pin<Box<dyn Future<Output = Result<FrameSnapshot, MobError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn admit_next_ready_node<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<KernelEffect>>, MobError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn admit_next_ready_node_with_retry<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
max_retries: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<KernelEffect>>, MobError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn complete_step<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
opts: StepCompletionOpts<'life3>,
) -> Pin<Box<dyn Future<Output = Result<(), MobError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn complete_node<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
node_id: &'life3 FlowNodeId,
) -> Pin<Box<dyn Future<Output = Result<bool, MobError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn fail_node<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
node_id: &'life3 FlowNodeId,
) -> Pin<Box<dyn Future<Output = Result<bool, MobError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn skip_node<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
node_id: &'life3 FlowNodeId,
) -> Pin<Box<dyn Future<Output = Result<bool, MobError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn cancel_node<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
node_id: &'life3 FlowNodeId,
) -> Pin<Box<dyn Future<Output = Result<bool, MobError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn terminalize_frame<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
) -> Pin<Box<dyn Future<Output = Result<bool, MobError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Sealed mutator trait for FlowFrame state transitions.
Only FlowFrameKernel implements this. All frame state mutations flow
through flow_frame::transition() + cas_frame_state.
Required Methods§
Sourcefn start_frame<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
spec: &'life3 FrameSpec,
) -> Pin<Box<dyn Future<Output = Result<FrameSnapshot, MobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn start_frame<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
spec: &'life3 FrameSpec,
) -> Pin<Box<dyn Future<Output = Result<FrameSnapshot, MobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Start a frame from a FrameSpec (arbitrary DAG).
Returns the initial FrameSnapshot in Running state.
Sourcefn admit_next_ready_node<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<KernelEffect>>, MobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn admit_next_ready_node<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<KernelEffect>>, MobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Admit the next ready node in the frame. Returns the effects emitted (e.g.
AdmitStepWork or StartLoopNode), or None if the queue was empty.
Sourcefn admit_next_ready_node_with_retry<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
max_retries: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<KernelEffect>>, MobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn admit_next_ready_node_with_retry<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
max_retries: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<KernelEffect>>, MobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Admit the next ready node with up to max_retries CAS retries.
Returns Ok(Some(effects)) on success, Ok(None) if the queue is
genuinely empty, or Err if every attempt lost the CAS (contention).
Sourcefn complete_step<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
opts: StepCompletionOpts<'life3>,
) -> Pin<Box<dyn Future<Output = Result<(), MobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn complete_step<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
opts: StepCompletionOpts<'life3>,
) -> Pin<Box<dyn Future<Output = Result<(), MobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Complete a step node and record its output, with CAS retry.
Sourcefn complete_node<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
node_id: &'life3 FlowNodeId,
) -> Pin<Box<dyn Future<Output = Result<bool, MobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn complete_node<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
node_id: &'life3 FlowNodeId,
) -> Pin<Box<dyn Future<Output = Result<bool, MobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Mark a node as completed. Returns true if the CAS succeeded.
Sourcefn fail_node<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
node_id: &'life3 FlowNodeId,
) -> Pin<Box<dyn Future<Output = Result<bool, MobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn fail_node<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
node_id: &'life3 FlowNodeId,
) -> Pin<Box<dyn Future<Output = Result<bool, MobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Mark a node as failed. Returns true if the CAS succeeded.
Sourcefn skip_node<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
node_id: &'life3 FlowNodeId,
) -> Pin<Box<dyn Future<Output = Result<bool, MobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn skip_node<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
node_id: &'life3 FlowNodeId,
) -> Pin<Box<dyn Future<Output = Result<bool, MobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Mark a node as skipped. Returns true if the CAS succeeded.
Sourcefn cancel_node<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
node_id: &'life3 FlowNodeId,
) -> Pin<Box<dyn Future<Output = Result<bool, MobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn cancel_node<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
node_id: &'life3 FlowNodeId,
) -> Pin<Box<dyn Future<Output = Result<bool, MobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Mark a node as canceled. Returns true if the CAS succeeded.
Sourcefn terminalize_frame<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
) -> Pin<Box<dyn Future<Output = Result<bool, MobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn terminalize_frame<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
frame_id: &'life2 FrameId,
) -> Pin<Box<dyn Future<Output = Result<bool, MobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Terminalize the frame as completed. Returns true if the CAS succeeded.