pub struct ToolCollection { /* private fields */ }
Expand description
A collection of tools
Implementations§
Source§impl ToolCollection
impl ToolCollection
Sourcepub fn tool_names(&self) -> Vec<&str>
pub fn tool_names(&self) -> Vec<&str>
Get all tool names
Sourcepub async fn invoke_tool(
&self,
name: &str,
input: HashMap<String, Value>,
config: Option<RunnableConfig>,
) -> Result<ToolResult>
pub async fn invoke_tool( &self, name: &str, input: HashMap<String, Value>, config: Option<RunnableConfig>, ) -> Result<ToolResult>
Invoke a tool by name
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ToolCollection
impl !RefUnwindSafe for ToolCollection
impl Send for ToolCollection
impl Sync for ToolCollection
impl Unpin for ToolCollection
impl !UnwindSafe for ToolCollection
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