Function to_vec
Source pub fn to_vec<T>(value: &T) -> Result<Vec<u8>>
Expand description
Serialize the given value as a JSON byte vector.
Serialization is performed as specified in RFC 8785.
§Errors
Serialization can fail if T
’s implementation of Serialize
fails.