pub struct Patch { /* fields omitted */ }
A structure representing the text changes in a single diff delta.
This is an opaque structure.
Return a Patch for one file in a Diff.
Returns Ok(None) for an unchanged or binary file.
Generate a Patch by diffing two blobs.
Generate a Patch by diffing a blob and a buffer.
Generate a Patch by diffing two buffers.
Get the DiffDelta associated with the Patch.
Get the number of hunks in the Patch.
Get the number of lines of context, additions, and deletions in the Patch.
Get a DiffHunk and its total line count from the Patch.
Get the number of lines in a hunk.
Get a DiffLine from a hunk of the Patch.
Get the size of a Patch's diff data in bytes.
Print the Patch to text via a callback.
Get the Patch text as a Buf.
Executes the destructor for this type. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static