pub struct StructuredFunctionTool { /* private fields */ }Expand description
Like FunctionTool, but returns structured ToolResult with metadata.
Use this when your tool needs to report result count, source, confidence, etc.
Implementations§
Trait Implementations§
Source§impl Debug for StructuredFunctionTool
impl Debug for StructuredFunctionTool
Source§impl Tool for StructuredFunctionTool
impl Tool for StructuredFunctionTool
Source§fn name(&self) -> &str
fn name(&self) -> &str
Tool name — must be unique within a
super::ToolRegistry.
Sent to the LLM in the tools list.Source§fn description(&self) -> &str
fn description(&self) -> &str
Human-readable description of what this tool does.
The LLM reads this to decide when to call the tool.
Source§fn schema(&self) -> ToolSchema
fn schema(&self) -> ToolSchema
JSON Schema for this tool’s input parameters.
InjectedState and
InjectedStore parameters MUST be excluded.Source§fn execute(&self, input: Value) -> ToolFuture
fn execute(&self, input: Value) -> ToolFuture
Execute the tool with the given input. Called by
super::ToolNode.Source§fn execute_structured(&self, input: Value) -> ToolResultFuture
fn execute_structured(&self, input: Value) -> ToolResultFuture
Execute with structured result metadata. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for StructuredFunctionTool
impl !UnwindSafe for StructuredFunctionTool
impl Freeze for StructuredFunctionTool
impl Send for StructuredFunctionTool
impl Sync for StructuredFunctionTool
impl Unpin for StructuredFunctionTool
impl UnsafeUnpin for StructuredFunctionTool
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