pub struct ToolRegistry { /* private fields */ }Expand description
Tool registry that can execute multiple tools
Implementations§
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub fn register(&mut self, name: impl Into<String>, tool: Arc<dyn ToolExecutor>)
pub fn register(&mut self, name: impl Into<String>, tool: Arc<dyn ToolExecutor>)
Register a tool
Sourcepub fn definitions(&self) -> Vec<Tool>
pub fn definitions(&self) -> Vec<Tool>
Get all tool definitions
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