pub struct HttpNetworkConfig {
pub proxy: Option<ProxyConfig>,
pub ca_cert: Option<PathBuf>,
pub client_cert: Option<ClientCertConfig>,
pub pool: Option<PoolConfig>,
}Expand description
Network configuration for HTTP client.
Fields§
§proxy: Option<ProxyConfig>Proxy configuration
ca_cert: Option<PathBuf>Custom CA certificate file path
client_cert: Option<ClientCertConfig>Client certificate for mTLS
pool: Option<PoolConfig>Connection pool settings
Implementations§
Source§impl HttpNetworkConfig
impl HttpNetworkConfig
Sourcepub fn proxy(self, proxy: ProxyConfig) -> Self
pub fn proxy(self, proxy: ProxyConfig) -> Self
Set proxy configuration.
Sourcepub fn client_cert(self, cert: ClientCertConfig) -> Self
pub fn client_cert(self, cert: ClientCertConfig) -> Self
Set client certificate for mTLS.
Sourcepub fn pool(self, pool: PoolConfig) -> Self
pub fn pool(self, pool: PoolConfig) -> Self
Set connection pool configuration.
Sourcepub fn is_configured(&self) -> bool
pub fn is_configured(&self) -> bool
Check if any network configuration is set.
Sourcepub async fn apply_to_builder(
&self,
builder: ClientBuilder,
) -> Result<ClientBuilder, Error>
pub async fn apply_to_builder( &self, builder: ClientBuilder, ) -> Result<ClientBuilder, Error>
Apply configuration to reqwest ClientBuilder.
Trait Implementations§
Source§impl Clone for HttpNetworkConfig
impl Clone for HttpNetworkConfig
Source§fn clone(&self) -> HttpNetworkConfig
fn clone(&self) -> HttpNetworkConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HttpNetworkConfig
impl Debug for HttpNetworkConfig
Source§impl Default for HttpNetworkConfig
impl Default for HttpNetworkConfig
Source§fn default() -> HttpNetworkConfig
fn default() -> HttpNetworkConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HttpNetworkConfig
impl RefUnwindSafe for HttpNetworkConfig
impl Send for HttpNetworkConfig
impl Sync for HttpNetworkConfig
impl Unpin for HttpNetworkConfig
impl UnwindSafe for HttpNetworkConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.