pub struct SemanticVersion { /* private fields */ }Expand description
Type for semantic versions: major.minor.patch.
Implementations§
Source§impl SemanticVersion
impl SemanticVersion
Sourcepub fn bump_patch(self) -> Self
pub fn bump_patch(self) -> Self
Bump the patch number of a version.
Sourcepub fn bump_minor(self) -> Self
pub fn bump_minor(self) -> Self
Bump the minor number of a version.
Sourcepub fn bump_major(self) -> Self
pub fn bump_major(self) -> Self
Bump the major number of a version.
Trait Implementations§
Source§impl Clone for SemanticVersion
impl Clone for SemanticVersion
Source§fn clone(&self) -> SemanticVersion
fn clone(&self) -> SemanticVersion
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 Debug for SemanticVersion
impl Debug for SemanticVersion
Source§impl Display for SemanticVersion
impl Display for SemanticVersion
Source§impl From<SemanticVersion> for (u32, u32, u32)
impl From<SemanticVersion> for (u32, u32, u32)
Source§fn from(v: SemanticVersion) -> Self
fn from(v: SemanticVersion) -> Self
Converts to this type from the input type.
Source§impl FromStr for SemanticVersion
impl FromStr for SemanticVersion
Source§impl Hash for SemanticVersion
impl Hash for SemanticVersion
Source§impl Ord for SemanticVersion
impl Ord for SemanticVersion
Source§fn cmp(&self, other: &SemanticVersion) -> Ordering
fn cmp(&self, other: &SemanticVersion) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SemanticVersion
impl PartialEq for SemanticVersion
Source§impl PartialOrd for SemanticVersion
impl PartialOrd for SemanticVersion
Source§impl Version for SemanticVersion
impl Version for SemanticVersion
impl Copy for SemanticVersion
impl Eq for SemanticVersion
impl StructuralPartialEq for SemanticVersion
Auto Trait Implementations§
impl Freeze for SemanticVersion
impl RefUnwindSafe for SemanticVersion
impl Send for SemanticVersion
impl Sync for SemanticVersion
impl Unpin for SemanticVersion
impl UnwindSafe for SemanticVersion
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