[−][src]Struct evmc_sys::evmc_result
The EVM code execution result.
Fields
status_code: evmc_status_code
The execution status code.
gas_left: i64
The amount of gas left after the execution.
If evmc_result::status_code is neither ::EVMC_SUCCESS nor ::EVMC_REVERT the value MUST be 0.
output_data: *const u8
The reference to output data.
The output contains data coming from RETURN opcode (iff evmc_result::code field is ::EVMC_SUCCESS) or from REVERT opcode.
The memory containing the output data is owned by EVM and has to be freed with evmc_result::release().
This MAY be NULL.
output_size: usize
The size of the output data.
If output_data is NULL this MUST be 0.
release: evmc_release_result_fn
The method releasing all resources associated with the result object.
This method (function pointer) is optional (MAY be NULL) and MAY be set by the VM implementation. If set it MUST be called by the user once to release memory and other resources associated with the result object. Once the resources are released the result object MUST NOT be used again.
The suggested code pattern for releasing execution results: @code struct evmc_result result = ...; if (result.release) result.release(&result); @endcode
@note It works similarly to C++ virtual destructor. Attaching the release function to the result itself allows VM composition.
create_address: evmc_address
The address of the contract created by create instructions.
This field has valid value only if:
- it is a result of the Host method evmc_host_interface::call
- and the result describes successful contract creation (evmc_result::status_code is ::EVMC_SUCCESS). In all other cases the address MUST be null bytes.
padding: [u8; 4]
Reserved data that MAY be used by a evmc_result object creator.
This reserved 4 bytes together with 20 bytes from create_address form 24 bytes of memory called "optional data" within evmc_result struct to be optionally used by the evmc_result object creator.
@see evmc_result_optional_data, evmc_get_optional_data().
Also extends the size of the evmc_result to 64 bytes (full cache line).
Trait Implementations
impl Clone for evmc_result
[src]
fn clone(&self) -> evmc_result
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for evmc_result
[src]
impl Debug for evmc_result
[src]
impl Hash for evmc_result
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<evmc_result> for evmc_result
[src]
fn eq(&self, other: &evmc_result) -> bool
[src]
fn ne(&self, other: &evmc_result) -> bool
[src]
impl StructuralPartialEq for evmc_result
[src]
Auto Trait Implementations
impl RefUnwindSafe for evmc_result
impl !Send for evmc_result
impl !Sync for evmc_result
impl Unpin for evmc_result
impl UnwindSafe for evmc_result
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,