pub enum DiffOp {
Equal(usize),
Delete(usize),
Insert(usize),
}Expand description
A run-length entry in a Myers edit script.
Each variant carries the number of consecutive lines it applies to:
DiffOp::Equal—nlines common to botholdandnew.DiffOp::Delete—nlines present inoldbut notnew.DiffOp::Insert—nlines present innewbut notold.
Walking the script in order and consuming old/new lines accordingly
reconstructs new from old.
Variants§
Equal(usize)
n lines are identical in both sequences.
Delete(usize)
n lines are removed from the old sequence.
Insert(usize)
n lines are added in the new sequence.
Trait Implementations§
impl Copy for DiffOp
impl Eq for DiffOp
impl StructuralPartialEq for DiffOp
Auto Trait Implementations§
impl Freeze for DiffOp
impl RefUnwindSafe for DiffOp
impl Send for DiffOp
impl Sync for DiffOp
impl Unpin for DiffOp
impl UnsafeUnpin for DiffOp
impl UnwindSafe for DiffOp
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