| <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A `ClientBuilder` can be used to create a `Client` with custom configuration."><meta name="keywords" content="rust, rustlang, rust-lang, ClientBuilder"><title>ClientBuilder in reqwest - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../normalize.css"><link rel="stylesheet" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../ayu.css" disabled><link rel="stylesheet" href="../dark.css" disabled><link rel="stylesheet" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../reqwest/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../reqwest/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">ClientBuilder</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.add_root_certificate">add_root_certificate</a></li><li><a href="#method.build">build</a></li><li><a href="#method.connect_timeout">connect_timeout</a></li><li><a href="#method.connection_verbose">connection_verbose</a></li><li><a href="#method.danger_accept_invalid_certs">danger_accept_invalid_certs</a></li><li><a href="#method.default_headers">default_headers</a></li><li><a href="#method.dns_resolver">dns_resolver</a></li><li><a href="#method.http09_responses">http09_responses</a></li><li><a href="#method.http1_allow_obsolete_multiline_headers_in_responses">http1_allow_obsolete_multiline_headers_in_responses</a></li><li><a href="#method.http1_only">http1_only</a></li><li><a href="#method.http1_title_case_headers">http1_title_case_headers</a></li><li><a href="#method.http2_adaptive_window">http2_adaptive_window</a></li><li><a href="#method.http2_initial_connection_window_size">http2_initial_connection_window_size</a></li><li><a href="#method.http2_initial_stream_window_size">http2_initial_stream_window_size</a></li><li><a href="#method.http2_keep_alive_interval">http2_keep_alive_interval</a></li><li><a href="#method.http2_keep_alive_timeout">http2_keep_alive_timeout</a></li><li><a href="#method.http2_keep_alive_while_idle">http2_keep_alive_while_idle</a></li><li><a href="#method.http2_max_frame_size">http2_max_frame_size</a></li><li><a href="#method.http2_prior_knowledge">http2_prior_knowledge</a></li><li><a href="#method.https_only">https_only</a></li><li><a href="#method.local_address">local_address</a></li><li><a href="#method.max_tls_version">max_tls_version</a></li><li><a href="#method.min_tls_version">min_tls_version</a></li><li><a href="#method.new">new</a></li><li><a href="#method.no_brotli">no_brotli</a></li><li><a href="#method.no_deflate">no_deflate</a></li><li><a href="#method.no_gzip">no_gzip</a></li><li><a href="#method.no_proxy">no_proxy</a></li><li><a href="#method.no_trust_dns">no_trust_dns</a></li><li><a href="#method.pool_idle_timeout">pool_idle_timeout</a></li><li><a href="#method.pool_max_idle_per_host">pool_max_idle_per_host</a></li><li><a href="#method.proxy">proxy</a></li><li><a href="#method.redirect">redirect</a></li><li><a href="#method.referer">referer</a></li><li><a href="#method.resolve">resolve</a></li><li><a href="#method.resolve_to_addrs">resolve_to_addrs</a></li><li><a href="#method.tcp_keepalive">tcp_keepalive</a></li><li><a href="#method.tcp_nodelay">tcp_nodelay</a></li><li><a href="#method.timeout">timeout</a></li><li><a href="#method.tls_built_in_root_certs">tls_built_in_root_certs</a></li><li><a href="#method.tls_sni">tls_sni</a></li><li><a href="#method.user_agent">user_agent</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Debug-for-ClientBuilder">Debug</a></li><li><a href="#impl-Default-for-ClientBuilder">Default</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-ClientBuilder">!RefUnwindSafe</a></li><li><a href="#impl-Send-for-ClientBuilder">Send</a></li><li><a href="#impl-Sync-for-ClientBuilder">Sync</a></li><li><a href="#impl-Unpin-for-ClientBuilder">Unpin</a></li><li><a href="#impl-UnwindSafe-for-ClientBuilder">!UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-ClientBuilder">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-ClientBuilder">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-ClientBuilder">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-ClientBuilder">From<T></a></li><li><a href="#impl-Instrument-for-ClientBuilder">Instrument</a></li><li><a href="#impl-Into%3CU%3E-for-ClientBuilder">Into<U></a></li><li><a href="#impl-TryFrom%3CU%3E-for-ClientBuilder">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-ClientBuilder">TryInto<U></a></li><li><a href="#impl-WithSubscriber-for-ClientBuilder">WithSubscriber</a></li></ul></section><h2><a href="index.html">In reqwest</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="index.html">reqwest</a>::<wbr><a class="struct" href="#">ClientBuilder</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#75-77">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct ClientBuilder { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A <code>ClientBuilder</code> can be used to create a <code>Client</code> with custom configuration.</p> |
| </div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-ClientBuilder" class="impl has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#157-1525">source</a><a href="#impl-ClientBuilder" class="anchor"></a><h3 class="code-header">impl <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#161-231">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>() -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Constructs a new <code>ClientBuilder</code>.</p> |
| <p>This is the same as <code>Client::builder()</code>.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.build" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#239-613">source</a><h4 class="code-header">pub fn <a href="#method.build" class="fnname">build</a>(self) -> <a class="type" href="type.Result.html" title="type reqwest::Result">Result</a><<a class="struct" href="struct.Client.html" title="struct reqwest::Client">Client</a>></h4></section></summary><div class="docblock"><p>Returns a <code>Client</code> that uses this <code>ClientBuilder</code> configuration.</p> |
| <h5 id="errors"><a href="#errors">Errors</a></h5> |
| <p>This method fails if a TLS backend cannot be initialized, or the resolver |
| cannot load the system configuration.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.user_agent" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#637-651">source</a><h4 class="code-header">pub fn <a href="#method.user_agent" class="fnname">user_agent</a><V>(self, value: V) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a><span class="where fmt-newline">where<br> V: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><<a class="struct" href="header/struct.HeaderValue.html" title="struct reqwest::header::HeaderValue">HeaderValue</a>>,<br> V::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" title="type core::convert::TryInto::Error">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="../http/error/struct.Error.html" title="struct http::error::Error">Error</a>>,</span></h4></section></summary><div class="docblock"><p>Sets the <code>User-Agent</code> header to be used by this client.</p> |
| <h5 id="example"><a href="#example">Example</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// Name your user agent after your app? |
| </span><span class="kw">static </span>APP_USER_AGENT: <span class="kw-2">&</span>str = <span class="macro">concat!</span>( |
| <span class="macro">env!</span>(<span class="string">"CARGO_PKG_NAME"</span>), |
| <span class="string">"/"</span>, |
| <span class="macro">env!</span>(<span class="string">"CARGO_PKG_VERSION"</span>), |
| ); |
| |
| <span class="kw">let </span>client = reqwest::Client::builder() |
| .user_agent(APP_USER_AGENT) |
| .build()<span class="question-mark">?</span>; |
| <span class="kw">let </span>res = client.get(<span class="string">"https://www.rust-lang.org"</span>).send().<span class="kw">await</span><span class="question-mark">?</span>;</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.default_headers" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#696-701">source</a><h4 class="code-header">pub fn <a href="#method.default_headers" class="fnname">default_headers</a>(self, headers: <a class="struct" href="header/struct.HeaderMap.html" title="struct reqwest::header::HeaderMap">HeaderMap</a>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Sets the default headers for every request.</p> |
| <h5 id="example-1"><a href="#example-1">Example</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>reqwest::header; |
| <span class="kw">let </span><span class="kw-2">mut </span>headers = header::HeaderMap::new(); |
| headers.insert(<span class="string">"X-MY-HEADER"</span>, header::HeaderValue::from_static(<span class="string">"value"</span>)); |
| |
| <span class="comment">// Consider marking security-sensitive headers with `set_sensitive`. |
| </span><span class="kw">let </span><span class="kw-2">mut </span>auth_value = header::HeaderValue::from_static(<span class="string">"secret"</span>); |
| auth_value.set_sensitive(<span class="bool-val">true</span>); |
| headers.insert(header::AUTHORIZATION, auth_value); |
| |
| <span class="comment">// get a client builder |
| </span><span class="kw">let </span>client = reqwest::Client::builder() |
| .default_headers(headers) |
| .build()<span class="question-mark">?</span>; |
| <span class="kw">let </span>res = client.get(<span class="string">"https://www.rust-lang.org"</span>).send().<span class="kw">await</span><span class="question-mark">?</span>;</code></pre></div> |
| <p>Override the default headers:</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>reqwest::header; |
| <span class="kw">let </span><span class="kw-2">mut </span>headers = header::HeaderMap::new(); |
| headers.insert(<span class="string">"X-MY-HEADER"</span>, header::HeaderValue::from_static(<span class="string">"value"</span>)); |
| |
| <span class="comment">// get a client builder |
| </span><span class="kw">let </span>client = reqwest::Client::builder() |
| .default_headers(headers) |
| .build()<span class="question-mark">?</span>; |
| <span class="kw">let </span>res = client |
| .get(<span class="string">"https://www.rust-lang.org"</span>) |
| .header(<span class="string">"X-MY-HEADER"</span>, <span class="string">"new_value"</span>) |
| .send() |
| .<span class="kw">await</span><span class="question-mark">?</span>;</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.no_gzip" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#818-828">source</a><h4 class="code-header">pub fn <a href="#method.no_gzip" class="fnname">no_gzip</a>(self) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Disable auto response body gzip decompression.</p> |
| <p>This method exists even if the optional <code>gzip</code> feature is not enabled. |
| This can be used to ensure a <code>Client</code> doesn’t use gzip decompression |
| even if another dependency were to enable the optional <code>gzip</code> feature.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.no_brotli" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#835-845">source</a><h4 class="code-header">pub fn <a href="#method.no_brotli" class="fnname">no_brotli</a>(self) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Disable auto response body brotli decompression.</p> |
| <p>This method exists even if the optional <code>brotli</code> feature is not enabled. |
| This can be used to ensure a <code>Client</code> doesn’t use brotli decompression |
| even if another dependency were to enable the optional <code>brotli</code> feature.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.no_deflate" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#852-862">source</a><h4 class="code-header">pub fn <a href="#method.no_deflate" class="fnname">no_deflate</a>(self) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Disable auto response body deflate decompression.</p> |
| <p>This method exists even if the optional <code>deflate</code> feature is not enabled. |
| This can be used to ensure a <code>Client</code> doesn’t use deflate decompression |
| even if another dependency were to enable the optional <code>deflate</code> feature.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.redirect" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#869-872">source</a><h4 class="code-header">pub fn <a href="#method.redirect" class="fnname">redirect</a>(self, policy: <a class="struct" href="redirect/struct.Policy.html" title="struct reqwest::redirect::Policy">Policy</a>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Set a <code>RedirectPolicy</code> for this client.</p> |
| <p>Default will follow redirects up to a maximum of 10.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.referer" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#877-880">source</a><h4 class="code-header">pub fn <a href="#method.referer" class="fnname">referer</a>(self, enable: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Enable or disable automatic setting of the <code>Referer</code> header.</p> |
| <p>Default is <code>true</code>.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.proxy" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#889-893">source</a><h4 class="code-header">pub fn <a href="#method.proxy" class="fnname">proxy</a>(self, proxy: <a class="struct" href="struct.Proxy.html" title="struct reqwest::Proxy">Proxy</a>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Add a <code>Proxy</code> to the list of proxies the <code>Client</code> will use.</p> |
| <h5 id="note"><a href="#note">Note</a></h5> |
| <p>Adding a proxy will disable the automatic usage of the “system” proxy.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.no_proxy" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#902-906">source</a><h4 class="code-header">pub fn <a href="#method.no_proxy" class="fnname">no_proxy</a>(self) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Clear all <code>Proxies</code>, so <code>Client</code> will use no proxy anymore.</p> |
| <h5 id="note-1"><a href="#note-1">Note</a></h5> |
| <p>To add a proxy exclusion list, use <a href="struct.Proxy.html#method.no_proxy" title="crate::proxy::Proxy::no_proxy()">crate::proxy::Proxy::no_proxy()</a> |
| on all desired proxies instead.</p> |
| <p>This also disables the automatic usage of the “system” proxy.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.timeout" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#916-919">source</a><h4 class="code-header">pub fn <a href="#method.timeout" class="fnname">timeout</a>(self, timeout: <a class="struct" href="https://doc.rust-lang.org/nightly/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Enables a request timeout.</p> |
| <p>The timeout is applied from when the request starts connecting until the |
| response body has finished.</p> |
| <p>Default is no timeout.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.connect_timeout" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#929-932">source</a><h4 class="code-header">pub fn <a href="#method.connect_timeout" class="fnname">connect_timeout</a>(self, timeout: <a class="struct" href="https://doc.rust-lang.org/nightly/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Set a timeout for only the connect phase of a <code>Client</code>.</p> |
| <p>Default is <code>None</code>.</p> |
| <h5 id="note-2"><a href="#note-2">Note</a></h5> |
| <p>This <strong>requires</strong> the futures be executed in a tokio runtime with |
| a tokio timer enabled.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.connection_verbose" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#940-943">source</a><h4 class="code-header">pub fn <a href="#method.connection_verbose" class="fnname">connection_verbose</a>(self, verbose: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Set whether connections should emit verbose logs.</p> |
| <p>Enabling this option will emit <a href="https://crates.io/crates/log">log</a> messages at the <code>TRACE</code> level |
| for read and write operations on connections.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.pool_idle_timeout" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#952-958">source</a><h4 class="code-header">pub fn <a href="#method.pool_idle_timeout" class="fnname">pool_idle_timeout</a><D>(self, val: D) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a><span class="where fmt-newline">where<br> D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a>>>,</span></h4></section></summary><div class="docblock"><p>Set an optional timeout for idle sockets being kept-alive.</p> |
| <p>Pass <code>None</code> to disable timeout.</p> |
| <p>Default is 90 seconds.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.pool_max_idle_per_host" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#961-964">source</a><h4 class="code-header">pub fn <a href="#method.pool_max_idle_per_host" class="fnname">pool_max_idle_per_host</a>(self, max: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Sets the maximum idle connection per host allowed in the pool.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http1_title_case_headers" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#967-970">source</a><h4 class="code-header">pub fn <a href="#method.http1_title_case_headers" class="fnname">http1_title_case_headers</a>(self) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Send headers as title case instead of lowercase.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http1_allow_obsolete_multiline_headers_in_responses" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#977-984">source</a><h4 class="code-header">pub fn <a href="#method.http1_allow_obsolete_multiline_headers_in_responses" class="fnname">http1_allow_obsolete_multiline_headers_in_responses</a>(<br> self,<br> value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><br>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Set whether HTTP/1 connections will accept obsolete line folding for |
| header values.</p> |
| <p>Newline codepoints (<code>\r</code> and <code>\n</code>) will be transformed to spaces when |
| parsing.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http1_only" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#987-990">source</a><h4 class="code-header">pub fn <a href="#method.http1_only" class="fnname">http1_only</a>(self) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Only use HTTP/1.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http09_responses" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#993-996">source</a><h4 class="code-header">pub fn <a href="#method.http09_responses" class="fnname">http09_responses</a>(self) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Allow HTTP/0.9 responses</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http2_prior_knowledge" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#999-1002">source</a><h4 class="code-header">pub fn <a href="#method.http2_prior_knowledge" class="fnname">http2_prior_knowledge</a>(self) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Only use HTTP/2.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http2_initial_stream_window_size" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#1014-1017">source</a><h4 class="code-header">pub fn <a href="#method.http2_initial_stream_window_size" class="fnname">http2_initial_stream_window_size</a>(<br> self,<br> sz: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>>><br>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Sets the <code>SETTINGS_INITIAL_WINDOW_SIZE</code> option for HTTP2 stream-level flow control.</p> |
| <p>Default is currently 65,535 but may change internally to optimize for common uses.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http2_initial_connection_window_size" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#1022-1028">source</a><h4 class="code-header">pub fn <a href="#method.http2_initial_connection_window_size" class="fnname">http2_initial_connection_window_size</a>(<br> self,<br> sz: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>>><br>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Sets the max connection-level flow control for HTTP2</p> |
| <p>Default is currently 65,535 but may change internally to optimize for common uses.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http2_adaptive_window" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#1034-1037">source</a><h4 class="code-header">pub fn <a href="#method.http2_adaptive_window" class="fnname">http2_adaptive_window</a>(self, enabled: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Sets whether to use an adaptive flow control.</p> |
| <p>Enabling this will override the limits set in <code>http2_initial_stream_window_size</code> and |
| <code>http2_initial_connection_window_size</code>.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http2_max_frame_size" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#1042-1045">source</a><h4 class="code-header">pub fn <a href="#method.http2_max_frame_size" class="fnname">http2_max_frame_size</a>(self, sz: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>>>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Sets the maximum frame size to use for HTTP2.</p> |
| <p>Default is currently 16,384 but may change internally to optimize for common uses.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http2_keep_alive_interval" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#1051-1057">source</a><h4 class="code-header">pub fn <a href="#method.http2_keep_alive_interval" class="fnname">http2_keep_alive_interval</a>(<br> self,<br> interval: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a>>><br>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Sets an interval for HTTP2 Ping frames should be sent to keep a connection alive.</p> |
| <p>Pass <code>None</code> to disable HTTP2 keep-alive. |
| Default is currently disabled.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http2_keep_alive_timeout" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#1064-1067">source</a><h4 class="code-header">pub fn <a href="#method.http2_keep_alive_timeout" class="fnname">http2_keep_alive_timeout</a>(self, timeout: <a class="struct" href="https://doc.rust-lang.org/nightly/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Sets a timeout for receiving an acknowledgement of the keep-alive ping.</p> |
| <p>If the ping is not acknowledged within the timeout, the connection will be closed. |
| Does nothing if <code>http2_keep_alive_interval</code> is disabled. |
| Default is currently disabled.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http2_keep_alive_while_idle" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#1075-1078">source</a><h4 class="code-header">pub fn <a href="#method.http2_keep_alive_while_idle" class="fnname">http2_keep_alive_while_idle</a>(self, enabled: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Sets whether HTTP2 keep-alive should apply while the connection is idle.</p> |
| <p>If disabled, keep-alive pings are only sent while there are open request/responses streams. |
| If enabled, pings are also sent when no streams are active. |
| Does nothing if <code>http2_keep_alive_interval</code> is disabled. |
| Default is <code>false</code>.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.tcp_nodelay" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#1085-1088">source</a><h4 class="code-header">pub fn <a href="#method.tcp_nodelay" class="fnname">tcp_nodelay</a>(self, enabled: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Set whether sockets have <code>TCP_NODELAY</code> enabled.</p> |
| <p>Default is <code>true</code>.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.local_address" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#1101-1107">source</a><h4 class="code-header">pub fn <a href="#method.local_address" class="fnname">local_address</a><T>(self, addr: T) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a><span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/std/net/ip_addr/enum.IpAddr.html" title="enum std::net::ip_addr::IpAddr">IpAddr</a>>>,</span></h4></section></summary><div class="docblock"><p>Bind to a local IP Address.</p> |
| <h5 id="example-2"><a href="#example-2">Example</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::net::IpAddr; |
| <span class="kw">let </span>local_addr = IpAddr::from([<span class="number">12</span>, <span class="number">4</span>, <span class="number">1</span>, <span class="number">8</span>]); |
| <span class="kw">let </span>client = reqwest::Client::builder() |
| .local_address(local_addr) |
| .build().unwrap();</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.tcp_keepalive" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#1112-1118">source</a><h4 class="code-header">pub fn <a href="#method.tcp_keepalive" class="fnname">tcp_keepalive</a><D>(self, val: D) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a><span class="where fmt-newline">where<br> D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a>>>,</span></h4></section></summary><div class="docblock"><p>Set that all sockets have <code>SO_KEEPALIVE</code> set with the supplied duration.</p> |
| <p>If <code>None</code>, the option will not be set.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.add_root_certificate" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#1140-1143">source</a><h4 class="code-header">pub fn <a href="#method.add_root_certificate" class="fnname">add_root_certificate</a>(self, cert: <a class="struct" href="tls/struct.Certificate.html" title="struct reqwest::tls::Certificate">Certificate</a>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Add a custom root certificate.</p> |
| <p>This can be used to connect to a server that has a self-signed |
| certificate for example.</p> |
| <h5 id="optional"><a href="#optional">Optional</a></h5> |
| <p>This requires the optional <code>default-tls</code>, <code>native-tls</code>, or <code>rustls-tls(-...)</code> |
| feature to be enabled.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.tls_built_in_root_certs" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#1162-1165">source</a><h4 class="code-header">pub fn <a href="#method.tls_built_in_root_certs" class="fnname">tls_built_in_root_certs</a>(<br> self,<br> tls_built_in_root_certs: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><br>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Controls the use of built-in/preloaded certificates during certificate validation.</p> |
| <p>Defaults to <code>true</code> – built-in system certs will be used.</p> |
| <h5 id="optional-1"><a href="#optional-1">Optional</a></h5> |
| <p>This requires the optional <code>default-tls</code>, <code>native-tls</code>, or <code>rustls-tls(-...)</code> |
| feature to be enabled.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.danger_accept_invalid_certs" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#1229-1232">source</a><h4 class="code-header">pub fn <a href="#method.danger_accept_invalid_certs" class="fnname">danger_accept_invalid_certs</a>(<br> self,<br> accept_invalid_certs: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><br>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Controls the use of certificate validation.</p> |
| <p>Defaults to <code>false</code>.</p> |
| <h5 id="warning"><a href="#warning">Warning</a></h5> |
| <p>You should think very carefully before using this method. If |
| invalid certificates are trusted, <em>any</em> certificate for <em>any</em> site |
| will be trusted for use. This includes expired certificates. This |
| introduces significant vulnerabilities, and should only be used |
| as a last resort.</p> |
| <h5 id="optional-2"><a href="#optional-2">Optional</a></h5> |
| <p>This requires the optional <code>default-tls</code>, <code>native-tls</code>, or <code>rustls-tls(-...)</code> |
| feature to be enabled.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.tls_sni" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#1251-1254">source</a><h4 class="code-header">pub fn <a href="#method.tls_sni" class="fnname">tls_sni</a>(self, tls_sni: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Controls the use of TLS server name indication.</p> |
| <p>Defaults to <code>true</code>.</p> |
| <h5 id="optional-3"><a href="#optional-3">Optional</a></h5> |
| <p>This requires the optional <code>default-tls</code>, <code>native-tls</code>, or <code>rustls-tls(-...)</code> |
| feature to be enabled.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.min_tls_version" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#1280-1283">source</a><h4 class="code-header">pub fn <a href="#method.min_tls_version" class="fnname">min_tls_version</a>(self, version: <a class="struct" href="tls/struct.Version.html" title="struct reqwest::tls::Version">Version</a>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Set the minimum required TLS version for connections.</p> |
| <p>By default the TLS backend’s own default is used.</p> |
| <h5 id="errors-1"><a href="#errors-1">Errors</a></h5> |
| <p>A value of <code>tls::Version::TLS_1_3</code> will cause an error with the |
| <code>native-tls</code>/<code>default-tls</code> backend. This does not mean the version |
| isn’t supported, just that it can’t be set as a minimum due to |
| technical limitations.</p> |
| <h5 id="optional-4"><a href="#optional-4">Optional</a></h5> |
| <p>This requires the optional <code>default-tls</code>, <code>native-tls</code>, or <code>rustls-tls(-...)</code> |
| feature to be enabled.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.max_tls_version" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#1309-1312">source</a><h4 class="code-header">pub fn <a href="#method.max_tls_version" class="fnname">max_tls_version</a>(self, version: <a class="struct" href="tls/struct.Version.html" title="struct reqwest::tls::Version">Version</a>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Set the maximum allowed TLS version for connections.</p> |
| <p>By default there’s no maximum.</p> |
| <h5 id="errors-2"><a href="#errors-2">Errors</a></h5> |
| <p>A value of <code>tls::Version::TLS_1_3</code> will cause an error with the |
| <code>native-tls</code>/<code>default-tls</code> backend. This does not mean the version |
| isn’t supported, just that it can’t be set as a maximum due to |
| technical limitations.</p> |
| <h5 id="optional-5"><a href="#optional-5">Optional</a></h5> |
| <p>This requires the optional <code>default-tls</code>, <code>native-tls</code>, or <code>rustls-tls(-...)</code> |
| feature to be enabled.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.no_trust_dns" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#1413-1423">source</a><h4 class="code-header">pub fn <a href="#method.no_trust_dns" class="fnname">no_trust_dns</a>(self) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Disables the trust-dns async resolver.</p> |
| <p>This method exists even if the optional <code>trust-dns</code> feature is not enabled. |
| This can be used to ensure a <code>Client</code> doesn’t use the trust-dns async resolver |
| even if another dependency were to enable the optional <code>trust-dns</code> feature.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.https_only" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#1428-1431">source</a><h4 class="code-header">pub fn <a href="#method.https_only" class="fnname">https_only</a>(self, enabled: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Restrict the Client to be used with HTTPS only requests.</p> |
| <p>Defaults to false.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.resolve" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#1441-1443">source</a><h4 class="code-header">pub fn <a href="#method.resolve" class="fnname">resolve</a>(self, domain: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, addr: <a class="enum" href="https://doc.rust-lang.org/nightly/std/net/socket_addr/enum.SocketAddr.html" title="enum std::net::socket_addr::SocketAddr">SocketAddr</a>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Override DNS resolution for specific domains to a particular IP address.</p> |
| <p>Warning</p> |
| <p>Since the DNS protocol has no notion of ports, if you wish to send |
| traffic to a particular port you must include this port in the URL |
| itself, any port in the overridden addr will be ignored and traffic sent |
| to the conventional port for the given scheme (e.g. 80 for http).</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.resolve_to_addrs" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#1453-1458">source</a><h4 class="code-header">pub fn <a href="#method.resolve_to_addrs" class="fnname">resolve_to_addrs</a>(self, domain: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, addrs: &[<a class="enum" href="https://doc.rust-lang.org/nightly/std/net/socket_addr/enum.SocketAddr.html" title="enum std::net::socket_addr::SocketAddr">SocketAddr</a>]) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Override DNS resolution for specific domains to particular IP addresses.</p> |
| <p>Warning</p> |
| <p>Since the DNS protocol has no notion of ports, if you wish to send |
| traffic to a particular port you must include this port in the URL |
| itself, any port in the overridden addresses will be ignored and traffic sent |
| to the conventional port for the given scheme (e.g. 80 for http).</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.dns_resolver" class="method has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#1465-1468">source</a><h4 class="code-header">pub fn <a href="#method.dns_resolver" class="fnname">dns_resolver</a><R: <a class="trait" href="dns/trait.Resolve.html" title="trait reqwest::dns::Resolve">Resolve</a> + 'static>(<br> self,<br> resolver: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><R><br>) -> <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h4></section></summary><div class="docblock"><p>Override the DNS resolver implementation.</p> |
| <p>Pass an <code>Arc</code> wrapping a trait object implementing <code>Resolve</code>. |
| Overrides for specific names passed to <code>resolve</code> and <code>resolve_to_addrs</code> will |
| still be applied on top of this resolver.</p> |
| </div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-ClientBuilder" class="impl has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#1800-1806">source</a><a href="#impl-Debug-for-ClientBuilder" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#1801-1805">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Default-for-ClientBuilder" class="impl has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#151-155">source</a><a href="#impl-Default-for-ClientBuilder" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.default" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/reqwest/async_impl/client.rs.html#152-154">source</a><a href="#method.default" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -> Self</h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-ClientBuilder" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-ClientBuilder" class="anchor"></a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h3></section><section id="impl-Send-for-ClientBuilder" class="impl has-srclink"><a href="#impl-Send-for-ClientBuilder" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h3></section><section id="impl-Sync-for-ClientBuilder" class="impl has-srclink"><a href="#impl-Sync-for-ClientBuilder" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h3></section><section id="impl-Unpin-for-ClientBuilder" class="impl has-srclink"><a href="#impl-Unpin-for-ClientBuilder" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h3></section><section id="impl-UnwindSafe-for-ClientBuilder" class="impl has-srclink"><a href="#impl-UnwindSafe-for-ClientBuilder" class="anchor"></a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-ClientBuilder" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-ClientBuilder" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-ClientBuilder" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-ClientBuilder" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-ClientBuilder" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-ClientBuilder" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-ClientBuilder" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-ClientBuilder" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Instrument-for-ClientBuilder" class="impl has-srclink"><a class="srclink rightside" href="../src/tracing/instrument.rs.html#276">source</a><a href="#impl-Instrument-for-ClientBuilder" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="../tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.instrument" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/tracing/instrument.rs.html#82">source</a><a href="#method.instrument" class="anchor"></a><h4 class="code-header">fn <a href="../tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="../tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="../tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></h4></section></summary><div class='docblock'>Instruments this type with the provided <a href="../tracing/span/struct.Span.html" title="Span"><code>Span</code></a>, returning an |
| <code>Instrumented</code> wrapper. <a href="../tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.in_current_span" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/tracing/instrument.rs.html#121">source</a><a href="#method.in_current_span" class="anchor"></a><h4 class="code-header">fn <a href="../tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="../tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></h4></section></summary><div class='docblock'>Instruments this type with the <a href="../tracing/span/struct.Span.html#method.current">current</a> <a href="../tracing/span/struct.Span.html"><code>Span</code></a>, returning an |
| <code>Instrumented</code> wrapper. <a href="../tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-ClientBuilder" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-ClientBuilder" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> |
| <p>That is, this conversion is whatever the implementation of |
| <code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-ClientBuilder" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-ClientBuilder" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-ClientBuilder" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-ClientBuilder" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-WithSubscriber-for-ClientBuilder" class="impl has-srclink"><a class="srclink rightside" href="../src/tracing/instrument.rs.html#334">source</a><a href="#impl-WithSubscriber-for-ClientBuilder" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="../tracing/instrument/trait.WithSubscriber.html" title="trait tracing::instrument::WithSubscriber">WithSubscriber</a> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_subscriber" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/tracing/instrument.rs.html#169-171">source</a><a href="#method.with_subscriber" class="anchor"></a><h4 class="code-header">fn <a href="../tracing/instrument/trait.WithSubscriber.html#method.with_subscriber" class="fnname">with_subscriber</a><S>(self, subscriber: S) -> <a class="struct" href="../tracing/instrument/struct.WithDispatch.html" title="struct tracing::instrument::WithDispatch">WithDispatch</a><Self><span class="where fmt-newline">where<br> S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="../tracing_core/dispatcher/struct.Dispatch.html" title="struct tracing_core::dispatcher::Dispatch">Dispatch</a>>,</span></h4></section></summary><div class='docblock'>Attaches the provided <a href="../tracing_core/subscriber/trait.Subscriber.html"><code>Subscriber</code></a> to this type, returning a |
| <a href="../tracing/instrument/struct.WithDispatch.html" title="WithDispatch"><code>WithDispatch</code></a> wrapper. <a href="../tracing/instrument/trait.WithSubscriber.html#method.with_subscriber">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_current_subscriber" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/tracing/instrument.rs.html#221">source</a><a href="#method.with_current_subscriber" class="anchor"></a><h4 class="code-header">fn <a href="../tracing/instrument/trait.WithSubscriber.html#method.with_current_subscriber" class="fnname">with_current_subscriber</a>(self) -> <a class="struct" href="../tracing/instrument/struct.WithDispatch.html" title="struct tracing::instrument::WithDispatch">WithDispatch</a><Self></h4></section></summary><div class='docblock'>Attaches the current <a href="../tracing/dispatcher/index.html#setting-the-default-subscriber">default</a> <a href="../tracing_core/subscriber/trait.Subscriber.html"><code>Subscriber</code></a> to this type, returning a |
| <a href="../tracing/instrument/struct.WithDispatch.html" title="WithDispatch"><code>WithDispatch</code></a> wrapper. <a href="../tracing/instrument/trait.WithSubscriber.html#method.with_current_subscriber">Read more</a></div></details></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="reqwest" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html> |