HookHandler

Trait HookHandler 

Source
pub trait HookHandler: Send + Sync {
    // Required methods
    fn event_type(&self) -> &'static str;
    fn handle(&self, input: &str) -> Result<String>;
}
Expand description

Trait for hook handlers.

Required Methods§

Source

fn event_type(&self) -> &'static str

The hook event type this handler processes.

Source

fn handle(&self, input: &str) -> Result<String>

Handles the hook event.

§Errors

Returns an error if handling fails.

Implementors§