pub struct IndexEntry {}Expand description
A single entry in the Git index.
Fields§
§ctime_sec: u32Time the file metadata last changed (seconds since epoch).
ctime_nsec: u32Nanosecond fraction of ctime_sec.
mtime_sec: u32Time the file data last changed (seconds since epoch).
mtime_nsec: u32Nanosecond fraction of mtime_sec.
dev: u32Device number.
ino: u32Inode number.
mode: u32Unix file mode (MODE_REGULAR, MODE_EXECUTABLE, MODE_SYMLINK, …).
uid: u32Owner UID.
gid: u32Owner GID.
size: u32File size in bytes (truncated to 32 bits).
oid: ObjectIdSHA-1 of the blob object.
flags: u16Entry flags (stage, assume-valid, extended, …).
flags_extended: Option<u16>Extended flags (v3+ only).
path: Vec<u8>Path relative to the repository root. May contain / separators.
Implementations§
Source§impl IndexEntry
impl IndexEntry
Sourcepub fn assume_unchanged(&self) -> bool
pub fn assume_unchanged(&self) -> bool
Whether the assume-unchanged bit is set.
Sourcepub fn skip_worktree(&self) -> bool
pub fn skip_worktree(&self) -> bool
Whether the skip-worktree bit is set (extended flags, v3+).
Sourcepub fn set_assume_unchanged(&mut self, value: bool)
pub fn set_assume_unchanged(&mut self, value: bool)
Set the assume-unchanged bit.
Sourcepub fn set_skip_worktree(&mut self, value: bool)
pub fn set_skip_worktree(&mut self, value: bool)
Set the skip-worktree bit (promotes entry to v3).
Trait Implementations§
Source§impl Clone for IndexEntry
impl Clone for IndexEntry
Source§fn clone(&self) -> IndexEntry
fn clone(&self) -> IndexEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IndexEntry
impl Debug for IndexEntry
Source§impl PartialEq for IndexEntry
impl PartialEq for IndexEntry
impl Eq for IndexEntry
impl StructuralPartialEq for IndexEntry
Auto Trait Implementations§
impl Freeze for IndexEntry
impl RefUnwindSafe for IndexEntry
impl Send for IndexEntry
impl Sync for IndexEntry
impl Unpin for IndexEntry
impl UnsafeUnpin for IndexEntry
impl UnwindSafe for IndexEntry
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
Mutably borrows from an owned value. Read more