pub struct Hunk {
pub old_start: usize,
pub old_count: usize,
pub new_start: usize,
pub new_count: usize,
pub first_body_line: usize,
pub lines: Vec<HunkLine>,
}Expand description
A single hunk in a unified diff.
Fields§
§old_start: usize1-based line number in the old file.
old_count: usizeNumber of lines in the old side.
new_start: usize1-based line number in the new file.
new_count: usizeNumber of lines on the new side.
first_body_line: usize1-based line number in the patch file of the first hunk body line (line after @@).
lines: Vec<HunkLine>Lines of the hunk body (’ ’, ‘+’, ‘-’ prefixed, or bare ’' no newline).
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