pub struct CommitBuilder { /* private fields */ }
Expand description
Builder for creating a new commit.
Implementations§
Source§impl CommitBuilder
impl CommitBuilder
Sourcepub fn new(hash: &str) -> Self
pub fn new(hash: &str) -> Self
Create a new instance of the builder with the provided hash. The new instance will default
to a committed date of Jan 1, 2021 UTC. All other fields are None
.
Sourcepub fn reference(self, reference: Reference) -> Self
pub fn reference(self, reference: Reference) -> Self
Set the reference, use create::testutil::ReferenceBuilder
to build a Reference
.
Set the author name and related email address.
Set the authored commit time from number of seconds since unix epoch.
Sourcepub fn committer(self, committer: User) -> Self
pub fn committer(self, committer: User) -> Self
Set the committer name and related email address.
Sourcepub fn commit_time(self, time: i64) -> Self
pub fn commit_time(self, time: i64) -> Self
Set the committed commit time from number of seconds since unix epoch.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CommitBuilder
impl RefUnwindSafe for CommitBuilder
impl Send for CommitBuilder
impl Sync for CommitBuilder
impl Unpin for CommitBuilder
impl UnwindSafe for CommitBuilder
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