[][src]Struct gitlab::api::projects::protected_branches::ProtectBranchBuilder

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

Builder for ProtectBranch.

Implementations

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

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

The project to protect a branch within.

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

The name or glob of the branch to protect.

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

The minimum access level required to push to the branch.

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

The minimum access level required to merge into the branch.

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

The minimum access level required to unprotect the branch.

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

Whether code owner approval is required to merge.

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

Builds a new ProtectBranch.

Errors

If a required field has not been initialized.

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

pub fn allowed_to_push(&mut self, access: ProtectedAccess) -> &mut Self[src]

Add access to push to the branch.

pub fn allowed_to_merge(&mut self, access: ProtectedAccess) -> &mut Self[src]

Add access to merge into the branch.

pub fn allowed_to_unprotect(&mut self, access: ProtectedAccess) -> &mut Self[src]

Add access to unprotect the branch.

Trait Implementations

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

impl<'a> Default for ProtectBranchBuilder<'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.