pub struct ToolRouter { /* private fields */ }Expand description
Carries tool router data across a host-port boundary. Constructing the value does not call the host; the port method that receives it documents any adapter, network, or storage effect.
Implementations§
Source§impl ToolRouter
impl ToolRouter
Sourcepub fn new(snapshot: ToolRegistrySnapshot) -> Self
pub fn new(snapshot: ToolRegistrySnapshot) -> Self
Creates a new ports::tool value with explicit caller-provided inputs. This constructor is data-only and performs no I/O or external side effects.
Sourcepub fn snapshot(&self) -> &ToolRegistrySnapshot
pub fn snapshot(&self) -> &ToolRegistrySnapshot
Snapshot. This reads tool registry metadata and does not execute a tool.
Sourcepub fn resolve(
&self,
request: ToolCallRequest,
) -> Result<ResolvedToolCall, AgentError>
pub fn resolve( &self, request: ToolCallRequest, ) -> Result<ResolvedToolCall, AgentError>
Resolves resolve through the configured ports::tool boundary. Concrete implementations own any backing-store, filesystem, or network side effects.
Trait Implementations§
Source§impl Clone for ToolRouter
impl Clone for ToolRouter
Source§fn clone(&self) -> ToolRouter
fn clone(&self) -> ToolRouter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ToolRouter
impl RefUnwindSafe for ToolRouter
impl Send for ToolRouter
impl Sync for ToolRouter
impl Unpin for ToolRouter
impl UnsafeUnpin for ToolRouter
impl UnwindSafe for ToolRouter
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