pub trait TransportConfig: Send + Sync {
// Required method
fn build_client(&self) -> Result<Client, ClientError>;
}Expand description
Controls how the underlying reqwest::Client is constructed.
Implementations configure TLS trust roots, client certificates, and
connect timeouts. This is separate from credential injection
(see AuthProvider) so transports and credentials compose freely.
Implement this trait when you need custom TLS logic (e.g. a private CA
or a client certificate). For custom per-request credentials only,
implement AuthProvider instead. DefaultTransport covers the common
case of publicly-trusted TLS with no custom certificates.
Required Methods§
Sourcefn build_client(&self) -> Result<Client, ClientError>
fn build_client(&self) -> Result<Client, ClientError>
Build the reqwest::Client for this transport configuration.
Trait Implementations§
Source§impl TransportConfig for Box<dyn TransportConfig>
impl TransportConfig for Box<dyn TransportConfig>
Source§fn build_client(&self) -> Result<Client, ClientError>
fn build_client(&self) -> Result<Client, ClientError>
Build the
reqwest::Client for this transport configuration.