Struct gitlab::api::projects::merge_requests::CreateMergeRequestBuilder[][src]

pub struct CreateMergeRequestBuilder<'a> { /* fields omitted */ }

Builder for CreateMergeRequest.

Implementations

impl<'a> CreateMergeRequestBuilder<'a>[src]

pub fn project<VALUE: Into<NameOrId<'a>>>(&mut self, value: VALUE) -> &mut Self[src]

The project to open the merge requset from.

pub fn source_branch<VALUE: Into<Cow<'a, str>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

The name of the source branch for the merge request.

pub fn target_branch<VALUE: Into<Cow<'a, str>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

The name of the target branch for the merge request.

pub fn title<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self[src]

The title for the merge request.

pub fn description<VALUE: Into<Cow<'a, str>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

The description of the merge request.

pub fn target_project_id(&mut self, value: u64) -> &mut Self[src]

The ID of the target project for the merge request.

pub fn milestone_id(&mut self, value: u64) -> &mut Self[src]

The ID of the milestone to add the merge request to.

pub fn approvals_before_merge(&mut self, value: u64) -> &mut Self[src]

How many approvals are required before merging will be allowed.

Note that this must be more than the project limit (if present).

pub fn remove_source_branch(&mut self, value: bool) -> &mut Self[src]

Whether to remove the source branch once merged or not.

pub fn allow_collaboration(&mut self, value: bool) -> &mut Self[src]

Whether to allow collaboration with maintainers of the target project or not.

pub fn squash(&mut self, value: bool) -> &mut Self[src]

Whether to squash the branch when merging or not.

pub fn allow_maintainer_to_push(&mut self, value: bool) -> &mut Self[src]

Whether to allow collaboration with maintainers of the target project or not.

pub fn build(&self) -> Result<CreateMergeRequest<'a>, String>[src]

Builds a new CreateMergeRequest.

Errors

If a required field has not been initialized.

impl<'a> CreateMergeRequestBuilder<'a>[src]

pub fn unassigned(&mut self) -> &mut Self[src]

Filter unassigned merge requests.

pub fn assignee(&mut self, assignee: u64) -> &mut Self[src]

Filter merge requests assigned to a user (by ID).

pub fn assignees<I>(&mut self, iter: I) -> &mut Self where
    I: Iterator<Item = u64>, 
[src]

Filter merge requests assigned to a users (by ID).

pub fn without_reviewer(&mut self) -> &mut Self[src]

Filter merge requests without a reviewer.

pub fn reviewer(&mut self, reviewer: u64) -> &mut Self[src]

Filter merge requests reviewed by a user (by ID).

pub fn reviewers<I>(&mut self, iter: I) -> &mut Self where
    I: Iterator<Item = u64>, 
[src]

Filter merge requests reviewed by users (by ID).

pub fn label<L>(&mut self, label: L) -> &mut Self where
    L: Into<Cow<'a, str>>, 
[src]

Add a label.

pub fn labels<I, L>(&mut self, iter: I) -> &mut Self where
    I: Iterator<Item = L>,
    L: Into<Cow<'a, str>>, 
[src]

Add multiple labels.

Trait Implementations

impl<'a> Clone for CreateMergeRequestBuilder<'a>[src]

fn clone(&self) -> CreateMergeRequestBuilder<'a>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<'a> Default for CreateMergeRequestBuilder<'a>[src]

fn default() -> CreateMergeRequestBuilder<'a>[src]

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.