pub struct Described { /* private fields */ }Expand description
A tool declared with another description. Everything else is the tool’s.
Implementations§
Trait Implementations§
Source§impl Tool for Described
impl Tool for Described
Source§fn declaration(&self) -> &ToolDeclaration
fn declaration(&self) -> &ToolDeclaration
Name, description and argument schema as sent to the model.
Source§fn execution_mode(&self) -> ExecutionMode
fn execution_mode(&self) -> ExecutionMode
See
ExecutionMode.Source§fn output_schema(&self) -> Option<&Value>
fn output_schema(&self) -> Option<&Value>
JSON Schema of the value the tool returns as
structuredContent, for
tools whose results scripts consume (pi’s outputSchema).Source§fn prepare_arguments(&self, arguments: Map<String, Value>) -> Map<String, Value>
fn prepare_arguments(&self, arguments: Map<String, Value>) -> Map<String, Value>
Rewrites raw arguments before validation, for compatibility with older
argument shapes.
Source§fn execute(
&self,
call_id: String,
args: Value,
cancel: CancellationToken,
updates: UpdateSink,
) -> BoxFuture<'_, Result<ToolResult, String>>
fn execute( &self, call_id: String, args: Value, cancel: CancellationToken, updates: UpdateSink, ) -> BoxFuture<'_, Result<ToolResult, String>>
Runs the tool with validated arguments.
Auto Trait Implementations§
impl !RefUnwindSafe for Described
impl !UnwindSafe for Described
impl Freeze for Described
impl Send for Described
impl Sync for Described
impl Unpin for Described
impl UnsafeUnpin for Described
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