pub enum HunkSide {
Removed,
Added,
}Expand description
Which side of a proposed change a hunk decoration marks.
Variants§
Removed
Text the proposal would remove or replace. Present in the buffer, so it has a real range and can be struck through in place.
Added
Text the proposal would add. Not in the buffer, so its range is zero-width — an anchor saying “new text goes here”. The content lives on the proposal and is rendered as a preview line rather than as a span over existing text.
This is the case a syntax-only decoration model cannot express, and the reason this layer carries a side at all.
Trait Implementations§
impl Copy for HunkSide
impl Eq for HunkSide
impl StructuralPartialEq for HunkSide
Auto Trait Implementations§
impl Freeze for HunkSide
impl RefUnwindSafe for HunkSide
impl Send for HunkSide
impl Sync for HunkSide
impl Unpin for HunkSide
impl UnsafeUnpin for HunkSide
impl UnwindSafe for HunkSide
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