pub enum DiffModification {
AdditionAddition {
line: Line,
line_no: u32,
},
AdditionContext {
line: Line,
line_no_old: u32,
line_no_new: u32,
},
AdditionDeletion {
line: Line,
line_no: u32,
},
ContextAddition {
line: Line,
line_no: u32,
},
ContextContext {
line: Line,
line_no_old: u32,
line_no_new: u32,
},
ContextDeletion {
line: Line,
line_no: u32,
},
DeletionAddition {
line: Line,
line_no: u32,
},
DeletionContext {
line: Line,
line_no_old: u32,
line_no_new: u32,
},
DeletionDeletion {
line: Line,
line_no: u32,
},
}
Expand description
Either the modification of a single diff Line
, or just contextual
information.
Variants§
AdditionAddition
An addition line is to be added.
AdditionContext
AdditionDeletion
An addition line is to be removed.
ContextAddition
A context line is to be added.
ContextContext
A contextual line in a file, i.e. there were no changes to the line.
ContextDeletion
A context line is to be removed.
DeletionAddition
A deletion line is to be added.
DeletionContext
A deletion line in a diff, i.e. there were no changes to the line.
DeletionDeletion
A deletion line is to be removed.
Trait Implementations§
Source§impl Clone for DiffModification
impl Clone for DiffModification
Source§fn clone(&self) -> DiffModification
fn clone(&self) -> DiffModification
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DiffModification
impl Debug for DiffModification
Source§impl Decode for DiffModification
impl Decode for DiffModification
Source§impl Encode for DiffModification
impl Encode for DiffModification
Source§impl PartialEq for DiffModification
impl PartialEq for DiffModification
impl Eq for DiffModification
impl StructuralPartialEq for DiffModification
Auto Trait Implementations§
impl Freeze for DiffModification
impl RefUnwindSafe for DiffModification
impl Send for DiffModification
impl Sync for DiffModification
impl Unpin for DiffModification
impl UnwindSafe for DiffModification
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.