pub enum LedgerObservation {
Absent,
Unreadable(String),
Read {
total: usize,
current: usize,
current_failing: usize,
newest_commit: String,
newest_at: String,
},
}Expand description
The evidence ledger, joined to the tree in front of you.
use majordomus_cli::environment::preflight::{derive, LedgerObservation, Observations, Verdict};
let mut o = Observations::empty("demo", 0);
o.ledger = LedgerObservation::Unreadable("version 9".into());
assert_eq!(derive(&o).check("verification.tests").unwrap().verdict, Verdict::Failed);Variants§
Absent
No ledger file.
Unreadable(String)
A ledger this executable cannot read; the reason.
Read
The ledger, joined to HEAD.
Fields
Trait Implementations§
Source§impl Clone for LedgerObservation
impl Clone for LedgerObservation
Source§fn clone(&self) -> LedgerObservation
fn clone(&self) -> LedgerObservation
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 LedgerObservation
impl Debug for LedgerObservation
Source§impl Default for LedgerObservation
impl Default for LedgerObservation
Source§fn default() -> LedgerObservation
fn default() -> LedgerObservation
Returns the “default value” for a type. Read more
impl Eq for LedgerObservation
Source§impl PartialEq for LedgerObservation
impl PartialEq for LedgerObservation
Source§fn eq(&self, other: &LedgerObservation) -> bool
fn eq(&self, other: &LedgerObservation) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for LedgerObservation
Auto Trait Implementations§
impl Freeze for LedgerObservation
impl RefUnwindSafe for LedgerObservation
impl Send for LedgerObservation
impl Sync for LedgerObservation
impl Unpin for LedgerObservation
impl UnsafeUnpin for LedgerObservation
impl UnwindSafe for LedgerObservation
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.