Skip to main content

Module ops

Module ops 

Source
Expand description

Pure bundle operations shared by the CLI and admin API: structural diff and delta-chain application. These functions take parsed Bundles and return data structures — no printing, no filesystem, no std::process::exit. The CLI formats the result for a terminal; the server serializes it to JSON.

Structs§

ApplyResult
Result of materializing a base bundle plus an ordered chain of deltas.
DeltaStat
Per-delta application statistics.
DiffResult
Structural difference between two bundles (A → B), computed over (entry_key, discriminator) pairs. “Changed” means the key exists in both but the response bytes differ.
EntryRef
A single entry identified by its key plus algorithm discriminator. Dual-algorithm bundles hold the same entry_key under different discriminators, so both fields are needed to name an entry uniquely.

Constants§

MAX_CHAIN_LENGTH
Recommended maximum delta-chain length before a full re-base is advised.

Functions§

apply
Apply an ordered chain of delta bundles onto a full base bundle, producing a materialized full bundle. Verifies the continuity chain (base digest, then prev_manifest_digest links) and rejects type mismatches. Callers are responsible for authenticating inputs against their configured trust policy. Output is an UNSIGNED INTERMEDIATE, with an empty seal; it must be sealed before installation on an authenticated responder.
apply_sealed
Materialize a delta chain and authenticate its final manifest using seal_fn. The caller must authenticate every input and authorize the output signer.
diff
Compute the structural diff of two bundles. Never fails: it only reads the already-parsed index and data sections.