Skip to main content

InstructionProvider

Trait InstructionProvider 

Source
pub trait InstructionProvider {
    type Context;
    type InterpreterTypes: InterpreterTypes;

    // Required methods
    fn instruction_table(
        &self,
    ) -> &InstructionTable<Self::InterpreterTypes, Self::Context>;
    fn gas_table(&self) -> &GasTable;
}
Expand description

Stores instructions for EVM.

Required Associated Types§

Source

type Context

Context type.

Source

type InterpreterTypes: InterpreterTypes

Interpreter types.

Required Methods§

Source

fn instruction_table( &self, ) -> &InstructionTable<Self::InterpreterTypes, Self::Context>

Returns the instruction table that is used by EvmTr to execute instructions.

Source

fn gas_table(&self) -> &GasTable

Returns the gas table for static gas costs.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, T: 'a + InstructionProvider + ?Sized> InstructionProvider for &'a mut T

Source§

impl<T: InstructionProvider + ?Sized> InstructionProvider for Box<T>

Implementors§