pub fn toml_to_csv(toml: &str) -> Result<String, Box<dyn Error>>Expand description
Converts a TOML document to CSV, extracting the first array of tables.
Flat TOML documents (all scalar values) become a single-row CSV. Documents with an array of tables at any depth use that array as the row source.
§Errors
Returns an error if the TOML is malformed or has no tabular structure.
§Examples
use sheeter_engine::toml_to_csv;
assert_eq!(toml_to_csv("a = 1\n").unwrap(), "a\n1\n");