pub enum PatchLine<'a> {
Show 66 variants
HunkHeader(HunkHead),
AddedLine(Cow<'a, [u8]>),
DeletedLine(Cow<'a, [u8]>),
ContextLine(Cow<'a, [u8]>),
NoNewlineAtEndOfFile,
OldFileHeader {
path: Cow<'a, str>,
},
NewFileHeader {
path: Cow<'a, str>,
},
DiffGitHeader {
old_path: Cow<'a, str>,
new_path: Cow<'a, str>,
},
IndexLine {
old_hash: Cow<'a, str>,
new_hash: Cow<'a, str>,
mode: Option<Cow<'a, str>>,
},
NewFileMode(Cow<'a, str>),
DeletedFileMode(Cow<'a, str>),
RenameFrom(Cow<'a, str>),
RenameTo(Cow<'a, str>),
CopyFrom(Cow<'a, str>),
CopyTo(Cow<'a, str>),
SimilarityIndex(u8),
DissimilarityIndex(u8),
OldMode(Cow<'a, str>),
NewMode(Cow<'a, str>),
FromCommit(Cow<'a, str>),
FromAuthor(Cow<'a, str>),
Date(Cow<'a, str>),
Subject(Cow<'a, str>),
MessageId(Cow<'a, str>),
InReplyTo(Cow<'a, str>),
References(Cow<'a, str>),
ContentType(Cow<'a, str>),
ContentTransferEncoding(Cow<'a, str>),
MimeVersion(Cow<'a, str>),
Description(Cow<'a, str>),
Author(Cow<'a, str>),
Origin(Cow<'a, str>),
Bug(Cow<'a, str>),
BugVendor {
vendor: Cow<'a, str>,
url: Cow<'a, str>,
},
Forwarded(Cow<'a, str>),
AppliedUpstream(Cow<'a, str>),
ReviewedBy(Cow<'a, str>),
AckedBy(Cow<'a, str>),
LastUpdate(Cow<'a, str>),
TestedBy(Cow<'a, str>),
ReportedBy(Cow<'a, str>),
SuggestedBy(Cow<'a, str>),
SignedOffBy(Cow<'a, str>),
Cc(Cow<'a, str>),
To(Cow<'a, str>),
ContinuationLine(Cow<'a, str>),
PatchDeclaration {
number: Option<Cow<'a, str>>,
filename: Cow<'a, str>,
},
SourceDeclaration {
number: Option<Cow<'a, str>>,
filename: Cow<'a, str>,
},
ThreeDashSeparator,
GitVersionSignature,
BinaryFilesDiffer {
old_path: Cow<'a, str>,
new_path: Cow<'a, str>,
},
GitBinaryPatch,
CombinedDiffHunkHeader(Cow<'a, str>),
CommentWithField {
field: Cow<'a, str>,
value: Cow<'a, str>,
},
CommentContinuation(Cow<'a, str>),
SeriesPatchEntry {
patch: Cow<'a, str>,
strip_level: Option<Cow<'a, str>>,
},
SeriesComment,
DiffstatLine {
file: Cow<'a, str>,
changes: Cow<'a, str>,
markers: Cow<'a, str>,
},
DiffstatSummary {
files: Cow<'a, str>,
insertions: Option<Cow<'a, str>>,
deletions: Option<Cow<'a, str>>,
},
ContextDiffFileHeader(Cow<'a, str>),
ContextDiffComparison(Cow<'a, str>),
ContextDiffHunkSeparator,
ContextDiffOldHunk {
start: Cow<'a, str>,
count: Option<Cow<'a, str>>,
},
ContextDiffNewHunk {
start: Cow<'a, str>,
count: Option<Cow<'a, str>>,
},
Unknown(Cow<'a, [u8]>),
Empty,
}Variants§
HunkHeader(HunkHead)
AddedLine(Cow<'a, [u8]>)
DeletedLine(Cow<'a, [u8]>)
ContextLine(Cow<'a, [u8]>)
NoNewlineAtEndOfFile
OldFileHeader
NewFileHeader
DiffGitHeader
IndexLine
NewFileMode(Cow<'a, str>)
DeletedFileMode(Cow<'a, str>)
RenameFrom(Cow<'a, str>)
RenameTo(Cow<'a, str>)
CopyFrom(Cow<'a, str>)
CopyTo(Cow<'a, str>)
SimilarityIndex(u8)
DissimilarityIndex(u8)
OldMode(Cow<'a, str>)
NewMode(Cow<'a, str>)
FromCommit(Cow<'a, str>)
FromAuthor(Cow<'a, str>)
Date(Cow<'a, str>)
Subject(Cow<'a, str>)
MessageId(Cow<'a, str>)
InReplyTo(Cow<'a, str>)
References(Cow<'a, str>)
ContentType(Cow<'a, str>)
ContentTransferEncoding(Cow<'a, str>)
MimeVersion(Cow<'a, str>)
Description(Cow<'a, str>)
Author(Cow<'a, str>)
Origin(Cow<'a, str>)
Bug(Cow<'a, str>)
BugVendor
Forwarded(Cow<'a, str>)
AppliedUpstream(Cow<'a, str>)
ReviewedBy(Cow<'a, str>)
AckedBy(Cow<'a, str>)
LastUpdate(Cow<'a, str>)
TestedBy(Cow<'a, str>)
ReportedBy(Cow<'a, str>)
SuggestedBy(Cow<'a, str>)
SignedOffBy(Cow<'a, str>)
Cc(Cow<'a, str>)
To(Cow<'a, str>)
ContinuationLine(Cow<'a, str>)
PatchDeclaration
SourceDeclaration
ThreeDashSeparator
GitVersionSignature
BinaryFilesDiffer
GitBinaryPatch
CombinedDiffHunkHeader(Cow<'a, str>)
CommentWithField
CommentContinuation(Cow<'a, str>)
SeriesPatchEntry
SeriesComment
DiffstatLine
DiffstatSummary
ContextDiffFileHeader(Cow<'a, str>)
ContextDiffComparison(Cow<'a, str>)
ContextDiffHunkSeparator
ContextDiffOldHunk
ContextDiffNewHunk
Unknown(Cow<'a, [u8]>)
Empty
Trait Implementations§
Source§impl<'de, 'a> Deserialize<'de> for PatchLine<'a>
impl<'de, 'a> Deserialize<'de> for PatchLine<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<'a> Eq for PatchLine<'a>
impl<'a> StructuralPartialEq for PatchLine<'a>
Auto Trait Implementations§
impl<'a> Freeze for PatchLine<'a>
impl<'a> RefUnwindSafe for PatchLine<'a>
impl<'a> Send for PatchLine<'a>
impl<'a> Sync for PatchLine<'a>
impl<'a> Unpin for PatchLine<'a>
impl<'a> UnsafeUnpin for PatchLine<'a>
impl<'a> UnwindSafe for PatchLine<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more