pub struct Trivia {
pub category: Category,
pub kind: Kind,
pub difficulty: Difficulty,
pub question: String,
pub correct_answer: String,
pub incorrect_answers: Vec<String>,
}Expand description
A trivia containing all the data about itself.
Fields§
§category: CategoryThe category this trivia belongs to.
kind: KindThe kind of answers this trivia has.
difficulty: DifficultyThe difficulty of this trivia.
question: StringThe question of this trivia.
correct_answer: StringThe correct answer of this trivia.
incorrect_answers: Vec<String>The incorrect answers of this trivia.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Trivia
impl<'de> Deserialize<'de> for Trivia
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
Auto Trait Implementations§
impl Freeze for Trivia
impl RefUnwindSafe for Trivia
impl Send for Trivia
impl Sync for Trivia
impl Unpin for Trivia
impl UnwindSafe for Trivia
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