Skip to main content

InvalidArgsHandler

Trait InvalidArgsHandler 

Source
pub trait InvalidArgsHandler: Send + Sync {
    // Required method
    fn on_invalid_args<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: InvalidArgsCtx<'life1>,
    ) -> Pin<Box<dyn Future<Output = AgentResult<InvalidArgsAction>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Strategy for calls that omit schema-required arguments.

Called before execution, once per rejected call, with the structured details. Implementations may perform side effects (load docs, trigger workflows) before returning an action.

The hook is async so applications can do I/O; the kernel only decides when to ask, not how to respond.

Required Methods§

Source

fn on_invalid_args<'life0, 'life1, 'async_trait>( &'life0 self, ctx: InvalidArgsCtx<'life1>, ) -> Pin<Box<dyn Future<Output = AgentResult<InvalidArgsAction>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§