Skip to main content

Crate patchlib

Crate patchlib 

Source

Modules§

matcher
parser
patterns
strings
types

Structs§

BytesMatcher
Matcher using bytes regex (for any input)
DiffHunk
Representation of a Hunk in a diff
HunkHead
Metadata for a specific hunk
Patch
A destructured Patch
StrMatcher
Matcher using UTF-8 regex (for valid UTF-8)

Enums§

Captures
Abstraction over regex capture groups
DiffLine
A generic line in a diff
Match
PatchContent
PatchLine
SmartMatcher
Chooses the appropriate matcher based on whether input is valid UTF-8

Traits§

PatternMatcher
Trait for pattern matching abstraction

Functions§

parse_data
Parse the given bytes into Patchlines, while capable of parsing invalid utf-8
parse_patch_line
parse_patch_lines
translate_lines_to_patches
parse the given patchlines and return Patches. This removes all fancy lines that are not needed for a unified format diff