pub struct Calculator;Expand description
Built-in calculator tool
Trait Implementations§
Source§impl Debug for Calculator
impl Debug for Calculator
Source§impl Tool for Calculator
impl Tool for Calculator
Source§fn description(&self) -> &str
fn description(&self) -> &str
Human-readable description for LLM context
Source§fn capabilities(&self) -> Vec<&'static str>
fn capabilities(&self) -> Vec<&'static str>
Tool capabilities for filtering and discovery
Source§fn is_cacheable(&self) -> bool
fn is_cacheable(&self) -> bool
Whether this tool can be cached
Source§fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
input: &'life1 str,
) -> Pin<Box<dyn Future<Output = RragResult<ToolResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
input: &'life1 str,
) -> Pin<Box<dyn Future<Output = RragResult<ToolResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute the tool with string input
Source§fn execute_with_params<'life0, 'async_trait>(
&'life0 self,
params: Value,
) -> Pin<Box<dyn Future<Output = RragResult<ToolResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute_with_params<'life0, 'async_trait>(
&'life0 self,
params: Value,
) -> Pin<Box<dyn Future<Output = RragResult<ToolResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute with structured parameters (default delegates to execute)
Source§fn requires_auth(&self) -> bool
fn requires_auth(&self) -> bool
Whether this tool requires authentication
Source§fn cost_estimate(&self) -> u32
fn cost_estimate(&self) -> u32
Cost estimate for execution (arbitrary units)
Auto Trait Implementations§
impl Freeze for Calculator
impl RefUnwindSafe for Calculator
impl Send for Calculator
impl Sync for Calculator
impl Unpin for Calculator
impl UnwindSafe for Calculator
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