pub struct CommitBuilder<'repo> { /* private fields */ }
Implementations§
Source§impl CommitBuilder<'_>
impl CommitBuilder<'_>
Sourcepub fn detach(self) -> DetachedCommitBuilder
pub fn detach(self) -> DetachedCommitBuilder
Detaches from &'repo mut
lifetime. The returned builder can be used in
order to obtain a temporary commit object.
pub fn parents(&self) -> &[CommitId]
pub fn set_parents(self, parents: Vec<CommitId>) -> Self
pub fn predecessors(&self) -> &[CommitId]
pub fn set_predecessors(self, predecessors: Vec<CommitId>) -> Self
pub fn tree_id(&self) -> &MergedTreeId
pub fn set_tree_id(self, tree_id: MergedTreeId) -> Self
Sourcepub fn is_empty(&self) -> BackendResult<bool>
pub fn is_empty(&self) -> BackendResult<bool>
Commit::is_empty()
for the new commit.
pub fn change_id(&self) -> &ChangeId
pub fn set_change_id(self, change_id: ChangeId) -> Self
pub fn generate_new_change_id(self) -> Self
pub fn description(&self) -> &str
pub fn set_description(self, description: impl Into<String>) -> Self
pub fn committer(&self) -> &Signature
pub fn set_committer(self, committer: Signature) -> Self
Sourcepub fn is_discardable(&self) -> BackendResult<bool>
pub fn is_discardable(&self) -> BackendResult<bool>
Commit::is_discardable()
for the new commit.
pub fn sign_settings(&self) -> &SignSettings
pub fn set_sign_behavior(self, sign_behavior: SignBehavior) -> Self
pub fn set_sign_key(self, sign_key: String) -> Self
pub fn clear_sign_key(self) -> Self
pub fn write(self) -> BackendResult<Commit>
Sourcepub fn abandon(self)
pub fn abandon(self)
Records the old commit as abandoned instead of writing new commit. This
is noop for the builder created by MutableRepo::new_commit()
.
Auto Trait Implementations§
impl<'repo> Freeze for CommitBuilder<'repo>
impl<'repo> !RefUnwindSafe for CommitBuilder<'repo>
impl<'repo> !Send for CommitBuilder<'repo>
impl<'repo> !Sync for CommitBuilder<'repo>
impl<'repo> Unpin for CommitBuilder<'repo>
impl<'repo> !UnwindSafe for CommitBuilder<'repo>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more