Trait Hook

Source
pub trait Hook {
    // Required method
    fn invoke_hook(&mut self, env: HookEnv<'_, '_>, buf: &[u8]) -> Vec<Vec<u8>>;
}
Expand description

A runtime hook. May be called during execution by writing to a specified file descriptor, accepting and returning arbitrary data.

Required Methods§

Source

fn invoke_hook(&mut self, env: HookEnv<'_, '_>, buf: &[u8]) -> Vec<Vec<u8>>

Invoke the runtime hook with a standard environment and arbitrary data. Returns the computed data.

Implementors§

Source§

impl<F: FnMut(HookEnv<'_, '_>, &[u8]) -> Vec<Vec<u8>>> Hook for F