Executor

Trait Executor 

Source
pub trait Executor<F> {
    // Required methods
    fn pre_compute_size(&self) -> usize;
    fn pre_compute<Ctx>(
        &self,
        pc: u32,
        inst: &Instruction<F>,
        data: &mut [u8],
    ) -> Result<ExecuteFunc<F, Ctx>, StaticProgramError>
       where Ctx: ExecutionCtxTrait;
}
Expand description

Trait for pure execution via a host interpreter. The trait methods provide the methods to pre-process the program code into function pointers which operate on pre_compute instruction data.

Required Methods§

Source

fn pre_compute_size(&self) -> usize

Source

fn pre_compute<Ctx>( &self, pc: u32, inst: &Instruction<F>, data: &mut [u8], ) -> Result<ExecuteFunc<F, Ctx>, StaticProgramError>
where Ctx: ExecutionCtxTrait,

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.

Implementors§