pub struct DiffHunk {
pub file: String,
pub old_file: String,
pub new_file: String,
pub file_header: String,
pub header: String,
pub lines: Vec<String>,
pub unsupported_metadata: Option<String>,
}Fields§
§file: StringThe primary file path for display/matching. Prefers the new-side path, but falls back to the old-side path for deletions (where new is /dev/null).
old_file: StringOld-side file path (from --- a/...), or “/dev/null” for new files.
new_file: StringNew-side file path (from +++ b/...), or “/dev/null” for deleted files.
file_header: StringThe full file header (— a/… and +++ b/… lines)
header: StringThe @@ line, e.g. “@@ -12,4 +12,6 @@ fn main”
lines: Vec<String>All lines in the hunk (context, +, -)
unsupported_metadata: Option<String>Unsupported preamble metadata (rename, mode change, etc.) if present
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DiffHunk
impl RefUnwindSafe for DiffHunk
impl Send for DiffHunk
impl Sync for DiffHunk
impl Unpin for DiffHunk
impl UnsafeUnpin for DiffHunk
impl UnwindSafe for DiffHunk
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