Skip to main content

Module encode

Module encode 

Source
Expand description

Unified diff encoder.

Mirror image of crate::decode: takes a DiffDocument tree and emits Git-style unified-diff text. Round-tripping decode → encode is byte-for-byte for any document the decoder accepted, including the preamble and the raw header lines preserved on each crate::FileHeader.

Traits§

Encode
Encodes a value as unified-diff text.