Struct nextsv_lib::VersionTag
source · [−]pub struct VersionTag { /* private fields */ }Expand description
Describes a tag
Implementations
sourceimpl VersionTag
impl VersionTag
sourcepub fn feat_commits(&self) -> u32
pub fn feat_commits(&self) -> u32
The count of feature commits in the conventional commits field If the conventional commits field has not been set returns 0
sourcepub fn fix_commits(&self) -> u32
pub fn fix_commits(&self) -> u32
The count of fix commits in the conventional commits field If the conventional commits field has not been set returns 0
sourcepub fn docs_commits(&self) -> u32
pub fn docs_commits(&self) -> u32
The count of docs commits in the conventional commits field If the conventional commits field has not been set returns 0
sourcepub fn chore_commits(&self) -> u32
pub fn chore_commits(&self) -> u32
The count of chore commits in the conventional commits field If the conventional commits field has not been set returns 0
sourcepub fn refactor_commits(&self) -> u32
pub fn refactor_commits(&self) -> u32
The count of refactor commits in the conventional commits field If the conventional commits field has not been set returns 0
sourcepub fn breaking(&self) -> bool
pub fn breaking(&self) -> bool
The breaking flag in the conventional commits field If the conventional commits field has not been set returns false
sourcepub fn latest(version_prefix: &str) -> Result<Self, Error>
pub fn latest(version_prefix: &str) -> Result<Self, Error>
The latest semantic version tag (vx.y.z)
sourcepub fn force_major(&mut self) -> Self
pub fn force_major(&mut self) -> Self
Construct conventional commits that forces Major update
sourcepub fn force_minor(&mut self) -> Self
pub fn force_minor(&mut self) -> Self
Construct conventional commits that forces Minor update
sourcepub fn force_patch(&mut self) -> Self
pub fn force_patch(&mut self) -> Self
Construct conventional commits that forces Patch update
sourcepub fn promote_first(&mut self) -> Result<Self, Error>
pub fn promote_first(&mut self) -> Result<Self, Error>
Promote the first production version (1.0.0)
sourcepub fn commits(self) -> Result<Self, Error>
pub fn commits(self) -> Result<Self, Error>
The number of conventional commits created since the tag was created
pub fn next_version(&mut self) -> Semantic
pub fn next_level(&mut self) -> Result<Level, Error>
pub fn bump_level(&self) -> Option<Level>
Trait Implementations
sourceimpl Clone for VersionTag
impl Clone for VersionTag
sourcefn clone(&self) -> VersionTag
fn clone(&self) -> VersionTag
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for VersionTag
impl Debug for VersionTag
sourceimpl Ord for VersionTag
impl Ord for VersionTag
sourcefn cmp(&self, other: &VersionTag) -> Ordering
fn cmp(&self, other: &VersionTag) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<VersionTag> for VersionTag
impl PartialEq<VersionTag> for VersionTag
sourcefn eq(&self, other: &VersionTag) -> bool
fn eq(&self, other: &VersionTag) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &VersionTag) -> bool
fn ne(&self, other: &VersionTag) -> bool
This method tests for !=.
sourceimpl PartialOrd<VersionTag> for VersionTag
impl PartialOrd<VersionTag> for VersionTag
sourcefn partial_cmp(&self, other: &VersionTag) -> Option<Ordering>
fn partial_cmp(&self, other: &VersionTag) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Eq for VersionTag
impl StructuralEq for VersionTag
impl StructuralPartialEq for VersionTag
Auto Trait Implementations
impl RefUnwindSafe for VersionTag
impl Send for VersionTag
impl Sync for VersionTag
impl Unpin for VersionTag
impl UnwindSafe for VersionTag
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more