pub struct CalculatorTool { /* private fields */ }Expand description
Implementations§
Trait Implementations§
Source§impl Default for CalculatorTool
impl Default for CalculatorTool
Source§impl Tool for CalculatorTool
impl Tool for CalculatorTool
Source§fn definition(&self) -> &ToolDefinition
fn definition(&self) -> &ToolDefinition
Returns the tool’s metadata (name, description, schema)
Source§fn capabilities(&self) -> Vec<Capability>
fn capabilities(&self) -> Vec<Capability>
Required capabilities for sandboxing. Read more
Source§fn validate(&self, args: &Value) -> Result<(), ToolError>
fn validate(&self, args: &Value) -> Result<(), ToolError>
Validate arguments before execution. Read more
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the tool with given arguments. Read more
Source§fn is_available(&self) -> bool
fn is_available(&self) -> bool
Whether the tool is currently available. Read more
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more