pub struct VersionReport {
pub declared: String,
pub tool: String,
pub agree: bool,
pub last_release: Option<String>,
pub bump: String,
pub commits_imply: Option<String>,
pub next: Option<String>,
pub decided_by: DecidedBy,
pub contract_unreadable: Option<String>,
pub changes: Vec<Change>,
}Expand description
What the version is, what the public contract requires it to become, and what the commits since the last release say about themselves.
next is the contract’s answer (ADR 0051): the analysis’ required_version, or the
smallest release above the last when that requirement is the last release itself. The
commit inference is evidence — bump and commits_imply — and never the answer: when the
contract cannot be measured next is absent, decided_by is undecided and
contract_unreadable says why. The selection is crate::release::version::select, the
one function release bump also takes its default target from.
Fields§
§declared: StringThe version the crate manifest declares — the one place it is authored.
tool: StringThe version bin/majordomus prints: what its projection, share/version.txt, states.
agree: boolWhether that projection is current. generate --check refuses a stale one and
scripts/release-version --check proves the tool prints it; this is the same question
asked by the executable, so every surface can show the answer.
last_release: Option<String>The last release: the highest version the layer records (the newest version tag when
it records none) — the baseline release analyze measures the contract from, so the
contract and the commit evidence describe one window.
bump: StringWhat the commit subjects since it imply: major, minor, patch, or none.
Evidence only — the contract decides next; release analyze reports where the two
disagree.
commits_imply: Option<String>The version that bump would produce from the last release (from the declared version when nothing was released yet). Evidence only, even when the contract cannot answer.
next: Option<String>The next version. When the contract could be measured, the version it requires: the
declared version when that already satisfies it, otherwise the smallest one it allows
— and, when that is the last release itself, the smallest release above it. Absent
when nothing would be released, and when the contract could not be measured
(decided_by: undecided): an unmeasurable baseline is refused, not guessed.
decided_by: DecidedByWho answered next.
contract_unreadable: Option<String>Why the contract could not answer, when decided_by is undecided.
changes: Vec<Change>How many commits since the last release, and of what kind — the evidence for the bump, so that a surprising answer can be checked rather than believed.
Trait Implementations§
Source§impl Clone for VersionReport
impl Clone for VersionReport
Source§fn clone(&self) -> VersionReport
fn clone(&self) -> VersionReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VersionReport
impl Debug for VersionReport
Source§impl<'de> Deserialize<'de> for VersionReport
impl<'de> Deserialize<'de> for VersionReport
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>,
impl Eq for VersionReport
Source§impl JsonSchema for VersionReport
impl JsonSchema for VersionReport
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for VersionReport
impl PartialEq for VersionReport
Source§fn eq(&self, other: &VersionReport) -> bool
fn eq(&self, other: &VersionReport) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for VersionReport
impl Serialize for VersionReport
impl StructuralPartialEq for VersionReport
Auto Trait Implementations§
impl Freeze for VersionReport
impl RefUnwindSafe for VersionReport
impl Send for VersionReport
impl Sync for VersionReport
impl Unpin for VersionReport
impl UnsafeUnpin for VersionReport
impl UnwindSafe for VersionReport
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.