pub enum ReasoningPhase {
Uncertainty,
Consulting,
Local,
Reuse,
AdvisorResponse,
Degradation,
Disagreement,
Experiment,
Conclusion,
Validation,
Attempt,
}Expand description
A phase of the reasoning timeline.
Each record maps to one phase: a plan to consulting, local or reuse by its outcome, a consultation to an advisor response or a degradation by its status, and every other kind to the phase of the same name.
use majordomus_cli::reasoning::state::{derive, ReasoningPhase};
use majordomus_cli::reasoning::store::Loaded;
let mut loaded = Loaded::default();
loaded.records.push(rec("consultation-1", 1, json!({
"kind": "consultation", "plan": "plan-0", "advisor": "alpha", "status": "unavailable",
})));
let phases: Vec<ReasoningPhase> =
derive(&loaded, None).timeline.iter().map(|s| s.phase).collect();
assert_eq!(phases, [ReasoningPhase::Degradation]);
let word = serde_json::to_value(ReasoningPhase::AdvisorResponse).unwrap();
assert_eq!(word, "advisor_response");Variants§
Uncertainty
Uncertainty stated with evidence.
Consulting
Review planned.
Local
Decided locally, by plan.
Reuse
A standing conclusion reused.
AdvisorResponse
An advisor answered.
Degradation
An advisor could not answer.
Disagreement
Positions diverged.
Experiment
An experiment settled a disagreement.
Conclusion
A conclusion.
Validation
A validation step.
Attempt
A failed attempt.
Trait Implementations§
Source§impl Clone for ReasoningPhase
impl Clone for ReasoningPhase
Source§fn clone(&self) -> ReasoningPhase
fn clone(&self) -> ReasoningPhase
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 moreimpl Copy for ReasoningPhase
Source§impl Debug for ReasoningPhase
impl Debug for ReasoningPhase
Source§impl<'de> Deserialize<'de> for ReasoningPhase
impl<'de> Deserialize<'de> for ReasoningPhase
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
impl Eq for ReasoningPhase
Source§impl JsonSchema for ReasoningPhase
impl JsonSchema for ReasoningPhase
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 moreSource§impl PartialEq for ReasoningPhase
impl PartialEq for ReasoningPhase
Source§fn eq(&self, other: &ReasoningPhase) -> bool
fn eq(&self, other: &ReasoningPhase) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ReasoningPhase
impl Serialize for ReasoningPhase
impl StructuralPartialEq for ReasoningPhase
Auto Trait Implementations§
impl Freeze for ReasoningPhase
impl RefUnwindSafe for ReasoningPhase
impl Send for ReasoningPhase
impl Sync for ReasoningPhase
impl Unpin for ReasoningPhase
impl UnsafeUnpin for ReasoningPhase
impl UnwindSafe for ReasoningPhase
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.