Expand description
Format-agnostic diff computation traits and algorithms Format-agnostic diff and patch traits
This module provides traits for computing diffs and applying patches
across different data formats. The DiffableValue trait enables
structural comparison, while GenericPatch represents format-agnostic
patch operations.
§Key Types
DiffableValue- Trait for values that can be compared for diffingDiffValueKind- Classification of value types for diff operationsGenericPatchOperation- A single patch operationGenericPatch- A collection of patch operations
§Example
ⓘ
use fionn_core::diffable::{DiffableValue, compute_diff};
let source: serde_json::Value = serde_json::json!({"name": "Alice"});
let target: serde_json::Value = serde_json::json!({"name": "Bob"});
let patch = compute_diff(&source, &target);Structs§
- Diff
Options - Options for diff computation
- Generic
Patch - A collection of patch operations (format-agnostic)
Enums§
- Diff
Value Kind - Classification of value types for diff operations
- Generic
Patch Operation - A single patch operation (format-agnostic)
Traits§
- Diffable
Value - Trait for values that can be compared for diffing
Functions§
- compute_
diff - Compute a diff between two values
- compute_
diff_ with_ options - Compute a diff with custom options