pub trait ToolExecutor:
Send
+ Sync
+ 'static {
// Required methods
fn spec(&self) -> ToolSpec;
fn execute<'life0, 'async_trait>(
&'life0 self,
ctx: ToolExecutionContext,
call: ToolCall,
) -> Pin<Box<dyn Future<Output = Result<ToolResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn supports_eager_execution(&self) -> bool { ... }
}Required Methods§
fn spec(&self) -> ToolSpec
fn execute<'life0, 'async_trait>(
&'life0 self,
ctx: ToolExecutionContext,
call: ToolCall,
) -> Pin<Box<dyn Future<Output = Result<ToolResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
Sourcefn supports_eager_execution(&self) -> bool
fn supports_eager_execution(&self) -> bool
Whether this executor is safe to start while the model is still sampling other output items. Only independent, read-only tools opt in. Approval, validation and workspace authorization still run normally.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".