pub struct MessageAgentTool { /* private fields */ }Trait Implementations§
Source§impl AgentTool for MessageAgentTool
impl AgentTool for MessageAgentTool
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.Auto Trait Implementations§
impl !RefUnwindSafe for MessageAgentTool
impl !UnwindSafe for MessageAgentTool
impl Forget for MessageAgentTool
impl Freeze for MessageAgentToolwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, Value>>: Freeze,
*const LeafNode<GrammarFormat, String> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(GrammarFormat, String)>>: Freeze,
*const ArcInner<OnceLock<WeakAgentHarness>> is !null: Freeze,
PhantomData<ArcInner<OnceLock<WeakAgentHarness>>>: Freeze,
impl Move for MessageAgentTool
impl Send for MessageAgentToolwhere
RawVecInner: Send,
RawTable<usize>: Send,
NodeRef<Owned, GrammarFormat, String, LeafOrInternal>: Send,
BoxRaw<(GrammarFormat, String)>: Send,
Arc<OnceLock<WeakAgentHarness>>: Send,
impl Sync for MessageAgentToolwhere
RawVecInner: Sync,
RawTable<usize>: Sync,
NodeRef<Owned, GrammarFormat, String, LeafOrInternal>: Sync,
BoxRaw<(GrammarFormat, String)>: Sync,
Arc<OnceLock<WeakAgentHarness>>: Sync,
impl Unpin for MessageAgentToolwhere
*const u8 is !null: Unpin,
*const LeafNode<GrammarFormat, String> is !null: Unpin,
Box<(GrammarFormat, String)>: Unpin,
Arc<OnceLock<WeakAgentHarness>>: Unpin,
impl UnsafeUnpin for MessageAgentToolwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, Value>>: UnsafeUnpin,
*const LeafNode<GrammarFormat, String> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(GrammarFormat, String)>>: UnsafeUnpin,
*const ArcInner<OnceLock<WeakAgentHarness>> is !null: UnsafeUnpin,
PhantomData<ArcInner<OnceLock<WeakAgentHarness>>>: UnsafeUnpin,
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