#[non_exhaustive]pub enum Question {
Choice {
instructions: Option<Value>,
criteria: IndexMap<String, Value>,
},
Score {
instructions: Option<Value>,
criteria: Vec<Value>,
},
Noul {
instructions: Option<Value>,
criteria: Option<NoulCriteria>,
},
Box {
instructions: Option<Value>,
},
}Expand description
A typed question.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Choice
Select one option. criteria maps option names to descriptions (may be null).
Score
Rate against ordered levels; level i scores i.
Noul
Probability that a statement is true / the answer is yes.
Box
Locate something in the request’s image.
Implementations§
Source§impl Question
impl Question
pub fn choice( instructions: impl Into<String>, criteria: IndexMap<String, Json>, ) -> Self
pub fn score(instructions: impl Into<String>, levels: Vec<Json>) -> Self
pub fn noul(instructions: impl Into<String>) -> Self
pub fn noul_with( instructions: impl Into<String>, criteria: NoulCriteria, ) -> Self
pub fn bounding_box(instructions: impl Into<String>) -> Self
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 StructuralPartialEq for Question
Auto Trait Implementations§
impl Forget for Question
impl Freeze for Question
impl Move 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