Struct git_repository::index::Entry

source ·
pub struct Entry {
    pub stat: Stat,
    pub id: ObjectId,
    pub flags: Flags,
    pub mode: Mode,
    /* private fields */
}
Expand description

An entry in the index, identifying a non-tree item on disk.

Fields§

§stat: Stat

The filesystem stat information for the file on disk.

§id: ObjectId

The object id for this entry’s ODB representation (assuming it’s up-to-date with it).

§flags: Flags

Additional flags for use in algorithms and for efficiently storing stage information.

§mode: Mode

The kind of item this entry represents - it’s not all blobs in the index anymore.

Implementations§

source§

impl Entry

Serialize ourselves to out with path access via state, without padding.

source§

impl Entry

Return an entry’s path, relative to the repository, which is extracted from its owning state.

Return an entry’s path using the given backing.

Return an entry’s stage.

source§

impl Entry

Compare one entry to another by their path, by comparing only their common path portion byte by byte, then resorting to entry length and stage.

Compare one entry to another by their path, by comparing only their common path portion byte by byte, then resorting to entry length.

Trait Implementations§

source§

impl Clone for Entry

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
source§

impl Debug for Entry

Formats the value using the given formatter. Read more
source§

impl PartialEq<Entry> for Entry

This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for Entry

source§

impl StructuralEq for Entry

source§

impl StructuralPartialEq for Entry

Auto Trait Implementations§

§

impl RefUnwindSafe for Entry

§

impl Send for Entry

§

impl Sync for Entry

§

impl Unpin for Entry

§

impl UnwindSafe for Entry

Blanket Implementations§

source§

impl<T> Any for Twhere
    T: 'static + ?Sized,

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere
    T: ?Sized,

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere
    T: ?Sized,

Mutably borrows from an owned value. Read more
§

impl<Q, K> Equivalent<K> for Qwhere
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized,

Checks if this value is equivalent to the given key. Read more
source§

impl<T> From<T> for T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere
    U: From<T>,

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

Should always be Self
source§

impl<T> ToOwned for Twhere
    T: Clone,

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere
    U: Into<T>,

The type returned in the event of a conversion error.
Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere
    U: TryFrom<T>,

The type returned in the event of a conversion error.
Performs the conversion.