#[repr(u8)]
#[non_exhaustive]
pub enum PanicReason {
Show 256 variants Success, Revert, OutOfGas, TransactionValidity, MemoryOverflow, ArithmeticOverflow, ContractNotFound, MemoryOwnership, NotEnoughBalance, ExpectedInternalContext, AssetIdNotFound, InputNotFound, OutputNotFound, WitnessNotFound, TransactionMaturity, InvalidMetadataIdentifier, MalformedCallStructure, ReservedRegisterNotWritable, ErrorFlag, InvalidImmediateValue, ExpectedCoinInput, MaxMemoryAccess, MemoryWriteOverlap, ContractNotInInputs, InternalBalanceOverflow, ContractMaxSize, ExpectedUnallocatedStack, MaxStaticContractsReached, TransferAmountCannotBeZero, ExpectedOutputVariable, ExpectedParentInternalContext, IllegalJump, NonZeroMessageOutputRecipient, ZeroedMessageOutputRecipient, ContractIdAlreadyDeployed, RESERV23, RESERV24, RESERV25, RESERV26, RESERV27, RESERV28, RESERV29, RESERV2A, RESERV2B, RESERV2C, RESERV2D, RESERV2E, RESERV2F, RESERV30, RESERV31, RESERV32, RESERV33, RESERV34, RESERV35, RESERV36, RESERV37, RESERV38, RESERV39, RESERV3A, RESERV3B, RESERV3C, RESERV3D, RESERV3E, RESERV3F, RESERV40, RESERV41, RESERV42, RESERV43, RESERV44, RESERV45, RESERV46, RESERV47, RESERV48, RESERV49, RESERV4A, RESERV4B, RESERV4C, RESERV4D, RESERV4E, RESERV4F, RESERV50, RESERV51, RESERV52, RESERV53, RESERV54, RESERV55, RESERV56, RESERV57, RESERV58, RESERV59, RESERV5A, RESERV5B, RESERV5C, RESERV5D, RESERV5E, RESERV5F, RESERV60, RESERV61, RESERV62, RESERV63, RESERV64, RESERV65, RESERV66, RESERV67, RESERV68, RESERV69, RESERV6A, RESERV6B, RESERV6C, RESERV6D, RESERV6E, RESERV6F, RESERV70, RESERV71, RESERV72, RESERV73, RESERV74, RESERV75, RESERV76, RESERV77, RESERV78, RESERV79, RESERV7A, RESERV7B, RESERV7C, RESERV7D, RESERV7E, RESERV7F, RESERV80, RESERV81, RESERV82, RESERV83, RESERV84, RESERV85, RESERV86, RESERV87, RESERV88, RESERV89, RESERV8A, RESERV8B, RESERV8C, RESERV8D, RESERV8E, RESERV8F, RESERV90, RESERV91, RESERV92, RESERV93, RESERV94, RESERV95, RESERV96, RESERV97, RESERV98, RESERV99, RESERV9A, RESERV9B, RESERV9C, RESERV9D, RESERV9E, RESERV9F, RESERVA0, RESERVA1, RESERVA2, RESERVA3, RESERVA4, RESERVA5, RESERVA6, RESERVA7, RESERVA8, RESERVA9, RESERVAA, RESERVAB, RESERVAC, RESERVAD, RESERVAE, RESERVAF, RESERVB0, RESERVB1, RESERVB2, RESERVB3, RESERVB4, RESERVB5, RESERVB6, RESERVB7, RESERVB8, RESERVB9, RESERVBA, RESERVBB, RESERVBC, RESERVBD, RESERVBE, RESERVBF, RESERVC0, RESERVC1, RESERVC2, RESERVC3, RESERVC4, RESERVC5, RESERVC6, RESERVC7, RESERVC8, RESERVC9, RESERVCA, RESERVCB, RESERVCC, RESERVCD, RESERVCE, RESERVCF, RESERVD0, RESERVD1, RESERVD2, RESERVD3, RESERVD4, RESERVD5, RESERVD6, RESERVD7, RESERVD8, RESERVD9, RESERVDA, RESERVDB, RESERVDC, RESERVDD, RESERVDE, RESERVDF, RESERVE0, RESERVE1, RESERVE2, RESERVE3, RESERVE4, RESERVE5, RESERVE6, RESERVE7, RESERVE8, RESERVE9, RESERVEA, RESERVEB, RESERVEC, RESERVED, RESERVEE, RESERVEF, RESERVF0, RESERVF1, RESERVF2, RESERVF3, RESERVF4, RESERVF5, RESERVF6, RESERVF7, RESERVF8, RESERVF9, RESERVFA, RESERVFB, RESERVFC, RESERVFD, RESERVFE, RESERVFF,
}
Expand description

Panic reason representation for the interpreter.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Success

0 is reserved for success, while any non-zero value indicates a failure.

§

Revert

Found RVRT instruction.

§

OutOfGas

Execution ran out of gas.

§

TransactionValidity

The transaction validity is violated.

§

MemoryOverflow

Attempt to write outside interpreter memory boundaries.

§

ArithmeticOverflow

Overflow while executing arithmetic operation.

§

ContractNotFound

Designed contract was not found in the storage.

§

MemoryOwnership

Memory ownership rules are violated.

§

NotEnoughBalance

The asset ID balance isn’t enough for the instruction.

§

ExpectedInternalContext

The interpreter is expected to be in internal context.

§

AssetIdNotFound

The queried asset ID was not found in the state.

§

InputNotFound

The provided input is not found in the transaction.

§

OutputNotFound

The provided output is not found in the transaction.

§

WitnessNotFound

The provided witness is not found in the transaction.

§

TransactionMaturity

The transaction maturity is not valid for this request.

§

InvalidMetadataIdentifier

The metadata identifier is invalid.

§

MalformedCallStructure

The call structure is not valid.

§

ReservedRegisterNotWritable

The provided register does not allow write operations.

§

ErrorFlag

The execution resulted in an erroneous state of the interpreter.

§

InvalidImmediateValue

The provided immediate value is not valid for this instruction.

§

ExpectedCoinInput

The provided transaction input is not of type Coin.

§

MaxMemoryAccess

The requested memory access exceeds the limits of the interpreter.

§

MemoryWriteOverlap

Two segments of the interpreter memory should not intersect for write operations.

§

ContractNotInInputs

The requested contract is not listed in the transaction inputs.

§

InternalBalanceOverflow

The internal asset ID balance overflowed with the provided instruction.

§

ContractMaxSize

The maximum allowed contract size is violated.

§

ExpectedUnallocatedStack

This instruction expects the stack area to be unallocated for this call.

§

MaxStaticContractsReached

The maximum allowed number of static contracts was reached for this transaction.

§

TransferAmountCannotBeZero

The requested transfer amount cannot be zero.

§

ExpectedOutputVariable

The provided transaction output should be of type Variable.

§

ExpectedParentInternalContext

The expected context of the stack parent is internal.

§

IllegalJump

The jump instruction cannot move backwards in predicate verification.

§

NonZeroMessageOutputRecipient

The message output is with a recipient.

§

ZeroedMessageOutputRecipient

The destination recipient for a message output is zero.

§

ContractIdAlreadyDeployed

The contract ID is already deployed and can’t be overwritten.

§

RESERV23

RESERV23

§

RESERV24

RESERV24

§

RESERV25

RESERV25

§

RESERV26

RESERV26

§

RESERV27

RESERV27

§

RESERV28

RESERV28

§

RESERV29

RESERV29

§

RESERV2A

RESERV2A

§

RESERV2B

RESERV2B

§

RESERV2C

RESERV2C

§

RESERV2D

RESERV2D

§

RESERV2E

RESERV2E

§

RESERV2F

RESERV2F

§

RESERV30

RESERV30

§

RESERV31

RESERV31

§

RESERV32

RESERV32

§

RESERV33

RESERV33

§

RESERV34

RESERV34

§

RESERV35

RESERV35

§

RESERV36

RESERV36

§

RESERV37

RESERV37

§

RESERV38

RESERV38

§

RESERV39

RESERV39

§

RESERV3A

RESERV3A

§

RESERV3B

RESERV3B

§

RESERV3C

RESERV3C

§

RESERV3D

RESERV3D

§

RESERV3E

RESERV3E

§

RESERV3F

RESERV3F

§

RESERV40

RESERV40

§

RESERV41

RESERV41

§

RESERV42

RESERV42

§

RESERV43

RESERV43

§

RESERV44

RESERV44

§

RESERV45

RESERV45

§

RESERV46

RESERV46

§

RESERV47

RESERV47

§

RESERV48

RESERV48

§

RESERV49

RESERV49

§

RESERV4A

RESERV4A

§

RESERV4B

RESERV4B

§

RESERV4C

RESERV4C

§

RESERV4D

RESERV4D

§

RESERV4E

RESERV4E

§

RESERV4F

RESERV4F

§

RESERV50

RESERV50

§

RESERV51

RESERV51

§

RESERV52

RESERV52

§

RESERV53

RESERV53

§

RESERV54

RESERV54

§

RESERV55

RESERV55

§

RESERV56

RESERV56

§

RESERV57

RESERV57

§

RESERV58

RESERV58

§

RESERV59

RESERV59

§

RESERV5A

RESERV5A

§

RESERV5B

RESERV5B

§

RESERV5C

RESERV5C

§

RESERV5D

RESERV5D

§

RESERV5E

RESERV5E

§

RESERV5F

RESERV5F

§

RESERV60

RESERV60

§

RESERV61

RESERV61

§

RESERV62

RESERV62

§

RESERV63

RESERV63

§

RESERV64

RESERV64

§

RESERV65

RESERV65

§

RESERV66

RESERV66

§

RESERV67

RESERV67

§

RESERV68

RESERV68

§

RESERV69

RESERV69

§

RESERV6A

RESERV6A

§

RESERV6B

RESERV6B

§

RESERV6C

RESERV6C

§

RESERV6D

RESERV6D

§

RESERV6E

RESERV6E

§

RESERV6F

RESERV6F

§

RESERV70

RESERV70

§

RESERV71

RESERV71

§

RESERV72

RESERV72

§

RESERV73

RESERV73

§

RESERV74

RESERV74

§

RESERV75

RESERV75

§

RESERV76

RESERV76

§

RESERV77

RESERV77

§

RESERV78

RESERV78

§

RESERV79

RESERV79

§

RESERV7A

RESERV7A

§

RESERV7B

RESERV7B

§

RESERV7C

RESERV7C

§

RESERV7D

RESERV7D

§

RESERV7E

RESERV7E

§

RESERV7F

RESERV7F

§

RESERV80

RESERV80

§

RESERV81

RESERV81

§

RESERV82

RESERV82

§

RESERV83

RESERV83

§

RESERV84

RESERV84

§

RESERV85

RESERV85

§

RESERV86

RESERV86

§

RESERV87

RESERV87

§

RESERV88

RESERV88

§

RESERV89

RESERV89

§

RESERV8A

RESERV8A

§

RESERV8B

RESERV8B

§

RESERV8C

RESERV8C

§

RESERV8D

RESERV8D

§

RESERV8E

RESERV8E

§

RESERV8F

RESERV8F

§

RESERV90

RESERV90

§

RESERV91

RESERV91

§

RESERV92

RESERV92

§

RESERV93

RESERV93

§

RESERV94

RESERV94

§

RESERV95

RESERV95

§

RESERV96

RESERV96

§

RESERV97

RESERV97

§

RESERV98

RESERV98

§

RESERV99

RESERV99

§

RESERV9A

RESERV9A

§

RESERV9B

RESERV9B

§

RESERV9C

RESERV9C

§

RESERV9D

RESERV9D

§

RESERV9E

RESERV9E

§

RESERV9F

RESERV9F

§

RESERVA0

RESERVA0

§

RESERVA1

RESERVA1

§

RESERVA2

RESERVA2

§

RESERVA3

RESERVA3

§

RESERVA4

RESERVA4

§

RESERVA5

RESERVA5

§

RESERVA6

RESERVA6

§

RESERVA7

RESERVA7

§

RESERVA8

RESERVA8

§

RESERVA9

RESERVA9

§

RESERVAA

RESERVAA

§

RESERVAB

RESERVAB

§

RESERVAC

RESERVAC

§

RESERVAD

RESERVAD

§

RESERVAE

RESERVAE

§

RESERVAF

RESERVAF

§

RESERVB0

RESERVB0

§

RESERVB1

RESERVB1

§

RESERVB2

RESERVB2

§

RESERVB3

RESERVB3

§

RESERVB4

RESERVB4

§

RESERVB5

RESERVB5

§

RESERVB6

RESERVB6

§

RESERVB7

RESERVB7

§

RESERVB8

RESERVB8

§

RESERVB9

RESERVB9

§

RESERVBA

RESERVBA

§

RESERVBB

RESERVBB

§

RESERVBC

RESERVBC

§

RESERVBD

RESERVBD

§

RESERVBE

RESERVBE

§

RESERVBF

RESERVBF

§

RESERVC0

RESERVC0

§

RESERVC1

RESERVC1

§

RESERVC2

RESERVC2

§

RESERVC3

RESERVC3

§

RESERVC4

RESERVC4

§

RESERVC5

RESERVC5

§

RESERVC6

RESERVC6

§

RESERVC7

RESERVC7

§

RESERVC8

RESERVC8

§

RESERVC9

RESERVC9

§

RESERVCA

RESERVCA

§

RESERVCB

RESERVCB

§

RESERVCC

RESERVCC

§

RESERVCD

RESERVCD

§

RESERVCE

RESERVCE

§

RESERVCF

RESERVCF

§

RESERVD0

RESERVD0

§

RESERVD1

RESERVD1

§

RESERVD2

RESERVD2

§

RESERVD3

RESERVD3

§

RESERVD4

RESERVD4

§

RESERVD5

RESERVD5

§

RESERVD6

RESERVD6

§

RESERVD7

RESERVD7

§

RESERVD8

RESERVD8

§

RESERVD9

RESERVD9

§

RESERVDA

RESERVDA

§

RESERVDB

RESERVDB

§

RESERVDC

RESERVDC

§

RESERVDD

RESERVDD

§

RESERVDE

RESERVDE

§

RESERVDF

RESERVDF

§

RESERVE0

RESERVE0

§

RESERVE1

RESERVE1

§

RESERVE2

RESERVE2

§

RESERVE3

RESERVE3

§

RESERVE4

RESERVE4

§

RESERVE5

RESERVE5

§

RESERVE6

RESERVE6

§

RESERVE7

RESERVE7

§

RESERVE8

RESERVE8

§

RESERVE9

RESERVE9

§

RESERVEA

RESERVEA

§

RESERVEB

RESERVEB

§

RESERVEC

RESERVEC

§

RESERVED

RESERVED

§

RESERVEE

RESERVEE

§

RESERVEF

RESERVEF

§

RESERVF0

RESERVF0

§

RESERVF1

RESERVF1

§

RESERVF2

RESERVF2

§

RESERVF3

RESERVF3

§

RESERVF4

RESERVF4

§

RESERVF5

RESERVF5

§

RESERVF6

RESERVF6

§

RESERVF7

RESERVF7

§

RESERVF8

RESERVF8

§

RESERVF9

RESERVF9

§

RESERVFA

RESERVFA

§

RESERVFB

RESERVFB

§

RESERVFC

RESERVFC

§

RESERVFD

RESERVFD

§

RESERVFE

RESERVFE

§

RESERVFF

RESERVFF

Trait Implementations§

source§

impl<'arbitrary> Arbitrary<'arbitrary> for PanicReason

source§

fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>

Generate an arbitrary value of Self from the given unstructured data. Read more
source§

fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>

Generate an arbitrary value of Self from the entirety of the given unstructured data. Read more
source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
source§

impl Clone for PanicReason

source§

fn clone(&self) -> PanicReason

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PanicReason

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for PanicReason

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for PanicReason

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for PanicReason

Available on crate feature std only.
source§

fn source(&self) -> Option<&(dyn Error + 'static)>

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

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Infallible> for PanicReason

source§

fn from(_i: Infallible) -> Self

Converts to this type from the input type.
source§

impl From<PanicReason> for Error

Available on crate feature std only.
source§

fn from(reason: PanicReason) -> Self

Converts to this type from the input type.
source§

impl From<u8> for PanicReason

source§

fn from(b: u8) -> Self

Converts to this type from the input type.
source§

impl Hash for PanicReason

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

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

impl PartialEq<PanicReason> for PanicReason

source§

fn eq(&self, other: &PanicReason) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for PanicReason

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for PanicReason

source§

impl Eq for PanicReason

source§

impl StructuralEq for PanicReason

source§

impl StructuralPartialEq for PanicReason

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<E> Provider for Ewhere E: Error + ?Sized,

source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,