Expand description
git-closure — Deterministic S-expression source snapshots.
§Public API
| Function | Description |
|---|---|
build_snapshot | Build a snapshot from a local directory |
build_snapshot_with_options | Build with explicit options |
build_snapshot_from_source | Build from a URL / source specifier |
build_snapshot_from_provider | Build via a custom providers::Provider |
verify_snapshot | Verify snapshot integrity |
materialize_snapshot | Restore a snapshot to a directory |
materialize_snapshot_with_options | Restore with explicit policy options |
diff_snapshots | Compare two snapshots and return structured differences |
diff_snapshot_to_source | Compare a snapshot against a live source directory |
render_snapshot | Render a snapshot as Markdown, HTML, or JSON |
fmt_snapshot | Canonicalize snapshot formatting |
fmt_snapshot_with_options | Canonicalize formatting with explicit options |
list_snapshot | List snapshot entries from a file path |
list_snapshot_str | List snapshot entries from in-memory text |
parse_snapshot | Parse in-memory snapshot text into header + entries |
summarize_snapshot | Compute aggregate snapshot metadata |
| Type | Description |
|---|---|
GitClosureError | Typed error taxonomy for build/verify/materialize operations |
BuildOptions | Build-mode toggles (include_untracked, require_clean) |
VerifyReport | Summary returned by verify_snapshot |
MaterializeOptions | Options controlling materialization behavior |
MaterializePolicy | Policy profile for materialization safety/compatibility |
ListEntry | Structured row returned by listing operations |
SnapshotHeader | Parsed ;; metadata header block |
SnapshotFile | Parsed file/symlink record from a snapshot |
DiffEntry | One change record emitted by diff_snapshots |
DiffResult | Deterministic diff output container |
RenderFormat | Output selector for render_snapshot |
FmtOptions | Formatting behavior options |
SnapshotSummary | Compact snapshot metadata summary |
Re-exports§
pub use error::GitClosureError;
Modules§
Structs§
- Build
Options - Options that influence which files are included in a snapshot build.
- Diff
Result - Result of comparing two snapshots.
- FmtOptions
- Formatting behavior toggles for
fmt_snapshot_with_options. - List
Entry - A single entry returned by
crate::list_snapshot. - Materialize
Options - Options controlling materialization behavior.
- Snapshot
File - An individual file record within a
.gclsnapshot. - Snapshot
Header - Parsed representation of the
;;-comment header block at the top of a.gclfile. - Snapshot
Summary - Aggregated metadata derived from a snapshot file.
- Verify
Report - Summary returned by
crate::verify_snapshot.
Enums§
- Diff
Entry - A single change entry produced by
diff_snapshots. - Materialize
Policy - Policy profiles for snapshot materialization.
- Render
Format - Output format for
render_snapshot.
Functions§
- build_
snapshot - Builds a snapshot of
sourceusing default options. - build_
snapshot_ from_ provider - Builds a snapshot using a caller-supplied
Providerimplementation. - build_
snapshot_ from_ source - Builds a snapshot from a URL or source specifier, fetching it via
provider_kind. - build_
snapshot_ with_ options - Core build function: collects, sorts, hashes, and serializes all files.
- diff_
snapshot_ to_ source - Compares a snapshot file against a live source directory.
- diff_
snapshots - Compares two
.gclsnapshot files and returns the set of differences. - fmt_
snapshot - Reads and canonicalizes a snapshot file using default
FmtOptions. - fmt_
snapshot_ with_ options - Reads and canonicalizes a snapshot file with explicit formatting options.
- list_
snapshot - Parses a
.gclsnapshot file and returns aListEntryfor each recorded file, in lexicographic path order. - list_
snapshot_ str - Parses snapshot text and returns a
ListEntryfor each recorded file. - materialize_
snapshot - Materializes a snapshot into
output, creating the directory tree and restoring file contents and permissions. - materialize_
snapshot_ with_ options - Materializes a snapshot with explicit policy controls.
- parse_
snapshot - render_
snapshot - Renders a snapshot file as an audit report in the given format.
- summarize_
snapshot - Computes aggregate snapshot metadata for human or machine-readable output.
- verify_
snapshot - Verifies the structural and content integrity of a snapshot file.