pub struct ConvcoMessage {
pub type: String,
pub scope: Option<String>,
pub is_breaking: bool,
pub desc: String,
pub body: Option<String>,
pub footer: Option<IndexMap<String, String>>,
}
Expand description
Conventional commit message
Fields§
§type: String
Commit type
scope: Option<String>
Commit scope
is_breaking: bool
Indicates that this is a breaking change (!)
desc: String
Commit description
body: Option<String>
Commit body
Footer
A footer must be a list of key: value pairs following the git trailer convention
Implementations§
Source§impl ConvcoMessage
impl ConvcoMessage
Sourcepub fn add_breaking_change(&mut self, desc: &str) -> &mut ConvcoMessage
pub fn add_breaking_change(&mut self, desc: &str) -> &mut ConvcoMessage
Sets a breaking change
Inserts a footer note
Sourcepub fn is_breaking_change(&self) -> bool
pub fn is_breaking_change(&self) -> bool
Checks if the message has a breaking change
Trait Implementations§
Source§impl Clone for ConvcoMessage
impl Clone for ConvcoMessage
Source§fn clone(&self) -> ConvcoMessage
fn clone(&self) -> ConvcoMessage
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl ConvcoMessageExt for ConvcoMessage
impl ConvcoMessageExt for ConvcoMessage
Source§fn version_incr_kind(&self, cfg: &VersioningConfig) -> VersionIncr
fn version_incr_kind(&self, cfg: &VersioningConfig) -> VersionIncr
Determines the kin of version increment for a conventional message
Source§impl Debug for ConvcoMessage
impl Debug for ConvcoMessage
Source§impl Default for ConvcoMessage
impl Default for ConvcoMessage
Source§fn default() -> ConvcoMessage
fn default() -> ConvcoMessage
Returns the “default value” for a type. Read more
Source§impl Display for ConvcoMessage
impl Display for ConvcoMessage
Source§impl FromStr for ConvcoMessage
impl FromStr for ConvcoMessage
Source§type Err = ConvcoError
type Err = ConvcoError
The associated error which can be returned from parsing.
Source§fn from_str(s: &str) -> Result<ConvcoMessage, <ConvcoMessage as FromStr>::Err>
fn from_str(s: &str) -> Result<ConvcoMessage, <ConvcoMessage as FromStr>::Err>
Parses a string
s
to return a value of this type. Read moreAuto Trait Implementations§
impl Freeze for ConvcoMessage
impl RefUnwindSafe for ConvcoMessage
impl Send for ConvcoMessage
impl Sync for ConvcoMessage
impl Unpin for ConvcoMessage
impl UnwindSafe for ConvcoMessage
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more