pub fn diff_to_string<'mem, 'facet>(
from: &'mem impl Facet<'facet>,
to: &'mem impl Facet<'facet>,
diff: &Diff<'mem, 'facet>,
) -> StringExpand description
Render a diff as XML to a String with ANSI colors.
§Arguments
from- The original valueto- The new valuediff- The diff betweenfromandto
§Example
ⓘ
use facet_diff::FacetDiff;
let old = Point { x: 10, y: 20 };
let new = Point { x: 15, y: 20 };
let diff = old.diff(&new);
let xml = facet_xml::diff_to_string(&old, &new, &diff);
println!("{}", xml);