std::encoding::yamlYAML parsing.
Parse YAML documents into values, inspect types, extract fields, and serialize back to YAML text.
import std::encoding::yaml;
fn main() {
let doc = yaml.parse("name: Hew\nversion: 1");
let name = doc.get_field("name");
println(name.get_string()); // "Hew"
name.free();
doc.free();
}
parseParse a YAML string into a Value.
Panics if the input is not valid YAML.
let config = yaml.parse("host: localhost\nport: 8080");
ValueAn opaque YAML value.
Represents any YAML type: null, bool, integer, float, String,
sequence, or mapping. Created by yaml.parse(s) or by navigating
into a parsed value. Must be freed with free() when no longer needed.
ValueMethodsMethods available on a YAML Value.