pub enum Op {
Equal {
old: Range<usize>,
new: Range<usize>,
},
Delete {
old: Range<usize>,
new: Range<usize>,
},
Insert {
old: Range<usize>,
new: Range<usize>,
},
}Expand description
One run of an edit script. Ranges index the compared sequences: lines for
diff_lines, bytes of the input strings for diff_words and
diff_chars. The side a run does not touch has an empty range at the
position where the run applies.
Variants§
Equal
old and new hold equal elements.
Delete
old is removed; new is empty.
Insert
new is inserted; old is empty.
Implementations§
Trait Implementations§
impl Eq for Op
impl StructuralPartialEq for Op
Auto Trait Implementations§
impl Freeze for Op
impl RefUnwindSafe for Op
impl Send for Op
impl Sync for Op
impl Unpin for Op
impl UnsafeUnpin for Op
impl UnwindSafe for Op
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.