15 unstable releases (5 breaking)
Uses new Rust 2024
| 0.6.1 | Nov 14, 2025 |
|---|---|
| 0.5.1 | Oct 27, 2025 |
| 0.4.5 | Apr 16, 2025 |
| 0.4.4 | Feb 20, 2025 |
| 0.3.0 | Mar 14, 2024 |
#1347 in Algorithms
170 downloads per month
Used in 2 crates
12KB
107 lines
Improved YAML Hash
If the YAML data you're working with is well-defined and you want to write the necessary types, you
should use serde and serde_yaml.
Otherwise, yaml_rust2 provides a foundation for working with varied YAML data or when you don't
want to write the necessary types.
This crate provides the YamlHash struct, which is a wrapper for yaml_rust2::yaml::Hash, and
supports some additional capabilities:
- Convert from
&strviaimpl From<&str> - Convert to
Stringviaimpl Display - Get a value for a dotted key as a
YamlHashoryaml_rust2::Yamlviagetandget_yaml; return the root hash if the key is"". - Merge a
YamlHashwith anotherYamlHash, YAML hash string, or YAML hash file to create a newYamlHashviamerge,merge_str, ormerge_file
Dependencies
~1.5MB
~23K SLoC