#toml #write #key #table #value

no-std toml_write

A low-level interface for writing out TOML

1 unstable release

new 0.1.0 Apr 25, 2025

#215 in Encoding


Used in 418 crates (via toml_edit)

MIT/Apache

31KB
704 lines

A low-level interface for writing out TOML

Example

use toml_write::TomlWrite as _;

let mut output = String::new();
output.newline()?;
output.open_table_header()?;
output.key("table")?;
output.close_table_header()?;
output.newline()?;

output.key("key")?;
output.space()?;
output.keyval_sep()?;
output.space()?;
output.value("value")?;
output.newline()?;

assert_eq!(output, r#"
[table]
key = "value"
"#);

toml_write

Latest Version Documentation

A low-level interface for writing out TOML

License

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in toml-rs by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps