pub struct CommitInfo { /* private fields */ }Expand description
Commit metadata.
Implementations§
Source§impl CommitInfo
impl CommitInfo
Sourcepub fn new(
oid: String,
message: String,
message_full: String,
author: String,
date: i64,
) -> Self
pub fn new( oid: String, message: String, message_full: String, author: String, date: i64, ) -> Self
Creates a new CommitInfo instance.
Primarily for testing and manual construction. Production code should use list_commits() or get_last_commits_batch() to retrieve commit data.
§Arguments
oid: Full commit hashmessage: First line of commit messagemessage_full: Full commit message (includes body)author: Author namedate: Commit timestamp (Unix seconds)
§Returns
A new CommitInfo instance with derived fields (short OID, committer).
Author name.
Author email.
Sourcepub fn message_full(&self) -> &str
pub fn message_full(&self) -> &str
Full commit message.
Co-authors from commit message trailers.
Trait Implementations§
Source§impl Clone for CommitInfo
impl Clone for CommitInfo
Source§fn clone(&self) -> CommitInfo
fn clone(&self) -> CommitInfo
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 moreAuto Trait Implementations§
impl Freeze for CommitInfo
impl RefUnwindSafe for CommitInfo
impl Send for CommitInfo
impl Sync for CommitInfo
impl Unpin for CommitInfo
impl UnwindSafe for CommitInfo
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