pub struct Commit {
pub parents: Vec<CommitId>,
pub predecessors: Vec<CommitId>,
pub root_tree: Merge<TreeId>,
pub conflict_labels: Merge<String>,
pub change_id: ChangeId,
pub description: String,
pub author: Signature,
pub committer: Signature,
pub secure_sig: Option<SecureSig>,
}Expand description
Represents a commit object, which contains a reference to the contents a that point in time, along with metadata about the commit.
Fields§
§parents: Vec<CommitId>The parent commits of this commit. Commits typically have one parents, but they can have any number of parents. Only the root commit has no parents.
predecessors: Vec<CommitId>The predecessor commits of this commit, i.e. commits that were rewritten to create this commit.
root_tree: Merge<TreeId>The tree at the root directory in this commit.
conflict_labels: Merge<String>If resolved, must be empty string. Otherwise, must have same number of
terms as root_tree.
change_id: ChangeIdThe change ID of this commit. This is a stable identifier that follows the commit when it’s rewritten.
description: StringThe description (commit message).
The person/entity that authored this commit.
committer: SignatureThe person/entity that committed this commit.
secure_sig: Option<SecureSig>A cryptographic signature of this commit.
Trait Implementations§
Source§impl ContentHash for Commit
impl ContentHash for Commit
Source§fn hash(&self, state: &mut impl DigestUpdate)
fn hash(&self, state: &mut impl DigestUpdate)
impl Eq for Commit
impl StructuralPartialEq for Commit
Auto Trait Implementations§
impl Freeze for Commit
impl RefUnwindSafe for Commit
impl Send for Commit
impl Sync for Commit
impl Unpin for Commit
impl UnsafeUnpin for Commit
impl UnwindSafe for Commit
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more