pub struct ToolRegistry { /* private fields */ }Expand description
Tool Registry for managing all available tools
Implementations§
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub fn register_tool(&mut self, tool: ToolMetadata) -> Result<()>
pub fn register_tool(&mut self, tool: ToolMetadata) -> Result<()>
Registers a tool in the registry
Sourcepub fn get_tool(&self, id: &str) -> Option<&ToolMetadata>
pub fn get_tool(&self, id: &str) -> Option<&ToolMetadata>
Gets a tool by ID
Sourcepub fn list_tools(&self) -> Vec<&ToolMetadata>
pub fn list_tools(&self) -> Vec<&ToolMetadata>
Lists all tools
Sourcepub fn list_tools_by_category(&self, category: &str) -> Vec<&ToolMetadata>
pub fn list_tools_by_category(&self, category: &str) -> Vec<&ToolMetadata>
Lists tools by category
Sourcepub fn list_tools_by_server(&self, server_id: &str) -> Vec<&ToolMetadata>
pub fn list_tools_by_server(&self, server_id: &str) -> Vec<&ToolMetadata>
Lists tools by server
Sourcepub fn tool_count(&self) -> usize
pub fn tool_count(&self) -> usize
Gets the number of registered tools
Trait Implementations§
Source§impl Clone for ToolRegistry
impl Clone for ToolRegistry
Source§fn clone(&self) -> ToolRegistry
fn clone(&self) -> ToolRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ToolRegistry
impl Debug for ToolRegistry
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