Skip to main content

ToolValidator

Trait ToolValidator 

Source
pub trait ToolValidator: Send + Sync {
    // Required methods
    fn tool_name(&self) -> &'static str;
    fn validate<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        tool_call: &'life1 ToolCall,
        context: &'life2 ValidationContext,
    ) -> Pin<Box<dyn Future<Output = Result<ValidationResult, ValidationError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}

Required Methods§

Source

fn tool_name(&self) -> &'static str

Source

fn validate<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tool_call: &'life1 ToolCall, context: &'life2 ValidationContext, ) -> Pin<Box<dyn Future<Output = Result<ValidationResult, ValidationError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Implementors§