Skip to main content

HookExecutor

Trait HookExecutor 

Source
pub trait HookExecutor:
    Send
    + Sync
    + Debug {
    // Required method
    fn fire<'life0, 'life1, 'async_trait>(
        &'life0 self,
        event: &'life1 HookEvent,
    ) -> Pin<Box<dyn Future<Output = HookResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Hook executor trait

Abstracts hook execution, allowing different implementations (e.g., full engine, no-op, test mocks) while keeping agent logic clean.

Required Methods§

Source

fn fire<'life0, 'life1, 'async_trait>( &'life0 self, event: &'life1 HookEvent, ) -> Pin<Box<dyn Future<Output = HookResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fire a hook event and get the result

Implementors§