rmp_serde::encode

Function to_vec_named

Source
pub fn to_vec_named<T>(val: &T) -> Result<Vec<u8>, Error>
where T: Serialize + ?Sized,
Expand description

Serializes data structure into byte vector as a map Resulting MessagePack message will contain field names

§Errors

Serialization can fail if T’s implementation of Serialize decides to fail.