Crates.io | yaml |
lib.rs | yaml |
version | 0.3.0 |
source | src |
created_at | 2014-12-02 21:40:55.798546 |
updated_at | 2018-08-28 17:20:52.165587 |
description | LibYAML binding for Rust |
homepage | |
repository | https://github.com/kimhyunkang/libyaml-rust |
max_upload_size | |
id | 442 |
size | 95,050 |
Parse from memory
extern crate yaml;
use yaml::constructor::*;
yaml::parse_bytes_utf8("[1, 2, 3]".as_bytes()); // => Ok(vec![YamlSequence(~[YamlInteger(1), YamlInteger(2), YamlInteger(3)])])
Parse from Reader
extern crate yaml;
use std::io::BufReader;
use yaml::constructor::*;
let data = "[1, 2, 3]";
let mut reader = BufReader::new(data.as_bytes());
yaml::parse_io_utf8(&mut reader); // => Ok(vec![YamlSequence(~[YamlInteger(1), YamlInteger(2), YamlInteger(3)])])
In the order of what I want to do...