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

Attempt to deserialise the value from input.

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.

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 Decode for Entry

Implementors

impl<T: Form> Decode for ExtrinsicMetadata<T> where
    T::Type: Decode,
    T::Type: Decode,
    Vec<SignedExtensionMetadata<T>>: Decode,
    Vec<SignedExtensionMetadata<T>>: Decode

impl<T: Form> Decode for SignedExtensionMetadata<T> where
    T::String: Decode,
    T::String: Decode,
    T::Type: Decode,
    T::Type: Decode,
    T::Type: Decode,
    T::Type: Decode

impl<T: Form> Decode for PalletStorageMetadata<T> where
    T::String: Decode,
    T::String: Decode,
    Vec<StorageEntryMetadata<T>>: Decode,
    Vec<StorageEntryMetadata<T>>: Decode

impl<T: Form> Decode for StorageEntryMetadata<T> where
    T::String: Decode,
    T::String: Decode,
    StorageEntryType<T>: Decode,
    StorageEntryType<T>: Decode,
    Vec<T::String>: Decode,
    Vec<T::String>: Decode

impl<T: Form> Decode for StorageEntryType<T> where
    T::Type: Decode,
    T::Type: Decode,
    T::Type: Decode,
    T::Type: Decode,
    T::Type: Decode,
    T::Type: Decode

impl<T: Form> Decode for PalletCallMetadata<T> where
    T::Type: Decode,
    T::Type: Decode

impl<T: Form> Decode for PalletEventMetadata<T> where
    T::Type: Decode,
    T::Type: Decode

impl<T: Form> Decode for PalletConstantMetadata<T> where
    T::String: Decode,
    T::String: Decode,
    T::Type: Decode,
    T::Type: Decode,
    Vec<T::String>: Decode,
    Vec<T::String>: Decode

impl<T: Form> Decode for PalletErrorMetadata<T> where
    T::Type: Decode,
    T::Type: Decode

impl<T: Config + Send + Sync> Decode for CheckGenesis<T> where
    PhantomData<T>: Decode,
    PhantomData<T>: Decode

impl<T: Config + Send + Sync> Decode for CheckMortality<T> where
    PhantomData<T>: Decode,
    PhantomData<T>: Decode

impl<T: Config> Decode for CheckNonce<T> where
    T::Index: HasCompact

impl<T: Config + Send + Sync> Decode for CheckSpecVersion<T> where
    PhantomData<T>: Decode,
    PhantomData<T>: Decode

impl<T: Config + Send + Sync> Decode for CheckTxVersion<T> where
    PhantomData<T>: Decode,
    PhantomData<T>: Decode

impl<T: Config + Send + Sync> Decode for CheckWeight<T> where
    PhantomData<T>: Decode,
    PhantomData<T>: Decode

impl<T: Config> Decode for Event<T> where
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Hash: Decode,
    T::Hash: Decode

impl<T: Config> Decode for Call<T>

impl Decode for Phase

impl<E: Parameter + Member, T> Decode for EventRecord<E, T> where
    E: Decode,
    E: Decode,
    Vec<T>: Decode,
    Vec<T>: Decode

impl<AccountId> Decode for RawOrigin<AccountId> where
    AccountId: Decode,
    AccountId: Decode

impl<Index, AccountData> Decode for AccountInfo<Index, AccountData> where
    Index: Decode,
    Index: Decode,
    AccountData: Decode,
    AccountData: Decode

impl<T: Config> Decode for Event<T> where
    <T as Config>::AccountId: Decode,
    <T as Config>::AccountId: Decode

impl<T: Config> Decode for Call<T>

impl<T: Config> Decode for Event<T> where
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Hash: Decode,
    T::Hash: Decode

impl<T: Config> Decode for Call<T>

impl<T: Config<I>, I: 'static> Decode for Event<T, I> where
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Balance: Decode,
    T::Balance: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Balance: Decode,
    T::Balance: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Balance: Decode,
    T::Balance: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Balance: Decode,
    T::Balance: Decode,
    T::Balance: Decode,
    T::Balance: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Balance: Decode,
    T::Balance: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Balance: Decode,
    T::Balance: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Balance: Decode,
    T::Balance: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Balance: Decode,
    T::Balance: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Balance: Decode,
    T::Balance: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Balance: Decode,
    T::Balance: Decode

impl<T: Config<I>, I: 'static> Decode for Call<T, I>

impl Decode for Reasons

impl<Balance> Decode for BalanceLock<Balance> where
    Balance: Decode,
    Balance: Decode

impl<ReserveIdentifier, Balance> Decode for ReserveData<ReserveIdentifier, Balance> where
    ReserveIdentifier: Decode,
    ReserveIdentifier: Decode,
    Balance: Decode,
    Balance: Decode

impl<Balance> Decode for AccountData<Balance> where
    Balance: Decode,
    Balance: Decode,
    Balance: Decode,
    Balance: Decode,
    Balance: Decode,
    Balance: Decode,
    Balance: Decode,
    Balance: Decode

impl<T: Config<I>, I: 'static> Decode for Event<T, I> where
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Balance: Decode,
    T::Balance: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Balance: Decode,
    T::Balance: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Balance: Decode,
    T::Balance: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Balance: Decode,
    T::Balance: Decode,
    T::Balance: Decode,
    T::Balance: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Balance: Decode,
    T::Balance: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Balance: Decode,
    T::Balance: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Balance: Decode,
    T::Balance: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Balance: Decode,
    T::Balance: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Balance: Decode,
    T::Balance: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Balance: Decode,
    T::Balance: Decode

impl<T: Config<I>, I: 'static> Decode for Call<T, I>

impl Decode for Reasons

impl<Balance> Decode for BalanceLock<Balance> where
    Balance: Decode,
    Balance: Decode

impl<ReserveIdentifier, Balance> Decode for ReserveData<ReserveIdentifier, Balance> where
    ReserveIdentifier: Decode,
    ReserveIdentifier: Decode,
    Balance: Decode,
    Balance: Decode

impl<Balance> Decode for AccountData<Balance> where
    Balance: Decode,
    Balance: Decode,
    Balance: Decode,
    Balance: Decode,
    Balance: Decode,
    Balance: Decode,
    Balance: Decode,
    Balance: Decode

impl<T: Config> Decode for Event<T> where
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode

impl<T: Config> Decode for Call<T>

impl<T: Config> Decode for Event<T>

impl<Balance, BlockNumber> Decode for EscrowedAmount<Balance, BlockNumber> where
    Balance: Decode,
    Balance: Decode,
    BlockNumber: Decode,
    BlockNumber: Decode

impl<T: Config> Decode for Call<T>

impl<T: Config> Decode for Event<T> where
    T::AccountId: Decode,
    T::AccountId: Decode

impl<T: Config> Decode for Call<T>

impl<T: Config> Decode for Event<T> where
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode

impl<T: Config> Decode for Call<T>

impl<T: Config> Decode for Event<T> where
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode

impl<T: Config> Decode for Call<T>

impl<T: Config> Decode for Call<T>

impl<T: Config> Decode for Event<T> where
    T::Hash: Decode,
    T::Hash: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode

impl<T: Config> Decode for Call<T>

impl<T: Config> Decode for Event<T> where
    T::Hash: Decode,
    T::Hash: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Hash: Decode,
    T::Hash: Decode

impl<T: Config> Decode for Call<T>

impl<T: Config> Decode for Call<T>

impl<Balance> Decode for InclusionFee<Balance> where
    Balance: Decode,
    Balance: Decode,
    Balance: Decode,
    Balance: Decode,
    Balance: Decode,
    Balance: Decode

impl<Balance> Decode for FeeDetails<Balance> where
    Option<InclusionFee<Balance>>: Decode,
    Option<InclusionFee<Balance>>: Decode,
    Balance: Decode,
    Balance: Decode

impl<Balance> Decode for RuntimeDispatchInfo<Balance> where
    Balance: Decode,
    Balance: Decode

impl<T: Config> Decode for Call<T>

impl<T: Config> Decode for Call<T>

impl<T: Config> Decode for Event<T>

impl<T: Config> Decode for Call<T>

impl Decode for U128

impl Decode for U256

impl Decode for U512

impl Decode for H128

impl Decode for H160

impl Decode for H256

impl Decode for H512

impl<T> Decode for UntrackedSymbol<T> where
    PhantomData<fn() -> T>: Decode,
    PhantomData<fn() -> T>: Decode

impl<T: Form> Decode for TypeDefComposite<T> where
    Vec<Field<T>>: Decode,
    Vec<Field<T>>: Decode

impl<T: Form> Decode for Field<T> where
    Option<T::String>: Decode,
    Option<T::String>: Decode,
    T::Type: Decode,
    T::Type: Decode,
    Option<T::String>: Decode,
    Option<T::String>: Decode,
    Vec<T::String>: Decode,
    Vec<T::String>: Decode

impl<T: Form> Decode for Path<T> where
    Vec<T::String>: Decode,
    Vec<T::String>: Decode

impl<T: Form> Decode for TypeDefVariant<T> where
    Vec<Variant<T>>: Decode,
    Vec<Variant<T>>: Decode

impl<T: Form> Decode for Variant<T> where
    T::String: Decode,
    T::String: Decode,
    Vec<Field<T>>: Decode,
    Vec<Field<T>>: Decode,
    Vec<T::String>: Decode,
    Vec<T::String>: Decode

impl<T: Form> Decode for Type<T> where
    Path<T>: Decode,
    Path<T>: Decode,
    Vec<TypeParameter<T>>: Decode,
    Vec<TypeParameter<T>>: Decode,
    TypeDef<T>: Decode,
    TypeDef<T>: Decode,
    Vec<T::String>: Decode,
    Vec<T::String>: Decode

impl<T: Form> Decode for TypeParameter<T> where
    T::String: Decode,
    T::String: Decode,
    Option<T::Type>: Decode,
    Option<T::Type>: Decode

impl<T: Form> Decode for TypeDef<T> where
    TypeDefComposite<T>: Decode,
    TypeDefComposite<T>: Decode,
    TypeDefVariant<T>: Decode,
    TypeDefVariant<T>: Decode,
    TypeDefSequence<T>: Decode,
    TypeDefSequence<T>: Decode,
    TypeDefArray<T>: Decode,
    TypeDefArray<T>: Decode,
    TypeDefTuple<T>: Decode,
    TypeDefTuple<T>: Decode,
    TypeDefCompact<T>: Decode,
    TypeDefCompact<T>: Decode,
    TypeDefBitSequence<T>: Decode,
    TypeDefBitSequence<T>: Decode

impl<T: Form> Decode for TypeDefArray<T> where
    T::Type: Decode,
    T::Type: Decode

impl<T: Form> Decode for TypeDefTuple<T> where
    Vec<T::Type>: Decode,
    Vec<T::Type>: Decode

impl<T: Form> Decode for TypeDefSequence<T> where
    T::Type: Decode,
    T::Type: Decode

impl<T: Form> Decode for TypeDefCompact<T> where
    T::Type: Decode,
    T::Type: Decode

impl<T: Form> Decode for TypeDefBitSequence<T> where
    T::Type: Decode,
    T::Type: Decode,
    T::Type: Decode,
    T::Type: Decode

impl Decode for Public

impl Decode for Signature

impl Decode for Public

impl Decode for Signature

impl Decode for Public

impl Decode for Signature

impl Decode for BigUint

impl Decode for FixedI64

impl Decode for FixedI128

impl Decode for FixedU128

impl Decode for Percent

impl Decode for PerU16

impl Decode for Permill

impl Decode for Perbill

impl Decode for KeyTypeId

impl Decode for Public

impl Decode for Signature

impl Decode for Public

impl Decode for Signature

impl Decode for HttpError

impl Decode for Timestamp

impl Decode for Duration

impl Decode for HostError

impl Decode for Entry

impl Decode for Public

impl Decode for Signature

impl Decode for LogLevel

impl Decode for Void

impl<T: Encode + Decode> Decode for Crossing<T> where
    T: Decode,
    T: Decode

impl<Block: BlockT> Decode for BlockId<Block> where
    Block::Hash: Decode,
    Block::Hash: Decode,
    NumberFor<Block>: Decode,
    NumberFor<Block>: Decode

impl<Header, Extrinsic: MaybeSerialize> Decode for Block<Header, Extrinsic> where
    Header: Decode,
    Header: Decode,
    Vec<Extrinsic>: Decode,
    Vec<Extrinsic>: Decode

impl<Block> Decode for SignedBlock<Block> where
    Block: Decode,
    Block: Decode

impl Decode for Digest

impl Decode for Era

impl<Number: Copy + Into<U256> + TryFrom<U256>, Hash: HashT> Decode for Header<Number, Hash> where
    Hash::Output: Decode,
    Hash::Output: Decode,
    Hash::Output: Decode,
    Hash::Output: Decode,
    Hash::Output: Decode,
    Hash::Output: Decode,
    Number: HasCompact

impl<Address, Call, Signature, Extra> Decode for UncheckedExtrinsic<Address, Call, Signature, Extra> where
    Address: Decode,
    Signature: Decode,
    Call: Decode,
    Extra: SignedExtension

impl<AccountId, AccountIndex> Decode for MultiAddress<AccountId, AccountIndex> where
    AccountId: Decode,
    AccountId: Decode,
    AccountIndex: HasCompact

impl Decode for Time

impl<Xt> Decode for ExtrinsicWrapper<Xt> where
    Xt: Decode,
    Xt: Decode

impl<Xt> Decode for Block<Xt> where
    Vec<Xt>: Decode,
    Vec<Xt>: Decode

impl<Call, Extra> Decode for TestXt<Call, Extra> where
    Option<(u64, Extra)>: Decode,
    Option<(u64, Extra)>: Decode,
    Call: Decode,
    Call: Decode

impl Decode for BadOrigin

impl<Info> Decode for DispatchErrorWithPostInfo<Info> where
    Info: Eq + PartialEq + Clone + Copy + Encode + Decode + Printable,
    Info: Decode,
    Info: Decode

impl<Reporter, Offender> Decode for OffenceDetails<Reporter, Offender> where
    Offender: Decode,
    Offender: Decode,
    Vec<Reporter>: Decode,
    Vec<Reporter>: Decode

impl Decode for Timestamp

impl Decode for WasmLevel

impl Decode for WasmValue

impl Decode for Value

impl Decode for Cogs

impl Decode for _0002_

impl Decode for _0003_

impl Decode for _0004_

impl Decode for _0005_

impl Decode for _0006_

impl Decode for _0007_

impl Decode for _0008_

impl Decode for _0009_

impl Decode for _0010_

impl Decode for _0011_

impl Decode for _0012_

impl Decode for _0013_

impl Decode for _0014_

impl Decode for _0015_

impl Decode for _0016_

impl Decode for _0017_

impl Decode for _0018_

impl Decode for _0019_

impl Decode for _0020_

impl Decode for _0021_

impl Decode for _0022_

impl Decode for _0023_

impl Decode for _0024_

impl Decode for _0025_

impl Decode for _0026_

impl Decode for _0027_

impl Decode for _0028_

impl Decode for _0029_

impl Decode for _0030_

impl Decode for _0031_

impl Decode for _0032_

impl Decode for _0033_

impl Decode for _0034_

impl Decode for _0035_

impl Decode for _0036_

impl Decode for _0038_

impl Decode for _1001_

impl Decode for _2001_

impl Decode for _2002_

impl Decode for _2003_

impl Decode for _2004_

impl Decode for _2005_

impl Decode for _3001_

impl Decode for Inventory

impl Decode for Coins

impl Decode for Tokens

impl Decode for Parties

impl Decode for _3003_

impl Decode for Sales

impl Decode for _1002_

impl Decode for A

impl Decode for L

impl Decode for E

impl Decode for I

impl Decode for X

impl Decode for P

impl Decode for B

impl Decode for Ledger

impl Decode for Indicator

impl<AccountId, Hash, BlockNumber> Decode for Record<AccountId, Hash, BlockNumber> where
    AccountId: Decode,
    AccountId: Decode,
    AccountId: Decode,
    AccountId: Decode,
    Hash: Decode,
    Hash: Decode,
    BlockNumber: Decode,
    BlockNumber: Decode,
    BlockNumber: Decode,
    BlockNumber: Decode

impl Decode for Reason

impl<Hash> Decode for TxKeysT<Hash> where
    Hash: Decode,
    Hash: Decode

impl<AccountId> Decode for OrderHeader<AccountId> where
    AccountId: Decode,
    AccountId: Decode,
    AccountId: Decode,
    AccountId: Decode,
    AccountId: Decode,
    AccountId: Decode

impl<Hash> Decode for OrderItem<Hash> where
    Hash: Decode,
    Hash: Decode

impl<Hash> Decode for TxKeysL<Hash> where
    Hash: Decode,
    Hash: Decode,
    Hash: Decode,
    Hash: Decode,
    Hash: Decode,
    Hash: Decode,
    Hash: Decode,
    Hash: Decode

impl<Hash> Decode for TxKeysM<Hash> where
    Hash: Decode,
    Hash: Decode,
    Hash: Decode,
    Hash: Decode,
    Hash: Decode,
    Hash: Decode

impl<Hash> Decode for TxKeysS<Hash> where
    Hash: Decode,
    Hash: Decode,
    Hash: Decode,
    Hash: Decode

impl<AccountId, ProjectStatus> Decode for DeletedProject<AccountId, ProjectStatus> where
    AccountId: Decode,
    AccountId: Decode,
    AccountId: Decode,
    AccountId: Decode,
    ProjectStatus: Decode,
    ProjectStatus: Decode

impl<AccountId, ReferenceHash, NumberOfBlocks, LockStatus, StatusOfTimeRecord, ReasonCodeStruct, PostingPeriod, StartOrEndBlockNumber, NumberOfBreaks> Decode for Timekeeper<AccountId, ReferenceHash, NumberOfBlocks, LockStatus, StatusOfTimeRecord, ReasonCodeStruct, PostingPeriod, StartOrEndBlockNumber, NumberOfBreaks> where
    AccountId: Decode,
    AccountId: Decode,
    ReferenceHash: Decode,
    ReferenceHash: Decode,
    NumberOfBlocks: Decode,
    NumberOfBlocks: Decode,
    LockStatus: Decode,
    LockStatus: Decode,
    ReasonCodeStruct: Decode,
    ReasonCodeStruct: Decode,
    StatusOfTimeRecord: Decode,
    StatusOfTimeRecord: Decode,
    ReasonCodeStruct: Decode,
    ReasonCodeStruct: Decode,
    PostingPeriod: Decode,
    PostingPeriod: Decode,
    StartOrEndBlockNumber: Decode,
    StartOrEndBlockNumber: Decode,
    StartOrEndBlockNumber: Decode,
    StartOrEndBlockNumber: Decode,
    NumberOfBreaks: Decode,
    NumberOfBreaks: Decode

impl<T> Decode for Set<T> where
    Vec<T>: Decode,
    Vec<T>: Decode