pub enum HunkKind {
Add,
Remove,
Change,
Conflict,
}Expand description
What kind of change a hunk represents.
Classification is relative to one “earlier” side. For
two-way diffs the earlier side is ranges[0] (the A rope);
for three-way diffs the earlier side is ranges[0] (the
base rope). Conflict is only produced by three-way diff
when both local and remote independently changed an
overlapping base region.
Variants§
Add
Lines present only in the later side(s). Earlier side range is empty.
Remove
Lines present only in the earlier side. Later side range(s) is/are empty.
Change
Lines present in both, with differing content.
Conflict
Three-way only: both local and remote modified the same base region. Resolution is deferred to D.6 / user.
Trait Implementations§
impl Copy for HunkKind
impl Eq for HunkKind
impl StructuralPartialEq for HunkKind
Auto Trait Implementations§
impl Freeze for HunkKind
impl RefUnwindSafe for HunkKind
impl Send for HunkKind
impl Sync for HunkKind
impl Unpin for HunkKind
impl UnsafeUnpin for HunkKind
impl UnwindSafe for HunkKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more