Skip to main content

Crate git_closure

Crate git_closure 

Source
Expand description

git-closure — Deterministic S-expression source snapshots.

§Public API

FunctionDescription
build_snapshotBuild a snapshot from a local directory
build_snapshot_with_optionsBuild with explicit options
build_snapshot_from_sourceBuild from a URL / source specifier
build_snapshot_from_providerBuild via a custom providers::Provider
verify_snapshotVerify snapshot integrity
materialize_snapshotRestore a snapshot to a directory
materialize_snapshot_with_optionsRestore with explicit policy options
diff_snapshotsCompare two snapshots and return structured differences
diff_snapshot_to_sourceCompare a snapshot against a live source directory
render_snapshotRender a snapshot as Markdown, HTML, or JSON
fmt_snapshotCanonicalize snapshot formatting
fmt_snapshot_with_optionsCanonicalize formatting with explicit options
list_snapshotList snapshot entries from a file path
list_snapshot_strList snapshot entries from in-memory text
parse_snapshotParse in-memory snapshot text into header + entries
summarize_snapshotCompute aggregate snapshot metadata
TypeDescription
GitClosureErrorTyped error taxonomy for build/verify/materialize operations
BuildOptionsBuild-mode toggles (include_untracked, require_clean)
VerifyReportSummary returned by verify_snapshot
MaterializeOptionsOptions controlling materialization behavior
MaterializePolicyPolicy profile for materialization safety/compatibility
ListEntryStructured row returned by listing operations
SnapshotHeaderParsed ;; metadata header block
SnapshotFileParsed file/symlink record from a snapshot
DiffEntryOne change record emitted by diff_snapshots
DiffResultDeterministic diff output container
RenderFormatOutput selector for render_snapshot
FmtOptionsFormatting behavior options
SnapshotSummaryCompact snapshot metadata summary

Re-exports§

pub use error::GitClosureError;

Modules§

error
providers

Structs§

BuildOptions
Options that influence which files are included in a snapshot build.
DiffResult
Result of comparing two snapshots.
FmtOptions
Formatting behavior toggles for fmt_snapshot_with_options.
ListEntry
A single entry returned by crate::list_snapshot.
MaterializeOptions
Options controlling materialization behavior.
SnapshotFile
An individual file record within a .gcl snapshot.
SnapshotHeader
Parsed representation of the ;;-comment header block at the top of a .gcl file.
SnapshotSummary
Aggregated metadata derived from a snapshot file.
VerifyReport
Summary returned by crate::verify_snapshot.

Enums§

DiffEntry
A single change entry produced by diff_snapshots.
MaterializePolicy
Policy profiles for snapshot materialization.
RenderFormat
Output format for render_snapshot.

Functions§

build_snapshot
Builds a snapshot of source using default options.
build_snapshot_from_provider
Builds a snapshot using a caller-supplied Provider implementation.
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 .gcl snapshot 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 .gcl snapshot file and returns a ListEntry for each recorded file, in lexicographic path order.
list_snapshot_str
Parses snapshot text and returns a ListEntry for 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.