Expand description
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
&str
viaimpl From<&str>
- Convert to
String
viaimpl Display
- Get a value for a dotted key as a
YamlHash
oryaml_rust2::Yaml
viaget
andget_yaml
; return the root hash if the key is""
. - Merge a
YamlHash
with anotherYamlHash
, YAML hash string, or YAML hash file to create a newYamlHash
viamerge
,merge_str
, ormerge_file
Structs§
- Improved YAML Hash
Enums§
- A YAML node is stored as this
Yaml
enumeration, which provides an easy way to access your YAML document.