pub trait Version: Send + Sync {
// Required methods
fn version_string(&self) -> &str;
fn is_yanked(&self) -> bool;
fn as_any(&self) -> &dyn Any;
// Provided methods
fn is_prerelease(&self) -> bool { ... }
fn features(&self) -> Vec<String> { ... }
fn is_stable(&self) -> bool { ... }
}Expand description
Version information trait.
All version types must implement this to work with generic handlers.
Required Methods§
Sourcefn version_string(&self) -> &str
fn version_string(&self) -> &str
Version string (e.g., “1.0.214”, “14.21.3”).
Provided Methods§
Sourcefn is_prerelease(&self) -> bool
fn is_prerelease(&self) -> bool
Whether this version is a pre-release (alpha, beta, rc, etc.).
Default implementation checks for common pre-release patterns.