xml_3dm/diff/
mod.rs

1//! Diff and Patch algorithms for XML trees.
2//!
3//! This module provides functionality to generate diffs between matched trees
4//! and to apply those diffs to reconstruct modified versions.
5
6mod bfs_index;
7mod diff_operation;
8mod generator;
9mod patch;
10
11pub use bfs_index::BfsIndex;
12pub use diff_operation::DiffOperation;
13pub use generator::Diff;
14pub use patch::Patch;
15
16/// Default namespace for diff tags.
17pub const DIFF_NS: &str = "";
18
19/// Tag names for diff operations.
20pub const DIFF_COPY_TAG: &str = "copy";
21pub const DIFF_INSERT_TAG: &str = "insert";
22pub const DIFF_ESC_TAG: &str = "esc";
23pub const DIFF_ROOT_TAG: &str = "diff";
24
25/// Attribute names for diff operations.
26pub const DIFF_CPYSRC_ATTR: &str = "src";
27pub const DIFF_CPYDST_ATTR: &str = "dst";
28pub const DIFF_CPYRUN_ATTR: &str = "run";
29pub const DIFF_ROOTOP_ATTR: &str = "op";
30
31/// Value for root insert operation.
32pub const DIFF_ROOTOP_INS: &str = "insert";