Struct opentdb::api_request::ApiRequest
source · pub struct ApiRequest {
pub questions: u8,
pub category: u8,
pub difficulty: String,
pub question_type: String,
pub encoding: String,
pub token: String,
}
Expand description
A struct representing the request to the server for the main API.
Example: https://opentdb.com/api.php?amount=10&category=10&difficulty=medium&type=multiple&encode=base64
Fields
questions: u8
category: u8
difficulty: String
question_type: String
encoding: String
token: String
Trait Implementations
sourceimpl Debug for ApiRequest
impl Debug for ApiRequest
sourceimpl<'de> Deserialize<'de> for ApiRequest
impl<'de> Deserialize<'de> for ApiRequest
sourcefn 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 RefUnwindSafe for ApiRequest
impl Send for ApiRequest
impl Sync for ApiRequest
impl Unpin for ApiRequest
impl UnwindSafe for ApiRequest
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more