serde_cbor::ser
pub fn to_vec<T: Serialize>(value: &T) -> Result<Vec<u8>>
Serializes a value to a vector.