YAML 1.2 implementation in pure Rust.
Usage
This crate is on github and can be
used by adding yaml-rust
to the dependencies in your project's Cargo.toml
.
[]
= "https://github.com/chyh1990/yaml-rust.git"
And this in your crate root:
extern crate yaml_rust;
Parse a string into Vec<Yaml>
and then serialize it as a YAML string.
Examples
use ;
let docs = load_from_str.unwrap;
let doc = &docs; // select the first document
assert_eq!; // access elements by index
let mut out_str = String new;
let mut emitter = new;
emitter.dump.unwrap; // dump the YAML object to a String