pub struct EchoTool;Trait Implementations§
Source§impl Tool for EchoTool
impl Tool for EchoTool
Source§fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input: &'life1 str,
_ctx: &'life2 ToolContext,
) -> Pin<Box<dyn Future<Output = Result<ToolResult>> + 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,
input: &'life1 str,
_ctx: &'life2 ToolContext,
) -> Pin<Box<dyn Future<Output = Result<ToolResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute the tool with the given input and context.
Source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
Human-readable description of what this tool does.
Used in system prompts so the LLM knows when to invoke this tool.
Auto Trait Implementations§
impl Freeze for EchoTool
impl RefUnwindSafe for EchoTool
impl Send for EchoTool
impl Sync for EchoTool
impl Unpin for EchoTool
impl UnsafeUnpin for EchoTool
impl UnwindSafe for EchoTool
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