pub struct Question {
pub id: String,
pub label: String,
pub prompt: String,
pub options: Vec<QuestionOption>,
pub allow_other: bool,
pub multi_select: bool,
}Expand description
A single question to ask the user.
Fields§
§id: StringUnique identifier for this question.
label: StringShort contextual label for the tab bar. Defaults to “Q1”, “Q2”, etc.
prompt: StringThe full question text to display.
options: Vec<QuestionOption>Available options. Can be empty when allow_other is true.
allow_other: boolWhether to show “Type something…” option. Defaults to true.
multi_select: boolWhether multiple options can be selected. Defaults to false.
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
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