pub enum Criteria {
Levels(Vec<Value>),
Options(IndexMap<String, Value>),
}Expand description
A question’s criteria, as the providers document it per type:
score: an array of level descriptions, lowest first, indexed from 0 (Criteria::Levels). The request has no levels or legend field; the answer’slegendis keyed by the level index.choice: an object from option id to its description, a string, object, array or null (Criteria::Options).noul: optionally{"true": string, "false": string}, also anCriteria::Options.
The options keep their order, so a decoded question re-encodes as sent.
Variants§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Criteria
impl<'de> Deserialize<'de> for Criteria
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 Criteria
Auto Trait Implementations§
impl Freeze for Criteria
impl RefUnwindSafe for Criteria
impl Send for Criteria
impl Sync for Criteria
impl Unpin for Criteria
impl UnsafeUnpin for Criteria
impl UnwindSafe for Criteria
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