Struct gitcc_core::ConvcoMessage
source · 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, RandomState>>,
}
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
§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 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