pub trait State: Send + Sync {
// Required methods
fn meta(&self) -> StateMeta;
fn handle<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 mut dyn DynContext,
io: &'life2 mut dyn IoProvider,
rec: &'life3 mut dyn EventRecorder,
) -> Pin<Box<dyn Future<Output = Result<StateOutcome, StateError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}Expand description
Note:
- The engine MAY still checkpoint context according to
RunConfig.context_checkpointingregardless ofStateOutcome.snapshot. This hint controls additional snapshot behavior and/or diagnostic snapshots, not permission to bypass required checkpoints. State behavior. States do NOT own theirStateId— IDs are assigned by the plan.
Required Methods§
Sourcefn handle<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 mut dyn DynContext,
io: &'life2 mut dyn IoProvider,
rec: &'life3 mut dyn EventRecorder,
) -> Pin<Box<dyn Future<Output = Result<StateOutcome, StateError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn handle<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 mut dyn DynContext,
io: &'life2 mut dyn IoProvider,
rec: &'life3 mut dyn EventRecorder,
) -> Pin<Box<dyn Future<Output = Result<StateOutcome, StateError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Executes the state against the provided context, IO provider, and event recorder.