pub struct LandingDecision {
pub schema: String,
pub trunk_version: String,
pub observed: Impact,
pub required_by_compatibility: Impact,
pub floor: Impact,
pub exemption: Option<AppliedExemption>,
pub selected: Impact,
pub next_version: String,
pub allocation: Allocation,
pub mode: Mode,
pub explanation: Vec<String>,
}Expand description
What a landing allocates, and why, step by step.
use majordomus_cli::release::compat::Impact;
use majordomus_cli::release::landing::{decide, LandingDecision, ReleasePolicy, DECISION_SCHEMA};
use majordomus_cli::release::version::Version;
let d: LandingDecision = decide(Version::parse("1.2.3").unwrap(), Impact::None, &ReleasePolicy::default(), &[]);
assert_eq!(d.schema, DECISION_SCHEMA);
assert_eq!(d.next_version, "1.2.3", "nothing moved and nothing is owed");Fields§
§schema: String§trunk_version: StringWhat the trunk declares: the number the next one is raised from.
observed: ImpactHow far the change moves the public contract, measured (ADR 0051).
required_by_compatibility: ImpactWhat that movement requires under the version’s mode.
floor: ImpactThe policy’s floor, or none when an exemption applied.
exemption: Option<AppliedExemption>The exemption that lowered the floor, if one did.
selected: ImpactThe larger of the requirement and the floor.
next_version: StringThe trunk’s version raised by selected.
allocation: AllocationWhether the policy allocates at landing; the decision is computed either way.
mode: ModeThe compatibility mode the trunk’s version puts in force.
explanation: Vec<String>One sentence per step, in the order the decision was made.
Trait Implementations§
Source§impl Clone for LandingDecision
impl Clone for LandingDecision
Source§fn clone(&self) -> LandingDecision
fn clone(&self) -> LandingDecision
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LandingDecision
impl Debug for LandingDecision
Source§impl<'de> Deserialize<'de> for LandingDecision
impl<'de> Deserialize<'de> for LandingDecision
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
impl Eq for LandingDecision
Source§impl JsonSchema for LandingDecision
impl JsonSchema for LandingDecision
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for LandingDecision
impl PartialEq for LandingDecision
Source§fn eq(&self, other: &LandingDecision) -> bool
fn eq(&self, other: &LandingDecision) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for LandingDecision
impl Serialize for LandingDecision
impl StructuralPartialEq for LandingDecision
Auto Trait Implementations§
impl Freeze for LandingDecision
impl RefUnwindSafe for LandingDecision
impl Send for LandingDecision
impl Sync for LandingDecision
impl Unpin for LandingDecision
impl UnsafeUnpin for LandingDecision
impl UnwindSafe for LandingDecision
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
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
Compare self to
key and return true if they are equal.