pub struct RulesReport {
pub head: Option<String>,
pub working_tree: String,
pub verdict: RulesVerdict,
pub rules: Vec<RuleProof>,
pub states: BTreeMap<String, usize>,
pub coverage: Coverage,
pub findings: Vec<Finding>,
pub satisfied: bool,
}Expand description
The whole rule corpus, verified.
§Example
The whole corpus joined to the tree and the ledger. verdict is what the corpus can be
said to prove; satisfied is only that there are no findings, and the two differ
whenever a blocking rule has never been run.
use majordomus_cli::rules::{RulesReport, RulesVerdict};
let r = RulesReport {
head: None,
working_tree: "clean".into(),
verdict: RulesVerdict::Unproven,
rules: vec![],
states: Default::default(),
coverage: Default::default(),
findings: vec![],
satisfied: true,
};
assert!(r.satisfied());
assert_ne!(r.verdict, RulesVerdict::Proven, "no findings is not proof");Fields§
§head: Option<String>The commit the report was derived against, when git could say.
working_tree: Stringclean, dirty or unknown at the time of derivation.
verdict: RulesVerdictWhat the whole corpus proves: proven, unproven or failing. Derived over the
whole corpus before any filter, like the tallies.
rules: Vec<RuleProof>Every rule, in canonical id order.
states: BTreeMap<String, usize>How many rules are in each state, by the state’s printed word.
coverage: CoverageThe parts of a proof, counted.
findings: Vec<Finding>Every rule whose declared class the proof does not support.
satisfied: boolWhether there are no findings — and nothing more. A corpus none of whose blocking
rules was ever run is satisfied; verdict is the field that says whether anything
was proven.
Implementations§
Source§impl RulesReport
impl RulesReport
Sourcepub fn satisfied(&self) -> bool
pub fn satisfied(&self) -> bool
Are there no findings? Not whether anything is proven: that is RulesReport::verdict.
Trait Implementations§
Source§impl Clone for RulesReport
impl Clone for RulesReport
Source§fn clone(&self) -> RulesReport
fn clone(&self) -> RulesReport
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 RulesReport
impl Debug for RulesReport
Source§impl<'de> Deserialize<'de> for RulesReport
impl<'de> Deserialize<'de> for RulesReport
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 RulesReport
Source§impl JsonSchema for RulesReport
impl JsonSchema for RulesReport
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 PartialEq for RulesReport
impl PartialEq for RulesReport
Source§fn eq(&self, other: &RulesReport) -> bool
fn eq(&self, other: &RulesReport) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for RulesReport
impl Serialize for RulesReport
impl StructuralPartialEq for RulesReport
Auto Trait Implementations§
impl Freeze for RulesReport
impl RefUnwindSafe for RulesReport
impl Send for RulesReport
impl Sync for RulesReport
impl Unpin for RulesReport
impl UnsafeUnpin for RulesReport
impl UnwindSafe for RulesReport
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<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.