Trait HttpClientProvider

Source
pub trait HttpClientProvider {
    // Required method
    fn http_client(&self) -> &Client;

    // Provided method
    fn create_http_client(config: &ConnectionConfig) -> Client { ... }
}
Expand description

HTTP client provider trait for standardized REST API access Implementations should have an HTTP client and provide methods for creating one

Required Methods§

Source

fn http_client(&self) -> &Client

Returns a reference to the HTTP client

Provided Methods§

Source

fn create_http_client(config: &ConnectionConfig) -> Client

Create a new HTTP client with appropriate settings from config

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§