pub struct SubjectEvidence {Show 14 fields
pub subject: String,
pub kind: SubjectKind,
pub id: String,
pub page: Option<String>,
pub presented: PresentedRevision,
pub verdict: ProofState,
pub meaning: String,
pub carries_proof: bool,
pub rule_state: Option<RuleState>,
pub totals: BTreeMap<String, usize>,
pub routes: Vec<RouteProof>,
pub members: Vec<MemberProof>,
pub mechanisms: Vec<String>,
pub subject_findings: Vec<SubjectFinding>,
}Expand description
What the repository can say about one subject at the presented revision: its verdict, the parts it was made from and the totals beside it.
use majordomus_cli::evidence::subject::SubjectEvidence;
let answer: SubjectEvidence = serde_json::from_value(serde_json::json!({
"subject": "claim:x", "kind": "claim", "id": "x",
"presented": { "revision": "working_tree", "tree": "clean" },
"verdict": "not_run", "meaning": "", "carries_proof": true,
"totals": { "not run": 1 }, "routes": [], "members": [], "mechanisms": [],
"subject_findings": []
}))
.unwrap();
assert_eq!(answer.verdict.label(), "not run");Fields§
§subject: StringThe subject’s key.
kind: SubjectKindIts kind.
id: StringIts id within the kind.
page: Option<String>Its page on the site.
presented: PresentedRevisionThe revision it was judged at, as the claim report states it.
verdict: ProofStateThe verdict over its parts.
meaning: StringThat verdict, in one sentence.
carries_proof: boolWhether any part can carry proof.
rule_state: Option<RuleState>A rule subject’s state, as capped by the presented tree.
totals: BTreeMap<String, usize>The parts in each state, by the state’s printed word.
routes: Vec<RouteProof>Its own routes, judged.
members: Vec<MemberProof>Its members, each with its own verdict.
mechanisms: Vec<String>A rule’s named paths that no runner drives.
subject_findings: Vec<SubjectFinding>Advisory findings about the subject; never a finding of the evidence report.
Trait Implementations§
Source§impl Clone for SubjectEvidence
impl Clone for SubjectEvidence
Source§fn clone(&self) -> SubjectEvidence
fn clone(&self) -> SubjectEvidence
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 SubjectEvidence
impl Debug for SubjectEvidence
Source§impl<'de> Deserialize<'de> for SubjectEvidence
impl<'de> Deserialize<'de> for SubjectEvidence
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SubjectEvidence
Source§impl JsonSchema for SubjectEvidence
impl JsonSchema for SubjectEvidence
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for SubjectEvidence
impl PartialEq for SubjectEvidence
Source§fn eq(&self, other: &SubjectEvidence) -> bool
fn eq(&self, other: &SubjectEvidence) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SubjectEvidence
impl Serialize for SubjectEvidence
impl StructuralPartialEq for SubjectEvidence
Auto Trait Implementations§
impl Freeze for SubjectEvidence
impl RefUnwindSafe for SubjectEvidence
impl Send for SubjectEvidence
impl Sync for SubjectEvidence
impl Unpin for SubjectEvidence
impl UnsafeUnpin for SubjectEvidence
impl UnwindSafe for SubjectEvidence
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<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
Compare self to
key and return true if they are equal.