#[non_exhaustive]pub enum QuestionError {
Noul(InvalidNoul),
Choice(InvalidChoice),
Score(InvalidScore),
Bbox(InvalidBbox),
}Expand description
The error of each question constructor.
It lets one Result hold questions of different types, as in a questions! set from data.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Noul(InvalidNoul)
A constructor of Noul failed.
Choice(InvalidChoice)
A constructor of Choice failed.
Score(InvalidScore)
A constructor of Score failed.
Bbox(InvalidBbox)
A constructor of Bbox failed.
Trait Implementations§
Source§impl Debug for QuestionError
impl Debug for QuestionError
Source§impl Display for QuestionError
impl Display for QuestionError
Source§impl Error for QuestionError
impl Error for QuestionError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<InvalidBbox> for QuestionError
impl From<InvalidBbox> for QuestionError
Source§fn from(source: InvalidBbox) -> Self
fn from(source: InvalidBbox) -> Self
Converts to this type from the input type.
Source§impl From<InvalidChoice> for QuestionError
impl From<InvalidChoice> for QuestionError
Source§fn from(source: InvalidChoice) -> Self
fn from(source: InvalidChoice) -> Self
Converts to this type from the input type.
Source§impl From<InvalidNoul> for QuestionError
impl From<InvalidNoul> for QuestionError
Source§fn from(source: InvalidNoul) -> Self
fn from(source: InvalidNoul) -> Self
Converts to this type from the input type.
Source§impl From<InvalidScore> for QuestionError
impl From<InvalidScore> for QuestionError
Source§fn from(source: InvalidScore) -> Self
fn from(source: InvalidScore) -> Self
Converts to this type from the input type.
Source§impl From<QuestionError> for Error
impl From<QuestionError> for Error
Source§fn from(source: QuestionError) -> Self
fn from(source: QuestionError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for QuestionError
impl !UnwindSafe for QuestionError
impl Forget for QuestionError
impl Freeze for QuestionError
impl Move for QuestionError
impl Send for QuestionError
impl Sync for QuestionError
impl Unpin for QuestionError
impl UnsafeUnpin for QuestionError
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