[−][src]Struct lta_blocking::lta_client::LTAClient
A Client
to make requests with
The Client
holds a connection pool internally, so it is advised that you create one and reuse it
There are some instance where you might need to customise your client due to certain limitations.
The Client
trait has a general constructor method and you should use the reqwest
re-export
to build you own customised client from the ground up.
Take a look at the reqwest documentation on how to build your own client
Example
use lta_utils_commons::reqwest::blocking::ClientBuilder; use lta_utils_commons::Client; use std::time::Duration; use lta_blocking::lta_client::LTAClient; fn my_custom_client() -> LTAClient { let client = ClientBuilder::new() .no_gzip() .connect_timeout(Duration::new(420, 0)) .build() .unwrap(); LTAClient::new(Some("api_key".to_string()), client) }
Trait Implementations
impl Client<Client, RequestBuilder> for LTAClient
[src]
fn new(api_key: Option<String>, client: Client) -> LTAClient
[src]
fn with_api_key<S>(api_key: S) -> LTAClient where
S: Into<String>,
[src]
S: Into<String>,
fn get_req_builder(&self, url: &str) -> RequestBuilder
[src]
impl Clone for LTAClient
[src]
impl Debug for LTAClient
[src]
Auto Trait Implementations
impl !RefUnwindSafe for LTAClient
impl Send for LTAClient
impl Sync for LTAClient
impl Unpin for LTAClient
impl !UnwindSafe for LTAClient
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,