#[non_exhaustive]pub enum Answer {
Noul(NoulAnswer),
Choice(ChoiceAnswer),
Score(ScoreAnswer),
}Expand description
A typed answer, returned under the id of the question it answers.
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(NoulAnswer)
Answer to a Noul question.
Choice(ChoiceAnswer)
Answer to a Choice question.
Score(ScoreAnswer)
Answer to a Score question.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Answer
impl<'de> Deserialize<'de> for Answer
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ChoiceAnswer> for Answer
impl From<ChoiceAnswer> for Answer
Source§fn from(answer: ChoiceAnswer) -> Self
fn from(answer: ChoiceAnswer) -> Self
Converts to this type from the input type.
Source§impl From<NoulAnswer> for Answer
impl From<NoulAnswer> for Answer
Source§fn from(answer: NoulAnswer) -> Self
fn from(answer: NoulAnswer) -> Self
Converts to this type from the input type.
Source§impl From<ScoreAnswer> for Answer
impl From<ScoreAnswer> for Answer
Source§fn from(answer: ScoreAnswer) -> Self
fn from(answer: ScoreAnswer) -> Self
Converts to this type from the input type.
Source§impl ReadAnswer for Answer
impl ReadAnswer for Answer
impl StructuralPartialEq for Answer
Auto Trait Implementations§
impl Freeze for Answer
impl RefUnwindSafe for Answer
impl Send for Answer
impl Sync for Answer
impl Unpin for Answer
impl UnsafeUnpin for Answer
impl UnwindSafe for Answer
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