Skip to main content

PatchLine

Enum PatchLine 

Source
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

Fields

§path: Cow<'a, str>
§

NewFileHeader

Fields

§path: Cow<'a, str>
§

DiffGitHeader

Fields

§old_path: Cow<'a, str>
§new_path: Cow<'a, str>
§

IndexLine

Fields

§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

Fields

§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

Fields

§number: Option<Cow<'a, str>>
§filename: Cow<'a, str>
§

SourceDeclaration

Fields

§number: Option<Cow<'a, str>>
§filename: Cow<'a, str>
§

ThreeDashSeparator

§

GitVersionSignature

§

BinaryFilesDiffer

Fields

§old_path: Cow<'a, str>
§new_path: Cow<'a, str>
§

GitBinaryPatch

§

CombinedDiffHunkHeader(Cow<'a, str>)

§

CommentWithField

Fields

§field: Cow<'a, str>
§value: Cow<'a, str>
§

CommentContinuation(Cow<'a, str>)

§

SeriesPatchEntry

Fields

§patch: Cow<'a, str>
§strip_level: Option<Cow<'a, str>>
§

SeriesComment

§

DiffstatLine

Fields

§file: Cow<'a, str>
§changes: Cow<'a, str>
§markers: Cow<'a, str>
§

DiffstatSummary

Fields

§files: Cow<'a, str>
§insertions: Option<Cow<'a, str>>
§deletions: Option<Cow<'a, str>>
§

ContextDiffFileHeader(Cow<'a, str>)

§

ContextDiffComparison(Cow<'a, str>)

§

ContextDiffHunkSeparator

§

ContextDiffOldHunk

Fields

§start: Cow<'a, str>
§count: Option<Cow<'a, str>>
§

ContextDiffNewHunk

Fields

§start: Cow<'a, str>
§count: Option<Cow<'a, str>>
§

Unknown(Cow<'a, [u8]>)

§

Empty

Trait Implementations§

Source§

impl<'a> Clone for PatchLine<'a>

Source§

fn clone(&self) -> PatchLine<'a>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for PatchLine<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, 'a> Deserialize<'de> for PatchLine<'a>

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<'a> PartialEq for PatchLine<'a>

Source§

fn eq(&self, other: &PatchLine<'a>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a> Serialize for PatchLine<'a>

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'a> Eq for PatchLine<'a>

Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,