pub struct Interpreter {
    pub instruction_pointer: *const u8,
    pub instruction_result: InstructionResult,
    pub gas: Gas,
    pub memory: Memory,
    pub stack: Stack,
    pub return_data_buffer: Bytes,
    pub return_range: Range<usize>,
    pub is_static: bool,
    pub contract: Contract,
}

Fields§

§instruction_pointer: *const u8

Instruction pointer.

§instruction_result: InstructionResult

Return is main control flag, it tell us if we should continue interpreter or break from it

§gas: Gas

left gas. Memory gas can be found in Memory field.

§memory: Memory

Memory.

§stack: Stack

Stack.

§return_data_buffer: Bytes

After call returns, its return data is saved here.

§return_range: Range<usize>

Return value.

§is_static: bool

Is interpreter call static.

§contract: Contract

Contract information and invoking data

Implementations§

Current opcode

Create new interpreter

Reference of interpreter memory.

Reference of interpreter stack.

Return a reference of the program counter.

Execute next instruction

loop steps until we are finished with execution

loop steps until we are finished with execution

Copy and get the return value of the interpreter, if any.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.