pub struct Hunk {
pub file_path: String,
pub old_start: u32,
pub old_lines: u32,
pub new_start: u32,
pub new_lines: u32,
pub content: String,
pub is_new_file: bool,
}Expand description
A hunk of changes from a staged diff.
Fields§
§file_path: StringFile path relative to repository root.
old_start: u32Starting line in the original file (1-indexed, before changes).
old_lines: u32Number of lines in the original file.
new_start: u32Starting line in the new file (1-indexed, after changes).
new_lines: u32Number of lines in the new file.
content: StringThe actual diff content (context + changes).
is_new_file: boolWhether this hunk is from a newly created file.
Trait Implementations§
impl Eq for Hunk
impl StructuralPartialEq for Hunk
Auto Trait Implementations§
impl Freeze for Hunk
impl RefUnwindSafe for Hunk
impl Send for Hunk
impl Sync for Hunk
impl Unpin 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