Struct git_commitgraph::file::commit::Commit [−][src]
A commit as stored in a File
.
Implementations
impl<'a> Commit<'a>
[src]
pub fn committer_timestamp(&self) -> u64
[src]
Returns the committer timestamp of this commit.
The value is the number of seconds since 1970-01-01 00:00:00 UTC.
pub fn generation(&self) -> u32
[src]
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.
pub fn iter_parents(
&'a self
) -> impl Iterator<Item = Result<Position, Error>> + 'a
[src]
&'a self
) -> impl Iterator<Item = Result<Position, Error>> + 'a
Returns an iterator over the parent positions for lookup in the owning Graph.
pub fn id(&self) -> &'a oid
[src]
Returns the hash of this commit.
pub fn parent1(&self) -> Result<Option<Position>, Error>
[src]
Returns the first parent of this commit.
pub fn position(&self) -> Position
[src]
Returns the position at which this commit is stored in the parent File.
pub fn root_tree_id(&self) -> &oid
[src]
Return the hash of the tree this commit points to.
Trait Implementations
impl<'a> Debug for Commit<'a>
[src]
impl<'a> Eq for Commit<'a>
[src]
impl<'a> PartialEq<Commit<'a>> for Commit<'a>
[src]
Auto Trait Implementations
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,