pub enum Either<'buf, 'cache> {
CommitRefIter(CommitRefIter<'buf>),
CachedCommit(Commit<'cache>),
}
Expand description
Information about a commit that can be obtained either from a gix_object::CommitRefIter
or
a gix_commitgraph::file::Commit
.
Variants§
CommitRefIter(CommitRefIter<'buf>)
CachedCommit(Commit<'cache>)
Implementations§
Source§impl Either<'_, '_>
impl Either<'_, '_>
Sourcepub fn tree_id(self) -> Result<ObjectId, Error>
pub fn tree_id(self) -> Result<ObjectId, Error>
Get a commit’s tree_id
by either getting it from a gix_commitgraph::Graph
, if
present, or a gix_object::CommitRefIter
otherwise.
Sourcepub fn commit_time(self) -> Result<SecondsSinceUnixEpoch, Error>
pub fn commit_time(self) -> Result<SecondsSinceUnixEpoch, Error>
Get a committer timestamp by either getting it from a gix_commitgraph::Graph
, if
present, or a gix_object::CommitRefIter
otherwise.
Trait Implementations§
impl<'buf, 'cache> Copy for Either<'buf, 'cache>
Auto Trait Implementations§
impl<'buf, 'cache> Freeze for Either<'buf, 'cache>
impl<'buf, 'cache> RefUnwindSafe for Either<'buf, 'cache>
impl<'buf, 'cache> Send for Either<'buf, 'cache>
impl<'buf, 'cache> Sync for Either<'buf, 'cache>
impl<'buf, 'cache> Unpin for Either<'buf, 'cache>
impl<'buf, 'cache> UnwindSafe for Either<'buf, 'cache>
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