pub trait InstructionHandlerwhere
Self: Sized,{
type Context;
type Err;
// Required methods
fn create_vm(initial_context: Self::Context) -> VM<Self>;
fn process_instruction(
vm_state: &mut VMState,
context: &mut Self::Context,
instruction: Instruction,
) -> Result<(), Self::Err>;
}
Expand description
An instruction handler interface.
Required Associated Types§
Required Methods§
fn create_vm(initial_context: Self::Context) -> VM<Self>
fn process_instruction( vm_state: &mut VMState, context: &mut Self::Context, instruction: Instruction, ) -> Result<(), Self::Err>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.