pub struct Entry {
pub stat: Stat,
pub id: ObjectId,
pub flags: Flags,
pub mode: Mode,
/* private fields */
}index only.Expand description
An entry in the index, identifying a non-tree item on disk.
Fields§
§stat: StatThe filesystem stat information for the file on disk.
id: ObjectIdThe object id for this entry’s ODB representation (assuming it’s up-to-date with it).
flags: FlagsAdditional flags for use in algorithms and for efficiently storing stage information.
mode: ModeThe kind of item this entry represents - it’s not all blobs in the index anymore.
Implementations§
Source§impl Entry
impl Entry
Sourcepub fn path<'a>(&self, state: &'a State) -> &'a BStr
Available on crate feature excludes only.
pub fn path<'a>(&self, state: &'a State) -> &'a BStr
excludes only.Return an entry’s path, relative to the repository, which is extracted from its owning state.
Sourcepub fn path_in<'backing>(&self, backing: &'backing [u8]) -> &'backing BStr
Available on crate feature excludes only.
pub fn path_in<'backing>(&self, backing: &'backing [u8]) -> &'backing BStr
excludes only.Return an entry’s path using the given backing.
Sourcepub fn stage(&self) -> Stage
Available on crate feature excludes only.
pub fn stage(&self) -> Stage
excludes only.Return an entry’s stage. See entry::Stage for possible values.
Source§impl Entry
impl Entry
Sourcepub fn cmp(&self, other: &Entry, state: &State) -> Ordering
Available on crate feature excludes only.
pub fn cmp(&self, other: &Entry, state: &State) -> Ordering
excludes only.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.
Sourcepub fn cmp_filepaths(a: &BStr, b: &BStr) -> Ordering
Available on crate feature excludes only.
pub fn cmp_filepaths(a: &BStr, b: &BStr) -> Ordering
excludes only.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§
impl Eq for Entry
impl StructuralPartialEq for Entry
Auto Trait Implementations§
impl Freeze for Entry
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> 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.