Skip to main content

HookModule

Trait HookModule 

Source
pub trait HookModule: Send + Sync {
    // Required methods
    fn id(&self) -> &str;
    fn handle(
        &self,
        event: &HookEvent,
        ctx: &ModuleContext,
    ) -> Result<ModuleOutput, String>;
}

Required Methods§

Source

fn id(&self) -> &str

Source

fn handle( &self, event: &HookEvent, ctx: &ModuleContext, ) -> Result<ModuleOutput, String>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§