Skip to main content

ChildExecutor

Trait ChildExecutor 

Source
pub trait ChildExecutor:
    Send
    + Sync
    + 'static {
    // Required method
    fn run<'life0, 'async_trait>(
        &'life0 self,
        spec: RunSpec,
        events: EventSink,
        steer: SteerInbox,
        cancel: CancellationToken,
    ) -> Pin<Box<dyn Future<Output = ChildOutcome> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    fn requires_contiguous_events(&self) -> bool { ... }
    fn supports_environment_lease_v1(&self) -> bool { ... }
    fn max_parallel_executions(&self) -> usize { ... }
}
Expand description

What runs inside an actor. Implemented by the worker with the real runtime.

Required Methods§

Source

fn run<'life0, 'async_trait>( &'life0 self, spec: RunSpec, events: EventSink, steer: SteerInbox, cancel: CancellationToken, ) -> Pin<Box<dyn Future<Output = ChildOutcome> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn requires_contiguous_events(&self) -> bool

The Host validates this executor’s complete event trace before admitting its history. Transport may coalesce events but must not drop batches. Ordinary observation-only executors retain their existing lossy lanes.

Source

fn supports_environment_lease_v1(&self) -> bool

Advertise only when run validates EnvironmentLease before executing provider or tools. The broker binds this claim to the authenticated subscriber connection; an older worker defaults to unsupported.

Source

fn max_parallel_executions(&self) -> usize

Maximum number of independent Run/Ask/Task executions this instance may execute at once. The safe default is one: production executors often own mutable permission/provider/child-runner state that must not cross session boundaries. An implementation may opt into more slots only when all per-run state is isolated.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§