pub struct JsToolAdapter { /* private fields */ }Trait Implementations§
Source§impl AgentTool for JsToolAdapter
impl AgentTool for JsToolAdapter
Source§fn schema(&self) -> &Tool
fn schema(&self) -> &Tool
The provider-facing tool definition (name, description, parameters schema).
Source§fn execution_mode(&self) -> ToolExecutionMode
fn execution_mode(&self) -> ToolExecutionMode
Per-tool execution-mode override.
Sequential forces one-at-a-time for
the whole batch when any tool in it returns Sequential; Parallel
(default) allows concurrency.Source§fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
tool_call_id: &'life1 str,
params: Value,
signal: CancellationToken,
on_update: Arc<dyn Fn(ToolResultPartial) + Send + Sync>,
) -> Pin<Box<dyn Future<Output = Result<AgentToolResult, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
tool_call_id: &'life1 str,
params: Value,
signal: CancellationToken,
on_update: Arc<dyn Fn(ToolResultPartial) + Send + Sync>,
) -> Pin<Box<dyn Future<Output = Result<AgentToolResult, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute the tool call. Throw via
Err(AgentError) on failure — the loop
encodes the error message into an error ToolResultMessage. Read moreSource§fn prepare_arguments(&self, args: Value) -> Result<Value, AgentError>
fn prepare_arguments(&self, args: Value) -> Result<Value, AgentError>
Optional compatibility shim for raw tool-call arguments before schema
validation. Default is identity. Mirrors TS
prepareArguments.Source§impl Clone for JsToolAdapter
impl Clone for JsToolAdapter
Source§fn clone(&self) -> JsToolAdapter
fn clone(&self) -> JsToolAdapter
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 JsToolAdapter
impl RefUnwindSafe for JsToolAdapter
impl Send for JsToolAdapter
impl Sync for JsToolAdapter
impl Unpin for JsToolAdapter
impl UnsafeUnpin for JsToolAdapter
impl UnwindSafe for JsToolAdapter
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