Trait frame_support::pallet_prelude::Decode [−]
pub trait Decode { fn decode<I>(input: &mut I) -> Result<Self, Error>
where
I: Input; fn skip<I>(input: &mut I) -> Result<(), Error>
where
I: Input, { ... } fn encoded_fixed_size() -> Option<usize> { ... } }
Expand description
Trait that allows zero-copy read of value-references from slices in LE format.
Required methods
Provided methods
Attempt to skip the encoded value from input.
The default implementation of this function is just calling Decode::decode
.
When possible, an implementation should provided a specialized implementation.
fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type.
If it returns Some(size)
then all possible values of this
type have the given size (in bytes) when encoded.
NOTE: A type with a fixed encoded size may return None
.
Implementations on Foreign Types
impl<T> Decode for LinkedList<T> where
T: Decode,
impl<T> Decode for LinkedList<T> where
T: Decode,
pub fn decode<I>(input: &mut I) -> Result<LinkedList<T>, Error> where
I: Input,
impl Decode for OptionBool
impl Decode for OptionBool
impl<A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> Decode for (A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) where
B0: Decode,
G0: Decode,
A0: Decode,
C0: Decode,
D0: Decode,
E0: Decode,
F0: Decode,
H0: Decode,
I0: Decode,
J0: Decode,
K0: Decode,
L0: Decode,
M0: Decode,
N0: Decode,
O0: Decode,
P0: Decode,
Q0: Decode,
R0: Decode,
impl<A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> Decode for (A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) where
B0: Decode,
G0: Decode,
A0: Decode,
C0: Decode,
D0: Decode,
E0: Decode,
F0: Decode,
H0: Decode,
I0: Decode,
J0: Decode,
K0: Decode,
L0: Decode,
M0: Decode,
N0: Decode,
O0: Decode,
P0: Decode,
Q0: Decode,
R0: Decode,
impl<T> Decode for RangeInclusive<T> where
T: Decode,
impl<T> Decode for RangeInclusive<T> where
T: Decode,
pub fn decode<I>(input: &mut I) -> Result<RangeInclusive<T>, Error> where
I: Input,
impl Decode for NonZeroI32
impl Decode for NonZeroI32
pub fn decode<I>(input: &mut I) -> Result<NonZeroI32, Error> where
I: Input,
impl Decode for NonZeroU64
impl Decode for NonZeroU64
pub fn decode<I>(input: &mut I) -> Result<NonZeroU64, Error> where
I: Input,
impl<C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> Decode for (C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) where
G0: Decode,
C0: Decode,
D0: Decode,
E0: Decode,
F0: Decode,
H0: Decode,
I0: Decode,
J0: Decode,
K0: Decode,
L0: Decode,
M0: Decode,
N0: Decode,
O0: Decode,
P0: Decode,
Q0: Decode,
R0: Decode,
impl<C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> Decode for (C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) where
G0: Decode,
C0: Decode,
D0: Decode,
E0: Decode,
F0: Decode,
H0: Decode,
I0: Decode,
J0: Decode,
K0: Decode,
L0: Decode,
M0: Decode,
N0: Decode,
O0: Decode,
P0: Decode,
Q0: Decode,
R0: Decode,
impl Decode for NonZeroI64
impl Decode for NonZeroI64
pub fn decode<I>(input: &mut I) -> Result<NonZeroI64, Error> where
I: Input,
impl Decode for NonZeroU16
impl Decode for NonZeroU16
pub fn decode<I>(input: &mut I) -> Result<NonZeroU16, Error> where
I: Input,
impl<E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> Decode for (E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) where
G0: Decode,
E0: Decode,
F0: Decode,
H0: Decode,
I0: Decode,
J0: Decode,
K0: Decode,
L0: Decode,
M0: Decode,
N0: Decode,
O0: Decode,
P0: Decode,
Q0: Decode,
R0: Decode,
impl<E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> Decode for (E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) where
G0: Decode,
E0: Decode,
F0: Decode,
H0: Decode,
I0: Decode,
J0: Decode,
K0: Decode,
L0: Decode,
M0: Decode,
N0: Decode,
O0: Decode,
P0: Decode,
Q0: Decode,
R0: Decode,
impl<T> Decode for BinaryHeap<T> where
T: Decode + Ord,
impl<T> Decode for BinaryHeap<T> where
T: Decode + Ord,
pub fn decode<I>(input: &mut I) -> Result<BinaryHeap<T>, Error> where
I: Input,
impl Decode for NonZeroU128
impl Decode for NonZeroU128
pub fn decode<I>(input: &mut I) -> Result<NonZeroU128, Error> where
I: Input,
impl Decode for NonZeroI16
impl Decode for NonZeroI16
pub fn decode<I>(input: &mut I) -> Result<NonZeroI16, Error> where
I: Input,
impl<B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> Decode for (B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) where
B0: Decode,
G0: Decode,
C0: Decode,
D0: Decode,
E0: Decode,
F0: Decode,
H0: Decode,
I0: Decode,
J0: Decode,
K0: Decode,
L0: Decode,
M0: Decode,
N0: Decode,
O0: Decode,
P0: Decode,
Q0: Decode,
R0: Decode,
impl<B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> Decode for (B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) where
B0: Decode,
G0: Decode,
C0: Decode,
D0: Decode,
E0: Decode,
F0: Decode,
H0: Decode,
I0: Decode,
J0: Decode,
K0: Decode,
L0: Decode,
M0: Decode,
N0: Decode,
O0: Decode,
P0: Decode,
Q0: Decode,
R0: Decode,
impl Decode for NonZeroI128
impl Decode for NonZeroI128
pub fn decode<I>(input: &mut I) -> Result<NonZeroI128, Error> where
I: Input,
impl Decode for NonZeroU32
impl Decode for NonZeroU32
pub fn decode<I>(input: &mut I) -> Result<NonZeroU32, Error> where
I: Input,
impl<D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> Decode for (D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) where
G0: Decode,
D0: Decode,
E0: Decode,
F0: Decode,
H0: Decode,
I0: Decode,
J0: Decode,
K0: Decode,
L0: Decode,
M0: Decode,
N0: Decode,
O0: Decode,
P0: Decode,
Q0: Decode,
R0: Decode,
impl<D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> Decode for (D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) where
G0: Decode,
D0: Decode,
E0: Decode,
F0: Decode,
H0: Decode,
I0: Decode,
J0: Decode,
K0: Decode,
L0: Decode,
M0: Decode,
N0: Decode,
O0: Decode,
P0: Decode,
Q0: Decode,
R0: Decode,
impl<B> Decode for BlockAndTimeDeadline<B> where
B: BlockNumberProvider,
<B as BlockNumberProvider>::BlockNumber: Decode,
impl<B> Decode for BlockAndTimeDeadline<B> where
B: BlockNumberProvider,
<B as BlockNumberProvider>::BlockNumber: Decode,
impl<Address, Call, Signature, Extra> Decode for UncheckedExtrinsic<Address, Call, Signature, Extra> where
Call: Decode,
Extra: SignedExtension,
Address: Decode,
Signature: Decode,
impl<Address, Call, Signature, Extra> Decode for UncheckedExtrinsic<Address, Call, Signature, Extra> where
Call: Decode,
Extra: SignedExtension,
Address: Decode,
Signature: Decode,
impl<AccountId, AccountIndex> Decode for MultiAddress<AccountId, AccountIndex> where
AccountId: Decode,
AccountIndex: HasCompact,
impl<AccountId, AccountIndex> Decode for MultiAddress<AccountId, AccountIndex> where
AccountId: Decode,
AccountIndex: HasCompact,
Implementors
impl<Balance> Decode for WeightToFeeCoefficient<Balance> where
Balance: Decode,
Balance: Decode,
impl<BlockNumber> Decode for DispatchTime<BlockNumber> where
BlockNumber: Decode,
BlockNumber: Decode,
BlockNumber: Decode,
BlockNumber: Decode,
impl<T> Decode for PerDispatchClass<T> where
T: Decode,
T: Decode,
T: Decode,
T: Decode,
T: Decode,
T: Decode,
impl<T> Decode for PhantomData<T>