Enum diem_sdk::types::vm_status::StatusCode
pub enum StatusCode {
Show 176 variants
UNKNOWN_VALIDATION_STATUS,
INVALID_SIGNATURE,
INVALID_AUTH_KEY,
SEQUENCE_NUMBER_TOO_OLD,
SEQUENCE_NUMBER_TOO_NEW,
INSUFFICIENT_BALANCE_FOR_TRANSACTION_FEE,
TRANSACTION_EXPIRED,
SENDING_ACCOUNT_DOES_NOT_EXIST,
REJECTED_WRITE_SET,
INVALID_WRITE_SET,
EXCEEDED_MAX_TRANSACTION_SIZE,
UNKNOWN_SCRIPT,
UNKNOWN_MODULE,
MAX_GAS_UNITS_EXCEEDS_MAX_GAS_UNITS_BOUND,
MAX_GAS_UNITS_BELOW_MIN_TRANSACTION_GAS_UNITS,
GAS_UNIT_PRICE_BELOW_MIN_BOUND,
GAS_UNIT_PRICE_ABOVE_MAX_BOUND,
INVALID_GAS_SPECIFIER,
SENDING_ACCOUNT_FROZEN,
UNABLE_TO_DESERIALIZE_ACCOUNT,
CURRENCY_INFO_DOES_NOT_EXIST,
INVALID_MODULE_PUBLISHER,
NO_ACCOUNT_ROLE,
BAD_CHAIN_ID,
SEQUENCE_NUMBER_TOO_BIG,
BAD_TRANSACTION_FEE_CURRENCY,
FEATURE_UNDER_GATING,
SECONDARY_KEYS_ADDRESSES_COUNT_MISMATCH,
SIGNERS_CONTAIN_DUPLICATES,
SEQUENCE_NONCE_INVALID,
UNKNOWN_VERIFICATION_ERROR,
INDEX_OUT_OF_BOUNDS,
INVALID_SIGNATURE_TOKEN,
RECURSIVE_STRUCT_DEFINITION,
FIELD_MISSING_TYPE_ABILITY,
INVALID_FALL_THROUGH,
NEGATIVE_STACK_SIZE_WITHIN_BLOCK,
INVALID_MAIN_FUNCTION_SIGNATURE,
DUPLICATE_ELEMENT,
INVALID_MODULE_HANDLE,
UNIMPLEMENTED_HANDLE,
LOOKUP_FAILED,
TYPE_MISMATCH,
MISSING_DEPENDENCY,
POP_WITHOUT_DROP_ABILITY,
BR_TYPE_MISMATCH_ERROR,
ABORT_TYPE_MISMATCH_ERROR,
STLOC_TYPE_MISMATCH_ERROR,
STLOC_UNSAFE_TO_DESTROY_ERROR,
UNSAFE_RET_LOCAL_OR_RESOURCE_STILL_BORROWED,
RET_TYPE_MISMATCH_ERROR,
RET_BORROWED_MUTABLE_REFERENCE_ERROR,
FREEZEREF_TYPE_MISMATCH_ERROR,
FREEZEREF_EXISTS_MUTABLE_BORROW_ERROR,
BORROWFIELD_TYPE_MISMATCH_ERROR,
BORROWFIELD_BAD_FIELD_ERROR,
BORROWFIELD_EXISTS_MUTABLE_BORROW_ERROR,
COPYLOC_UNAVAILABLE_ERROR,
COPYLOC_WITHOUT_COPY_ABILITY,
COPYLOC_EXISTS_BORROW_ERROR,
MOVELOC_UNAVAILABLE_ERROR,
MOVELOC_EXISTS_BORROW_ERROR,
BORROWLOC_REFERENCE_ERROR,
BORROWLOC_UNAVAILABLE_ERROR,
BORROWLOC_EXISTS_BORROW_ERROR,
CALL_TYPE_MISMATCH_ERROR,
CALL_BORROWED_MUTABLE_REFERENCE_ERROR,
PACK_TYPE_MISMATCH_ERROR,
UNPACK_TYPE_MISMATCH_ERROR,
READREF_TYPE_MISMATCH_ERROR,
READREF_WITHOUT_COPY_ABILITY,
READREF_EXISTS_MUTABLE_BORROW_ERROR,
WRITEREF_TYPE_MISMATCH_ERROR,
WRITEREF_WITHOUT_DROP_ABILITY,
WRITEREF_EXISTS_BORROW_ERROR,
WRITEREF_NO_MUTABLE_REFERENCE_ERROR,
INTEGER_OP_TYPE_MISMATCH_ERROR,
BOOLEAN_OP_TYPE_MISMATCH_ERROR,
EQUALITY_OP_TYPE_MISMATCH_ERROR,
EXISTS_WITHOUT_KEY_ABILITY_OR_BAD_ARGUMENT,
BORROWGLOBAL_TYPE_MISMATCH_ERROR,
BORROWGLOBAL_WITHOUT_KEY_ABILITY,
MOVEFROM_TYPE_MISMATCH_ERROR,
MOVEFROM_WITHOUT_KEY_ABILITY,
MOVETO_TYPE_MISMATCH_ERROR,
MOVETO_WITHOUT_KEY_ABILITY,
MODULE_ADDRESS_DOES_NOT_MATCH_SENDER,
NO_MODULE_HANDLES,
POSITIVE_STACK_SIZE_AT_BLOCK_END,
MISSING_ACQUIRES_ANNOTATION,
EXTRANEOUS_ACQUIRES_ANNOTATION,
DUPLICATE_ACQUIRES_ANNOTATION,
INVALID_ACQUIRES_ANNOTATION,
GLOBAL_REFERENCE_ERROR,
CONSTRAINT_NOT_SATISFIED,
NUMBER_OF_TYPE_ARGUMENTS_MISMATCH,
LOOP_IN_INSTANTIATION_GRAPH,
ZERO_SIZED_STRUCT,
LINKER_ERROR,
INVALID_CONSTANT_TYPE,
MALFORMED_CONSTANT_DATA,
EMPTY_CODE_UNIT,
INVALID_LOOP_SPLIT,
INVALID_LOOP_BREAK,
INVALID_LOOP_CONTINUE,
UNSAFE_RET_UNUSED_VALUES_WITHOUT_DROP,
TOO_MANY_LOCALS,
GENERIC_MEMBER_OPCODE_MISMATCH,
FUNCTION_RESOLUTION_FAILURE,
INVALID_OPERATION_IN_SCRIPT,
DUPLICATE_MODULE_NAME,
BACKWARD_INCOMPATIBLE_MODULE_UPDATE,
CYCLIC_MODULE_DEPENDENCY,
NUMBER_OF_ARGUMENTS_MISMATCH,
INVALID_PARAM_TYPE_FOR_DESERIALIZATION,
FAILED_TO_DESERIALIZE_ARGUMENT,
NUMBER_OF_SIGNER_ARGUMENTS_MISMATCH,
CALLED_SCRIPT_VISIBLE_FROM_NON_SCRIPT_VISIBLE,
EXECUTE_SCRIPT_FUNCTION_CALLED_ON_NON_SCRIPT_VISIBLE,
INVALID_FRIEND_DECL_WITH_SELF,
INVALID_FRIEND_DECL_WITH_MODULES_OUTSIDE_ACCOUNT_ADDRESS,
INVALID_FRIEND_DECL_WITH_MODULES_IN_DEPENDENCIES,
CYCLIC_MODULE_FRIENDSHIP,
INVALID_PHANTOM_TYPE_PARAM_POSITION,
VEC_UPDATE_EXISTS_MUTABLE_BORROW_ERROR,
VEC_BORROW_ELEMENT_EXISTS_MUTABLE_BORROW_ERROR,
UNKNOWN_INVARIANT_VIOLATION_ERROR,
EMPTY_VALUE_STACK,
PC_OVERFLOW,
VERIFICATION_ERROR,
STORAGE_ERROR,
INTERNAL_TYPE_ERROR,
EVENT_KEY_MISMATCH,
UNREACHABLE,
VM_STARTUP_FAILURE,
UNEXPECTED_ERROR_FROM_KNOWN_MOVE_FUNCTION,
VERIFIER_INVARIANT_VIOLATION,
UNEXPECTED_VERIFIER_ERROR,
UNEXPECTED_DESERIALIZATION_ERROR,
FAILED_TO_SERIALIZE_WRITE_SET_CHANGES,
FAILED_TO_DESERIALIZE_RESOURCE,
TYPE_RESOLUTION_FAILURE,
DUPLICATE_NATIVE_FUNCTION,
UNKNOWN_BINARY_ERROR,
MALFORMED,
BAD_MAGIC,
UNKNOWN_VERSION,
UNKNOWN_TABLE_TYPE,
UNKNOWN_SIGNATURE_TYPE,
UNKNOWN_SERIALIZED_TYPE,
UNKNOWN_OPCODE,
BAD_HEADER_TABLE,
UNEXPECTED_SIGNATURE_TYPE,
DUPLICATE_TABLE,
UNKNOWN_ABILITY,
UNKNOWN_NATIVE_STRUCT_FLAG,
BAD_U64,
BAD_U128,
VALUE_SERIALIZATION_ERROR,
VALUE_DESERIALIZATION_ERROR,
CODE_DESERIALIZATION_ERROR,
INVALID_FLAG_BITS,
UNKNOWN_RUNTIME_STATUS,
EXECUTED,
OUT_OF_GAS,
RESOURCE_DOES_NOT_EXIST,
RESOURCE_ALREADY_EXISTS,
MISSING_DATA,
DATA_FORMAT_ERROR,
ABORTED,
ARITHMETIC_ERROR,
EXECUTION_STACK_OVERFLOW,
CALL_STACK_OVERFLOW,
VM_MAX_TYPE_DEPTH_REACHED,
VM_MAX_VALUE_DEPTH_REACHED,
UNKNOWN_STATUS,
}
Expand description
We don’t derive Arbitrary on this enum because it is too large and breaks proptest. It is written for a subset of these in proptest_types. We test conversion between this and protobuf with a hand-written test.
Variants§
UNKNOWN_VALIDATION_STATUS
INVALID_SIGNATURE
INVALID_AUTH_KEY
SEQUENCE_NUMBER_TOO_OLD
SEQUENCE_NUMBER_TOO_NEW
INSUFFICIENT_BALANCE_FOR_TRANSACTION_FEE
TRANSACTION_EXPIRED
SENDING_ACCOUNT_DOES_NOT_EXIST
REJECTED_WRITE_SET
INVALID_WRITE_SET
EXCEEDED_MAX_TRANSACTION_SIZE
UNKNOWN_SCRIPT
UNKNOWN_MODULE
MAX_GAS_UNITS_EXCEEDS_MAX_GAS_UNITS_BOUND
MAX_GAS_UNITS_BELOW_MIN_TRANSACTION_GAS_UNITS
GAS_UNIT_PRICE_BELOW_MIN_BOUND
GAS_UNIT_PRICE_ABOVE_MAX_BOUND
INVALID_GAS_SPECIFIER
SENDING_ACCOUNT_FROZEN
UNABLE_TO_DESERIALIZE_ACCOUNT
CURRENCY_INFO_DOES_NOT_EXIST
INVALID_MODULE_PUBLISHER
NO_ACCOUNT_ROLE
BAD_CHAIN_ID
SEQUENCE_NUMBER_TOO_BIG
BAD_TRANSACTION_FEE_CURRENCY
FEATURE_UNDER_GATING
SECONDARY_KEYS_ADDRESSES_COUNT_MISMATCH
SIGNERS_CONTAIN_DUPLICATES
SEQUENCE_NONCE_INVALID
UNKNOWN_VERIFICATION_ERROR
INDEX_OUT_OF_BOUNDS
INVALID_SIGNATURE_TOKEN
RECURSIVE_STRUCT_DEFINITION
FIELD_MISSING_TYPE_ABILITY
INVALID_FALL_THROUGH
NEGATIVE_STACK_SIZE_WITHIN_BLOCK
INVALID_MAIN_FUNCTION_SIGNATURE
DUPLICATE_ELEMENT
INVALID_MODULE_HANDLE
UNIMPLEMENTED_HANDLE
LOOKUP_FAILED
TYPE_MISMATCH
MISSING_DEPENDENCY
POP_WITHOUT_DROP_ABILITY
BR_TYPE_MISMATCH_ERROR
ABORT_TYPE_MISMATCH_ERROR
STLOC_TYPE_MISMATCH_ERROR
STLOC_UNSAFE_TO_DESTROY_ERROR
UNSAFE_RET_LOCAL_OR_RESOURCE_STILL_BORROWED
RET_TYPE_MISMATCH_ERROR
RET_BORROWED_MUTABLE_REFERENCE_ERROR
FREEZEREF_TYPE_MISMATCH_ERROR
FREEZEREF_EXISTS_MUTABLE_BORROW_ERROR
BORROWFIELD_TYPE_MISMATCH_ERROR
BORROWFIELD_BAD_FIELD_ERROR
BORROWFIELD_EXISTS_MUTABLE_BORROW_ERROR
COPYLOC_UNAVAILABLE_ERROR
COPYLOC_WITHOUT_COPY_ABILITY
COPYLOC_EXISTS_BORROW_ERROR
MOVELOC_UNAVAILABLE_ERROR
MOVELOC_EXISTS_BORROW_ERROR
BORROWLOC_REFERENCE_ERROR
BORROWLOC_UNAVAILABLE_ERROR
BORROWLOC_EXISTS_BORROW_ERROR
CALL_TYPE_MISMATCH_ERROR
CALL_BORROWED_MUTABLE_REFERENCE_ERROR
PACK_TYPE_MISMATCH_ERROR
UNPACK_TYPE_MISMATCH_ERROR
READREF_TYPE_MISMATCH_ERROR
READREF_WITHOUT_COPY_ABILITY
READREF_EXISTS_MUTABLE_BORROW_ERROR
WRITEREF_TYPE_MISMATCH_ERROR
WRITEREF_WITHOUT_DROP_ABILITY
WRITEREF_EXISTS_BORROW_ERROR
WRITEREF_NO_MUTABLE_REFERENCE_ERROR
INTEGER_OP_TYPE_MISMATCH_ERROR
BOOLEAN_OP_TYPE_MISMATCH_ERROR
EQUALITY_OP_TYPE_MISMATCH_ERROR
EXISTS_WITHOUT_KEY_ABILITY_OR_BAD_ARGUMENT
BORROWGLOBAL_TYPE_MISMATCH_ERROR
BORROWGLOBAL_WITHOUT_KEY_ABILITY
MOVEFROM_TYPE_MISMATCH_ERROR
MOVEFROM_WITHOUT_KEY_ABILITY
MOVETO_TYPE_MISMATCH_ERROR
MOVETO_WITHOUT_KEY_ABILITY
MODULE_ADDRESS_DOES_NOT_MATCH_SENDER
NO_MODULE_HANDLES
POSITIVE_STACK_SIZE_AT_BLOCK_END
MISSING_ACQUIRES_ANNOTATION
EXTRANEOUS_ACQUIRES_ANNOTATION
DUPLICATE_ACQUIRES_ANNOTATION
INVALID_ACQUIRES_ANNOTATION
GLOBAL_REFERENCE_ERROR
CONSTRAINT_NOT_SATISFIED
NUMBER_OF_TYPE_ARGUMENTS_MISMATCH
LOOP_IN_INSTANTIATION_GRAPH
ZERO_SIZED_STRUCT
LINKER_ERROR
INVALID_CONSTANT_TYPE
MALFORMED_CONSTANT_DATA
EMPTY_CODE_UNIT
INVALID_LOOP_SPLIT
INVALID_LOOP_BREAK
INVALID_LOOP_CONTINUE
UNSAFE_RET_UNUSED_VALUES_WITHOUT_DROP
TOO_MANY_LOCALS
GENERIC_MEMBER_OPCODE_MISMATCH
FUNCTION_RESOLUTION_FAILURE
INVALID_OPERATION_IN_SCRIPT
DUPLICATE_MODULE_NAME
BACKWARD_INCOMPATIBLE_MODULE_UPDATE
CYCLIC_MODULE_DEPENDENCY
NUMBER_OF_ARGUMENTS_MISMATCH
INVALID_PARAM_TYPE_FOR_DESERIALIZATION
FAILED_TO_DESERIALIZE_ARGUMENT
NUMBER_OF_SIGNER_ARGUMENTS_MISMATCH
CALLED_SCRIPT_VISIBLE_FROM_NON_SCRIPT_VISIBLE
EXECUTE_SCRIPT_FUNCTION_CALLED_ON_NON_SCRIPT_VISIBLE
INVALID_FRIEND_DECL_WITH_SELF
INVALID_FRIEND_DECL_WITH_MODULES_OUTSIDE_ACCOUNT_ADDRESS
INVALID_FRIEND_DECL_WITH_MODULES_IN_DEPENDENCIES
CYCLIC_MODULE_FRIENDSHIP
INVALID_PHANTOM_TYPE_PARAM_POSITION
VEC_UPDATE_EXISTS_MUTABLE_BORROW_ERROR
VEC_BORROW_ELEMENT_EXISTS_MUTABLE_BORROW_ERROR
UNKNOWN_INVARIANT_VIOLATION_ERROR
EMPTY_VALUE_STACK
PC_OVERFLOW
VERIFICATION_ERROR
STORAGE_ERROR
INTERNAL_TYPE_ERROR
EVENT_KEY_MISMATCH
UNREACHABLE
VM_STARTUP_FAILURE
UNEXPECTED_ERROR_FROM_KNOWN_MOVE_FUNCTION
VERIFIER_INVARIANT_VIOLATION
UNEXPECTED_VERIFIER_ERROR
UNEXPECTED_DESERIALIZATION_ERROR
FAILED_TO_SERIALIZE_WRITE_SET_CHANGES
FAILED_TO_DESERIALIZE_RESOURCE
TYPE_RESOLUTION_FAILURE
DUPLICATE_NATIVE_FUNCTION
UNKNOWN_BINARY_ERROR
MALFORMED
BAD_MAGIC
UNKNOWN_VERSION
UNKNOWN_TABLE_TYPE
UNKNOWN_SIGNATURE_TYPE
UNKNOWN_SERIALIZED_TYPE
UNKNOWN_OPCODE
BAD_HEADER_TABLE
UNEXPECTED_SIGNATURE_TYPE
DUPLICATE_TABLE
UNKNOWN_ABILITY
UNKNOWN_NATIVE_STRUCT_FLAG
BAD_U64
BAD_U128
VALUE_SERIALIZATION_ERROR
VALUE_DESERIALIZATION_ERROR
CODE_DESERIALIZATION_ERROR
INVALID_FLAG_BITS
UNKNOWN_RUNTIME_STATUS
EXECUTED
OUT_OF_GAS
RESOURCE_DOES_NOT_EXIST
RESOURCE_ALREADY_EXISTS
MISSING_DATA
DATA_FORMAT_ERROR
ABORTED
ARITHMETIC_ERROR
EXECUTION_STACK_OVERFLOW
CALL_STACK_OVERFLOW
VM_MAX_TYPE_DEPTH_REACHED
VM_MAX_VALUE_DEPTH_REACHED
UNKNOWN_STATUS
Implementations§
§impl StatusCode
impl StatusCode
pub fn status_type(self) -> StatusType
pub fn status_type(self) -> StatusType
Return the status type for this status code
Trait Implementations§
§impl Arbitrary for StatusCode
impl Arbitrary for StatusCode
The Arbitrary
impl only generates validation statuses since the full enum is too large.
§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = BoxedStrategy<StatusCode>
type Strategy = BoxedStrategy<StatusCode>
The type of
Strategy
used to generate values of type Self
.§fn arbitrary_with(_args: ()) -> <StatusCode as Arbitrary>::Strategy
fn arbitrary_with(_args: ()) -> <StatusCode as Arbitrary>::Strategy
§impl Clone for StatusCode
impl Clone for StatusCode
§fn clone(&self) -> StatusCode
fn clone(&self) -> StatusCode
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for StatusCode
impl Debug for StatusCode
§impl<'de> Deserialize<'de> for StatusCode
impl<'de> Deserialize<'de> for StatusCode
§fn deserialize<D>(
deserializer: D
) -> Result<StatusCode, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>( deserializer: D ) -> Result<StatusCode, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Hash for StatusCode
impl Hash for StatusCode
§impl Ord for StatusCode
impl Ord for StatusCode
§impl PartialEq<StatusCode> for StatusCode
impl PartialEq<StatusCode> for StatusCode
§fn eq(&self, other: &StatusCode) -> bool
fn eq(&self, other: &StatusCode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl PartialOrd<StatusCode> for StatusCode
impl PartialOrd<StatusCode> for StatusCode
§fn partial_cmp(&self, other: &StatusCode) -> Option<Ordering>
fn partial_cmp(&self, other: &StatusCode) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more§impl Serialize for StatusCode
impl Serialize for StatusCode
§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where S: Serializer,
Serialize this value into the given Serde serializer. Read more
§impl TryFrom<u64> for StatusCode
impl TryFrom<u64> for StatusCode
impl Copy for StatusCode
impl Eq for StatusCode
impl StructuralEq for StatusCode
impl StructuralPartialEq for StatusCode
Auto Trait Implementations§
impl RefUnwindSafe for StatusCode
impl Send for StatusCode
impl Sync for StatusCode
impl Unpin for StatusCode
impl UnwindSafe for StatusCode
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.