pub fn invert_patch(
original: &SdfNode,
patch: &TreePatch,
) -> Result<TreePatch, DiffError>Expand description
Invert a patch: creates an undo patch from a forward patch.
The inverted patch, when applied to the result tree, produces the original tree. Invert a patch: produces a patch that undoes the given patch. Works for all operation types (Replace, Insert, Delete) by applying the patch then computing the reverse diff.