pub struct Entry { /* private fields */ }Expand description
An entry that can be found in a tree.
§Ordering
The ordering of a Entry is first by its entry where
EntryKind::Trees come before EntryKind::Blob. If both kinds
are equal then they are next compared by the lexicographical ordering
of their names.
Implementations§
Source§impl Entry
impl Entry
pub fn name(&self) -> &str
pub fn entry(&self) -> &EntryKind
pub fn is_tree(&self) -> bool
pub fn commit(&self) -> &Commit
pub fn object_id(&self) -> Oid
Sourcepub fn last_commit(&self, repo: &Repository) -> Result<Commit, LastCommitError>
pub fn last_commit(&self, repo: &Repository) -> Result<Commit, LastCommitError>
Returns the commit that last touched this Entry.
Trait Implementations§
Source§impl Ord for Entry
impl Ord for Entry
Source§impl PartialOrd for Entry
impl PartialOrd for Entry
impl Eq 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
Mutably borrows from an owned value. Read more