pub struct CommitSubjectBuilder { /* private fields */ }
Expand description

Builder for CommitSubject.

Implementations

The minimum length allowed for the summary line.

Configuration: Optional Default: 8

The maximum length allowed for the summary line.

Configuration: Optional Default: 78

Whether to deny work-in-progress commits or not.

Commit messages which mention WIP, wip, or a few variants of Draft at the beginning of their commit messages are rejected since they are (nominally) incomplete.

Configuration: Optional Default: true

Check for rebase commands

Rebase commands include commits which begin with fixup! , squash! , or amend! . These subjects are used to indicate that the commit belongs somewhere else in the branch and should be completed before merging.

Configuration: Optional Default: true

Check for suggestions applied through a hosting facility

Some hosting services support applying suggestions for changes to a topic as a new commit. Enabling this option detects these subjects and rejects the commit as the code suggestion should be squashed back into the relevant commit.

Configuration: Optional Default: false

Builds a new CommitSubject.

Errors

If a required field has not been initialized.

Tolerated prefixes for commits.

The specified prefix patterns will be tolerated regardless of any configured allowed or disallowed prefixes.

Configuration: Optional Default: Vec::new()

Required prefixes for commits.

The specified prefixes will be the only allowed prefixes on commit message subjects that do not match a tolerated pattern.

Configuration: Optional Default: Vec::new()

Forbidden prefixes for commits.

The specified prefixes will be rejected on commit message subjects that do not also match a tolerated pattern.

Configuration: Optional Default: Vec::new()

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

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

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

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.