Struct git::testutil::CommitBuilder
source · [−]pub struct CommitBuilder { /* private fields */ }Expand description
Builder for creating a new commit.
Implementations
sourceimpl 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 RefUnwindSafe for CommitBuilder
impl Send for CommitBuilder
impl Sync for CommitBuilder
impl Unpin for CommitBuilder
impl UnwindSafe for CommitBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more