pub trait DecodeWithMetadata {
    type Target;

    fn decode_with_metadata(
        bytes: &mut &[u8],
        type_id: u32,
        metadata: &Metadata
    ) -> Result<Self::Target, Error>; fn decode_storage_with_metadata(
        bytes: &mut &[u8],
        pallet_name: &str,
        storage_entry: &str,
        metadata: &Metadata
    ) -> Result<Self::Target, Error> { ... } }
Expand description

This trait is implemented for types which can be decoded with the help of metadata.

Required Associated Types§

The type that we’ll get back from decoding.

Required Methods§

Given some metadata and a type ID, attempt to SCALE decode the provided bytes into Self.

Provided Methods§

Decode a storage item using metadata. By default, this uses the metadata to work out the type ID to use, but for static items we can short circuit this lookup.

Implementors§