Function to_vec
pub fn to_vec<T>(value: &T) -> Result<Vec<u8>, Error> ⓘ
Available on crate feature
dep_toml_edit
only.Expand description
Serialize the given data structure as a TOML byte vector.
Serialization can fail if T
’s implementation of Serialize
decides to
fail, if T
contains a map with non-string keys, or if T
attempts to
serialize an unsupported datatype such as an enum, tuple, or tuple struct.