pub struct AttemptInput {
pub assessment: Option<String>,
pub attempt: String,
pub observed_failure: String,
pub assumption_invalidated: Option<String>,
pub evidence: Vec<ReasoningEvidence>,
pub updated_hypothesis: Option<String>,
}Expand description
A failed implementation attempt and what it taught.
An attempt may stand alone or bear on an assessment. It records the observed failure and, when known, the assumption the failure invalidated, so that a later session does not try the same thing again.
use majordomus_cli::reasoning::record::AttemptInput;
let a: AttemptInput = serde_json::from_value(serde_json::json!({
"attempt": "share the client across threads",
"observed_failure": "the borrow checker refused the handle",
"assumption_invalidated": "the client is Sync",
}))
.unwrap();
assert!(a.assessment.is_none());
assert_eq!(a.assumption_invalidated.as_deref(), Some("the client is Sync"));Fields§
§assessment: Option<String>The assessment it bears on, when there is one.
attempt: StringWhat was tried.
observed_failure: StringWhat failed, observed.
assumption_invalidated: Option<String>The assumption the failure invalidated.
evidence: Vec<ReasoningEvidence>Evidence the failure produced.
updated_hypothesis: Option<String>The hypothesis now.
Trait Implementations§
Source§impl Clone for AttemptInput
impl Clone for AttemptInput
Source§fn clone(&self) -> AttemptInput
fn clone(&self) -> AttemptInput
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 AttemptInput
impl Debug for AttemptInput
Source§impl<'de> Deserialize<'de> for AttemptInput
impl<'de> Deserialize<'de> for AttemptInput
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 AttemptInput
impl JsonSchema for AttemptInput
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 AttemptInput
impl RefUnwindSafe for AttemptInput
impl Send for AttemptInput
impl Sync for AttemptInput
impl Unpin for AttemptInput
impl UnsafeUnpin for AttemptInput
impl UnwindSafe for AttemptInput
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