Trait sp1_core_executor::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