Trait subxt::metadata::DecodeWithMetadata
source · 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§
Required Methods§
Provided Methods§
sourcefn decode_storage_with_metadata(
bytes: &mut &[u8],
pallet_name: &str,
storage_entry: &str,
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>
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.