pub struct ToolRegistry { /* private fields */ }Expand description
Tool registry for managing and accessing tools
Implementations§
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create a registry with default tools
Sourcepub fn list_names(&self) -> Vec<String>
pub fn list_names(&self) -> Vec<String>
List all tool names
Sourcepub fn execute(
&self,
name: &str,
params: Value,
context: &mut ToolContext<'_>,
) -> Result<ToolResult>
pub fn execute( &self, name: &str, params: Value, context: &mut ToolContext<'_>, ) -> Result<ToolResult>
Execute a tool by name
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ToolRegistry
impl !RefUnwindSafe for ToolRegistry
impl Send for ToolRegistry
impl Sync for ToolRegistry
impl Unpin for ToolRegistry
impl !UnwindSafe for ToolRegistry
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