Public declaration syntax from harness-tui-kit/src/util/word_diff.rs Original source SHA-256: ae917b53b256cab54c7a03bbc06596f6d1e48be6deb31a560be6e927122f6c95 Function bodies and constant values are omitted. This is not the complete implementation. Source line 18 #[derive(Debug, Clone, PartialEq, Eq)] pub struct WordDiff { /// Number of leading characters that match exactly. pub prefix_chars: usize, /// Number of trailing characters that match exactly. pub suffix_chars: usize, /// The changed-region character range on the old line: /// `prefix_chars..(old_len - suffix_chars)`. pub old_changed_range: std::ops::Range, /// The changed-region character range on the new line: /// `prefix_chars..(new_len - suffix_chars)`. pub new_changed_range: std::ops::Range } Source line 34 #[must_use] pub fn word_diff(old: &str, new: &str) -> WordDiff; Source line 68 #[derive(Debug, Clone, PartialEq, Eq)] pub struct ChangedPair { /// Index of the removed line. pub removed_idx: usize, /// Index of the added line. pub added_idx: usize, /// Word-level diff between the two contents. pub word_diff: WordDiff } Source line 82 #[must_use] pub fn pair_changed_lines(lines: &[DiffLine]) -> Vec;