Skip to main content

ApprovalPolicy

Trait ApprovalPolicy 

Source
pub trait ApprovalPolicy: Send + Sync {
    // Required method
    fn evaluate<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        descriptor: &'life1 ToolDescriptor,
        ctx: &'life2 ToolCtx,
        call: &'life3 ToolCall,
    ) -> Pin<Box<dyn Future<Output = Result<ToolApprovalState, ToolError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
}

Required Methods§

Source

fn evaluate<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, descriptor: &'life1 ToolDescriptor, ctx: &'life2 ToolCtx, call: &'life3 ToolCall, ) -> Pin<Box<dyn Future<Output = Result<ToolApprovalState, ToolError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§