Expand description
Typed unified diffs. Parsing validates hunk extents; malformed or incomplete patches are errors rather than plausible-looking source.
Structs§
- Changed
Span - Character-boundary-safe byte offsets into one specific diff line.
- Diff
Line - File
Diff - Hunk
- Hunk
Range - A side of a hunk. An empty range may start at zero; nonempty ranges are checked to fit positive u32 source line numbers by the parser.
- Line
Number - One-based source line. Missing sides are
None, never line zero. - Patch
Error