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
impl Entry
sourcepub fn path<'a>(&self, state: &'a State) -> &'a BStr
pub fn path<'a>(&self, state: &'a State) -> &'a BStr
Return an entry’s path, relative to the repository, which is extracted from its owning state
.
sourcepub fn path_in<'backing>(
&self,
backing: &'backing PathStorageRef,
) -> &'backing BStr
pub fn path_in<'backing>( &self, backing: &'backing PathStorageRef, ) -> &'backing BStr
Return an entry’s path using the given backing
.
sourcepub fn stage(&self) -> Stage
pub fn stage(&self) -> Stage
Return an entry’s stage. See entry::Stage for possible values.
source§impl Entry
impl Entry
sourcepub fn cmp(&self, other: &Self, state: &State) -> Ordering
pub fn cmp(&self, other: &Self, state: &State) -> Ordering
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
pub fn cmp_filepaths(a: &BStr, b: &BStr) -> Ordering
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 PartialEq for Entry
impl PartialEq for Entry
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)