pub struct Hunk {
pub header: String,
pub display: String,
pub old_range: (usize, usize),
pub new_lines: Vec<String>,
pub old_lines: Vec<String>,
}Expand description
A single diff hunk representing a localized change between the original and modified file.
Fields§
§header: StringThe unified diff header (e.g., “@@ -1,3 +1,4 @@”)
display: StringFormatted hunk text for display (with +/- lines and context)
old_range: (usize, usize)Range of lines in the original text that this hunk covers (start index, exclusive end)
new_lines: Vec<String>The replacement lines from the modified version
old_lines: Vec<String>The original lines being replaced
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