pub struct Quiz { /* private fields */ }
Expand description
A quiz struct that contains a vector of questions and optional categories.
Implementations§
Source§impl Quiz
impl Quiz
Sourcepub fn new(questions: Vec<QuestionType>) -> Self
pub fn new(questions: Vec<QuestionType>) -> Self
Creates a new quiz instance with the specified moodle categories and questions.
Categories are not mandatory.
See Moodle XML format for more information.
Category entry is appended after $course$/
mark.
Sourcepub fn set_categories(&mut self, categories: Vec<Category>)
pub fn set_categories(&mut self, categories: Vec<Category>)
Adds categories to the quiz.
Auto Trait Implementations§
impl Freeze for Quiz
impl RefUnwindSafe for Quiz
impl Send for Quiz
impl Sync for Quiz
impl Unpin for Quiz
impl UnwindSafe for Quiz
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