pub enum CheckStatus {
Passed,
Failed,
Running,
Errored,
}Expand description
What an automated check found about a commit (D49).
Four states and not two. Each one implies a different action, which is the only reason a state earns a variant. “Not finished” is a real answer and the one a caller most needs to distinguish, because the action it implies – wait – differs from both pass and fail. Collapsing it into failure makes every in-flight check look like a broken build; collapsing it into success is worse.
Errored is the durable half of D18’s central claim: a provider
fault is not a statement about the commit. choir-queue already
refuses to evict a change on one, but until this variant existed the
fault could be recorded nowhere, so a re-run was the only way anyone
downstream learned it had happened.
Variants§
Passed
The check ran and was satisfied.
Failed
The check ran and was not satisfied.
Running
The check has started and has not reported an outcome.
Errored
The check could not be run, so it says nothing about the commit.
A VM that failed to boot, a runner that vanished, a job over its
deadline. The distinction from CheckStatus::Failed is not
cosmetic: Failed is evidence about the commit and blocks it on
its merits, while Errored is evidence about us, and the action
it implies is a re-run rather than a rewrite.
Implementations§
Source§impl CheckStatus
impl CheckStatus
Sourcepub fn parse(raw: &str) -> Option<Self>
pub fn parse(raw: &str) -> Option<Self>
Parses the CLI spelling, or None for anything else.
Deliberately not a FromStr impl taking arbitrary case: a check
reported as "PASSED" by a runner that upcased its output should
be refused loudly rather than accepted into a signed op, because
the op is what a later audit reads.
Trait Implementations§
Source§impl Clone for CheckStatus
impl Clone for CheckStatus
Source§fn clone(&self) -> CheckStatus
fn clone(&self) -> CheckStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CheckStatus
impl Debug for CheckStatus
Source§impl<'de> Deserialize<'de> for CheckStatus
impl<'de> Deserialize<'de> for CheckStatus
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>,
Source§impl PartialEq for CheckStatus
impl PartialEq for CheckStatus
Source§fn eq(&self, other: &CheckStatus) -> bool
fn eq(&self, other: &CheckStatus) -> bool
self and other values to be equal, and is used by ==.