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

#[repr(C)]
pub struct evmc_host_interface { pub account_exists: Option<unsafe extern "C" fn(*mut evmc_context, *const evmc_address) -> bool>, pub get_storage: Option<unsafe extern "C" fn(*mut evmc_context, *const evmc_address, *const evmc_bytes32) -> evmc_bytes32>, pub set_storage: Option<unsafe extern "C" fn(*mut evmc_context, *const evmc_address, *const evmc_bytes32, *const evmc_bytes32) -> evmc_storage_status>, pub get_balance: Option<unsafe extern "C" fn(*mut evmc_context, *const evmc_address) -> evmc_bytes32>, pub get_code_size: Option<unsafe extern "C" fn(*mut evmc_context, *const evmc_address) -> usize>, pub get_code_hash: Option<unsafe extern "C" fn(*mut evmc_context, *const evmc_address) -> evmc_bytes32>, pub copy_code: Option<unsafe extern "C" fn(*mut evmc_context, *const evmc_address, usize, *mut u8, usize) -> usize>, pub selfdestruct: Option<unsafe extern "C" fn(*mut evmc_context, *const evmc_address, *const evmc_address)>, pub call: Option<unsafe extern "C" fn(*mut evmc_context, *const evmc_message) -> evmc_result>, pub get_tx_context: Option<unsafe extern "C" fn(*mut evmc_context) -> evmc_tx_context>, pub get_block_hash: Option<unsafe extern "C" fn(*mut evmc_context, i64) -> evmc_bytes32>, pub emit_log: Option<unsafe extern "C" fn(*mut evmc_context, *const evmc_address, *const u8, usize, *const evmc_bytes32, usize)>, }
Expand description

The Host interface.

The set of all callback functions expected by VM instances. This is C realisation of vtable for OOP interface (only virtual methods, no data). Host implementations SHOULD create constant singletons of this (similarly to vtables) to lower the maintenance and memory management cost.

Fields

account_exists: Option<unsafe extern "C" fn(*mut evmc_context, *const evmc_address) -> bool>

Check account existence callback function.

get_storage: Option<unsafe extern "C" fn(*mut evmc_context, *const evmc_address, *const evmc_bytes32) -> evmc_bytes32>

Get storage callback function.

set_storage: Option<unsafe extern "C" fn(*mut evmc_context, *const evmc_address, *const evmc_bytes32, *const evmc_bytes32) -> evmc_storage_status>

Set storage callback function.

get_balance: Option<unsafe extern "C" fn(*mut evmc_context, *const evmc_address) -> evmc_bytes32>

Get balance callback function.

get_code_size: Option<unsafe extern "C" fn(*mut evmc_context, *const evmc_address) -> usize>

Get code size callback function.

get_code_hash: Option<unsafe extern "C" fn(*mut evmc_context, *const evmc_address) -> evmc_bytes32>

Get code hash callback function.

copy_code: Option<unsafe extern "C" fn(*mut evmc_context, *const evmc_address, usize, *mut u8, usize) -> usize>

Copy code callback function.

selfdestruct: Option<unsafe extern "C" fn(*mut evmc_context, *const evmc_address, *const evmc_address)>

Selfdestruct callback function.

call: Option<unsafe extern "C" fn(*mut evmc_context, *const evmc_message) -> evmc_result>

Call callback function.

get_tx_context: Option<unsafe extern "C" fn(*mut evmc_context) -> evmc_tx_context>

Get transaction context callback function.

get_block_hash: Option<unsafe extern "C" fn(*mut evmc_context, i64) -> evmc_bytes32>

Get block hash callback function.

emit_log: Option<unsafe extern "C" fn(*mut evmc_context, *const evmc_address, *const u8, usize, *const evmc_bytes32, usize)>

Emit log callback function.

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.