AsyncExecutionHook

Trait AsyncExecutionHook 

Source
pub trait AsyncExecutionHook:
    Send
    + Sync
    + Debug {
    // Required methods
    fn execute_async(
        &mut self,
        context: &ExecutionContext,
        data: Option<&HookData>,
    ) -> SklResult<HookResult>;
    fn name(&self) -> &str;
    fn should_execute(&self, phase: HookPhase) -> bool;

    // Provided methods
    fn priority(&self) -> i32 { ... }
    fn timeout(&self) -> Option<Duration> { ... }
}
Expand description

Async execution hook trait for non-blocking operations Note: Would use #[async_trait::async_trait] in real implementation

Required Methods§

Source

fn execute_async( &mut self, context: &ExecutionContext, data: Option<&HookData>, ) -> SklResult<HookResult>

Source

fn name(&self) -> &str

Source

fn should_execute(&self, phase: HookPhase) -> bool

Check if hook should execute for given phase

Provided Methods§

Source

fn priority(&self) -> i32

Source

fn timeout(&self) -> Option<Duration>

Maximum execution timeout

Implementors§