std::encoding::tomlTOML parsing.
Parse TOML documents into values, inspect types, extract fields, and serialize back to TOML text.
import std::encoding::toml;
fn main() {
let doc = toml.parse("[package]\nname = \"hew\"");
let pkg = doc.get_field("package");
let name = pkg.get_field("name");
println(name.get_string()); // "hew"
name.free();
pkg.free();
doc.free();
}
parseParse a TOML string into a Value.
Panics if the input is not valid TOML.
let config = toml.parse("debug = true\nport = 8080");
ValueAn opaque TOML value.
Represents any TOML type: String, integer, float, boolean, array,
table, or datetime. Created by toml.parse(s) or by navigating
into a parsed value. Must be freed with free() when no longer needed.
ValueMethodsMethods available on a TOML Value.