#[repr(u8)]
pub enum ReturnErrorCode {
Show 16 variants Success = 0, CalleeTrapped = 1, CalleeReverted = 2, KeyNotFound = 3, _BelowSubsistenceThreshold = 4, TransferFailed = 5, _EndowmentTooLow = 6, CodeNotFound = 7, NotCallable = 8, LoggingDisabled = 9, CallRuntimeFailed = 10, EcdsaRecoveryFailed = 11, Sr25519VerifyFailed = 12, XcmExecutionFailed = 13, XcmSendFailed = 14, Unknown = 15,
}
Expand description

Every error that can be returned to a contract when it calls any of the host functions.

Variants§

§

Success = 0

API call successful.

§

CalleeTrapped = 1

The called function trapped and has its state changes reverted. In this case no output buffer is returned. Can only be returned from call and instantiate.

§

CalleeReverted = 2

The called function ran to completion but decided to revert its state. An output buffer is returned when one was supplied. Can only be returned from call and instantiate.

§

KeyNotFound = 3

The passed key does not exist in storage.

§

_BelowSubsistenceThreshold = 4

Deprecated and no longer returned: There is only the minimum balance.

§

TransferFailed = 5

Transfer failed for other not further specified reason. Most probably reserved or locked balance of the sender that was preventing the transfer.

§

_EndowmentTooLow = 6

Deprecated and no longer returned: Endowment is no longer required.

§

CodeNotFound = 7

No code could be found at the supplied code hash.

§

NotCallable = 8

The account that was called is no contract.

§

LoggingDisabled = 9

The call to debug_message had no effect because debug message recording was disabled.

§

CallRuntimeFailed = 10

The call dispatched by call_runtime was executed but returned an error.

§

EcdsaRecoveryFailed = 11

ECDSA public key recovery failed. Most probably wrong recovery id or signature.

§

Sr25519VerifyFailed = 12

sr25519 signature verification failed.

§

XcmExecutionFailed = 13

The xcm_execute call failed.

§

XcmSendFailed = 14

The xcm_send call failed.

§

Unknown = 15

Returns if an unknown error was received from the host module.

Trait Implementations§

source§

impl Debug for ReturnErrorCode

source§

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

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

impl From<ReturnErrorCode> for u32

source§

fn from(code: ReturnErrorCode) -> u32

Converts to this type from the input type.
source§

impl PartialEq for ReturnErrorCode

source§

fn eq(&self, other: &ReturnErrorCode) -> 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 Eq for ReturnErrorCode

source§

impl StructuralPartialEq for ReturnErrorCode

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where 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 T
where 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<T, U> TryFrom<U> for T
where 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 T
where 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> JsonSchemaMaybe for T