Writes a struct as a TOML document: key/value lines first, then [table] and
[[array of tables]] headers for struct fields; null pointers are omitted. Honors the
notes of from_toml and the output limits of options. Free the text with free.
Signature
to_toml :: (value: $T, options := Toml_Options.{}) -> (string, Toml_Error)
Point :: struct {
x: float64;
y: float64;
}
text, error := to_toml(Point.{ 1, 2.5 });
assert(error.kind == .NONE && text == "x = 1.0\ny = 2.5\n");
free(text);