Skip to main content

Hook

Trait Hook 

Source
pub trait Hook: Send + Sync {
    // Required methods
    fn execute(&self, context: &HookContext) -> HookResult;
    fn name(&self) -> &str;
}
Expand description

Trait for hook implementations.

Required Methods§

Source

fn execute(&self, context: &HookContext) -> HookResult

Execute the hook and return a result.

Source

fn name(&self) -> &str

Display name for logging.

Implementors§