pub struct BranchProtectionDefaultsBuilder { /* private fields */ }Expand description
Builder for BranchProtectionDefaults.
Implementations§
Source§impl BranchProtectionDefaultsBuilder
impl BranchProtectionDefaultsBuilder
Sourcepub fn allow_force_push(&mut self, value: bool) -> &mut Self
pub fn allow_force_push(&mut self, value: bool) -> &mut Self
Whether force pushes are allowed or not.
Sourcepub fn developer_can_initial_push(&mut self, value: bool) -> &mut Self
pub fn developer_can_initial_push(&mut self, value: bool) -> &mut Self
Whether developers can create branches or not.
Sourcepub fn build(
&self,
) -> Result<BranchProtectionDefaults, BranchProtectionDefaultsBuilderError>
pub fn build( &self, ) -> Result<BranchProtectionDefaults, BranchProtectionDefaultsBuilderError>
Source§impl BranchProtectionDefaultsBuilder
impl BranchProtectionDefaultsBuilder
Sourcepub fn allowed_to_push(
&mut self,
allowed: BranchProtectionAccessLevel,
) -> &mut Self
pub fn allowed_to_push( &mut self, allowed: BranchProtectionAccessLevel, ) -> &mut Self
Add an access level allowed to push.
Sourcepub fn not_allowed_to_push(
&mut self,
disallowed: BranchProtectionAccessLevel,
) -> &mut Self
pub fn not_allowed_to_push( &mut self, disallowed: BranchProtectionAccessLevel, ) -> &mut Self
Remove an access level allowed to push.
Sourcepub fn allowed_to_merge(
&mut self,
allowed: BranchProtectionAccessLevel,
) -> &mut Self
pub fn allowed_to_merge( &mut self, allowed: BranchProtectionAccessLevel, ) -> &mut Self
Add an access level allowed to merge.
Sourcepub fn not_allowed_to_merge(
&mut self,
disallowed: BranchProtectionAccessLevel,
) -> &mut Self
pub fn not_allowed_to_merge( &mut self, disallowed: BranchProtectionAccessLevel, ) -> &mut Self
Remove an access level allowed to merge.
Trait Implementations§
Source§impl Clone for BranchProtectionDefaultsBuilder
impl Clone for BranchProtectionDefaultsBuilder
Source§fn clone(&self) -> BranchProtectionDefaultsBuilder
fn clone(&self) -> BranchProtectionDefaultsBuilder
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 Freeze for BranchProtectionDefaultsBuilder
impl RefUnwindSafe for BranchProtectionDefaultsBuilder
impl Send for BranchProtectionDefaultsBuilder
impl Sync for BranchProtectionDefaultsBuilder
impl Unpin for BranchProtectionDefaultsBuilder
impl UnwindSafe for BranchProtectionDefaultsBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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