pub struct FileDiff {
pub path: String,
pub old_path: Option<String>,
pub status: DiffStatus,
pub old_mode: Option<String>,
pub new_mode: Option<String>,
pub old_oid: ObjectId,
pub new_oid: ObjectId,
pub binary: bool,
pub content_changed: bool,
pub old_encoding_lossy: bool,
pub new_encoding_lossy: bool,
pub hunks: Vec<StructuredHunk>,
}Expand description
One changed file with structured hunks and metadata.
Fields§
§path: StringDisplay path (new path, or old path for a deletion).
old_path: Option<String>Pre-rename path when it differs from Self::path.
status: DiffStatusChange kind for this path.
old_mode: Option<String>Old git mode (octal), when present on this side.
new_mode: Option<String>New git mode (octal), when present on this side.
old_oid: ObjectIdOld blob OID on this side (zero when absent).
new_oid: ObjectIdNew blob OID on this side (zero when absent).
binary: boolTrue when either side was treated as binary (NUL in the first 8 KiB).
content_changed: boolTrue when blob content changed (not a mode-only touch on the same OID).
old_encoding_lossy: boolOld side was decoded with lossy UTF-8.
new_encoding_lossy: boolNew side was decoded with lossy UTF-8.
hunks: Vec<StructuredHunk>Structured line hunks for text files.
Trait Implementations§
impl Eq for FileDiff
impl StructuralPartialEq for FileDiff
Auto Trait Implementations§
impl Freeze for FileDiff
impl RefUnwindSafe for FileDiff
impl Send for FileDiff
impl Sync for FileDiff
impl Unpin for FileDiff
impl UnsafeUnpin for FileDiff
impl UnwindSafe for FileDiff
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