pub type ExecutionSuccess = ExecutionResult<Value>;Expand description
Execution related info as a result of performing a successful transaction
execution on the network. This value can be converted into the returned
value of the transaction via ExecutionSuccess::json or ExecutionSuccess::borsh
Aliased Type§
pub struct ExecutionSuccess {
pub total_gas_burnt: UncGas,
/* private fields */
}Fields§
§total_gas_burnt: UncGasTotal gas burnt by the execution
Implementations§
Source§impl ExecutionSuccess
impl ExecutionSuccess
Sourcepub fn json<T: DeserializeOwned>(&self) -> Result<T>
pub fn json<T: DeserializeOwned>(&self) -> Result<T>
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.
Sourcepub fn borsh<T: BorshDeserialize>(&self) -> Result<T>
pub fn borsh<T: BorshDeserialize>(&self) -> Result<T>
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.
Sourcepub fn raw_bytes(&self) -> Result<Vec<u8>>
pub fn raw_bytes(&self) -> Result<Vec<u8>>
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.