Tool

Trait Tool 

Source
pub trait Tool: Send + Sync {
    // Required methods
    fn info(&self) -> ToolInfo;
    fn execute<'life0, 'async_trait>(
        &'life0 self,
        params: Value,
    ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Base trait for all tools

Required Methods§

Source

fn info(&self) -> ToolInfo

Get information about this tool

Source

fn execute<'life0, 'async_trait>( &'life0 self, params: Value, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Execute the tool with given parameters

Implementors§