Expand description
Layered merge over an owned Value tree.
One walk, one value type. Every format parses into Value before merging,
so JSON and TOML layers stack without a conversion in the middle. This crate
knows nothing about files, formats or the command line; parsing, emission and
provenance are all the caller’s job.
thiserror and indexmap are the only dependencies — neither is a format
crate. cargo tree -p knf-core --depth 1 is the enforcement.
Structs§
- Merge
Options - Knobs on the merge itself. Passed by reference rather than encoded as cargo
features: features are additive and unify across a dependency graph, so a
strictfeature would silently change behaviour for one consumer the moment a second consumer enabled it.
Enums§
- Merge
Error - Number
- A number, kept in the widest lossless representation of its source.
- Value
- A parsed document, or any node within one.
Functions§
- merge
- Folds a list of layers into one document, last-wins, seeded with an empty object.
- merge_
into - Merges
overintobasein place. - merge_
with - Folds a list of layers into one document, seeded with an empty object.
Type Aliases§
- Map
- The object type.
indexmaprather thanBTreeMapso input key order survives, and rather thanVec<(String, Value)>so merge’s per-key lookup is not quadratic.