pub fn to_vec<T: ?Sized>(value: &T) -> Result<Vec<u8>> where T: Serialize,
Serialize the given data structure as a YAML byte vector.
Serialization can fail if T’s implementation of Serialize decides to return an error.
T
Serialize