pub enum SkillEvidence {
Proven,
InputsUnchanged,
Stale,
Failing,
NotRun,
Unrunnable,
Untested,
}Expand description
What the evidence ledger can say about a skill’s tests, as a whole: the weakest state of
the tests that name it, or untested when none does.
use majordomus_cli::skill::SkillEvidence;
assert!(SkillEvidence::Proven.current());
assert!(SkillEvidence::InputsUnchanged.current());
assert!(!SkillEvidence::Stale.current());
assert!(SkillEvidence::Proven < SkillEvidence::Untested);Variants§
Proven
Every naming test has a passing run, and nothing but the ledger changed since.
InputsUnchanged
Every naming test passed, and neither the test nor the skill changed since.
Stale
A passing run exists, and the test or the skill changed since.
Failing
The latest recorded run of a naming test did not pass.
NotRun
A test names the skill and no run of it was ever recorded.
Unrunnable
A test names the skill from a path no runner drives.
Untested
No test names the skill.
Implementations§
Source§impl SkillEvidence
impl SkillEvidence
Sourcepub fn current(self) -> bool
pub fn current(self) -> bool
Does this state carry a passing run nothing known has invalidated?
use majordomus_cli::skill::SkillEvidence;
assert!(!SkillEvidence::NotRun.current());Sourcepub fn label(self) -> &'static str
pub fn label(self) -> &'static str
The word every surface prints for this evidence state: the text listing, the JSON answer and the site page all read it here, so they cannot spell a state two ways.
use majordomus_cli::skill::SkillEvidence;
assert_eq!(SkillEvidence::InputsUnchanged.label(), "inputs_unchanged");Sourcepub fn of(state: ProofState) -> SkillEvidence
pub fn of(state: ProofState) -> SkillEvidence
The skill-level word for one test’s proof state.
use majordomus_cli::evidence::ProofState;
use majordomus_cli::skill::SkillEvidence;
assert_eq!(SkillEvidence::of(ProofState::NotRun), SkillEvidence::NotRun);Trait Implementations§
Source§impl Clone for SkillEvidence
impl Clone for SkillEvidence
Source§fn clone(&self) -> SkillEvidence
fn clone(&self) -> SkillEvidence
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SkillEvidence
Source§impl Debug for SkillEvidence
impl Debug for SkillEvidence
Source§impl<'de> Deserialize<'de> for SkillEvidence
impl<'de> Deserialize<'de> for SkillEvidence
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>,
impl Eq for SkillEvidence
Source§impl JsonSchema for SkillEvidence
impl JsonSchema for SkillEvidence
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ord for SkillEvidence
impl Ord for SkillEvidence
Source§fn cmp(&self, other: &SkillEvidence) -> Ordering
fn cmp(&self, other: &SkillEvidence) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for SkillEvidence
impl PartialEq for SkillEvidence
Source§fn eq(&self, other: &SkillEvidence) -> bool
fn eq(&self, other: &SkillEvidence) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SkillEvidence
impl PartialOrd for SkillEvidence
Source§impl Serialize for SkillEvidence
impl Serialize for SkillEvidence
impl StructuralPartialEq for SkillEvidence
Auto Trait Implementations§
impl Freeze for SkillEvidence
impl RefUnwindSafe for SkillEvidence
impl Send for SkillEvidence
impl Sync for SkillEvidence
impl Unpin for SkillEvidence
impl UnsafeUnpin for SkillEvidence
impl UnwindSafe for SkillEvidence
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
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
key and return true if they are equal.