Struct git_commitgraph::file::commit::Commit[][src]

pub struct Commit<'a> { /* fields omitted */ }

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]

Returns an iterator over the parent positions for lookup in the owning Graph.

pub fn id(&self) -> Id<'a>[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) -> Id<'a>[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>[src]

impl<'a> Send for Commit<'a>[src]

impl<'a> Sync for Commit<'a>[src]

impl<'a> Unpin for Commit<'a>[src]

impl<'a> UnwindSafe for Commit<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.