pub struct ResolutionInput {
pub disagreement: String,
pub experiment: String,
pub outcome: String,
pub favours: String,
pub evidence: Vec<ReasoningEvidence>,
}Expand description
A disagreement settled by evidence: what was run or read, and which position it favours.
The resolution is the only way past a disagreement. It must cite at least one piece of
evidence, because a disagreement is settled by an experiment, never by counting who
agrees; it favours one of the disagreement’s sources, or neither.
use majordomus_cli::reasoning::record::ResolutionInput;
let r: ResolutionInput = serde_json::from_value(serde_json::json!({
"disagreement": "disagreement-1",
"experiment": "run the supervision test",
"outcome": "no caller retries",
"favours": "neither",
"evidence": [{ "kind": "test", "reference": "test/supervision.rs" }],
}))
.unwrap();
assert_eq!(r.favours, "neither");
assert_eq!(r.evidence.len(), 1);Fields§
§disagreement: StringThe disagreement it settles.
experiment: StringThe experiment performed.
outcome: StringWhat it showed.
favours: StringThe position it favours: a source of the disagreement, or neither.
evidence: Vec<ReasoningEvidence>The evidence it produced; at least one reference.
Trait Implementations§
Source§impl Clone for ResolutionInput
impl Clone for ResolutionInput
Source§fn clone(&self) -> ResolutionInput
fn clone(&self) -> ResolutionInput
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 ResolutionInput
impl Debug for ResolutionInput
Source§impl<'de> Deserialize<'de> for ResolutionInput
impl<'de> Deserialize<'de> for ResolutionInput
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 ResolutionInput
impl JsonSchema for ResolutionInput
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 ResolutionInput
impl RefUnwindSafe for ResolutionInput
impl Send for ResolutionInput
impl Sync for ResolutionInput
impl Unpin for ResolutionInput
impl UnsafeUnpin for ResolutionInput
impl UnwindSafe for ResolutionInput
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