pub struct Hunk {
pub file: usize,
pub old_start: u32,
pub old_count: u32,
pub new_start: u32,
pub new_count: u32,
pub removed: Vec<Line>,
pub added: Vec<Line>,
pub nonl_old: bool,
pub nonl_new: bool,
}Expand description
One canonical hunk from git diff -U0 --no-renames.
Fields§
§file: usizeIndex into the canonical file vector.
old_start: u32§old_count: u32§new_start: u32§new_count: u32§removed: Vec<Line>Removed lines, without prefix or newline.
added: Vec<Line>Added lines, without prefix or newline.
nonl_old: bool\ No newline at end of file on the old side.
nonl_new: bool\ No newline at end of file on the new side.
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