Struct cargo_swagger::client::Client
[−]
[src]
pub struct Client { /* fields omitted */ }
A client that implements the API by making HTTP calls out to a server.
Methods
impl Client
[src]
fn try_new_http<T>(base_path: T) -> Result<Client, ClientInitError> where
T: IntoUrl,
[src]
T: IntoUrl,
fn try_new_https<T, CA>(
base_path: T,
ca_certificate: CA
) -> Result<Client, ClientInitError> where
T: IntoUrl,
CA: AsRef<Path>,
[src]
base_path: T,
ca_certificate: CA
) -> Result<Client, ClientInitError> where
T: IntoUrl,
CA: AsRef<Path>,
fn try_new_https_mutual<T, CA, K, C>(
base_path: T,
ca_certificate: CA,
client_key: K,
client_certificate: C
) -> Result<Client, ClientInitError> where
T: IntoUrl,
CA: AsRef<Path>,
K: AsRef<Path>,
C: AsRef<Path>,
[src]
base_path: T,
ca_certificate: CA,
client_key: K,
client_certificate: C
) -> Result<Client, ClientInitError> where
T: IntoUrl,
CA: AsRef<Path>,
K: AsRef<Path>,
C: AsRef<Path>,
fn try_new_with_hyper_client<T>(
base_path: T,
hyper_client: Arc<Fn() -> Client + Sync + Send>
) -> Result<Client, ClientInitError> where
T: IntoUrl,
[src]
base_path: T,
hyper_client: Arc<Fn() -> Client + Sync + Send>
) -> Result<Client, ClientInitError> where
T: IntoUrl,
Constructor for creating a Client
by passing in a pre-made hyper
client.
One should avoid relying on this function if possible, since it adds a dependency on the underlying transport implementation, which it would be better to abstract away. Therefore, using this function may lead to a loss of code generality, which may make it harder to move the application to a serverless environment, for example.
The reason for this function's existence is to support legacy test code, which did mocking at the hyper layer. This is not a recommended way to write new tests. If other reasons are found for using this function, they should be mentioned here.
Trait Implementations
impl Clone for Client
[src]
fn clone(&self) -> Client
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Client
[src]
impl Api for Client
[src]
fn upload_api(
&self,
param_api_and_token: ApiAndToken,
context: &Context
) -> Box<Future<Item = UploadApiResponse, Error = ApiError> + Send>
[src]
&self,
param_api_and_token: ApiAndToken,
context: &Context
) -> Box<Future<Item = UploadApiResponse, Error = ApiError> + Send>
Upload an API