pub struct DiffFile<'a> { /* private fields */ }
Expand description
Description of one side of a delta.
Although this is called a “file” it could represent a file, a symbolic link, a submodule commit id, or even a tree (although that only happens if you are tracking type changes or ignored/untracked directories).
Implementations
sourceimpl<'a> DiffFile<'a>
impl<'a> DiffFile<'a>
sourcepub fn id(&self) -> Oid
pub fn id(&self) -> Oid
Returns the Oid of this item.
If this entry represents an absent side of a diff (e.g. the old_file
of a Added
delta), then the oid returned will be zeroes.
sourcepub fn path_bytes(&self) -> Option<&'a [u8]>
pub fn path_bytes(&self) -> Option<&'a [u8]>
Returns the path, in bytes, of the entry relative to the working directory of the repository.
sourcepub fn path(&self) -> Option<&'a Path>
pub fn path(&self) -> Option<&'a Path>
Returns the path of the entry relative to the working directory of the repository.
sourcepub fn is_not_binary(&self) -> bool
pub fn is_not_binary(&self) -> bool
Returns true
if file(s) are treated as text data.
sourcepub fn is_valid_id(&self) -> bool
pub fn is_valid_id(&self) -> bool
Returns true
if id
value is known correct.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for DiffFile<'a>
impl<'a> !Send for DiffFile<'a>
impl<'a> !Sync for DiffFile<'a>
impl<'a> Unpin for DiffFile<'a>
impl<'a> UnwindSafe for DiffFile<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more