Skip to main content

Crate khive_graph_diff

Crate khive_graph_diff 

Source
Expand description

Deterministic, I/O-free graph-state differences (ADR-101 D5).

Callers load three substrate-labelled NDJSON streams. This crate validates record identities, then compares supplied fields without domain defaults or schema interpretation. Nested JSON values change as whole top-level fields.

Structs§

FieldChange
One changed top-level field. Missing sides are omitted during serialization; present JSON null is serialized explicitly. These DTOs are Serialize-only: ordinary Option<Value> deserialization would conflate missing and null.
GraphDiff
Structured diff over three independent substrate collections.
GraphState
Validated, privately held graph state. Construction performs no I/O.
Id128
A 128-bit opaque identifier stored as 16 bytes, formatted as a hyphenated UUID string.
ModifiedRecord
A record whose supplied fields changed, ordered lexicographically by field.
Record
A complete added/removed record, with its identity represented exactly once.
SubstrateDiff
Additions, removals and changes, each ordered by UUID ascending.

Enums§

DiffInputError
Input refusal with the substrate and one-based physical NDJSON line.
Substrate
Independently keyed record collections; equal IDs across substrates coexist.

Functions§

diff
Compare validated graph states without mutation, I/O, time or randomness.

Type Aliases§

Fields
Supplied fields other than the substrate’s extracted identity.