Skip to main content

Module diffable

Module diffable 

Source
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

§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§

DiffOptions
Options for diff computation
GenericPatch
A collection of patch operations (format-agnostic)

Enums§

DiffValueKind
Classification of value types for diff operations
GenericPatchOperation
A single patch operation (format-agnostic)

Traits§

DiffableValue
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