pub enum Question {
Noul {
instructions: String,
criteria: Option<NoulCriteria>,
},
Choice {
instructions: String,
criteria: BTreeMap<String, String>,
},
Score {
instructions: String,
criteria: Vec<String>,
},
}Expand description
One question, in the wire’s spelling.
Variants§
Noul
A yes-or-no proposition. The answer is the probability that it holds.
Fields
§
criteria: Option<NoulCriteria>What counts as yes and what counts as no, when the instructions alone leave it open.
Choice
One option out of a set. The answer names the option and gives a probability for each.
Fields
Score
A position on an ordered scale. The answer is the probability-weighted
index of the levels, 0.0 for the first.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Question
impl<'de> Deserialize<'de> for Question
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 Question
Source§impl JsonSchema for Question
impl JsonSchema for Question
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 moreimpl StructuralPartialEq for Question
Auto Trait Implementations§
impl Freeze for Question
impl RefUnwindSafe for Question
impl Send for Question
impl Sync for Question
impl Unpin for Question
impl UnsafeUnpin for Question
impl UnwindSafe for Question
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