pub struct Commit<'a> {
    pub id: String,
    pub message: String,
    pub conv: Option<ConventionalCommit<'a>>,
    pub group: Option<String>,
    pub default_scope: Option<String>,
    pub scope: Option<String>,
    pub links: Vec<Link>,
    pub author: Signature,
    pub committer: Signature,
}
Expand description

Common commit object that is parsed from a repository.

Fields§

§id: String

Commit ID.

§message: String

Commit message including title, description and summary.

§conv: Option<ConventionalCommit<'a>>

Conventional commit.

§group: Option<String>

Commit group based on a commit parser or its conventional type.

§default_scope: Option<String>

Default commit scope based on (inherited from) conventional type or a commit parser.

§scope: Option<String>

Commit scope for overriding the default one.

§links: Vec<Link>

A list of links found in the commit

§author: Signature

Commit author.

§committer: Signature

Committer.

Implementations§

Constructs a new instance.

Processes the commit.

  • converts commit to a conventional commit
  • sets the group for the commit
  • extacts links and generates URLs

Returns the commit with its conventional type set.

Preprocesses the commit using CommitPreprocessors.

Modifies the commit message using regex or custom OS command.

Parses the commit using CommitParsers.

Sets the group and scope of the commit.

Parses the commit using LinkParsers.

Sets the links of the commit.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Serialize this value into the given Serde serializer. 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.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.