pub(crate) struct Commit {
pub(crate) kind: Option<CommitType>,
pub(crate) description: String,
pub(crate) breaking: bool,
}Expand description
One commit since the baseline of a unit.
Fields§
§kind: Option<CommitType>The type, or None when the subject is not a Conventional Commit.
description: StringThe description, or the whole subject when it does not parse.
breaking: boolWhether the commit marks a breaking change.
Implementations§
Source§impl Commit
impl Commit
Sourcepub(crate) fn from_messages<'a>(
messages: impl IntoIterator<Item = &'a str>,
template: &CommitSubject,
) -> Vec<Self>
pub(crate) fn from_messages<'a>( messages: impl IntoIterator<Item = &'a str>, template: &CommitSubject, ) -> Vec<Self>
Read commit messages, skipping the ones whose subject matches the
proposal template.
Sourcepub(crate) fn parse(message: &str) -> Self
pub(crate) fn parse(message: &str) -> Self
Read one commit message. A body line starting with BREAKING CHANGE:
or BREAKING-CHANGE: marks a breaking change too.
Sourcepub(crate) const fn is_release_worthy(&self) -> bool
pub(crate) const fn is_release_worthy(&self) -> bool
Whether this commit is a feature, a fix or a breaking change.
Trait Implementations§
impl Eq for Commit
impl StructuralPartialEq for Commit
Auto Trait Implementations§
impl Freeze for Commit
impl RefUnwindSafe for Commit
impl Send for Commit
impl Sync for Commit
impl Unpin for Commit
impl UnsafeUnpin for Commit
impl UnwindSafe for Commit
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.