pub struct HttpClientBuilder {
client: Option<Client>,
base_url: Option<Url>,
auth_tokens: Option<Option<AuthTokens>>,
captcha: Option<Option<String>>,
client_info: Option<Option<ClientInfo>>,
}
Expand description
Builder for HttpClient
.
Fields§
§client: Option<Client>
§base_url: Option<Url>
§auth_tokens: Option<Option<AuthTokens>>
§captcha: Option<Option<String>>
§client_info: Option<Option<ClientInfo>>
Implementations§
Source§impl HttpClientBuilder
impl HttpClientBuilder
pub fn client<VALUE: Into<Client>>(&mut self, value: VALUE) -> &mut Self
pub fn base_url<VALUE: Into<Url>>(&mut self, value: VALUE) -> &mut Self
pub fn auth_tokens<VALUE: Into<AuthTokens>>( &mut self, value: VALUE, ) -> &mut Self
pub fn captcha<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn client_info<VALUE: Into<ClientInfo>>( &mut self, value: VALUE, ) -> &mut Self
Sourcepub fn build(&self) -> Result<HttpClient, BuilderError>
pub fn build(&self) -> Result<HttpClient, BuilderError>
Sourcefn create_empty() -> Self
fn create_empty() -> Self
Create an empty builder, with all fields set to None
or PhantomData
.
Trait Implementations§
Source§impl Clone for HttpClientBuilder
impl Clone for HttpClientBuilder
Source§fn clone(&self) -> HttpClientBuilder
fn clone(&self) -> HttpClientBuilder
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for HttpClientBuilder
impl !RefUnwindSafe for HttpClientBuilder
impl Send for HttpClientBuilder
impl Sync for HttpClientBuilder
impl Unpin for HttpClientBuilder
impl !UnwindSafe for HttpClientBuilder
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