pub enum GenerationObservation {
Absent,
Unreadable(String),
Read {
record: GenerationRecord,
head_tree: Option<String>,
},
}Expand description
The last generation check scripts/pages current recorded, and the tree HEAD has now.
use majordomus_cli::environment::preflight::{derive, GenerationObservation, Observations, Verdict};
let mut o = Observations::empty("demo", 0);
o.generation = GenerationObservation::Unreadable("schema 9".into());
assert_eq!(derive(&o).check("verification.docs").unwrap().verdict, Verdict::Unknown);Variants§
Absent
No record: the check has not run in this checkout.
Unreadable(String)
A record this executable cannot read; the reason.
Read
The record, and HEAD’s tree when git could name it.
Fields
§
record: GenerationRecordWhat the check recorded.
Trait Implementations§
Source§impl Clone for GenerationObservation
impl Clone for GenerationObservation
Source§fn clone(&self) -> GenerationObservation
fn clone(&self) -> GenerationObservation
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 GenerationObservation
impl Debug for GenerationObservation
Source§impl Default for GenerationObservation
impl Default for GenerationObservation
Source§fn default() -> GenerationObservation
fn default() -> GenerationObservation
Returns the “default value” for a type. Read more
impl Eq for GenerationObservation
Source§impl PartialEq for GenerationObservation
impl PartialEq for GenerationObservation
Source§fn eq(&self, other: &GenerationObservation) -> bool
fn eq(&self, other: &GenerationObservation) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GenerationObservation
Auto Trait Implementations§
impl Freeze for GenerationObservation
impl RefUnwindSafe for GenerationObservation
impl Send for GenerationObservation
impl Sync for GenerationObservation
impl Unpin for GenerationObservation
impl UnsafeUnpin for GenerationObservation
impl UnwindSafe for GenerationObservation
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.