Struct rust_ssvm::types::ffi::evmc_instance[][src]

#[repr(C)]
pub struct evmc_instance { pub abi_version: i32, pub name: *const i8, pub version: *const i8, pub destroy: Option<unsafe extern "C" fn(*mut evmc_instance)>, pub execute: Option<unsafe extern "C" fn(*mut evmc_instance, *mut evmc_context, evmc_revision, *const evmc_message, *const u8, usize) -> evmc_result>, pub get_capabilities: Option<unsafe extern "C" fn(*mut evmc_instance) -> u32>, pub set_tracer: Option<unsafe extern "C" fn(*mut evmc_instance, Option<unsafe extern "C" fn(*mut evmc_tracer_context, usize, evmc_status_code, i64, usize, *const evmc_bytes32, usize, usize, usize, *const u8)>, *mut evmc_tracer_context)>, pub set_option: Option<unsafe extern "C" fn(*mut evmc_instance, *const i8, *const i8) -> evmc_set_option_result>, }
Expand description

The EVM instance.

Defines the base struct of the VM implementation.

Fields

abi_version: i32

EVMC ABI version implemented by the VM instance.

Can be used to detect ABI incompatibilities. The EVMC ABI version represented by this file is in ::EVMC_ABI_VERSION.

name: *const i8

The name of the EVMC VM implementation.

It MUST be a NULL-terminated not empty string. The content MUST be UTF-8 encoded (this implies ASCII encoding is also allowed).

version: *const i8

The version of the EVMC VM implementation, e.g. “1.2.3b4”.

It MUST be a NULL-terminated not empty string. The content MUST be UTF-8 encoded (this implies ASCII encoding is also allowed).

destroy: Option<unsafe extern "C" fn(*mut evmc_instance)>

Pointer to function destroying the EVM instance.

This is a mandatory method and MUST NOT be set to NULL.

execute: Option<unsafe extern "C" fn(*mut evmc_instance, *mut evmc_context, evmc_revision, *const evmc_message, *const u8, usize) -> evmc_result>

Pointer to function executing a code by the EVM instance.

This is a mandatory method and MUST NOT be set to NULL.

get_capabilities: Option<unsafe extern "C" fn(*mut evmc_instance) -> u32>

A method returning capabilities supported by the VM instance.

The value returned MAY change when different options are set via the set_option() method.

A Client SHOULD only rely on the value returned if it has queried it after it has called the set_option().

This is a mandatory method and MUST NOT be set to NULL.

set_tracer: Option<unsafe extern "C" fn(*mut evmc_instance, Option<unsafe extern "C" fn(*mut evmc_tracer_context, usize, evmc_status_code, i64, usize, *const evmc_bytes32, usize, usize, usize, *const u8)>, *mut evmc_tracer_context)>

Optional pointer to function setting the EVM instruction tracer.

If the EVM does not support this feature the pointer can be NULL.

@deprecated Since EVMC 6.3, the tracing API has been deprecated as there have been some design flaws discovered. New API is expected to be introduced in future.

set_option: Option<unsafe extern "C" fn(*mut evmc_instance, *const i8, *const i8) -> evmc_set_option_result>

Optional pointer to function modifying VM’s options.

If the VM does not support this feature the pointer can be NULL.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

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.

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.