scientific_method/
conclusion.rs1#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
5#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6#[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
7pub enum Outcome {
8 Accepted,
9 Rejected,
10 Inconclusive,
11}
12
13#[derive(Debug, Clone, PartialEq, Eq)]
15#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
16pub struct Conclusion {
17 pub outcome: Outcome,
18 pub summary: Option<String>,
19}
20
21impl Conclusion {
22 pub fn new(outcome: Outcome) -> Self {
23 Self {
24 outcome,
25 summary: None,
26 }
27 }
28
29 pub fn with_summary(mut self, summary: impl Into<String>) -> Self {
30 self.summary = Some(summary.into());
31 self
32 }
33}