pub struct StoredConclusion {
pub input: ConclusionInput,
pub reviewed_by: Vec<String>,
pub independent_review_count: usize,
}Expand description
A conclusion as stored: the input and what only the writer computes.
The input is flattened, so a stored conclusion reads as the input plus two fields:
the advisors whose completed consultations it cites, each once and in canonical
order, and their count. Both are computed at admission and checked again by
reasoning.check, so a hand-edited count is reported.
use majordomus_cli::reasoning::record::{ConclusionInput, StoredConclusion};
let stored = StoredConclusion {
input: ConclusionInput {
assessment: "assessment-1".into(),
decision: "keep the lock".into(),
rationale: "measured".into(),
..Default::default()
},
reviewed_by: vec!["alpha".into()],
independent_review_count: 1,
};
let json = serde_json::to_value(&stored).unwrap();
assert_eq!(json["decision"], "keep the lock");
assert_eq!(json["independent_review_count"], 1);Fields§
§input: ConclusionInputWhat the executor concluded.
reviewed_by: Vec<String>The advisors whose completed consultations it cites, each once. Computed.
independent_review_count: usizeHow many independent advisors reviewed it: reviewed_by’s length. Computed.
Trait Implementations§
Source§impl Clone for StoredConclusion
impl Clone for StoredConclusion
Source§fn clone(&self) -> StoredConclusion
fn clone(&self) -> StoredConclusion
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 StoredConclusion
impl Debug for StoredConclusion
Source§impl<'de> Deserialize<'de> for StoredConclusion
impl<'de> Deserialize<'de> for StoredConclusion
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
Source§impl JsonSchema for StoredConclusion
impl JsonSchema for StoredConclusion
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 moreAuto Trait Implementations§
impl Freeze for StoredConclusion
impl RefUnwindSafe for StoredConclusion
impl Send for StoredConclusion
impl Sync for StoredConclusion
impl Unpin for StoredConclusion
impl UnsafeUnpin for StoredConclusion
impl UnwindSafe for StoredConclusion
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