pub enum QuizError {
XMLWriterError(Error),
EmptyError(String),
ValueError(String),
AnswerFractionError(String),
AnswerCountError(String),
}
Expand description
Error type for Quiz, Question and Answer struct
§Errors
XMLWriterError xml::writer::Error
- xml-rs writer error
EmptyError
- Error when generating empty quiz or question
ValueError
- Error when generating answer with too much points
AnswerFractionError - Error when answer fraction is larger than 100
AnswerCountError - Error when answer count is different than required
Variants§
XMLWriterError(Error)
EmptyError(String)
ValueError(String)
AnswerFractionError(String)
AnswerCountError(String)
Trait Implementations§
Source§impl From<EmptyError> for QuizError
impl From<EmptyError> for QuizError
Source§fn from(e: EmptyError) -> Self
fn from(e: EmptyError) -> Self
Converts to this type from the input type.
Source§impl From<EmitterError> for QuizError
impl From<EmitterError> for QuizError
Source§impl From<ValueError> for QuizError
impl From<ValueError> for QuizError
Source§fn from(e: ValueError) -> Self
fn from(e: ValueError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for QuizError
impl !RefUnwindSafe for QuizError
impl Send for QuizError
impl Sync for QuizError
impl Unpin for QuizError
impl !UnwindSafe for QuizError
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