Skip to main content

Module diff

Module diff 

Source
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§

DiffLine
A single line in a structured diff.
PatchError
Error when applying a patch fails.

Enums§

ChangeTag
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).