pub enum AssessmentStanding {
Open,
Planned,
Disputed,
Concluded,
Validated,
ValidationFailed,
}Expand description
Where an assessment stands, from open through validated.
The standing is derived, never stored: an unresolved disagreement makes it disputed whatever else is recorded; otherwise its standing conclusion and that conclusion’s validations decide it, and without a conclusion a recorded plan makes it planned.
use majordomus_cli::reasoning::state::{derive, AssessmentStanding};
use majordomus_cli::reasoning::store::Loaded;
let mut loaded = Loaded::default();
loaded.records.push(rec("assessment-1", 1, json!({ "kind": "assessment", "subject": "s" })));
assert_eq!(derive(&loaded, None).assessments[0].standing, AssessmentStanding::Open);
loaded.records.push(rec("disagreement-2", 2, json!({
"kind": "disagreement", "assessment": "assessment-1",
"positions": [
{ "source": "primary", "position": "A" },
{ "source": "consultation-9", "position": "B" },
],
"discriminating_question": "do callers retry?",
})));
assert_eq!(derive(&loaded, None).assessments[0].standing, AssessmentStanding::Disputed);Variants§
Open
Stated; no plan yet.
Planned
Planned; no conclusion yet.
Disputed
A disagreement on it is unsettled.
Concluded
Concluded; not yet validated.
Validated
Concluded, and every validation recorded passed.
ValidationFailed
Concluded, and a validation failed.
Trait Implementations§
Source§impl Clone for AssessmentStanding
impl Clone for AssessmentStanding
Source§fn clone(&self) -> AssessmentStanding
fn clone(&self) -> AssessmentStanding
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 AssessmentStanding
Source§impl Debug for AssessmentStanding
impl Debug for AssessmentStanding
Source§impl<'de> Deserialize<'de> for AssessmentStanding
impl<'de> Deserialize<'de> for AssessmentStanding
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 AssessmentStanding
Source§impl JsonSchema for AssessmentStanding
impl JsonSchema for AssessmentStanding
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 AssessmentStanding
impl PartialEq for AssessmentStanding
Source§fn eq(&self, other: &AssessmentStanding) -> bool
fn eq(&self, other: &AssessmentStanding) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AssessmentStanding
impl Serialize for AssessmentStanding
impl StructuralPartialEq for AssessmentStanding
Auto Trait Implementations§
impl Freeze for AssessmentStanding
impl RefUnwindSafe for AssessmentStanding
impl Send for AssessmentStanding
impl Sync for AssessmentStanding
impl Unpin for AssessmentStanding
impl UnsafeUnpin for AssessmentStanding
impl UnwindSafe for AssessmentStanding
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.