Skip to main content

Module decode

Module decode 

Source
Expand description

Unified diff decoder.

Streaming Decode implementations for HunkHeader, DiffLine, Hunk, FileDiff, and DiffDocument. Hunks are read by their header counts (matching radicle-cli’s unified_diff shape) so callers can pull a hunk at a time without arbitrary peek-ahead. File and document boundaries are detected with BufRead::fill_buf since rustik-diff has no libgit2 layer to do it for us.

Decode::decode_str is a thin string entry point — it just wraps the input in io::Cursor and runs the streaming decoder.

Traits§

Decode
Decodes a value from unified diff text.