pub struct ToolRegistry { /* private fields */ }Expand description
Schema-only registry of named tools.
Stores Tool definitions (name, description, JSON schema) keyed by name.
Used by Runtime to filter tool schemas per agent at add_agent time.
No handlers or closures are stored here.
Implementations§
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub fn insert_all(&mut self, tools: Vec<Tool>)
pub fn insert_all(&mut self, tools: Vec<Tool>)
Insert multiple tool schemas.
Sourcepub fn remove(&mut self, name: &str) -> bool
pub fn remove(&mut self, name: &str) -> bool
Remove a tool by name. Returns true if it existed.
Sourcepub fn filtered_snapshot(&self, names: &[CompactString]) -> Vec<Tool>
pub fn filtered_snapshot(&self, names: &[CompactString]) -> Vec<Tool>
Build a filtered list of tool schemas matching the given names.
If names is empty, all tools are returned. Used by Runtime::add_agent
to build the per-agent schema snapshot stored on Agent.
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 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 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