pub enum Impact {
None,
Patch,
Minor,
Major,
}Expand description
How much a change moves the contract.
Ordered, so that “the declared bump covers what is required” is a comparison rather than a table:
use majordomus_cli::release::compat::Impact;
assert!(Impact::Major > Impact::Minor);
assert!(Impact::Minor > Impact::Patch);
assert!(Impact::Patch > Impact::None);Variants§
None
The contract did not move.
Patch
It moved behind the boundary: a caller cannot tell.
Minor
Something arrived; every existing caller still works.
Major
Something a caller could hold is gone or changed under it.
Implementations§
Source§impl Impact
impl Impact
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
The word every surface renders: the command line’s report, the JSON every machine surface answers with, the Cockpit’s badge and the gate’s refusal all print this and never a wording of their own.
use majordomus_cli::release::compat::Impact;
assert_eq!(Impact::Major.as_str(), "major");
assert_eq!(Impact::None.as_str(), "none");Trait Implementations§
impl Copy for Impact
Source§impl<'de> Deserialize<'de> for Impact
impl<'de> Deserialize<'de> for Impact
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 Impact
Source§impl JsonSchema for Impact
impl JsonSchema for Impact
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 Ord for Impact
impl Ord for Impact
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Impact
impl PartialOrd for Impact
impl StructuralPartialEq for Impact
Auto Trait Implementations§
impl Freeze for Impact
impl RefUnwindSafe for Impact
impl Send for Impact
impl Sync for Impact
impl Unpin for Impact
impl UnsafeUnpin for Impact
impl UnwindSafe for Impact
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.