#[non_exhaustive]
pub struct ExecutionResult<T> { pub total_gas_burnt: Gas, /* private fields */ }
Expand description

The result after evaluating the status of an execution. This can be ExecutionSuccess for successful executions or a ExecutionFailure for failed ones.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§total_gas_burnt: Gas

Total gas burnt by the execution

Implementations§

Deserialize an instance of type T from bytes of JSON text sourced from the execution result of this call. This conversion can fail if the structure of the internal state does not meet up with serde::de::DeserializeOwned’s requirements.

Deserialize an instance of type T from bytes sourced from the execution result. This conversion can fail if the structure of the internal state does not meet up with borsh::BorshDeserialize’s requirements.

Grab the underlying raw bytes returned from calling into a contract’s function. If we want to deserialize these bytes into a rust datatype, use ExecutionResult::json or ExecutionResult::borsh instead.

Returns just the transaction outcome.

Grab all outcomes after the execution of the transaction. This includes outcomes from the transaction and all the receipts it generated.

Grab all outcomes after the execution of the transaction. This includes outcomes only from receipts generated by this transaction.

Grab all outcomes that did not succeed the execution of this transaction. This will also include the failures from receipts as well.

Just like failures, grab only failed receipt outcomes.

Grab all logs from both the transaction and receipt outcomes.

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
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Converts a reference to Self into a dynamic trait object of Fail.
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.
Returns the “name” of the error. Read more
Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more
Returns a reference to the Backtrace carried by this failure, if it carries one. Read more
Provides context for this failure. Read more
Wraps this failure in a compatibility wrapper that implements std::error::Error. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. 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.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more