Function toml_edit::ser::to_vec

source ·
pub fn to_vec<T>(value: &T) -> Result<Vec<u8>, Error>where
    T: Serialize + ?Sized,
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.