Crates.io | yaml-hash |
lib.rs | yaml-hash |
version | 0.3.0 |
source | src |
created_at | 2024-03-13 01:22:13.546591 |
updated_at | 2024-03-14 12:29:09.154835 |
description | Improved YAML Hash |
homepage | |
repository | https://github.com/qtfkwk/yaml-hash |
max_upload_size | |
id | 1171222 |
size | 18,033 |
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:
&str
via impl From<&str>
String
via impl Display
YamlHash
or yaml_rust2::Yaml
via
get
and get_yaml
; return the root hash if the key
is ""
.YamlHash
with another YamlHash
, YAML hash string, or YAML hash file to create a
new YamlHash
via merge
, merge_str
, or
merge_file