Skip to main content

ToolResolver

Trait ToolResolver 

Source
pub trait ToolResolver {
    // Required method
    fn resolve_tool(&self, name: &str) -> Option<&dyn DynTool>;
}
Expand description

Resolves a tool node’s declared name to the DynTool that executes it.

The tool counterpart of AgentResolver. A HashMap<String, Box<dyn DynTool>> implements it out of the box.

Required Methods§

Source

fn resolve_tool(&self, name: &str) -> Option<&dyn DynTool>

The tool registered under name, or None if none is.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ToolResolver for HashMap<String, Box<dyn DynTool>>

Source§

fn resolve_tool(&self, name: &str) -> Option<&dyn DynTool>

Implementors§