pub struct LessonValidator {}Expand description
Lesson validation engine
Implementations§
Source§impl LessonValidator
impl LessonValidator
pub fn new() -> Self
Sourcepub fn validate_command(
&self,
user_input: &str,
expected: &str,
validation: &CommandValidation,
) -> ValidationResult
pub fn validate_command( &self, user_input: &str, expected: &str, validation: &CommandValidation, ) -> ValidationResult
Validate a command exercise
Sourcepub fn validate_multiple_choice(
&self,
user_choice: usize,
correct: usize,
) -> ValidationResult
pub fn validate_multiple_choice( &self, user_choice: usize, correct: usize, ) -> ValidationResult
Validate a multiple choice answer
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LessonValidator
impl RefUnwindSafe for LessonValidator
impl Send for LessonValidator
impl Sync for LessonValidator
impl Unpin for LessonValidator
impl UnwindSafe for LessonValidator
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