pub trait ExecutionStrategy: Send + Sync {
// Required method
fn execute_batch<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
calls: Vec<PendingToolCall>,
tools: &'life1 [Arc<dyn ErasedTool>],
guards: &'life2 [Arc<dyn Guard>],
state: &'life3 AgentState,
) -> Pin<Box<dyn Future<Output = Vec<ToolResult>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait;
}Expand description
Trait for pluggable tool execution strategies.
Implementations control how a batch of tool calls are executed — sequentially, in parallel, or with custom logic.
Required Methods§
Sourcefn execute_batch<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
calls: Vec<PendingToolCall>,
tools: &'life1 [Arc<dyn ErasedTool>],
guards: &'life2 [Arc<dyn Guard>],
state: &'life3 AgentState,
) -> Pin<Box<dyn Future<Output = Vec<ToolResult>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn execute_batch<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
calls: Vec<PendingToolCall>,
tools: &'life1 [Arc<dyn ErasedTool>],
guards: &'life2 [Arc<dyn Guard>],
state: &'life3 AgentState,
) -> Pin<Box<dyn Future<Output = Vec<ToolResult>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Execute a batch of tool calls and return results.