cool-diff 0.1.0

Compact, context-preserving diffs of structured data (serde_json::Value)
Documentation
/// YAML-style diff renderer.
pub mod yaml;

use crate::model::DiffTree;

/// Renders a `DiffTree` into a human-readable string.
pub trait DiffRenderer {
    /// Renders the diff tree as a string.
    fn render(&self, tree: &DiffTree) -> String;
}

/// Line prefix characters for diff output.
pub mod indicator {
    /// Context lines (unchanged values, comments, structural markers).
    pub const CONTEXT: char = ' ';

    /// Expected values (what we wanted but didn't get).
    pub const EXPECTED: char = '-';

    /// Actual values (what we got instead).
    pub const ACTUAL: char = '+';
}