Type Definition subxt::dynamic::DecodedValue

source ·
pub type DecodedValue = Value<TypeId>;
Expand description

A scale_value::Value type endowed with contextual information regarding what type was used to decode each part of it. This implements crate::metadata::DecodeWithMetadata, and is used as a return type for dynamic requests.

Trait Implementations§

source§

impl DecodeWithMetadata for DecodedValue

§

type Target = Value<TypeId>

The type that we’ll get back from decoding.
source§

fn decode_with_metadata( bytes: &mut &[u8], type_id: u32, metadata: &Metadata ) -> Result<Self::Target, Error>

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

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.