Struct gitlab::api::projects::repository::commits::CreateCommitBuilder
source · pub struct CreateCommitBuilder<'a> { /* private fields */ }
Expand description
Builder for CreateCommit
.
Implementations§
source§impl<'a> CreateCommitBuilder<'a>
impl<'a> CreateCommitBuilder<'a>
sourcepub fn project<VALUE: Into<NameOrId<'a>>>(&mut self, value: VALUE) -> &mut Self
pub fn project<VALUE: Into<NameOrId<'a>>>(&mut self, value: VALUE) -> &mut Self
The ID or URL-encoded path of the project
sourcepub fn branch<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self
pub fn branch<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self
Name of the branch to commit into.
To create a new branch, also provide either start_branch
or start_sha
, and (optionally)
start_project
.
sourcepub fn commit_message<VALUE: Into<Cow<'a, str>>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn commit_message<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE ) -> &mut Self
Commit message.
sourcepub fn start_branch<VALUE: Into<Cow<'a, str>>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn start_branch<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE ) -> &mut Self
Name of the branch to start the new branch from.
sourcepub fn start_sha<VALUE: Into<Cow<'a, str>>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn start_sha<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE ) -> &mut Self
SHA of the commit to start the new branch from.
sourcepub fn start_project<VALUE: Into<NameOrId<'a>>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn start_project<VALUE: Into<NameOrId<'a>>>( &mut self, value: VALUE ) -> &mut Self
The project path or ID of the project to start the new branch from.
Defaults to the value of project
.
Specify the commit author’s email address.
Specify the commit author’s name.
sourcepub fn force(&mut self, value: bool) -> &mut Self
pub fn force(&mut self, value: bool) -> &mut Self
When true
, overwrites the target branch with a new commit based on the start_branch
or
start_sha
.
sourcepub fn build(&self) -> Result<CreateCommit<'a>, CreateCommitBuilderError>
pub fn build(&self) -> Result<CreateCommit<'a>, CreateCommitBuilderError>
source§impl<'a> CreateCommitBuilder<'a>
impl<'a> CreateCommitBuilder<'a>
sourcepub fn action(&mut self, action: CommitAction<'a>) -> &mut Self
pub fn action(&mut self, action: CommitAction<'a>) -> &mut Self
Add an action.
sourcepub fn actions<I>(&mut self, iter: I) -> &mut Selfwhere
I: IntoIterator<Item = CommitAction<'a>>,
pub fn actions<I>(&mut self, iter: I) -> &mut Selfwhere
I: IntoIterator<Item = CommitAction<'a>>,
Add multiple actions.
Trait Implementations§
source§impl<'a> Clone for CreateCommitBuilder<'a>
impl<'a> Clone for CreateCommitBuilder<'a>
source§fn clone(&self) -> CreateCommitBuilder<'a>
fn clone(&self) -> CreateCommitBuilder<'a>
Returns a copy 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<'a> Freeze for CreateCommitBuilder<'a>
impl<'a> RefUnwindSafe for CreateCommitBuilder<'a>
impl<'a> Send for CreateCommitBuilder<'a>
impl<'a> Sync for CreateCommitBuilder<'a>
impl<'a> Unpin for CreateCommitBuilder<'a>
impl<'a> UnwindSafe for CreateCommitBuilder<'a>
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