Skip to main content

Module operations

Module operations 

Source

Structs§

ManifestDiff
Differences between two manifests.

Functions§

diff_manifests
Calculate differences between two manifests. Patches are compared by UUID: if the PURL exists in both manifests but the UUID changed, the patch is considered modified.
get_after_hash_blobs
Get only afterHash blobs referenced by a manifest. Used for apply operations – we only need the patched file content, not the original. This saves disk space since beforeHash blobs are not needed for applying patches.
get_before_hash_blobs
Get only beforeHash blobs referenced by a manifest. Used for rollback operations – we need the original file content to restore.
get_referenced_blobs
Get all blob hashes referenced by a manifest (both beforeHash and afterHash). Used for garbage collection and validation.
read_manifest
Read and parse a manifest from the filesystem. Returns Ok(None) if the file does not exist or cannot be parsed.
validate_manifest
Validate a parsed JSON value as a PatchManifest. Returns Ok(manifest) if valid, or Err(message) if invalid.
write_manifest
Write a manifest to the filesystem with pretty-printed JSON.