[][src]Enum casper_execution_engine::core::engine_state::execution_result::ExecutionResult

pub enum ExecutionResult {
    Failure {
        error: Error,
        effect: ExecutionEffect,
        transfers: Vec<TransferAddr>,
        cost: Gas,
    },
    Success {
        effect: ExecutionEffect,
        transfers: Vec<TransferAddr>,
        cost: Gas,
    },
}

Variants

Failure

An error condition that happened during execution

Fields of Failure

error: Erroreffect: ExecutionEffecttransfers: Vec<TransferAddr>cost: Gas
Success

Execution was finished successfully

Fields of Success

effect: ExecutionEffecttransfers: Vec<TransferAddr>cost: Gas

Implementations

impl ExecutionResult[src]

pub fn precondition_failure(error: Error) -> ExecutionResult[src]

Constructs ExecutionResult::Failure that has 0 cost and no effects. This is the case for failures that we can't (or don't want to) charge for, like PreprocessingError or InvalidNonce.

pub fn is_success(&self) -> bool[src]

pub fn is_failure(&self) -> bool[src]

pub fn has_precondition_failure(&self) -> bool[src]

pub fn cost(&self) -> Gas[src]

pub fn effect(&self) -> &ExecutionEffect[src]

pub fn transfers(&self) -> &Vec<TransferAddr>[src]

pub fn with_cost(self, cost: Gas) -> Self[src]

pub fn with_effect(self, effect: ExecutionEffect) -> Self[src]

pub fn with_transfers(self, transfers: Vec<TransferAddr>) -> Self[src]

pub fn as_error(&self) -> Option<&Error>[src]

pub fn take_error(self) -> Option<Error>[src]

Consumes ExecutionResult instance and optionally returns error::Error instance for ExecutionResult::Failure variant.

pub fn check_forced_transfer(
    &self,
    payment_purse_balance: Motes
) -> Option<ForcedTransferResult>
[src]

pub fn new_payment_code_error(
    error: Error,
    max_payment_cost: Motes,
    account_main_purse_balance: Motes,
    account_main_purse_balance_key: Key,
    proposer_main_purse_balance_key: Key
) -> ExecutionResult
[src]

pub fn take_with_ret<T: FromBytes + CLTyped>(self, ret: T) -> (Option<T>, Self)[src]

pub fn take_without_ret<T: FromBytes + CLTyped>(self) -> (Option<T>, Self)[src]

Trait Implementations

impl Debug for ExecutionResult[src]

impl Default for ExecutionResult[src]

impl<'_> From<&'_ ExecutionResult> for ExecutionResult[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,