pub enum ProjectionState {
NotHere,
Current,
Stale {
projected: Option<String>,
declared: String,
},
Disagrees {
projected: String,
declared: Option<String>,
},
}Expand description
How PROJECTION stands against the authority.
Three answers that lead to three different actions: nothing to do, run the derivation, or find out who wrote a version nobody authored.
use majordomus_cli::release::version::ProjectionState;
let stale = ProjectionState::Stale { projected: Some("0.8.0".into()), declared: "0.9.0".into() };
// the state every bump leaves behind is not the state nothing could have produced
assert_ne!(stale, ProjectionState::Disagrees { projected: "0.8.0".into(), declared: Some("0.9.0".into()) });Variants§
NotHere
Neither the manifest nor the projection is here: this repository does not carry the product, so there is nothing to project and nothing to compare.
Current
The projection states the version the manifest declares.
Stale
The projection is missing, or states an older version than the manifest: the state
between release bump and the derivation that follows it. generate fixes it.
Fields
Disagrees
The projection states a version newer than the manifest’s, or one that cannot be compared with it, or there is a projection and no manifest. No derivation writes that, so somebody did.
Trait Implementations§
Source§impl Clone for ProjectionState
impl Clone for ProjectionState
Source§fn clone(&self) -> ProjectionState
fn clone(&self) -> ProjectionState
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 ProjectionState
impl Debug for ProjectionState
impl Eq for ProjectionState
Source§impl PartialEq for ProjectionState
impl PartialEq for ProjectionState
Source§fn eq(&self, other: &ProjectionState) -> bool
fn eq(&self, other: &ProjectionState) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ProjectionState
Auto Trait Implementations§
impl Freeze for ProjectionState
impl RefUnwindSafe for ProjectionState
impl Send for ProjectionState
impl Sync for ProjectionState
impl Unpin for ProjectionState
impl UnsafeUnpin for ProjectionState
impl UnwindSafe for ProjectionState
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> 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.