pub struct FrameworkVersion { /* private fields */ }Expand description
The framework train one binary was built from, and therefore the whole of what it claims about compatibility.
Its canonical wire spelling is the SemVer string itself, e.g. 0.56.2:
three decimal segments, no prefix, no padding, no pre-release or build
metadata. Comparison is exact equality; the CompatibilityLine a version
belongs to is reported separately so a looser rule can never be applied by
accident.
Implementations§
Source§impl FrameworkVersion
impl FrameworkVersion
Sourcepub const CURRENT_SPELLING: &'static str = "0.58.2"
pub const CURRENT_SPELLING: &'static str = "0.58.2"
The canonical spelling of the train this binary was built from.
The crate version is the workspace train version: [workspace.package] version sets it and exact = pins keep every internal dependency on
the same train.
Sourcepub const CURRENT: Self
pub const CURRENT: Self
The train this binary was built from.
Parsed from Self::CURRENT_SPELLING during const evaluation, so a
crate version this type cannot represent fails the build rather than
reaching a process boundary.
Sourcepub const fn new(major: u16, minor: u16, patch: u16) -> Self
pub const fn new(major: u16, minor: u16, patch: u16) -> Self
Construct one exact framework version.
Sourcepub const fn compatibility_line(self) -> CompatibilityLine
pub const fn compatibility_line(self) -> CompatibilityLine
The SemVer line this version belongs to: pre-1.0 trains break on every minor, and a released major breaks only on the major.
This reports the line; it does not decide compatibility. Two binaries are compatible when their versions are equal.
Trait Implementations§
Source§impl Clone for FrameworkVersion
impl Clone for FrameworkVersion
Source§fn clone(&self) -> FrameworkVersion
fn clone(&self) -> FrameworkVersion
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more