pub struct ApiRequest {
    pub base_url: String,
    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§

§base_url: String§questions: u8§category: u8§difficulty: String§question_type: String§encoding: String§token: String

Trait Implementations§

Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.