pub struct ParallelStrategy {
pub max_concurrency: usize,
}Expand description
Execute tool calls concurrently with bounded concurrency.
Fields§
§max_concurrency: usizeMaximum number of concurrent tool executions.
Implementations§
Trait Implementations§
Source§impl ExecutionStrategy for ParallelStrategy
impl ExecutionStrategy for ParallelStrategy
Source§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
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: '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
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Execute a batch of tool calls and return results.
Auto Trait Implementations§
impl Freeze for ParallelStrategy
impl RefUnwindSafe for ParallelStrategy
impl Send for ParallelStrategy
impl Sync for ParallelStrategy
impl Unpin for ParallelStrategy
impl UnsafeUnpin for ParallelStrategy
impl UnwindSafe for ParallelStrategy
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