Struct http_client::Config [−][src]
#[non_exhaustive]pub struct Config { pub http_keep_alive: bool, pub tcp_no_delay: bool, pub timeout: Option<Duration>, pub tls_config: Option<Arc<TlsConnector>>, }
unstable-config
only.Expand description
Configuration for HttpClient
s.
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.http_keep_alive: bool
HTTP/1.1 keep-alive
(connection pooling).
Default: true
.
tcp_no_delay: bool
TCP NO_DELAY
.
Default: false
.
timeout: Option<Duration>
Connection timeout duration.
Default: Some(Duration::from_secs(60))
.
tls_config: Option<Arc<TlsConnector>>
h1_client
only.TLS Configuration (Native TLS)
Implementations
impl Config
[src]
impl Config
[src]pub fn set_http_keep_alive(self, keep_alive: bool) -> Self
[src]
pub fn set_http_keep_alive(self, keep_alive: bool) -> Self
[src]Set HTTP/1.1 keep-alive
(connection pooling).
pub fn set_tcp_no_delay(self, no_delay: bool) -> Self
[src]
pub fn set_tcp_no_delay(self, no_delay: bool) -> Self
[src]Set TCP NO_DELAY
.
pub fn set_timeout(self, timeout: Option<Duration>) -> Self
[src]
pub fn set_timeout(self, timeout: Option<Duration>) -> Self
[src]Set connection timeout duration.
pub fn set_tls_config(self, tls_config: Option<Arc<TlsConnector>>) -> Self
[src]
This is supported on crate feature h1_client
only.
pub fn set_tls_config(self, tls_config: Option<Arc<TlsConnector>>) -> Self
[src]h1_client
only.Set TLS Configuration (Native TLS)
Trait Implementations
impl TryFrom<Config> for IsahcClient
[src]
impl TryFrom<Config> for IsahcClient
[src]curl_client
only.Auto Trait Implementations
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
impl<T> WithSubscriber for T
[src]fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
fn with_current_subscriber(self) -> WithDispatch<Self>
[src]
fn with_current_subscriber(self) -> WithDispatch<Self>
[src]Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more