Enum diem_types::vm_status::VMStatus[][src]

pub enum VMStatus {
    Executed,
    Error(StatusCode),
    MoveAbort(AbortLocationu64),
    ExecutionFailure {
        status_code: StatusCode,
        location: AbortLocation,
        function: u16,
        code_offset: u16,
    },
}
Expand description

A VMStatus is represented as either

  • Executed indicating successful execution
  • Error indicating an error from the VM itself
  • MoveAbort indicating an abort ocurred inside of a Move program

Variants

Executed

The VM status corresponding to an EXECUTED status code

Error(StatusCode)

Indicates an error from the VM, e.g. OUT_OF_GAS, INVALID_AUTH_KEY, RET_TYPE_MISMATCH_ERROR etc. The code will neither EXECUTED nor ABORTED

Tuple Fields of Error

0: StatusCode
MoveAbort(AbortLocationu64)

Indicates an abort from inside Move code. Contains the location of the abort and the code

Tuple Fields of MoveAbort

0: AbortLocation1: u64
ExecutionFailure

Indicates an failure from inside Move code, where the VM could not continue exection, e.g. dividing by zero or a missing resource

Fields of ExecutionFailure

status_code: StatusCodelocation: AbortLocationfunction: u16code_offset: u16

Implementations

Return the status code for the VMStatus

Returns the Move abort code if the status is MoveAbort, and None otherwise

Return the status type for this VMStatus. This is solely determined by the status_code

Returns Ok with a recorded status if it should be kept, Err of the error code if it should be discarded

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

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Serialize this value into the given Serde serializer. 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.

Should always be Self

Generates a hash used only for tests.

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)

recently added

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.