Skip to main content

Crate atelier_sdk_diff

Crate atelier_sdk_diff 

Source
Expand description

The format-independent diff model and fidelity ladder.

A Diff is a set of addressed Deltas, each carried at a Fidelity rung. The binary rung here is the floor every document diffs at; FormatPackages project documents to text so the ladder can raise deltas to the text rung, and later to rich deltas in the format’s own terms.

Structs§

Address
Where a delta lands, in the format’s own terms.
Delta
One addressed difference inside a Diff, carried at its own rung.
Diff
The differences between two versions: addressed deltas, each carried at the highest fidelity the ladder could raise it to.
Line
One line of a text-rung comparison: what happened and the line’s content.
PackageError
Why a package could not handle a document it detected.
PackageId
The identity of a format package: its name plus semver version.
Projection
A deterministic text rendering of a document, stamped with the package that produced it. The original document is always kept.

Enums§

Confidence
How strongly a package claims a document.
DeltaKind
What kind of change one Delta records.
Fidelity
The rung a delta is carried at: the format-independent fidelity ladder.
LineKind
What happened to one line at the text rung.

Constants§

NO_NEWLINE_MARKER
The marker line carried after a changed line that has no trailing newline, following git’s convention, so a terminal-newline edit stays visible in the comparison.

Traits§

FormatPackage
One format’s support, shipped as its own versioned unit: the ecosystem’s public ABI (ADR-0003).

Functions§

as_text
The bytes as text, when they are valid UTF-8 without NUL — the precondition for diffing at the text rung without a projection.
detect_package
The package that claims the document most confidently; equal claims break by package id, so selection is deterministic whatever order the registry was built in.
diff_lines
The text rung: the line-level comparison of two texts.
diff_listings
The binary rung: diff two file listings by content id alone.