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§
- Diff
Serialize Options - Options for diff-aware XML serialization.
- Diff
Symbols - Symbols for diff rendering.
- Diff
Theme - 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.