pub struct EchoExecutor;Expand description
Dependency-free executor: streams one token event per word, then completes with an echo.
Used by the demo worker and tests to exercise the full transport without a real LLM.
Test hook: an assignment starting with __sleep_ms:<n> sleeps (cancellably)
for n milliseconds before echoing the rest — this is what lets cancel /
concurrency e2e tests hold a run open deterministically without an LLM.
Trait Implementations§
Source§impl ChildExecutor for EchoExecutor
impl ChildExecutor for EchoExecutor
Source§fn max_parallel_executions(&self) -> usize
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.
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,
Source§fn requires_contiguous_events(&self) -> bool
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
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.Auto Trait Implementations§
impl Freeze for EchoExecutor
impl RefUnwindSafe for EchoExecutor
impl Send for EchoExecutor
impl Sync for EchoExecutor
impl Unpin for EchoExecutor
impl UnsafeUnpin for EchoExecutor
impl UnwindSafe for EchoExecutor
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