Crates.io | easy_yaml |
lib.rs | easy_yaml |
version | 0.1.1 |
source | src |
created_at | 2024-04-14 18:55:47.488102 |
updated_at | 2024-04-14 20:01:55.453277 |
description | Easy work with Yaml files |
homepage | https://github.com/leonovk/easy_yaml |
repository | https://github.com/leonovk/easy_yaml |
max_upload_size | |
id | 1208460 |
size | 14,231 |
Easy work with Yaml files
cargo add easy_yaml
use easy_yaml::*;
let yaml = EasyYaml::new("tests/test.yaml");
let result = yaml.get("key2.key3.key4");
match result {
Some(v) => match v {
String(s) => assert_eq!("value2".to_string(), s),
_ => panic!("Value: {:?}", v),
},
None => panic!("-_-"),
}