[][src]Struct git2::DiffFile

pub struct DiffFile<'a> { /* fields omitted */ }

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

pub fn is_binary(&self) -> bool[src]

Returns true if file(s) are treated as binary data.

pub fn is_not_binary(&self) -> bool[src]

Returns true if file(s) are treated as text data.

pub fn is_valid_id(&self) -> bool[src]

Returns true if id value is known correct.

pub fn exists(&self) -> bool[src]

Returns true if file exists at this side of the delta.

pub fn mode(&self) -> FileMode[src]

Returns file mode.

Trait Implementations

impl<'a> Debug for DiffFile<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for DiffFile<'a>[src]

impl<'a> !Send for DiffFile<'a>[src]

impl<'a> !Sync for DiffFile<'a>[src]

impl<'a> Unpin for DiffFile<'a>[src]

impl<'a> UnwindSafe for DiffFile<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.