#[non_exhaustive]pub struct NetworkConfig {
pub timeout_secs: u64,
pub connect_timeout_secs: u64,
pub retries: u32,
pub user_agent: String,
pub allow_cross_origin_auth: bool,
pub proxy: Option<String>,
pub no_proxy: Option<String>,
}Expand description
HTTP networking defaults: timeouts, retries, user agent and auth policy.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.timeout_secs: u64Total request timeout in seconds.
connect_timeout_secs: u64Connection timeout in seconds.
retries: u32Number of retry attempts for failed transfers.
user_agent: StringUser-Agent header sent with every request.
allow_cross_origin_auth: boolAllow authentication headers to follow cross-origin redirects.
proxy: Option<String>Explicit HTTP/HTTPS/SOCKS proxy URL. When unset, the HTTP client keeps reqwest’s ambient behavior.
no_proxy: Option<String>Comma-separated hosts that bypass the configured proxy.
Trait Implementations§
Source§impl Clone for NetworkConfig
impl Clone for NetworkConfig
Source§impl Debug for NetworkConfig
impl Debug for NetworkConfig
Source§impl Default for NetworkConfig
impl Default for NetworkConfig
Source§impl<'de> Deserialize<'de> for NetworkConfigwhere
NetworkConfig: Default,
impl<'de> Deserialize<'de> for NetworkConfigwhere
NetworkConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for NetworkConfig
impl Freeze for NetworkConfig
impl Move for NetworkConfig
impl RefUnwindSafe for NetworkConfig
impl Send for NetworkConfig
impl Sync for NetworkConfig
impl Unpin for NetworkConfig
impl UnsafeUnpin for NetworkConfig
impl UnwindSafe for NetworkConfig
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