[][src]Struct lta_blocking::lta_client::LTAClient

pub struct LTAClient { /* fields omitted */ }

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]

impl Clone for LTAClient[src]

impl Debug for LTAClient[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.