pub trait RuntimeEffectController: AwaitEventResolver {
// Required method
fn execute_effect<'life0, 'life1, 'async_trait>(
&'life0 self,
envelope: RuntimeEffectEnvelope,
local_executor: RuntimeEffectLocalExecutor<'life1>,
) -> Pin<Box<dyn Future<Output = Result<RuntimeEffectOutcome, RuntimeEffectControllerError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
// Provided methods
fn wants_segment_boundary(
&self,
_progress: &SegmentProgress,
) -> Option<BoundaryReason> { ... }
fn supports_concurrent_effects(&self) -> bool { ... }
}Expand description
Boundary for nondeterministic runtime work.
Required Methods§
fn execute_effect<'life0, 'life1, 'async_trait>(
&'life0 self,
envelope: RuntimeEffectEnvelope,
local_executor: RuntimeEffectLocalExecutor<'life1>,
) -> Pin<Box<dyn Future<Output = Result<RuntimeEffectOutcome, RuntimeEffectControllerError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Provided Methods§
Sourcefn wants_segment_boundary(
&self,
_progress: &SegmentProgress,
) -> Option<BoundaryReason>
fn wants_segment_boundary( &self, _progress: &SegmentProgress, ) -> Option<BoundaryReason>
Advises an engine to end the current in-process execution segment at a quiescent point. Engines may decline when live state is not capturable, but must make progress before returning another decline. In particular, an engine must not repeatedly return the same boundary and unchanged durable-wait state in one invocation; a host may bound and retry such a non-progressing invocation.
Sourcefn supports_concurrent_effects(&self) -> bool
fn supports_concurrent_effects(&self) -> bool
Whether this controller can safely accept overlapping execute_effect
calls from one runtime coordinator.
Local and store-backed controllers can usually fan out independent
effects. Some workflow substrates expose a single ordered journal
context where native operations must be awaited immediately before the
next context call is issued. Those controllers should return false so
coordinators serialize child effects while still replaying each child by
its own stable key.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".