Function scale_value::scale::decode_as_type
source · pub fn decode_as_type<Id: Into<TypeId>>(
data: &mut &[u8],
ty_id: Id,
types: &PortableRegistry
) -> Result<Value<TypeId>, DecodeError>
Expand description
Attempt to decode some SCALE encoded bytes into a value, by providing a pointer to the bytes (which will be moved forwards as bytes are used in the decoding), a type ID, and a type registry from which we’ll look up the relevant type information.