pub struct Question { /* private fields */ }Implementations§
Source§impl Question
impl Question
Sourcepub const fn new(
id: Option<String>,
name: String,
prompt: String,
kind: QuestionKind,
) -> Question
pub const fn new( id: Option<String>, name: String, prompt: String, kind: QuestionKind, ) -> Question
Create a new question with the given id, name, prompt, and kind.
pub fn id(&self) -> Option<&str>
pub fn name(&self) -> &str
pub fn prompt(&self) -> &str
pub const fn kind(&self) -> &QuestionKind
pub const fn kind_mut(&mut self) -> &mut QuestionKind
pub const fn assumed(&self) -> Option<&AssumedAnswer>
Sourcepub fn set_suggestion(&mut self, value: impl Into<SuggestedAnswer>)
pub fn set_suggestion(&mut self, value: impl Into<SuggestedAnswer>)
Set the suggested value for this question based on its kind.
Sourcepub fn set_assumption(&mut self, value: impl Into<AssumedAnswer>)
pub fn set_assumption(&mut self, value: impl Into<AssumedAnswer>)
Set an assumed value for this question, causing it to be skipped in the interview.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Question
impl RefUnwindSafe for Question
impl Send for Question
impl Sync for Question
impl Unpin 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