pub struct EditProjectPushRuleBuilder<'a> { /* private fields */ }
Expand description

Builder for EditProjectPushRule.

Implementations§

source§

impl<'a> EditProjectPushRuleBuilder<'a>

source

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

The project to get.

source

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

Ensure commit messages match a given regular expression.

source

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

Ensure commit messages do not match a given regular expression.

source

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

Restrict branch names to a given regular expression.

source

pub fn deny_delete_tag(&mut self, value: bool) -> &mut Self

Do not allow users to delete a tag via git push.

Users can still delete via the UI.

source

pub fn member_check(&mut self, value: bool) -> &mut Self

Restrict commits by author (email) to existing GitLab users.

source

pub fn prevent_secrets(&mut self, value: bool) -> &mut Self

Reject commits with secrets.

See GitLab docs for more details.

source

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

Require commiter email addresses match a given regular expression.

source

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

Reject files that match a given regular expression.

source

pub fn max_file_size(&mut self, value: u64) -> &mut Self

Set the maximum size of a file (in megabytes).

source

pub fn commit_committer_check(&mut self, value: bool) -> &mut Self

Users can only push commits to this repository if the committer email is one of their own verified emails.

source

pub fn commit_committer_name_check(&mut self, value: bool) -> &mut Self

Enforce commit metadata name consistency.

If set, users can only push commits to the repository if the commit author name is consistent with their account.

source

pub fn reject_unsigned_commits(&mut self, value: bool) -> &mut Self

Reject commits that are not signed with a GPG key.

source

pub fn build( &self ) -> Result<EditProjectPushRule<'a>, EditProjectPushRuleBuilderError>

Builds a new EditProjectPushRule.

§Errors

If a required field has not been initialized.

Trait Implementations§

source§

impl<'a> Clone for EditProjectPushRuleBuilder<'a>

source§

fn clone(&self) -> EditProjectPushRuleBuilder<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Default for EditProjectPushRuleBuilder<'a>

source§

fn default() -> Self

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

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

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

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more