pub struct CanonicalToolRuntime { /* private fields */ }Implementations§
Source§impl ToolRuntime
impl ToolRuntime
Sourcepub fn new(registry: ToolRegistry) -> ToolRuntime
pub fn new(registry: ToolRegistry) -> ToolRuntime
Creates a runtime around the supplied registry using default policy and limits.
Sourcepub fn with_config(self, config: ToolRuntimeConfig) -> ToolRuntime
pub fn with_config(self, config: ToolRuntimeConfig) -> ToolRuntime
Overrides runtime-wide timeout and output-size defaults.
Sourcepub fn with_approval_policy(
self,
approval_policy: Arc<dyn ApprovalPolicy>,
) -> ToolRuntime
pub fn with_approval_policy( self, approval_policy: Arc<dyn ApprovalPolicy>, ) -> ToolRuntime
Replaces the approval policy used before dispatching tools.
Sourcepub fn with_receipt_sink(
self,
receipt_sink: Arc<dyn ToolReceiptSink>,
) -> ToolRuntime
pub fn with_receipt_sink( self, receipt_sink: Arc<dyn ToolReceiptSink>, ) -> ToolRuntime
Installs the durable receipt sink used for ForgeRaw receipt persistence.
Sourcepub fn registry(&self) -> &ToolRegistry
pub fn registry(&self) -> &ToolRegistry
Borrows the underlying tool registry.
pub async fn execute( &self, ctx: &ToolCtx, call: &ToolCall, permit: Option<&ToolExecutionPermit>, cancel: Option<&Atomic<bool>>, ) -> ToolExecution
Auto Trait Implementations§
impl !RefUnwindSafe for ToolRuntime
impl !UnwindSafe for ToolRuntime
impl Freeze for ToolRuntime
impl Send for ToolRuntime
impl Sync for ToolRuntime
impl Unpin for ToolRuntime
impl UnsafeUnpin for ToolRuntime
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