pub struct Commit {
pub tree: ObjectId,
pub parents: SmallVec<[ObjectId; 1]>,
pub author: Signature,
pub committer: Signature,
pub encoding: Option<BString>,
pub message: BString,
pub extra_headers: Vec<(BString, BString)>,
}Available on crate feature
excludes only.Expand description
A mutable git commit, representing an annotated state of a working tree along with a reference to its historical commits.
Fields§
§tree: ObjectIdThe hash of recorded working tree state.
parents: SmallVec<[ObjectId; 1]>Hash of each parent commit. Empty for the first commit in repository.
Who wrote this commit.
committer: SignatureWho committed this commit.
This may be different from the author in case the author couldn’t write to the repository themselves and
is commonly encountered with contributed commits.
encoding: Option<BString>The name of the message encoding, otherwise UTF-8 should be assumed.
message: BStringThe commit message documenting the change.
extra_headers: Vec<(BString, BString)>Extra header fields, in order of them being encountered, made accessible with the iterator returned
by extra_headers().
Implementations§
Source§impl Commit
impl Commit
Sourcepub fn extra_headers(
&self,
) -> ExtraHeaders<impl Iterator<Item = (&BStr, &BStr)>>
pub fn extra_headers( &self, ) -> ExtraHeaders<impl Iterator<Item = (&BStr, &BStr)>>
Returns a convenient iterator over all extra headers.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Commit
impl<'de> Deserialize<'de> for Commit
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Commit, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Commit, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Commit
impl Ord for Commit
Source§impl PartialOrd for Commit
impl PartialOrd for Commit
Source§impl Serialize for Commit
impl Serialize for Commit
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl WriteTo for Commit
impl WriteTo for Commit
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 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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.