pub enum ArtifactKind {
Case,
Gate,
Unknown,
}Expand description
What a path a rule names actually is, decided by what drives it rather than by where it sits.
The corpus names two kinds and this distinction is the difference between a verdict and
a mechanism. A case is driven by a runner, so an execution of it can be recorded and
the repository can show that it passed. A gate is an executable check a CI gate runs
as its own command, or a unit-test module (src/<module>/tests.rs) the gate running the
crate’s cargo test compiles: it refuses violations on every run, and this repository
records no verdict for it, so what can be shown is the mechanism and not the result.
Anything else a rule names is proof only in prose.
§Example
use majordomus_cli::rules::ArtifactKind;
assert_eq!(ArtifactKind::Case.label(), "case");
assert_eq!(ArtifactKind::Gate.label(), "gate");Variants§
Case
A behavioural case a runner drives; executions of it are recorded.
Gate
An executable check a CI gate runs as its own command, or a unit-test module the
gate running the crate’s cargo test compiles.
Unknown
Neither. Nothing can run it, so nothing can ever record it.
Implementations§
Trait Implementations§
Source§impl Clone for ArtifactKind
impl Clone for ArtifactKind
Source§fn clone(&self) -> ArtifactKind
fn clone(&self) -> ArtifactKind
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 ArtifactKind
Source§impl Debug for ArtifactKind
impl Debug for ArtifactKind
Source§impl<'de> Deserialize<'de> for ArtifactKind
impl<'de> Deserialize<'de> for ArtifactKind
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 ArtifactKind
Source§impl JsonSchema for ArtifactKind
impl JsonSchema for ArtifactKind
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 ArtifactKind
impl Ord for ArtifactKind
Source§fn cmp(&self, other: &ArtifactKind) -> Ordering
fn cmp(&self, other: &ArtifactKind) -> 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 ArtifactKind
impl PartialEq for ArtifactKind
Source§fn eq(&self, other: &ArtifactKind) -> bool
fn eq(&self, other: &ArtifactKind) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ArtifactKind
impl PartialOrd for ArtifactKind
Source§impl Serialize for ArtifactKind
impl Serialize for ArtifactKind
impl StructuralPartialEq for ArtifactKind
Auto Trait Implementations§
impl Freeze for ArtifactKind
impl RefUnwindSafe for ArtifactKind
impl Send for ArtifactKind
impl Sync for ArtifactKind
impl Unpin for ArtifactKind
impl UnsafeUnpin for ArtifactKind
impl UnwindSafe for ArtifactKind
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.