pub struct PatchHunk {
pub old_start: usize,
pub old_count: usize,
pub new_start: usize,
pub new_count: usize,
pub lines: Vec<PatchLine>,
}Expand description
A contiguous region of changes within a file patch — one move in the combo.
Fields§
§old_start: usizeStarting line number in the original file (1-based).
old_count: usizeNumber of lines from the original covered by this hunk.
new_start: usizeStarting line number in the new file (1-based).
new_count: usizeNumber of lines in the new version covered by this hunk.
lines: Vec<PatchLine>The diff lines that make up this hunk.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PatchHunk
impl<'de> Deserialize<'de> for PatchHunk
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PatchHunk
impl RefUnwindSafe for PatchHunk
impl Send for PatchHunk
impl Sync for PatchHunk
impl Unpin for PatchHunk
impl UnsafeUnpin for PatchHunk
impl UnwindSafe for PatchHunk
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