Trait wasm::execution::hooks::HookSet

source ·
pub trait HookSet: Default {
    // Provided method
    fn instruction_hook(&mut self, bytecode: &[u8], pc: usize) { ... }
}
Expand description

Trait that allows user specified hooks for various events during interpretation

The default implementation of all trait methods are empty, i. e. can be optimized out fully.

Provided Methods§

source

fn instruction_hook(&mut self, bytecode: &[u8], pc: usize)

A hook which is called before every wasm instruction

This allows the most intricate insight into the interpreters behavior, at the cost of a hefty performance penalty

Object Safety§

This trait is not object safe.

Implementors§