Enum ink_env::ReturnErrorCode

#[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§

§

impl Debug for ReturnErrorCode

§

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

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

impl From<ReturnErrorCode> for Error

source§

fn from(value: ReturnErrorCode) -> Self

Converts to this type from the input type.
§

impl PartialEq for ReturnErrorCode

§

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.
§

impl Eq for ReturnErrorCode

§

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> Same for T

§

type Output = T

Should always be Self
§

impl<T> SaturatedConversion for T

§

fn saturated_from<T>(t: T) -> Self
where Self: UniqueSaturatedFrom<T>,

Convert from a value of T into an equivalent instance of Self. Read more
§

fn saturated_into<T>(self) -> T
where Self: UniqueSaturatedInto<T>,

Consume self to return an equivalent value of T. Read more
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.
§

impl<T, S> UniqueSaturatedInto<T> for S
where T: Bounded, S: TryInto<T>,

§

fn unique_saturated_into(self) -> T

Consume self to return an equivalent value of T.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V