Function deserialize_data

Source
pub fn deserialize_data(
    data: &[u8],
    params: &[ParamInput],
) -> Result<Vec<DynValue>>
Expand description

Deserializes binary data into a vector of dynamic values based on the provided parameter types

§Arguments

  • data - The binary data to deserialize
  • params - The parameter types that define the structure of the data

§Returns

A vector of deserialized values matching the parameter types

§Errors

Returns an error if:

  • There is not enough data to deserialize all parameters
  • The data format doesn’t match the expected parameter types
  • There is remaining data after deserializing all parameters