#[repr(i32)]pub enum ReturnCode {
Show 13 variants
Success = 0,
CalleeTrapped = 1,
CalleeReverted = 2,
KeyNotFound = 3,
BelowSubsistenceThreshold = 4,
TransferFailed = 5,
NewContractNotFunded = 6,
CodeNotFound = 7,
NotCallable = 8,
LoggingDisabled = 9,
CallRuntimeReturnedError = 10,
EcdsaRecoverFailed = 11,
UnExpectedReturnCode = 12,
}
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.
CalleeReverted = 2
The called function ran to completion but decided to revert its state. An output buffer is returned when one was supplied.
KeyNotFound = 3
The passed key does not exist in storage.
BelowSubsistenceThreshold = 4
Transfer failed because it would have brought the sender’s total balance below the subsistence threshold.
TransferFailed = 5
Transfer failed for other reasons. Most probably reserved or locked balance of the sender prevents the transfer.
NewContractNotFunded = 6
The newly created contract is below the subsistence threshold after executing its constructor.
CodeNotFound = 7
No code could be found at the supplied code hash.
NotCallable = 8
The contract that was called is either no contract at all (a plain account) or is a tombstone.
LoggingDisabled = 9
The call to seal_debug_message
had no effect because debug message
recording was disabled.
CallRuntimeReturnedError = 10
The call dispatched by seal_call_runtime
was executed but returned an error.
EcdsaRecoverFailed = 11
ECDSA pubkey recovery failed. Most probably wrong recovery id or signature.
UnExpectedReturnCode = 12
Unexpected return code
Trait Implementations§
Source§impl Clone for ReturnCode
impl Clone for ReturnCode
Source§fn clone(&self) -> ReturnCode
fn clone(&self) -> ReturnCode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ReturnCode
impl Debug for ReturnCode
Source§impl From<i32> for ReturnCode
impl From<i32> for ReturnCode
Source§fn from(n: i32) -> ReturnCode
fn from(n: i32) -> ReturnCode
Source§impl PartialEq for ReturnCode
impl PartialEq for ReturnCode
impl Copy for ReturnCode
impl Eq for ReturnCode
impl StructuralPartialEq for ReturnCode
Auto Trait Implementations§
impl Freeze for ReturnCode
impl RefUnwindSafe for ReturnCode
impl Send for ReturnCode
impl Sync for ReturnCode
impl Unpin for ReturnCode
impl UnwindSafe for ReturnCode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.