pub enum TieBreak {
Stable,
Myers,
}Expand description
How to choose between edit scripts of equal (minimal) cost.
Variants§
Stable
Prefer the script whose unchanged blocks shift the least, then the one with fewest
blocks, so that what stayed the same visibly stays put. For example
a + b = c → b + a = c keeps + = c and swaps the letters. Costs an O(N·M) pass,
so it applies only up to STABLE_LIMIT; larger inputs keep Myers’ choice.
Myers
Whatever the algorithm’s search order yields first. Fastest.
Trait Implementations§
impl Copy for TieBreak
impl Eq for TieBreak
impl StructuralPartialEq for TieBreak
Auto Trait Implementations§
impl Freeze for TieBreak
impl RefUnwindSafe for TieBreak
impl Send for TieBreak
impl Sync for TieBreak
impl Unpin for TieBreak
impl UnsafeUnpin for TieBreak
impl UnwindSafe for TieBreak
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