MeteredExecutor

Trait MeteredExecutor 

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

Trait for metered 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 which contains auxiliary data (e.g., corresponding AIR ID) for metering purposes.

Required Methods§

Source

fn metered_pre_compute_size(&self) -> usize

Source

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

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§