Skip to main content

TransportConfig

Trait TransportConfig 

Source
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§

Source

fn build_client(&self) -> Result<Client, ClientError>

Build the reqwest::Client for this transport configuration.

Trait Implementations§

Source§

impl TransportConfig for Box<dyn TransportConfig>

Source§

fn build_client(&self) -> Result<Client, ClientError>

Build the reqwest::Client for this transport configuration.

Implementations on Foreign Types§

Source§

impl TransportConfig for Box<dyn TransportConfig>

Implementors§