pub struct FileDiff {
pub path: String,
pub old_path: Option<String>,
pub status: FileStatus,
pub binary: bool,
pub old_text: Option<String>,
pub new_text: Option<String>,
pub hunks: Vec<Hunk>,
pub hashes: HashCache,
pub blobs: BlobIds,
}Fields§
§path: String§old_path: Option<String>§status: FileStatus§binary: bool§old_text: Option<String>Full contents of each side. None for binary files and for the
missing side of adds/deletes.
new_text: Option<String>§hunks: Vec<Hunk>§hashes: HashCache§blobs: BlobIdsImplementations§
Source§impl FileDiff
impl FileDiff
Sourcepub fn content_hash(&self) -> String
pub fn content_hash(&self) -> String
Identity of the new side, which viewed marks key on. A binary file uses its new blob id.
Sourcepub fn sides_hash(&self) -> String
pub fn sides_hash(&self) -> String
Identity of both sides, for caches derived from old and new text.
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