pub struct MultiChoiceQuestion {
pub single: bool,
pub shuffleanswers: bool,
pub correctfeedback: String,
pub partiallycorrectfeedback: String,
pub incorrectfeedback: String,
pub answernumbering: String,
/* private fields */
}
Expand description
Multiple choice question type.
Fields§
§single: bool
§shuffleanswers: bool
§correctfeedback: String
§partiallycorrectfeedback: String
§incorrectfeedback: String
§answernumbering: String
Implementations§
Source§impl MultiChoiceQuestion
impl MultiChoiceQuestion
Sourcepub fn new(
name: String,
description: String,
single: Option<bool>,
shuffleanswers: Option<bool>,
correctfeedback: Option<String>,
partiallycorrectfeedback: Option<String>,
incorrectfeedback: Option<String>,
answernumbering: Option<String>,
) -> Self
pub fn new( name: String, description: String, single: Option<bool>, shuffleanswers: Option<bool>, correctfeedback: Option<String>, partiallycorrectfeedback: Option<String>, incorrectfeedback: Option<String>, answernumbering: Option<String>, ) -> Self
New must take all the required fields after base wrapped with Option<> so that I can use default when not provided.
Trait Implementations§
Source§impl Clone for MultiChoiceQuestion
impl Clone for MultiChoiceQuestion
Source§fn clone(&self) -> MultiChoiceQuestion
fn clone(&self) -> MultiChoiceQuestion
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MultiChoiceQuestion
impl Debug for MultiChoiceQuestion
Source§impl From<MultiChoiceQuestion> for QuestionType
impl From<MultiChoiceQuestion> for QuestionType
Source§fn from(question: MultiChoiceQuestion) -> Self
fn from(question: MultiChoiceQuestion) -> Self
Converts to this type from the input type.
Source§impl From<MultiChoiceQuestion> for Vec<Box<dyn Question>>where
MultiChoiceQuestion: Question + 'static,
impl From<MultiChoiceQuestion> for Vec<Box<dyn Question>>where
MultiChoiceQuestion: Question + 'static,
Source§fn from(question: MultiChoiceQuestion) -> Self
fn from(question: MultiChoiceQuestion) -> Self
Converts to this type from the input type.
Source§impl<Q> From<MultiChoiceQuestion> for Vec<Q>
impl<Q> From<MultiChoiceQuestion> for Vec<Q>
Source§fn from(question: MultiChoiceQuestion) -> Self
fn from(question: MultiChoiceQuestion) -> Self
Converts to this type from the input type.
Source§impl From<MultiChoiceQuestion> for Vec<QuestionType>
impl From<MultiChoiceQuestion> for Vec<QuestionType>
Source§fn from(question: MultiChoiceQuestion) -> Self
fn from(question: MultiChoiceQuestion) -> Self
Converts to this type from the input type.
Source§impl Question for MultiChoiceQuestion
impl Question for MultiChoiceQuestion
Source§fn get_description(&self) -> &str
fn get_description(&self) -> &str
Returns the description of the question.
Source§fn set_text_format(&mut self, format: TextFormat)
fn set_text_format(&mut self, format: TextFormat)
Set the text rendering format
TextFormat
for the question.Auto Trait Implementations§
impl Freeze for MultiChoiceQuestion
impl RefUnwindSafe for MultiChoiceQuestion
impl Send for MultiChoiceQuestion
impl Sync for MultiChoiceQuestion
impl Unpin for MultiChoiceQuestion
impl UnwindSafe for MultiChoiceQuestion
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