deserialize_data

Function deserialize_data 

Source
pub fn deserialize_data(
    data: &[u8],
    params: &[ParamInput],
    error_on_remaining: bool,
) -> 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
  • error_on_remaining - Whether to error if there is remaining data in the buffer after parsing
  • given params.

§Returns

A vector of deserialized values matching the parameter types

§Errors

Returns an error if:

  • error_on_remaining is true and 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