pub struct IndentHeuristic<IndentOfToken> { /* private fields */ }Expand description
A slider heuristic that uses indentation levels to determine the best hunk position.
This heuristic analyzes the indentation of lines surrounding potential hunk positions and chooses the position that results in the most intuitive diff for human readers. It’s particularly effective for code and other indented text.
Implementations§
Trait Implementations§
Source§impl<IndentOfToken: Fn(Token) -> IndentLevel> SliderHeuristic for IndentHeuristic<IndentOfToken>
impl<IndentOfToken: Fn(Token) -> IndentLevel> SliderHeuristic for IndentHeuristic<IndentOfToken>
Auto Trait Implementations§
impl<IndentOfToken> Freeze for IndentHeuristic<IndentOfToken>where
IndentOfToken: Freeze,
impl<IndentOfToken> RefUnwindSafe for IndentHeuristic<IndentOfToken>where
IndentOfToken: RefUnwindSafe,
impl<IndentOfToken> Send for IndentHeuristic<IndentOfToken>where
IndentOfToken: Send,
impl<IndentOfToken> Sync for IndentHeuristic<IndentOfToken>where
IndentOfToken: Sync,
impl<IndentOfToken> Unpin for IndentHeuristic<IndentOfToken>where
IndentOfToken: Unpin,
impl<IndentOfToken> UnsafeUnpin for IndentHeuristic<IndentOfToken>where
IndentOfToken: UnsafeUnpin,
impl<IndentOfToken> UnwindSafe for IndentHeuristic<IndentOfToken>where
IndentOfToken: UnwindSafe,
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