pub struct RepoCommit {
pub hash: String,
pub author_name: String,
pub author_email: String,
pub author_date: String,
pub message: String,
}Expand description
Represents a commit in the Git repository
§Examples
use git::repo::RepoCommit;
let commit = RepoCommit {
hash: "abcdef123456".to_string(),
author_name: "John Doe".to_string(),
author_email: "john@example.com".to_string(),
author_date: "Wed, 01 Jan 2023 12:00:00 +0000".to_string(),
message: "feat: add new feature".to_string(),
};
println!("{}: {} ({})", commit.hash, commit.message, commit.author_name);Fields§
§hash: StringThe commit hash (SHA)
The name of the commit author
The email of the commit author
The date of the commit in RFC2822 format
message: StringThe commit message
Trait Implementations§
Source§impl Clone for RepoCommit
impl Clone for RepoCommit
Source§fn clone(&self) -> RepoCommit
fn clone(&self) -> RepoCommit
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 RepoCommit
impl RefUnwindSafe for RepoCommit
impl Send for RepoCommit
impl Sync for RepoCommit
impl Unpin for RepoCommit
impl UnwindSafe for RepoCommit
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