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