pub struct LineHashDiff;
Expand description
A line-oriented, hash based diff algorithm.
This works by taking a hash of each line in either document that has a length, ignoring leading whitespace, above some threshold.
Lines in the target document are matched against lines in the base document. When a match is found, it is extended forwards and backwards as far as possible.
This runs in O(n+m) in the lengths of the two ropes, and produces results on a variety of workloads that are comparable in quality (measured in terms of serialized diff size) with the results from using a suffix array, while being an order of magnitude faster.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LineHashDiff
impl RefUnwindSafe for LineHashDiff
impl Send for LineHashDiff
impl Sync for LineHashDiff
impl Unpin for LineHashDiff
impl UnwindSafe for LineHashDiff
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