pub fn to_vec<T>(val: &T) -> Result<Vec<u8>, Error>
Expand description
Serialize the given data structure as a MessagePack byte vector. This method uses compact representation, structs are serialized as arrays
Serialization can fail if T
’s implementation of Serialize
decides to fail.