pub struct ToolRegistry { /* private fields */ }Expand description
工具注册中心 - 仅管理代理工具(内置工具由 Agent 直接管理)
Implementations§
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub fn register_batch(&mut self, tools: Vec<ProxyTool>)
pub fn register_batch(&mut self, tools: Vec<ProxyTool>)
批量注册代理工具
Sourcepub fn proxy_definitions(&self) -> Vec<ToolDefinition>
pub fn proxy_definitions(&self) -> Vec<ToolDefinition>
获取所有代理工具定义(用于提交给大模型)
Sourcepub fn proxy_tools(&self) -> &[ProxyTool]
pub fn proxy_tools(&self) -> &[ProxyTool]
获取所有代理工具
Sourcepub fn find_proxy(&self, name: &str) -> Option<&ProxyTool>
pub fn find_proxy(&self, name: &str) -> Option<&ProxyTool>
查找代理工具
Sourcepub fn get_metadata(&self, name: &str) -> Option<&ProxyMetadata>
pub fn get_metadata(&self, name: &str) -> Option<&ProxyMetadata>
获取代理工具元数据
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 UnsafeUnpin 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