pub struct SequentialToolExecutor;Expand description
Execute tool calls one by one in call order. Context freshness between calls is controlled by the caller. Stops at first suspension.
Trait Implementations§
Source§impl Clone for SequentialToolExecutor
impl Clone for SequentialToolExecutor
Source§fn clone(&self) -> SequentialToolExecutor
fn clone(&self) -> SequentialToolExecutor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SequentialToolExecutor
impl Debug for SequentialToolExecutor
Source§impl Default for SequentialToolExecutor
impl Default for SequentialToolExecutor
Source§fn default() -> SequentialToolExecutor
fn default() -> SequentialToolExecutor
Returns the “default value” for a type. Read more
Source§impl ToolExecutor for SequentialToolExecutor
impl ToolExecutor for SequentialToolExecutor
Source§fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tools: &'life1 HashMap<String, Arc<dyn Tool>>,
calls: &'life2 [ToolCall],
base_ctx: &'life3 ToolCallContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<ToolExecutionResult>, ToolExecutorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tools: &'life1 HashMap<String, Arc<dyn Tool>>,
calls: &'life2 [ToolCall],
base_ctx: &'life3 ToolCallContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<ToolExecutionResult>, ToolExecutorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Execute tool calls and return results.
Source§fn requires_incremental_state(&self) -> bool
fn requires_incremental_state(&self) -> bool
Whether the executor needs state refreshed between individual tool calls.
Sequential executors return true; parallel executors return false.
impl Copy for SequentialToolExecutor
Auto Trait Implementations§
impl Freeze for SequentialToolExecutor
impl RefUnwindSafe for SequentialToolExecutor
impl Send for SequentialToolExecutor
impl Sync for SequentialToolExecutor
impl Unpin for SequentialToolExecutor
impl UnsafeUnpin for SequentialToolExecutor
impl UnwindSafe for SequentialToolExecutor
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