pub struct SemVer {
pub major: u64,
pub minor: u64,
pub patch: u64,
pub prerelease: Option<String>,
pub build_metadata: Option<String>,
}Fields§
§major: u64§minor: u64§patch: u64§prerelease: Option<String>§build_metadata: Option<String>Implementations§
Source§impl SemVer
impl SemVer
pub fn is_prerelease(&self) -> bool
Sourcepub fn raw_version_string(&self) -> String
pub fn raw_version_string(&self) -> String
Canonical RawVersion string: major.minor.patch, with no prerelease
or build-metadata suffix.
Sourcepub fn version_string(&self) -> String
pub fn version_string(&self) -> String
Canonical Version string: major.minor.patch plus the optional
-prerelease and +build-metadata suffixes. This is the single source
of truth for deriving the Version template var from a parsed tag, used
by both Context::populate_git_vars
and the build stage’s per-crate re-scoping so the two never drift.
Trait Implementations§
impl Eq for SemVer
Source§impl Ord for SemVer
impl Ord for SemVer
1.21.0 (const: unstable) · 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
Auto Trait Implementations§
impl Freeze for SemVer
impl RefUnwindSafe for SemVer
impl Send for SemVer
impl Sync for SemVer
impl Unpin for SemVer
impl UnsafeUnpin for SemVer
impl UnwindSafe for SemVer
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.