pub struct Interpreter<S> { /* private fields */ }
Expand description

VM interpreter.

The internal state of the VM isn’t expose because the intended usage is to either inspect the resulting receipts after a transaction execution, or the resulting mutated transaction.

These can be obtained with the help of a crate::transactor::Transactor or a client implementation.

Implementations

Create a new interpreter instance out of a storage implementation.

If the provided storage implements crate::storage::InterpreterStorage, the returned interpreter will provide full functionality.

Create a new interpreter without a storage backend.

It will have restricted capabilities.

Create a new storage with a provided in-memory storage.

It will have full capabilities.

Execute the current instruction pair located in $m[$pc].

Execute a provided instruction

Allocate internally a new instance of Interpreter with the provided storage, initialize it with the provided transaction and return the result of th execution in form of StateTransition

Initialize a pre-allocated instance of Interpreter with the provided transaction and execute it. The result will be bound to the lifetime of the interpreter and will avoid unnecessary copy with the data that can be referenced from the interpreter instance itself.

Returns the current state of the VM memory

Returns the current state of the registers

Debug handler

Receipts generated by a transaction execution.

Trait Implementations

Performs the conversion.

Performs the conversion.

Performs the conversion.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

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

Performs the conversion.

Performs the conversion.

Should always be Self

Encode the hex strict representing self into the result. Lower case letters are used (e.g. f9b4ca) Read more

Encode the hex strict representing self into the result. Upper case letters are used (e.g. F9B4CA) Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.