pub struct ToolRegistry { /* private fields */ }Expand description
工具注册表实现
Implementations§
Source§impl ToolRegistry
impl ToolRegistry
pub fn new() -> Self
Sourcepub fn with_builtin_tools() -> Self
pub fn with_builtin_tools() -> Self
创建带内置工具的注册表
Trait Implementations§
Source§impl Default for ToolRegistry
impl Default for ToolRegistry
Source§impl ToolRegistryTrait for ToolRegistry
impl ToolRegistryTrait for ToolRegistry
Source§fn unregister(&self, name: &str) -> Layer2Result<bool>
fn unregister(&self, name: &str) -> Layer2Result<bool>
注销工具
Source§fn definitions(&self) -> Vec<ToolDefinition>
fn definitions(&self) -> Vec<ToolDefinition>
获取所有工具定义(OpenAI 格式)
Auto Trait Implementations§
impl !Freeze for ToolRegistry
impl !RefUnwindSafe for ToolRegistry
impl !UnwindSafe for ToolRegistry
impl Send for ToolRegistry
impl Sync for ToolRegistry
impl Unpin for ToolRegistry
impl UnsafeUnpin 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