pub struct AssessmentInput {
pub subject: String,
pub materiality: Materiality,
pub confidence: ReasoningConfidence,
pub hypothesis: Option<String>,
pub affects: Vec<String>,
pub facts: Vec<String>,
pub assumptions: Vec<String>,
pub questions: Vec<String>,
pub evidence: Vec<ReasoningEvidence>,
pub capabilities: Vec<String>,
pub new_evidence: bool,
}Expand description
A material uncertainty, stated with the evidence gathered before anyone was asked.
The assessment opens a chain: plans, consultations, disagreements and conclusions all
name it. Only subject is required; materiality defaults to low and confidence to
medium. The store refuses a material assessment that carries no evidence.
use majordomus_cli::reasoning::record::AssessmentInput;
use majordomus_cli::reasoning::policy::{Materiality, ReasoningConfidence};
let a: AssessmentInput =
serde_json::from_value(serde_json::json!({ "subject": "retry policy" })).unwrap();
assert_eq!(a.materiality, Materiality::Low);
assert_eq!(a.confidence, ReasoningConfidence::Medium);
assert!(a.evidence.is_empty() && !a.new_evidence);Fields§
§subject: StringWhat is uncertain, as one line. Later assessments of the same subject find the conclusions of earlier ones through it.
materiality: MaterialityHow much the decision could matter.
confidence: ReasoningConfidenceHow sure the executor is of its hypothesis.
hypothesis: Option<String>The current hypothesis.
affects: Vec<String>What the decision could affect: public_api, persistent_data, security,
concurrency, architecture, …
facts: Vec<String>What is known.
assumptions: Vec<String>What is assumed.
questions: Vec<String>What is still open.
evidence: Vec<ReasoningEvidence>The evidence gathered locally.
capabilities: Vec<String>The advisory capabilities review would need; empty means independent_reasoning.
new_evidence: boolThe assessment brings evidence a standing conclusion on the subject did not have, so that conclusion does not answer it.
Trait Implementations§
Source§impl Clone for AssessmentInput
impl Clone for AssessmentInput
Source§fn clone(&self) -> AssessmentInput
fn clone(&self) -> AssessmentInput
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 AssessmentInput
impl Debug for AssessmentInput
Source§impl Default for AssessmentInput
impl Default for AssessmentInput
Source§fn default() -> AssessmentInput
fn default() -> AssessmentInput
Source§impl<'de> Deserialize<'de> for AssessmentInput
impl<'de> Deserialize<'de> for AssessmentInput
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 JsonSchema for AssessmentInput
impl JsonSchema for AssessmentInput
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 more