Enum diem_types::vm_status::VMStatus [−][src]
pub enum VMStatus { Executed, Error(StatusCode), MoveAbort(AbortLocation, u64), ExecutionFailure { status_code: StatusCode, location: AbortLocation, function: u16, code_offset: u16, }, }
Expand description
A VMStatus
is represented as either
Executed
indicating successful executionError
indicating an error from the VM itselfMoveAbort
indicating anabort
ocurred inside of a Move program
Variants
Expand description
The VM status corresponding to an EXECUTED status code
Error(StatusCode)
Expand description
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
MoveAbort(AbortLocation, u64)
Expand description
Indicates an abort
from inside Move code. Contains the location of the abort and the code
Expand description
Indicates an failure from inside Move code, where the VM could not continue exection, e.g. dividing by zero or a missing resource
Show fields
Fields of ExecutionFailure
Implementations
impl VMStatus
[src]
impl VMStatus
[src]pub fn status_code(&self) -> StatusCode
[src]
pub fn status_code(&self) -> StatusCode
[src]Return the status code for the VMStatus
pub fn move_abort_code(&self) -> Option<u64>
[src]
pub fn move_abort_code(&self) -> Option<u64>
[src]Returns the Move abort code if the status is MoveAbort
, and None
otherwise
pub fn status_type(&self) -> StatusType
[src]
pub fn status_type(&self) -> StatusType
[src]Return the status type for this VMStatus
. This is solely determined by the status_code
pub fn keep_or_discard(self) -> Result<KeptVMStatus, StatusCode>
[src]
pub fn keep_or_discard(self) -> Result<KeptVMStatus, StatusCode>
[src]Returns Ok
with a recorded status if it should be kept, Err
of the error code if it
should be discarded
Trait Implementations
impl<'de> Deserialize<'de> for VMStatus
[src]
impl<'de> Deserialize<'de> for VMStatus
[src]pub fn deserialize<__D>(
__deserializer: __D
) -> Result<VMStatus, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<VMStatus, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl Error for VMStatus
[src]
impl Error for VMStatus
[src]fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]The lower-level source of this error, if any. Read more
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
fn description(&self) -> &str
1.0.0[src]
fn description(&self) -> &str
1.0.0[src]use the Display impl or to_string()
impl From<VMStatus> for TransactionStatus
[src]
impl From<VMStatus> for TransactionStatus
[src]impl Ord for VMStatus
[src]
impl Ord for VMStatus
[src]impl PartialOrd<VMStatus> for VMStatus
[src]
impl PartialOrd<VMStatus> for VMStatus
[src]pub fn partial_cmp(&self, other: &VMStatus) -> Option<Ordering>
[src]
pub fn partial_cmp(&self, other: &VMStatus) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Serialize for VMStatus
[src]
impl Serialize for VMStatus
[src]pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]Serialize this value into the given Serde serializer. Read more
impl Eq for VMStatus
[src]
impl StructuralEq for VMStatus
[src]
impl StructuralPartialEq for VMStatus
[src]
Auto Trait Implementations
impl RefUnwindSafe for VMStatus
impl Send for VMStatus
impl Sync for VMStatus
impl Unpin for VMStatus
impl UnwindSafe for VMStatus
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> TestOnlyHash for T where
T: Serialize + ?Sized,
[src]
impl<T> TestOnlyHash for T where
T: Serialize + ?Sized,
[src]pub fn test_only_hash(&self) -> HashValue
[src]
pub fn test_only_hash(&self) -> HashValue
[src]Generates a hash used only for tests.
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,