pub struct ToolRuntime { /* private fields */ }Implementations§
Source§impl ToolRuntime
impl ToolRuntime
Sourcepub fn new(registry: ToolRegistry) -> Self
pub fn new(registry: ToolRegistry) -> Self
Creates a runtime around the supplied registry using default policy and limits.
Sourcepub fn with_config(self, config: ToolRuntimeConfig) -> Self
pub fn with_config(self, config: ToolRuntimeConfig) -> Self
Overrides runtime-wide timeout and output-size defaults.
Sourcepub fn with_approval_policy(
self,
approval_policy: Arc<dyn ApprovalPolicy>,
) -> Self
pub fn with_approval_policy( self, approval_policy: Arc<dyn ApprovalPolicy>, ) -> Self
Replaces the approval policy used before dispatching tools.
Sourcepub fn with_receipt_sink(self, receipt_sink: Arc<dyn ToolReceiptSink>) -> Self
pub fn with_receipt_sink(self, receipt_sink: Arc<dyn ToolReceiptSink>) -> Self
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<Arc<ToolExecutionPermit>>, cancel: Option<&AtomicBool>, ) -> 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