Expand description
Diff utilities for generating structured diffs.
Structs§
- Diff
Bundle - A diff rendered with both structured hunks and formatted text.
- Diff
Hunk - A diff hunk with metadata for old/new ranges.
- Diff
Line - Metadata for a single line inside a diff hunk.
- Diff
Options - Options for diff generation.
Enums§
- Chunk
- Represents a chunk of text in a diff (Equal, Delete, or Insert).
- Diff
Line Kind - A single diff line annotated with metadata and type.
Functions§
- compute_
diff - Compute a structured diff bundle.
- compute_
diff_ chunks - Compute an optimal diff between two strings using Myers algorithm.
- compute_
diff_ with_ theme - Compute a structured diff bundle using the default theme-aware formatter.
- format_
colored_ diff - Format diff hunks with theme colors for terminal display.
- format_
unified_ diff - Format a unified diff without ANSI color codes.