pub struct Diagnosis {
pub case: String,
pub severity: Severity,
pub severity_source: SeveritySource,
pub likely_cause: String,
pub evidence: Vec<Evidence>,
pub hypotheses: Vec<String>,
pub unknowns: Vec<String>,
pub next_steps: Vec<String>,
pub reproduction: String,
pub escalation_note: String,
pub rule: &'static str,
}Expand description
The output of diagnose, consumed by every renderer.
Fields are organized into three groups:
- Identification:
case,rule. Theruleis a stable string that names the rule arm that fired (e.g."dns_failure"); it is the join key againstprose.toml. - Classification:
severity,severity_source,likely_cause. Thelikely_causeis human prose, possibly with a{host}/{peer}/{field}placeholder filled in.severity_sourcecarries the provenance. - Communication:
evidence,hypotheses,unknowns,next_steps,reproduction,escalation_note. These feed both the human report and the LLM prompt. Theevidencefield is a curated subset chosen by [pick] in rule order, not the raw input vector.
Diagnosis is Serialize so the JSON-envelope prompt renderer can
embed it directly without a parallel struct.
Fields§
§case: String§severity: Severity§severity_source: SeveritySource§likely_cause: String§evidence: Vec<Evidence>§hypotheses: Vec<String>§unknowns: Vec<String>§next_steps: Vec<String>§reproduction: String§escalation_note: String§rule: &'static strTrait Implementations§
Auto Trait Implementations§
impl Freeze for Diagnosis
impl RefUnwindSafe for Diagnosis
impl Send for Diagnosis
impl Sync for Diagnosis
impl Unpin for Diagnosis
impl UnsafeUnpin for Diagnosis
impl UnwindSafe for Diagnosis
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