pub struct Commit<'a> { /* private fields */ }
Expand description
A commit as stored in a File
.
Implementations§
source§impl<'a> Commit<'a>
impl<'a> Commit<'a>
sourcepub fn committer_timestamp(&self) -> u64
pub fn committer_timestamp(&self) -> u64
Returns the committer timestamp of this commit.
The value is the number of seconds since 1970-01-01 00:00:00 UTC.
sourcepub fn generation(&self) -> u32
pub fn generation(&self) -> u32
Returns the generation number of this commit.
Commits without parents have generation number 1. Commits with parents have a generation number that is the max of their parents’ generation numbers + 1.
sourcepub fn iter_parents(self) -> Parents<'a> ⓘ
pub fn iter_parents(self) -> Parents<'a> ⓘ
Returns an iterator over the parent positions for lookup in the owning Graph.
sourcepub fn parent1(&self) -> Result<Option<Position>, Error>
pub fn parent1(&self) -> Result<Option<Position>, Error>
Returns the first parent of this commit.
sourcepub fn position(&self) -> Position
pub fn position(&self) -> Position
Returns the position at which this commit is stored in the parent File.
sourcepub fn root_tree_id(&self) -> &oid
pub fn root_tree_id(&self) -> &oid
Return the hash of the tree this commit points to.
Trait Implementations§
impl<'a> Copy for Commit<'a>
impl Eq for Commit<'_>
Auto Trait Implementations§
impl<'a> Freeze for Commit<'a>
impl<'a> RefUnwindSafe for Commit<'a>
impl<'a> Send for Commit<'a>
impl<'a> Sync for Commit<'a>
impl<'a> Unpin for Commit<'a>
impl<'a> UnwindSafe for Commit<'a>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)