Files
rapr-rs/docs/reqwest/struct.ClientBuilder.html
T
2021-03-14 20:06:11 +00:00

157 lines
52 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!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="API documentation for the Rust `ClientBuilder` struct in crate `reqwest`."><meta name="keywords" content="rust, rustlang, rust-lang, ClientBuilder"><title>reqwest::ClientBuilder - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../reqwest/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Struct ClientBuilder</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.add_root_certificate">add_root_certificate</a><a href="#method.build">build</a><a href="#method.connect_timeout">connect_timeout</a><a href="#method.connection_verbose">connection_verbose</a><a href="#method.danger_accept_invalid_certs">danger_accept_invalid_certs</a><a href="#method.default_headers">default_headers</a><a href="#method.http1_title_case_headers">http1_title_case_headers</a><a href="#method.http2_adaptive_window">http2_adaptive_window</a><a href="#method.http2_initial_connection_window_size">http2_initial_connection_window_size</a><a href="#method.http2_initial_stream_window_size">http2_initial_stream_window_size</a><a href="#method.http2_max_frame_size">http2_max_frame_size</a><a href="#method.http2_prior_knowledge">http2_prior_knowledge</a><a href="#method.https_only">https_only</a><a href="#method.local_address">local_address</a><a href="#method.new">new</a><a href="#method.no_brotli">no_brotli</a><a href="#method.no_gzip">no_gzip</a><a href="#method.no_proxy">no_proxy</a><a href="#method.no_trust_dns">no_trust_dns</a><a href="#method.pool_idle_timeout">pool_idle_timeout</a><a href="#method.pool_max_idle_per_host">pool_max_idle_per_host</a><a href="#method.proxy">proxy</a><a href="#method.redirect">redirect</a><a href="#method.referer">referer</a><a href="#method.tcp_keepalive">tcp_keepalive</a><a href="#method.tcp_nodelay">tcp_nodelay</a><a href="#method.timeout">timeout</a><a href="#method.tls_built_in_root_certs">tls_built_in_root_certs</a><a href="#method.user_agent">user_agent</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Default">Default</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="index.html">reqwest</a></p><script>window.sidebarCurrent = {name: "ClientBuilder", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#67-69" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="index.html">reqwest</a>::<wbr><a class="struct" href="">ClientBuilder</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct"><span class="docblock attributes top-attr">#[must_use]</span>pub struct ClientBuilder { /* fields omitted */ }</pre></div><div class="docblock"><p>A <code>ClientBuilder</code> can be used to create a <code>Client</code> with custom configuration.</p>
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#118-991" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>() -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#122-169" title="goto source code">[src]</a></h4><div class="docblock"><p>Constructs a new <code>ClientBuilder</code>.</p>
<p>This is the same as <code>Client::builder()</code>.</p>
</div><h4 id="method.build" class="method"><code>pub fn <a href="#method.build" class="fnname">build</a>(self) -&gt; <a class="type" href="../reqwest/type.Result.html" title="type reqwest::Result">Result</a>&lt;<a class="struct" href="../reqwest/struct.Client.html" title="struct reqwest::Client">Client</a>&gt;</code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#177-362" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns a <code>Client</code> that uses this <code>ClientBuilder</code> configuration.</p>
<h1 id="errors" class="section-header"><a href="#errors">Errors</a></h1>
<p>This method fails if TLS backend cannot be initialized, or the resolver
cannot load the system configuration.</p>
</div><h4 id="method.user_agent" class="method"><code>pub fn <a href="#method.user_agent" class="fnname">user_agent</a>&lt;V&gt;(self, value: V) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;V: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;<a class="struct" href="../reqwest/header/struct.HeaderValue.html" title="struct reqwest::header::HeaderValue">HeaderValue</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;V::<a class="type" 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>&lt;<a class="struct" href="../http/error/struct.Error.html" title="struct http::error::Error">Error</a>&gt;,&nbsp;</span></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#386-400" title="goto source code">[src]</a></h4><div class="docblock"><p>Sets the <code>User-Agent</code> header to be used by this client.</p>
<h1 id="example" class="section-header"><a href="#example">Example</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="comment">// Name your user agent after your app?</span>
<span class="kw">static</span> <span class="ident">APP_USER_AGENT</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="macro">concat</span><span class="macro">!</span>(
<span class="macro">env</span><span class="macro">!</span>(<span class="string">&quot;CARGO_PKG_NAME&quot;</span>),
<span class="string">&quot;/&quot;</span>,
<span class="macro">env</span><span class="macro">!</span>(<span class="string">&quot;CARGO_PKG_VERSION&quot;</span>),
);
<span class="kw">let</span> <span class="ident">client</span> <span class="op">=</span> <span class="ident">reqwest</span>::<span class="ident">Client</span>::<span class="ident">builder</span>()
.<span class="ident">user_agent</span>(<span class="ident">APP_USER_AGENT</span>)
.<span class="ident">build</span>()<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">res</span> <span class="op">=</span> <span class="ident">client</span>.<span class="ident">get</span>(<span class="string">&quot;https://www.rust-lang.org&quot;</span>).<span class="ident">send</span>().<span class="kw">await</span><span class="question-mark">?</span>;</pre></div>
</div><h4 id="method.default_headers" class="method"><code>pub fn <a href="#method.default_headers" class="fnname">default_headers</a>(self, headers: <a class="struct" href="../reqwest/header/struct.HeaderMap.html" title="struct reqwest::header::HeaderMap">HeaderMap</a>) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#445-450" title="goto source code">[src]</a></h4><div class="docblock"><p>Sets the default headers for every request.</p>
<h1 id="example-1" class="section-header"><a href="#example-1">Example</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">reqwest</span>::<span class="ident">header</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">headers</span> <span class="op">=</span> <span class="ident">header</span>::<span class="ident">HeaderMap</span>::<span class="ident">new</span>();
<span class="ident">headers</span>.<span class="ident">insert</span>(<span class="string">&quot;X-MY-HEADER&quot;</span>, <span class="ident">header</span>::<span class="ident">HeaderValue</span>::<span class="ident">from_static</span>(<span class="string">&quot;value&quot;</span>));
<span class="comment">// Consider marking security-sensitive headers with `set_sensitive`.</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">auth_value</span> <span class="op">=</span> <span class="ident">header</span>::<span class="ident">HeaderValue</span>::<span class="ident">from_static</span>(<span class="string">&quot;secret&quot;</span>);
<span class="ident">auth_value</span>.<span class="ident">set_sensitive</span>(<span class="bool-val">true</span>);
<span class="ident">headers</span>.<span class="ident">insert</span>(<span class="ident">header</span>::<span class="ident">AUTHORIZATION</span>, <span class="ident">auth_value</span>);
<span class="comment">// get a client builder</span>
<span class="kw">let</span> <span class="ident">client</span> <span class="op">=</span> <span class="ident">reqwest</span>::<span class="ident">Client</span>::<span class="ident">builder</span>()
.<span class="ident">default_headers</span>(<span class="ident">headers</span>)
.<span class="ident">build</span>()<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">res</span> <span class="op">=</span> <span class="ident">client</span>.<span class="ident">get</span>(<span class="string">&quot;https://www.rust-lang.org&quot;</span>).<span class="ident">send</span>().<span class="kw">await</span><span class="question-mark">?</span>;</pre></div>
<p>Override the default headers:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">reqwest</span>::<span class="ident">header</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">headers</span> <span class="op">=</span> <span class="ident">header</span>::<span class="ident">HeaderMap</span>::<span class="ident">new</span>();
<span class="ident">headers</span>.<span class="ident">insert</span>(<span class="string">&quot;X-MY-HEADER&quot;</span>, <span class="ident">header</span>::<span class="ident">HeaderValue</span>::<span class="ident">from_static</span>(<span class="string">&quot;value&quot;</span>));
<span class="comment">// get a client builder</span>
<span class="kw">let</span> <span class="ident">client</span> <span class="op">=</span> <span class="ident">reqwest</span>::<span class="ident">Client</span>::<span class="ident">builder</span>()
.<span class="ident">default_headers</span>(<span class="ident">headers</span>)
.<span class="ident">build</span>()<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">res</span> <span class="op">=</span> <span class="ident">client</span>
.<span class="ident">get</span>(<span class="string">&quot;https://www.rust-lang.org&quot;</span>)
.<span class="ident">header</span>(<span class="string">&quot;X-MY-HEADER&quot;</span>, <span class="string">&quot;new_value&quot;</span>)
.<span class="ident">send</span>()
.<span class="kw">await</span><span class="question-mark">?</span>;</pre></div>
</div><h4 id="method.no_gzip" class="method"><code>pub fn <a href="#method.no_gzip" class="fnname">no_gzip</a>(self) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#544-554" title="goto source code">[src]</a></h4><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><h4 id="method.no_brotli" class="method"><code>pub fn <a href="#method.no_brotli" class="fnname">no_brotli</a>(self) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#561-571" title="goto source code">[src]</a></h4><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><h4 id="method.redirect" class="method"><code>pub fn <a href="#method.redirect" class="fnname">redirect</a>(self, policy: <a class="struct" href="../reqwest/redirect/struct.Policy.html" title="struct reqwest::redirect::Policy">Policy</a>) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#578-581" title="goto source code">[src]</a></h4><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><h4 id="method.referer" class="method"><code>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>) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#586-589" title="goto source code">[src]</a></h4><div class="docblock"><p>Enable or disable automatic setting of the <code>Referer</code> header.</p>
<p>Default is <code>true</code>.</p>
</div><h4 id="method.proxy" class="method"><code>pub fn <a href="#method.proxy" class="fnname">proxy</a>(self, proxy: <a class="struct" href="../reqwest/struct.Proxy.html" title="struct reqwest::Proxy">Proxy</a>) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#598-602" title="goto source code">[src]</a></h4><div class="docblock"><p>Add a <code>Proxy</code> to the list of proxies the <code>Client</code> will use.</p>
<h1 id="note" class="section-header"><a href="#note">Note</a></h1>
<p>Adding a proxy will disable the automatic usage of the &quot;system&quot; proxy.</p>
</div><h4 id="method.no_proxy" class="method"><code>pub fn <a href="#method.no_proxy" class="fnname">no_proxy</a>(self) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#607-611" title="goto source code">[src]</a></h4><div class="docblock"><p>Clear all <code>Proxies</code>, so <code>Client</code> will use no proxy anymore.</p>
<p>This also disables the automatic usage of the &quot;system&quot; proxy.</p>
</div><h4 id="method.timeout" class="method"><code>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>) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#621-624" title="goto source code">[src]</a></h4><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><h4 id="method.connect_timeout" class="method"><code>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>) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#634-637" title="goto source code">[src]</a></h4><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>
<h1 id="note-1" class="section-header"><a href="#note-1">Note</a></h1>
<p>This <strong>requires</strong> the futures be executed in a tokio runtime with
a tokio timer enabled.</p>
</div><h4 id="method.connection_verbose" class="method"><code>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>) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#645-648" title="goto source code">[src]</a></h4><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><h4 id="method.pool_idle_timeout" class="method"><code>pub fn <a href="#method.pool_idle_timeout" class="fnname">pool_idle_timeout</a>&lt;D&gt;(self, val: D) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a>&gt;&gt;,&nbsp;</span></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#657-663" title="goto source code">[src]</a></h4><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><h4 id="method.pool_max_idle_per_host" class="method"><code>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>) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#666-669" title="goto source code">[src]</a></h4><div class="docblock"><p>Sets the maximum idle connection per host allowed in the pool.</p>
</div><h4 id="method.http1_title_case_headers" class="method"><code>pub fn <a href="#method.http1_title_case_headers" class="fnname">http1_title_case_headers</a>(self) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#672-675" title="goto source code">[src]</a></h4><div class="docblock"><p>Enable case sensitive headers.</p>
</div><h4 id="method.http2_prior_knowledge" class="method"><code>pub fn <a href="#method.http2_prior_knowledge" class="fnname">http2_prior_knowledge</a>(self) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#678-681" title="goto source code">[src]</a></h4><div class="docblock"><p>Only use HTTP/2.</p>
</div><h4 id="method.http2_initial_stream_window_size" class="method"><code>pub fn <a href="#method.http2_initial_stream_window_size" class="fnname">http2_initial_stream_window_size</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;sz: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;&gt;<br>) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#686-689" title="goto source code">[src]</a></h4><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><h4 id="method.http2_initial_connection_window_size" class="method"><code>pub fn <a href="#method.http2_initial_connection_window_size" class="fnname">http2_initial_connection_window_size</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;sz: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;&gt;<br>) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#694-700" title="goto source code">[src]</a></h4><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><h4 id="method.http2_adaptive_window" class="method"><code>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>) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#706-709" title="goto source code">[src]</a></h4><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><h4 id="method.http2_max_frame_size" class="method"><code>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>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;&gt;) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#714-717" title="goto source code">[src]</a></h4><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><h4 id="method.tcp_nodelay" class="method"><code>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>) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#724-727" title="goto source code">[src]</a></h4><div class="docblock"><p>Set whether sockets have <code>SO_NODELAY</code> enabled.</p>
<p>Default is <code>true</code>.</p>
</div><h4 id="method.local_address" class="method"><code>pub fn <a href="#method.local_address" class="fnname">local_address</a>&lt;T&gt;(self, addr: T) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/std/net/ip/enum.IpAddr.html" title="enum std::net::ip::IpAddr">IpAddr</a>&gt;&gt;,&nbsp;</span></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#740-746" title="goto source code">[src]</a></h4><div class="docblock"><p>Bind to a local IP Address.</p>
<h1 id="example-2" class="section-header"><a href="#example-2">Example</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">net</span>::<span class="ident">IpAddr</span>;
<span class="kw">let</span> <span class="ident">local_addr</span> <span class="op">=</span> <span class="ident">IpAddr</span>::<span class="ident">from</span>([<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> <span class="ident">client</span> <span class="op">=</span> <span class="ident">reqwest</span>::<span class="ident">Client</span>::<span class="ident">builder</span>()
.<span class="ident">local_address</span>(<span class="ident">local_addr</span>)
.<span class="ident">build</span>().<span class="ident">unwrap</span>();</pre></div>
</div><h4 id="method.tcp_keepalive" class="method"><code>pub fn <a href="#method.tcp_keepalive" class="fnname">tcp_keepalive</a>&lt;D&gt;(self, val: D) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a>&gt;&gt;,&nbsp;</span></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#751-757" title="goto source code">[src]</a></h4><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><h4 id="method.add_root_certificate" class="method"><code>pub fn <a href="#method.add_root_certificate" class="fnname">add_root_certificate</a>(self, cert: <a class="struct" href="../reqwest/struct.Certificate.html" title="struct reqwest::Certificate">Certificate</a>) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#779-782" title="goto source code">[src]</a></h4><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>
<h1 id="optional" class="section-header"><a href="#optional">Optional</a></h1>
<p>This requires the optional <code>default-tls</code>, <code>native-tls</code>, or <code>rustls-tls(-...)</code>
feature to be enabled.</p>
</div><h4 id="method.tls_built_in_root_certs" class="method"><code>pub fn <a href="#method.tls_built_in_root_certs" class="fnname">tls_built_in_root_certs</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;tls_built_in_root_certs: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><br>) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#801-804" title="goto source code">[src]</a></h4><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>
<h1 id="optional-1" class="section-header"><a href="#optional-1">Optional</a></h1>
<p>This requires the optional <code>default-tls</code>, <code>native-tls</code>, or <code>rustls-tls(-...)</code>
feature to be enabled.</p>
</div><h4 id="method.danger_accept_invalid_certs" class="method"><code>pub fn <a href="#method.danger_accept_invalid_certs" class="fnname">danger_accept_invalid_certs</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;accept_invalid_certs: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><br>) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#868-871" title="goto source code">[src]</a></h4><div class="docblock"><p>Controls the use of certificate validation.</p>
<p>Defaults to <code>false</code>.</p>
<h1 id="warning" class="section-header"><a href="#warning">Warning</a></h1>
<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>
<h1 id="optional-2" class="section-header"><a href="#optional-2">Optional</a></h1>
<p>This requires the optional <code>default-tls</code>, <code>native-tls</code>, or <code>rustls-tls(-...)</code>
feature to be enabled.</p>
</div><h4 id="method.no_trust_dns" class="method"><code>pub fn <a href="#method.no_trust_dns" class="fnname">no_trust_dns</a>(self) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#972-982" title="goto source code">[src]</a></h4><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><h4 id="method.https_only" class="method"><code>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>) -&gt; <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#987-990" title="goto source code">[src]</a></h4><div class="docblock"><p>Restrict the Client to be used with HTTPS only requests.</p>
<p>Defaults to false.</p>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Debug" class="impl"><code class="in-band">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="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#1225-1231" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#1226-1230" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>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></p>
</div></div><h3 id="impl-Default" class="impl"><code class="in-band">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="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#112-116" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.default" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -&gt; Self</code><a class="srclink" href="../src/reqwest/async_impl/client.rs.html#113-115" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the &quot;default value&quot; for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
</div></div></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"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../src/reqwest/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">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="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../src/reqwest/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">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="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../src/reqwest/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">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="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../src/reqwest/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../reqwest/struct.ClientBuilder.html" title="struct reqwest::ClientBuilder">ClientBuilder</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../src/reqwest/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>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></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>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></p>
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -&gt; T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-Instrument" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="../tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</code><a href="#impl-Instrument" class="anchor"></a><a class="srclink" href="../src/tracing/instrument.rs.html#155" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument" class="method hidden"><code>pub 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>) -&gt; <a class="struct" href="../tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a>&lt;Self&gt;</code><a class="srclink" href="../src/tracing/instrument.rs.html#38-40" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
<code>Instrumented</code> wrapper. <a href="../tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></p>
</div><h4 id="method.in_current_span" class="method hidden"><code>pub fn <a href="../tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -&gt; <a class="struct" href="../tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a>&lt;Self&gt;</code><a class="srclink" href="../src/tracing/instrument.rs.html#74-76" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="../struct.Span.html#method.current">current</a> <code>Span</code>, returning an
<code>Instrumented</code> wrapper. <a href="../tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></p>
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -&gt; U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#589-598" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#595-597" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#575-584" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id="method.try_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#581-583" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "reqwest";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>