Skip to main content

BatchExecutor

Trait BatchExecutor 

Source
pub trait BatchExecutor: Send + Sync {
    // Required method
    fn exec_batches<F, O, E>(
        &self,
        plan: Vec<BatchItem>,
        f: F,
    ) -> Result<Vec<(String, O)>, E>
       where F: FnMut(String, String, Value) -> Result<O, E> + Send;
}
Expand description

Contract for executing planned batches.

Narrow by design: this concerns only execution of tool invocations with concurrency semantics established by the planner. It does not include operator concerns such as streaming, hooks, tracing, or budget control.

Required Methods§

Source

fn exec_batches<F, O, E>( &self, plan: Vec<BatchItem>, f: F, ) -> Result<Vec<(String, O)>, E>
where F: FnMut(String, String, Value) -> Result<O, E> + Send,

Execute a full plan using the provided runner for individual tool calls. The runner receives (id, name, input_json) and returns an output value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§