pub trait Client: Sized {
type InternalClient;
type RB;
fn new(api_key: impl Into<String>, client: Self::InternalClient) -> Self;
fn with_api_key(api_key: impl Into<String>) -> LTAResult<Self>;
fn req_builder(&self, url: &str) -> Self::RB;
}
Expand description
A Client
to make requests with
The Client
holds a connection pool internally, so it is advised that you create one and reuse it
Required Associated Types
type InternalClient
type InternalClient
Any backend Client
Required Methods
fn new(api_key: impl Into<String>, client: Self::InternalClient) -> Self
fn new(api_key: impl Into<String>, client: Self::InternalClient) -> Self
General constructor for Self
fn with_api_key(api_key: impl Into<String>) -> LTAResult<Self>
fn with_api_key(api_key: impl Into<String>) -> LTAResult<Self>
This method not assign the api_key
in struct if the provided key is empty or whitespaces
Instead, assign None
fn req_builder(&self, url: &str) -> Self::RB
fn req_builder(&self, url: &str) -> Self::RB
Returns Self::RB