pub struct ReasoningStep {
pub at: String,
pub id: String,
pub phase: ReasoningPhase,
pub summary: String,
}Expand description
One step of the timeline: when, which record, which phase, and one line saying what happened.
The summary is cut to a single line of at most 140 characters, so a timeline renders the same on a terminal, a page and a handover.
use majordomus_cli::reasoning::state::{derive, ReasoningPhase, ReasoningStep};
use majordomus_cli::reasoning::store::Loaded;
let mut loaded = Loaded::default();
loaded.records.push(rec("attempt-1", 1, json!({
"kind": "attempt", "attempt": "share the client\nacross threads",
"observed_failure": "the handle is not Sync",
})));
let state = derive(&loaded, None);
let step: &ReasoningStep = &state.timeline[0];
assert_eq!(step.at, "2026-10-01T00:00:01Z");
assert_eq!(step.phase, ReasoningPhase::Attempt);
assert_eq!(step.summary, "share the client failed: the handle is not Sync");Fields§
§at: StringWhen.
id: StringThe record.
phase: ReasoningPhaseThe phase.
summary: StringOne line.
Trait Implementations§
Source§impl Clone for ReasoningStep
impl Clone for ReasoningStep
Source§fn clone(&self) -> ReasoningStep
fn clone(&self) -> ReasoningStep
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 ReasoningStep
impl Debug for ReasoningStep
Source§impl<'de> Deserialize<'de> for ReasoningStep
impl<'de> Deserialize<'de> for ReasoningStep
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 ReasoningStep
impl JsonSchema for ReasoningStep
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 ReasoningStep
impl RefUnwindSafe for ReasoningStep
impl Send for ReasoningStep
impl Sync for ReasoningStep
impl Unpin for ReasoningStep
impl UnsafeUnpin for ReasoningStep
impl UnwindSafe for ReasoningStep
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