#[non_exhaustive]pub struct HttpConfig {
pub debug: Option<bool>,
pub proxy: Option<String>,
pub timeout: Option<u32>,
pub cainfo: Option<String>,
pub check_revoke: Option<bool>,
pub low_speed_limit: Option<u32>,
pub multiplexing: Option<bool>,
pub user_agent: Option<String>,
}Expand description
The [http] table.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.debug: Option<bool>If true, enables debugging of HTTP requests.
The debug information can be seen by setting the CARGO_LOG=network=debug environment variable
(or use network=trace for even more information).
proxy: Option<String>Sets an HTTP and HTTPS proxy to use. The format is in libcurl format as in [protocol://]host[:port].
If not set, Cargo will also check the http.proxy setting in your global git configuration.
If none of those are set, the HTTPS_PROXY or https_proxy environment variables set the proxy for HTTPS requests,
and http_proxy sets it for HTTP requests.
timeout: Option<u32>Sets the timeout for each HTTP request, in seconds.
cainfo: Option<String>Path to a Certificate Authority (CA) bundle file, used to verify TLS certificates. If not specified, Cargo attempts to use the system certificates.
check_revoke: Option<bool>This determines whether or not TLS certificate revocation checks should be performed. This only works on Windows.
low_speed_limit: Option<u32>This setting controls timeout behavior for slow connections.
If the average transfer speed in bytes per second is below the given value
for http.timeout seconds (default 30 seconds), then the connection is considered too slow and Cargo will abort and retry.
multiplexing: Option<bool>When true, Cargo will attempt to use the HTTP2 protocol with multiplexing. This allows multiple requests to use the same connection, usually improving performance when fetching multiple files. If false, Cargo will use HTTP 1.1 without pipelining.
user_agent: Option<String>Specifies a custom user-agent header to use. The default if not specified is a string that includes Cargo’s version.
Trait Implementations§
Source§impl Clone for HttpConfig
impl Clone for HttpConfig
Source§fn clone(&self) -> HttpConfig
fn clone(&self) -> HttpConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more