Skip to main content

ToolHandler

Trait ToolHandler 

Source
pub trait ToolHandler: Send + Sync {
    // Required methods
    fn kind(&self) -> ToolKind;
    fn handle<'life0, 'async_trait>(
        &'life0 self,
        invocation: ToolInvocation,
    ) -> Pin<Box<dyn Future<Output = Result<ToolOutput, FunctionCallError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    fn matches_kind(&self, kind: ToolKind) -> bool { ... }
    fn is_mutating(&self) -> bool { ... }
}

Required Methods§

Source

fn kind(&self) -> ToolKind

Source

fn handle<'life0, 'async_trait>( &'life0 self, invocation: ToolInvocation, ) -> Pin<Box<dyn Future<Output = Result<ToolOutput, FunctionCallError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn matches_kind(&self, kind: ToolKind) -> bool

Source

fn is_mutating(&self) -> bool

Implementors§