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

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 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 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]

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

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.

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.