Skip to main content

Module patch

Module patch 

Source
Expand description

Patches in the include’s own configuration (patch.ts): { insert: [...] } / { id, insert: [...] } appends entries (to the root or a group); { id, name?, ...keys } overrides keys of an entry.

Structs§

PatchIndex
Where every entry and key of a patched tree comes from.
Patched

Enums§

Owner
Who supplies an entry, or one key of it, in the patched tree.

Functions§

apply_patches
Overlays patches onto a copy of data, building the ownership index in the same pass (a patch that does not apply owns nothing). Anonymous entries of a group config a patch supplies get their ids on the patch itself, so that they keep them on the next application.
ensure_ids
Gives every entry (nested groups included) an id, in place.
ensure_insert_ids
Runtime changes are routed back to an inserted entry by its id, so every insert needs one.
route_journal
Routes a journal to its owners: file-owned changes go into data, patch-owned ones into patches. Returns whether any patch changed.