pub struct Registry { /* private fields */ }Implementations§
Source§impl Registry
impl Registry
pub fn new() -> Self
Sourcepub fn register(&mut self, tool: Arc<dyn Tool>)
pub fn register(&mut self, tool: Arc<dyn Tool>)
Register a tool with the default NativeBinding — dispatch will call
the tool’s Tool::call directly. Panics on duplicate tool_id:
startup misconfiguration should fail loud, not at request time.
Sourcepub fn register_with_binding(
&mut self,
tool: Arc<dyn Tool>,
binding: Arc<dyn Binding>,
)
pub fn register_with_binding( &mut self, tool: Arc<dyn Tool>, binding: Arc<dyn Binding>, )
Register a tool paired with an explicit binding. Use this for tools
whose execution strategy differs from “run the Tool::call future”
(e.g. CliBinding for subprocess-backed tools).
pub fn get(&self, tool_id: &str) -> Option<&RegisteredTool>
pub fn summaries(&self) -> Vec<ToolSummary>
pub fn count(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Registry
impl !RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl UnsafeUnpin for Registry
impl !UnwindSafe for Registry
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