Reference · reference
toml module
use toml parses and serializes TOML over the Value type. config-weave registers it from wscript-std. Every function returns Result[…, string]. Serialization fails when the top-level value is not a map, and when a Value::Null appears anywhere, because TOML has no null. INI files are handled by the data module.
parse
rust
parse
Parses TOML text into a Value. Tables become maps and arrays become lists. Date and time values become strings.
to_string and to_string_pretty
rust
to_string
to_string_pretty
Serializes a map Value as TOML, in compact or in expanded form.
rust
use fs
use toml
let cfg = parse?
write?