pub trait ErasedToolExecutor: Send + Sync {
// Required methods
fn execute_erased<'a>(
&'a self,
response: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<ToolOutput>, ToolError>> + Send + 'a>>;
fn execute_confirmed_erased<'a>(
&'a self,
response: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<ToolOutput>, ToolError>> + Send + 'a>>;
fn tool_definitions_erased(&self) -> Vec<ToolDef>;
fn execute_tool_call_erased<'a>(
&'a self,
call: &'a ToolCall,
) -> Pin<Box<dyn Future<Output = Result<Option<ToolOutput>, ToolError>> + Send + 'a>>;
fn is_tool_retryable_erased(&self, tool_id: &str) -> bool;
// Provided methods
fn execute_tool_call_confirmed_erased<'a>(
&'a self,
call: &'a ToolCall,
) -> Pin<Box<dyn Future<Output = Result<Option<ToolOutput>, ToolError>> + Send + 'a>> { ... }
fn set_skill_env(&self, _env: Option<HashMap<String, String>>) { ... }
fn set_effective_trust(&self, _level: TrustLevel) { ... }
}Expand description
Object-safe erased version of ToolExecutor using boxed futures.
Implemented automatically for all T: ToolExecutor + 'static.
Use Box<dyn ErasedToolExecutor> when dynamic dispatch is required.
Required Methods§
fn execute_erased<'a>( &'a self, response: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Option<ToolOutput>, ToolError>> + Send + 'a>>
fn execute_confirmed_erased<'a>( &'a self, response: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Option<ToolOutput>, ToolError>> + Send + 'a>>
fn tool_definitions_erased(&self) -> Vec<ToolDef>
fn execute_tool_call_erased<'a>( &'a self, call: &'a ToolCall, ) -> Pin<Box<dyn Future<Output = Result<Option<ToolOutput>, ToolError>> + Send + 'a>>
Sourcefn is_tool_retryable_erased(&self, tool_id: &str) -> bool
fn is_tool_retryable_erased(&self, tool_id: &str) -> bool
Whether the executor can safely retry this tool call on a transient error.
Provided Methods§
fn execute_tool_call_confirmed_erased<'a>( &'a self, call: &'a ToolCall, ) -> Pin<Box<dyn Future<Output = Result<Option<ToolOutput>, ToolError>> + Send + 'a>>
Sourcefn set_skill_env(&self, _env: Option<HashMap<String, String>>)
fn set_skill_env(&self, _env: Option<HashMap<String, String>>)
Inject environment variables for the currently active skill. No-op by default.
Sourcefn set_effective_trust(&self, _level: TrustLevel)
fn set_effective_trust(&self, _level: TrustLevel)
Set the effective trust level for the currently active skill. No-op by default.