pub struct CalculatorTool { /* private fields */ }Expand description
Calculator tool for basic arithmetic
Implementations§
Trait Implementations§
Source§impl Default for CalculatorTool
impl Default for CalculatorTool
Source§impl Tool for CalculatorTool
impl Tool for CalculatorTool
Source§fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
arguments: &'life1 Value,
_state: &'life2 GraphState,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
arguments: &'life1 Value,
_state: &'life2 GraphState,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute the tool with given arguments
Source§fn description(&self) -> &str
fn description(&self) -> &str
Get the tool description
Source§fn argument_schema(&self) -> Value
fn argument_schema(&self) -> Value
Get the tool’s argument schema (JSON Schema)
Source§fn validate_arguments(&self, arguments: &Value) -> Result<(), ToolError>
fn validate_arguments(&self, arguments: &Value) -> Result<(), ToolError>
Validate tool arguments
Source§fn requires_auth(&self) -> bool
fn requires_auth(&self) -> bool
Check if the tool requires authentication
Auto Trait Implementations§
impl Freeze for CalculatorTool
impl RefUnwindSafe for CalculatorTool
impl Send for CalculatorTool
impl Sync for CalculatorTool
impl Unpin for CalculatorTool
impl UnwindSafe for CalculatorTool
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