Skip to main content

ToolHandler

Trait ToolHandler 

Source
pub trait ToolHandler: Send + Sync {
    // Required method
    fn call<'life0, 'async_trait>(
        &'life0 self,
        arguments: Value,
    ) -> Pin<Box<dyn Future<Output = ToolResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait implemented by tool handlers that the server dispatches to.

Required Methods§

Source

fn call<'life0, 'async_trait>( &'life0 self, arguments: Value, ) -> Pin<Box<dyn Future<Output = ToolResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Execute the tool with the given JSON arguments.

Implementors§