pub struct ApiBuilderSimple { /* private fields */ }Expand description
The Simple Builder is not limited to what is within Enums, so the builder SHOULD be able to deal with any arbitrary data. If the user uses something unsupported, breakage MIGHT occur, but at the same time should something unsupported and new or shiny happen, the user can use it.
Implementations§
Source§impl ApiBuilderSimple
impl ApiBuilderSimple
pub fn new() -> Self
pub fn base_url(&mut self, base_url: String) -> &mut Self
pub fn questions(&mut self, questions: u8) -> &mut Self
pub fn category(&mut self, category: u8) -> &mut Self
pub fn difficulty(&mut self, difficulty: String) -> &mut Self
pub fn question_type(&mut self, question_type: String) -> &mut Self
pub fn encoding(&mut self, encoding: String) -> &mut Self
pub fn token(&mut self, token: String) -> &mut Self
pub fn build(&self) -> ApiRequest
Trait Implementations§
Source§impl Default for ApiBuilderSimple
impl Default for ApiBuilderSimple
Source§fn default() -> ApiBuilderSimple
fn default() -> ApiBuilderSimple
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ApiBuilderSimple
impl RefUnwindSafe for ApiBuilderSimple
impl Send for ApiBuilderSimple
impl Sync for ApiBuilderSimple
impl Unpin for ApiBuilderSimple
impl UnsafeUnpin for ApiBuilderSimple
impl UnwindSafe for ApiBuilderSimple
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more