referrerpolicy=no-referrer-when-downgrade

Trait polkadot_sdk_frame::traits::PalletError

pub trait PalletError: Encode + Decode {
    const MAX_ENCODED_SIZE: usize;
}
Expand description

Trait indicating that the implementing type is going to be included as a field in a variant of the #[pallet::error] enum type.

§Notes

The pallet error enum has a maximum encoded size as defined by [frame_support::MAX_MODULE_ERROR_ENCODED_SIZE]. If the pallet error type exceeds this size limit, a static assertion during compilation will fail. The compilation error will be in the format of error[E0080]: evaluation of constant value failed due to the usage of const assertions.

Required Associated Constants§

const MAX_ENCODED_SIZE: usize

The maximum encoded size for the implementing type.

This will be used to check whether the pallet error type is less than or equal to [frame_support::MAX_MODULE_ERROR_ENCODED_SIZE], and if it is, a compilation error will be thrown.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl PalletError for bool

§

const MAX_ENCODED_SIZE: usize = 1usize

§

impl PalletError for i8

§

const MAX_ENCODED_SIZE: usize = 1usize

§

impl PalletError for i16

§

const MAX_ENCODED_SIZE: usize = 2usize

§

impl PalletError for i32

§

const MAX_ENCODED_SIZE: usize = 4usize

§

impl PalletError for i64

§

const MAX_ENCODED_SIZE: usize = 8usize

§

impl PalletError for i128

§

const MAX_ENCODED_SIZE: usize = 16usize

§

impl PalletError for u8

§

const MAX_ENCODED_SIZE: usize = 1usize

§

impl PalletError for u16

§

const MAX_ENCODED_SIZE: usize = 2usize

§

impl PalletError for u32

§

const MAX_ENCODED_SIZE: usize = 4usize

§

impl PalletError for u64

§

const MAX_ENCODED_SIZE: usize = 8usize

§

impl PalletError for u128

§

const MAX_ENCODED_SIZE: usize = 16usize

§

impl PalletError for ()

§

const MAX_ENCODED_SIZE: usize = 0usize

§

impl PalletError for Duration

§

const MAX_ENCODED_SIZE: usize = 12usize

§

impl PalletError for Compact<u8>

§

const MAX_ENCODED_SIZE: usize = 2usize

§

impl PalletError for Compact<u16>

§

const MAX_ENCODED_SIZE: usize = 4usize

§

impl PalletError for Compact<u32>

§

const MAX_ENCODED_SIZE: usize = 5usize

§

impl PalletError for Compact<u64>

§

const MAX_ENCODED_SIZE: usize = 9usize

§

impl PalletError for Compact<u128>

§

const MAX_ENCODED_SIZE: usize = 17usize

§

impl<T> PalletError for Option<T>
where T: PalletError,

§

impl<T> PalletError for Range<T>
where T: PalletError,

§

impl<T, E> PalletError for Result<T, E>
where T: PalletError, E: PalletError,

§

impl<T, const N: usize> PalletError for [T; N]
where T: PalletError,

§

impl<TupleElement0> PalletError for (TupleElement0,)
where TupleElement0: PalletError,

§

impl<TupleElement0, TupleElement1> PalletError for (TupleElement0, TupleElement1)
where TupleElement0: PalletError, TupleElement1: PalletError,

§

impl<TupleElement0, TupleElement1, TupleElement2> PalletError for (TupleElement0, TupleElement1, TupleElement2)
where TupleElement0: PalletError, TupleElement1: PalletError, TupleElement2: PalletError,

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3> PalletError for (TupleElement0, TupleElement1, TupleElement2, TupleElement3)
where TupleElement0: PalletError, TupleElement1: PalletError, TupleElement2: PalletError, TupleElement3: PalletError,

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4> PalletError for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4)
where TupleElement0: PalletError, TupleElement1: PalletError, TupleElement2: PalletError, TupleElement3: PalletError, TupleElement4: PalletError,

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5> PalletError for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5)
where TupleElement0: PalletError, TupleElement1: PalletError, TupleElement2: PalletError, TupleElement3: PalletError, TupleElement4: PalletError, TupleElement5: PalletError,

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6> PalletError for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6)
where TupleElement0: PalletError, TupleElement1: PalletError, TupleElement2: PalletError, TupleElement3: PalletError, TupleElement4: PalletError, TupleElement5: PalletError, TupleElement6: PalletError,

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7> PalletError for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7)
where TupleElement0: PalletError, TupleElement1: PalletError, TupleElement2: PalletError, TupleElement3: PalletError, TupleElement4: PalletError, TupleElement5: PalletError, TupleElement6: PalletError, TupleElement7: PalletError,

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8> PalletError for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8)
where TupleElement0: PalletError, TupleElement1: PalletError, TupleElement2: PalletError, TupleElement3: PalletError, TupleElement4: PalletError, TupleElement5: PalletError, TupleElement6: PalletError, TupleElement7: PalletError, TupleElement8: PalletError,

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9> PalletError for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9)
where TupleElement0: PalletError, TupleElement1: PalletError, TupleElement2: PalletError, TupleElement3: PalletError, TupleElement4: PalletError, TupleElement5: PalletError, TupleElement6: PalletError, TupleElement7: PalletError, TupleElement8: PalletError, TupleElement9: PalletError,

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10> PalletError for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10)
where TupleElement0: PalletError, TupleElement1: PalletError, TupleElement2: PalletError, TupleElement3: PalletError, TupleElement4: PalletError, TupleElement5: PalletError, TupleElement6: PalletError, TupleElement7: PalletError, TupleElement8: PalletError, TupleElement9: PalletError, TupleElement10: PalletError,

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11> PalletError for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11)
where TupleElement0: PalletError, TupleElement1: PalletError, TupleElement2: PalletError, TupleElement3: PalletError, TupleElement4: PalletError, TupleElement5: PalletError, TupleElement6: PalletError, TupleElement7: PalletError, TupleElement8: PalletError, TupleElement9: PalletError, TupleElement10: PalletError, TupleElement11: PalletError,

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12> PalletError for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12)
where TupleElement0: PalletError, TupleElement1: PalletError, TupleElement2: PalletError, TupleElement3: PalletError, TupleElement4: PalletError, TupleElement5: PalletError, TupleElement6: PalletError, TupleElement7: PalletError, TupleElement8: PalletError, TupleElement9: PalletError, TupleElement10: PalletError, TupleElement11: PalletError, TupleElement12: PalletError,

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13> PalletError for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13)
where TupleElement0: PalletError, TupleElement1: PalletError, TupleElement2: PalletError, TupleElement3: PalletError, TupleElement4: PalletError, TupleElement5: PalletError, TupleElement6: PalletError, TupleElement7: PalletError, TupleElement8: PalletError, TupleElement9: PalletError, TupleElement10: PalletError, TupleElement11: PalletError, TupleElement12: PalletError, TupleElement13: PalletError,

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14> PalletError for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14)
where TupleElement0: PalletError, TupleElement1: PalletError, TupleElement2: PalletError, TupleElement3: PalletError, TupleElement4: PalletError, TupleElement5: PalletError, TupleElement6: PalletError, TupleElement7: PalletError, TupleElement8: PalletError, TupleElement9: PalletError, TupleElement10: PalletError, TupleElement11: PalletError, TupleElement12: PalletError, TupleElement13: PalletError, TupleElement14: PalletError,

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15> PalletError for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15)
where TupleElement0: PalletError, TupleElement1: PalletError, TupleElement2: PalletError, TupleElement3: PalletError, TupleElement4: PalletError, TupleElement5: PalletError, TupleElement6: PalletError, TupleElement7: PalletError, TupleElement8: PalletError, TupleElement9: PalletError, TupleElement10: PalletError, TupleElement11: PalletError, TupleElement12: PalletError, TupleElement13: PalletError, TupleElement14: PalletError, TupleElement15: PalletError,

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16> PalletError for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16)
where TupleElement0: PalletError, TupleElement1: PalletError, TupleElement2: PalletError, TupleElement3: PalletError, TupleElement4: PalletError, TupleElement5: PalletError, TupleElement6: PalletError, TupleElement7: PalletError, TupleElement8: PalletError, TupleElement9: PalletError, TupleElement10: PalletError, TupleElement11: PalletError, TupleElement12: PalletError, TupleElement13: PalletError, TupleElement14: PalletError, TupleElement15: PalletError, TupleElement16: PalletError,

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17> PalletError for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17)
where TupleElement0: PalletError, TupleElement1: PalletError, TupleElement2: PalletError, TupleElement3: PalletError, TupleElement4: PalletError, TupleElement5: PalletError, TupleElement6: PalletError, TupleElement7: PalletError, TupleElement8: PalletError, TupleElement9: PalletError, TupleElement10: PalletError, TupleElement11: PalletError, TupleElement12: PalletError, TupleElement13: PalletError, TupleElement14: PalletError, TupleElement15: PalletError, TupleElement16: PalletError, TupleElement17: PalletError,

Implementors§

§

impl PalletError for Never

§

const MAX_ENCODED_SIZE: usize = 0usize

§

impl<T> PalletError for Error<T>

§

const MAX_ENCODED_SIZE: usize = 1usize

§

impl<T> PalletError for PhantomData<T>

§

const MAX_ENCODED_SIZE: usize = 0usize