Enum ReturnErrorCode
#[repr(u32)]pub enum ReturnErrorCode {
Show 13 variants
Success = 0,
CalleeTrapped = 1,
CalleeReverted = 2,
KeyNotFound = 3,
TransferFailed = 4,
LoggingDisabled = 5,
CallRuntimeFailed = 6,
EcdsaRecoveryFailed = 7,
Sr25519VerifyFailed = 8,
XcmExecutionFailed = 9,
XcmSendFailed = 10,
OutOfResources = 11,
Unknown = 12,
}
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.
TransferFailed = 4
Transfer failed for other not further specified reason. Most probably reserved or locked balance of the sender that was preventing the transfer.
LoggingDisabled = 5
The call to debug_message
had no effect because debug message
recording was disabled.
CallRuntimeFailed = 6
The call dispatched by call_runtime
was executed but returned an error.
EcdsaRecoveryFailed = 7
ECDSA public key recovery failed. Most probably wrong recovery id or signature.
Sr25519VerifyFailed = 8
sr25519 signature verification failed.
XcmExecutionFailed = 9
The xcm_execute
call failed.
XcmSendFailed = 10
The xcm_send
call failed.
OutOfResources = 11
The subcall ran out of weight or storage deposit.
Unknown = 12
Returns if an unknown error was received from the host module.
Trait Implementations§
§impl Debug for ReturnErrorCode
impl Debug for ReturnErrorCode
source§impl From<ReturnErrorCode> for Error
impl From<ReturnErrorCode> for Error
source§fn from(value: ReturnErrorCode) -> Self
fn from(value: ReturnErrorCode) -> Self
§impl PartialEq for ReturnErrorCode
impl PartialEq for ReturnErrorCode
impl Eq for ReturnErrorCode
impl StructuralPartialEq for ReturnErrorCode
Auto Trait Implementations§
impl Freeze for ReturnErrorCode
impl RefUnwindSafe for ReturnErrorCode
impl Send for ReturnErrorCode
impl Sync for ReturnErrorCode
impl Unpin for ReturnErrorCode
impl UnwindSafe for ReturnErrorCode
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
§impl<T> IsType<T> for T
impl<T> IsType<T> for T
§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T
. Read more§impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
type Error = <U as TryFromKey<T>>::Error
fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>
§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.