Function scale_value::scale::encode_as_type
source · pub fn encode_as_type<T: Clone, Id: Into<TypeId>>(
value: &Value<T>,
ty_id: Id,
types: &PortableRegistry,
buf: &mut Vec<u8>
) -> Result<(), EncodeError<T>>
Expand description
Attempt to encode some crate::Value<T>
into SCALE bytes, by providing a pointer to the
type ID that we’d like to encode it as, a type registry from which we’ll look
up the relevant type information, and a buffer to encode the bytes to.