pub enum RegistryDiff {
Text {
lines: Vec<TextDiffLine>,
},
Structural {
added: Vec<LeafChange>,
removed: Vec<LeafChange>,
changed: Vec<LeafModification>,
},
}Expand description
The derived view between two committed versions of one artifact. A
line diff for the prompt text (RegistryDiff::Text); a structural
diff over the canonical-JSON content for every JSON family
(RegistryDiff::Structural). The wire shape is pinned under
tests/golden/, like every contract in the release.
Variants§
Text
Line diff of two prompt texts, oldest change hunks first.
Fields
lines: Vec<TextDiffLine>Every line of the view, in order: context lines carried once, removed lines (from the base) before their added replacements.
Structural
Structural diff over the canonical-JSON content: added, removed, and changed leaves, each sorted by path. A leaf is a scalar, or a whole subtree where one side lacks the path — a removed object reports as one removed leaf, not a forest of scalars.
Fields
added: Vec<LeafChange>Leaves present in the target and absent in the base.
removed: Vec<LeafChange>Leaves present in the base and absent in the target.
changed: Vec<LeafModification>Leaves present in both with different values (including type changes, reported whole).
Implementations§
Trait Implementations§
Source§impl Clone for RegistryDiff
impl Clone for RegistryDiff
Source§fn clone(&self) -> RegistryDiff
fn clone(&self) -> RegistryDiff
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more