Struct git2::DiffFile [−][src]
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
impl<'a> DiffFile<'a>[src]
pub fn id(&self) -> Oid[src]
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.
pub fn path_bytes(&self) -> Option<&'a [u8]>[src]
Returns the path, in bytes, of the entry relative to the working directory of the repository.
pub fn path(&self) -> Option<&'a Path>[src]
Returns the path of the entry relative to the working directory of the repository.
pub fn size(&self) -> u64[src]
Returns the size of this entry, in bytes
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
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,