pub struct CommitInfo<A = CommitAnalysis> {
pub hash: String,
pub author: String,
pub date: DateTime<FixedOffset>,
pub original_message: String,
pub in_main_branches: Vec<String>,
pub analysis: A,
}Expand description
Commit information structure, generic over analysis type.
Fields§
§hash: StringFull SHA-1 hash of the commit.
Commit author name and email address.
date: DateTime<FixedOffset>Commit date in ISO format with timezone.
original_message: StringThe original commit message as written by the author.
in_main_branches: Vec<String>Array of remote main branches that contain this commit.
analysis: AAutomated analysis of the commit including type detection and proposed message.
Implementations§
Source§impl CommitInfo
impl CommitInfo
Sourcepub fn from_git_commit(repo: &Repository, commit: &Commit<'_>) -> Result<Self>
pub fn from_git_commit(repo: &Repository, commit: &Commit<'_>) -> Result<Self>
Creates a CommitInfo from a git2::Commit.
Trait Implementations§
Source§impl<A: Clone> Clone for CommitInfo<A>
impl<A: Clone> Clone for CommitInfo<A>
Source§fn clone(&self) -> CommitInfo<A>
fn clone(&self) -> CommitInfo<A>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<A: Debug> Debug for CommitInfo<A>
impl<A: Debug> Debug for CommitInfo<A>
Source§impl<'de, A> Deserialize<'de> for CommitInfo<A>where
A: Deserialize<'de>,
impl<'de, A> Deserialize<'de> for CommitInfo<A>where
A: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<A> Freeze for CommitInfo<A>where
A: Freeze,
impl<A> RefUnwindSafe for CommitInfo<A>where
A: RefUnwindSafe,
impl<A> Send for CommitInfo<A>where
A: Send,
impl<A> Sync for CommitInfo<A>where
A: Sync,
impl<A> Unpin for CommitInfo<A>where
A: Unpin,
impl<A> UnsafeUnpin for CommitInfo<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for CommitInfo<A>where
A: UnwindSafe,
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