Expand description
Text diffing primitives using the similar crate.
Pure functions — no I/O, no async. Produces unified diffs, structured line diffs, and can apply patches.
Structs§
- Diff
Line - A single line in a structured diff.
- Patch
Error - Error when applying a patch fails.
Enums§
- Change
Tag - Type of change for a diff line.
Functions§
- apply_
patch - Apply a unified diff patch to the original text.
- line_
diff - Return a structured per-line diff.
- unified_
diff - Produce a unified diff string (standard format with @@ hunk headers).