pub struct ToolRegistry { /* private fields */ }Expand description
An ordered set of tools offered to the model.
Implementations§
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub fn with_builtins() -> Self
pub fn with_builtins() -> Self
A registry pre-populated with all built-in tools.
Sourcepub fn register(&mut self, tool: impl Tool + 'static)
pub fn register(&mut self, tool: impl Tool + 'static)
Add a tool. A later registration with the same name shadows the earlier.
Trait Implementations§
Source§impl Default for ToolRegistry
impl Default for ToolRegistry
Source§fn default() -> ToolRegistry
fn default() -> ToolRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ToolRegistry
impl !UnwindSafe for ToolRegistry
impl Freeze 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