Skip to main content

Module overlay

Module overlay 

Source
Expand description

Applying the adopter’s corrections to the vendor’s document.

Requires the document feature.

parse reads a document into the value a correction edits, and apply lays one Overlay over it. A chain of the two is how a document with several layers of correction is assembled, and everything downstream sees a single corrected document and never learns that an Overlay existed.

Layers are ordinary Overlay documents in an order the caller chose. This module knows nothing about what any of them is for: whether a layer repairs the vendor’s mistakes, sharpens a type, or marks an operation for a command line is a convention an adoption keeps, not a thing the library can see.

Enums§

OverlayError
The Overlay, or the document it is applied to, is not usable.

Functions§

apply
Lay one Overlay over the document as it stands, and hand back the result.
parse
Read a document — YAML or JSON, as the vendor ships it — into the value a correction is applied to.