Type Alias sp_runtime::TryRuntimeError

source ·
pub type TryRuntimeError = DispatchError;
Expand description

The error type used as return type in try runtime hooks.

Aliased Type§

enum TryRuntimeError {
Show 14 variants Other(&'static str), CannotLookup, BadOrigin, Module(ModuleError), ConsumerRemaining, NoProviders, TooManyConsumers, Token(TokenError), Arithmetic(ArithmeticError), Transactional(TransactionalError), Exhausted, Corruption, Unavailable, RootNotAllowed,
}

Variants§

§

Other(&'static str)

Some error occurred.

§

CannotLookup

Failed to lookup some data.

§

BadOrigin

A bad origin.

§

Module(ModuleError)

A custom error in a module.

§

ConsumerRemaining

At least one consumer is remaining so the account cannot be destroyed.

§

NoProviders

There are no providers so the account cannot be created.

§

TooManyConsumers

There are too many consumers so the account cannot be created.

§

Token(TokenError)

An error to do with tokens.

§

Arithmetic(ArithmeticError)

An arithmetic error.

§

Transactional(TransactionalError)

The number of transactional layers has been reached, or we are not in a transactional layer.

§

Exhausted

Resources exhausted, e.g. attempt to read/write data which is too large to manipulate.

§

Corruption

The state is corrupt; this is generally not going to fix itself.

§

Unavailable

Some resource (e.g. a preimage) is unavailable right now. This might fix itself later.

§

RootNotAllowed

Root origin is not allowed.

Implementations§

source§

impl DispatchError

source

pub fn stripped(self) -> Self

Return the same error but without the attached message.

Trait Implementations§

source§

impl Clone for DispatchError

source§

fn clone(&self) -> DispatchError

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 DispatchError

source§

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

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

impl Decode for DispatchError

source§

fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy ) -> Result<Self, Error>

Attempt to deserialise the value from input.
source§

fn decode_into<I>( input: &mut I, dst: &mut MaybeUninit<Self> ) -> Result<DecodeFinished, Error>where I: Input,

Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
source§

fn skip<I>(input: &mut I) -> Result<(), Error>where I: Input,

Attempt to skip the encoded value from input. Read more
source§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
source§

impl<'de> Deserialize<'de> for DispatchError

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 Encode for DispatchError

source§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
source§

fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy )

Convert self to a slice and append it to the destination.
source§

fn encode(&self) -> Vec<u8, Global>

Convert self to an owned vector.
source§

fn using_encoded<R, F>(&self, f: F) -> Rwhere F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
source§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
source§

impl From<&'static str> for DispatchError

source§

fn from(err: &'static str) -> DispatchError

Converts to this type from the input type.
source§

impl From<ArithmeticError> for DispatchError

source§

fn from(e: ArithmeticError) -> DispatchError

Converts to this type from the input type.
source§

impl From<BadOrigin> for DispatchError

source§

fn from(_: BadOrigin) -> Self

Converts to this type from the input type.
source§

impl From<LookupError> for DispatchError

source§

fn from(_: LookupError) -> Self

Converts to this type from the input type.
source§

impl From<TokenError> for DispatchError

source§

fn from(e: TokenError) -> DispatchError

Converts to this type from the input type.
source§

impl From<TransactionalError> for DispatchError

source§

fn from(e: TransactionalError) -> DispatchError

Converts to this type from the input type.
source§

impl MaxEncodedLen for DispatchError

source§

fn max_encoded_len() -> usize

Upper bound, in bytes, of the maximum encoded size of this item.
source§

impl PartialEq<DispatchError> for DispatchError

source§

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

source§

fn print(&self)

Print the object.
source§

impl Serialize for DispatchError

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 TypeInfo for DispatchError

§

type Identity = DispatchError

The type identifying for which type info is provided. Read more
source§

fn type_info() -> Type

Returns the static type identifier for Self.
source§

impl Copy for DispatchError

source§

impl EncodeLike<DispatchError> for DispatchError

source§

impl Eq for DispatchError

source§

impl StructuralEq for DispatchError

source§

impl StructuralPartialEq for DispatchError