pub struct Hunk {
pub kind: HunkKind,
pub new_start: usize,
pub new_count: usize,
pub old_start: usize,
pub old_count: usize,
pub lines: Vec<String>,
}Expand description
One diff hunk between HEAD and the buffer, in 1-based buffer lines.
Fields§
§kind: HunkKind§new_start: usizeFirst affected line in the buffer (1-based). For pure deletions this is the line after which content vanished.
new_count: usize§old_start: usize§old_count: usize§lines: Vec<String>Diff lines with their origin prefix (+ - space), for preview.
Implementations§
Source§impl Hunk
impl Hunk
Sourcepub fn signs(&self) -> Vec<(usize, Sign)>
pub fn signs(&self) -> Vec<(usize, Sign)>
Signs this hunk produces, derived from its diff lines.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Hunk
impl RefUnwindSafe for Hunk
impl Send for Hunk
impl Sync for Hunk
impl Unpin for Hunk
impl UnsafeUnpin for Hunk
impl UnwindSafe for Hunk
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