pub struct ModelVersion {
pub major: u32,
pub minor: u32,
pub patch: u32,
pub prerelease: Option<String>,
pub build: Option<String>,
}Expand description
Semantic version for a model.
Fields§
§major: u32Major version (architecture changes).
minor: u32Minor version (retraining).
patch: u32Patch version (optimizations).
prerelease: Option<String>Optional pre-release identifier (e.g., “beta.1”).
build: Option<String>Build metadata (e.g., training run ID).
Implementations§
Source§impl ModelVersion
impl ModelVersion
Sourcepub fn with_prerelease(self, prerelease: impl Into<String>) -> Self
pub fn with_prerelease(self, prerelease: impl Into<String>) -> Self
Set pre-release identifier.
Sourcepub fn with_build(self, build: impl Into<String>) -> Self
pub fn with_build(self, build: impl Into<String>) -> Self
Set build metadata.
Sourcepub fn bump_major(&self) -> Self
pub fn bump_major(&self) -> Self
Increment major version (resets minor and patch).
Sourcepub fn bump_minor(&self) -> Self
pub fn bump_minor(&self) -> Self
Increment minor version (resets patch).
Sourcepub fn bump_patch(&self) -> Self
pub fn bump_patch(&self) -> Self
Increment patch version.
Sourcepub fn is_prerelease(&self) -> bool
pub fn is_prerelease(&self) -> bool
Check if this is a pre-release version.
Trait Implementations§
Source§impl Clone for ModelVersion
impl Clone for ModelVersion
Source§fn clone(&self) -> ModelVersion
fn clone(&self) -> ModelVersion
Returns a duplicate 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 ModelVersion
impl Debug for ModelVersion
Source§impl Default for ModelVersion
impl Default for ModelVersion
Source§impl<'de> Deserialize<'de> for ModelVersion
impl<'de> Deserialize<'de> for ModelVersion
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ModelVersion
impl Display for ModelVersion
Source§impl FromStr for ModelVersion
impl FromStr for ModelVersion
Source§impl Hash for ModelVersion
impl Hash for ModelVersion
Source§impl Ord for ModelVersion
impl Ord for ModelVersion
Source§impl PartialEq for ModelVersion
impl PartialEq for ModelVersion
Source§impl PartialOrd for ModelVersion
impl PartialOrd for ModelVersion
Source§impl Serialize for ModelVersion
impl Serialize for ModelVersion
impl Eq for ModelVersion
impl StructuralPartialEq for ModelVersion
Auto Trait Implementations§
impl Freeze for ModelVersion
impl RefUnwindSafe for ModelVersion
impl Send for ModelVersion
impl Sync for ModelVersion
impl Unpin for ModelVersion
impl UnwindSafe for ModelVersion
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§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.