Struct git_cliff_core::commit::Commit  
source · pub struct Commit<'a> {
    pub id: String,
    pub message: String,
    pub conv: Option<Commit<'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: StringCommit ID.
message: StringCommit message including title, description and summary.
conv: Option<Commit<'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
Commit author.
committer: SignatureCommitter.
Implementations§
source§impl Commit<'_>
 
impl Commit<'_>
sourcepub fn process(&self, config: &GitConfig) -> Result<Self>
 
pub fn process(&self, config: &GitConfig) -> Result<Self>
Processes the commit.
- converts commit to a conventional commit
- sets the group for the commit
- extacts links and generates URLs
sourcepub fn into_conventional(self) -> Result<Self>
 
pub fn into_conventional(self) -> Result<Self>
Returns the commit with its conventional type set.
sourcepub fn preprocess(self, preprocessors: &[TextProcessor]) -> Result<Self>
 
pub fn preprocess(self, preprocessors: &[TextProcessor]) -> Result<Self>
Preprocesses the commit using [CommitPreprocessor]s.
Modifies the commit message using regex or custom OS command.
sourcepub fn parse(
    self,
    parsers: &[CommitParser],
    protect_breaking: bool,
    filter: bool
) -> Result<Self>
 
pub fn parse( self, parsers: &[CommitParser], protect_breaking: bool, filter: bool ) -> Result<Self>
Parses the commit using CommitParsers.
sourcepub fn parse_links(self, parsers: &[LinkParser]) -> Result<Self>
 
pub fn parse_links(self, parsers: &[LinkParser]) -> Result<Self>
Parses the commit using LinkParsers.
Sets the links of the commit.
Trait Implementations§
source§impl<'de, 'a> Deserialize<'de> for Commit<'a>
 
impl<'de, 'a> Deserialize<'de> for Commit<'a>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a> PartialEq<Commit<'a>> for Commit<'a>
 
impl<'a> PartialEq<Commit<'a>> for Commit<'a>
impl<'a> StructuralPartialEq for Commit<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Commit<'a>
impl<'a> Send for Commit<'a>
impl<'a> Sync for Commit<'a>
impl<'a> Unpin for Commit<'a>
impl<'a> UnwindSafe for Commit<'a>
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