Crate facet_xml_diff

Crate facet_xml_diff 

Source
Expand description

Diff-aware XML serialization.

This module provides XML rendering of diffs with -/+ prefixes, value-only coloring, and proper alignment.

§Example

use facet_diff::FacetDiff;

let old = Rect { fill: "red".into(), x: 10, .. };
let new = Rect { fill: "blue".into(), x: 10, .. };
let diff = old.diff(&new);

// Render as diff-aware XML
let xml = facet_xml::diff_to_string(&old, &new, &diff)?;
// Output:
// <rect
// ← fill="red"
// → fill="blue"
//   x="10" y="10" width="50" height="50"
// />

Structs§

DiffSerializeOptions
Options for diff-aware XML serialization.
DiffSymbols
Symbols for diff rendering.
DiffTheme
Color theme for diff rendering.

Functions§

diff_to_string
Render a diff as XML to a String with ANSI colors.
diff_to_string_with_options
Render a diff as XML to a String with custom options.
diff_to_writer
Render a diff as XML to a writer.
diff_to_writer_with_options
Render a diff as XML to a writer with custom options.