| <!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 lower-level configuration of the HTTP protocol."><meta name="keywords" content="rust, rustlang, rust-lang, Http"><title>Http in hyper::server::conn - 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="../../../hyper/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="../../../hyper/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Http</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.http1_half_close">http1_half_close</a></li><li><a href="#method.http1_header_read_timeout">http1_header_read_timeout</a></li><li><a href="#method.http1_keep_alive">http1_keep_alive</a></li><li><a href="#method.http1_only">http1_only</a></li><li><a href="#method.http1_preserve_header_case">http1_preserve_header_case</a></li><li><a href="#method.http1_title_case_headers">http1_title_case_headers</a></li><li><a href="#method.http1_writev">http1_writev</a></li><li><a href="#method.http2_adaptive_window">http2_adaptive_window</a></li><li><a href="#method.http2_enable_connect_protocol">http2_enable_connect_protocol</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_max_concurrent_streams">http2_max_concurrent_streams</a></li><li><a href="#method.http2_max_frame_size">http2_max_frame_size</a></li><li><a href="#method.http2_max_header_list_size">http2_max_header_list_size</a></li><li><a href="#method.http2_max_pending_accept_reset_streams">http2_max_pending_accept_reset_streams</a></li><li><a href="#method.http2_max_send_buf_size">http2_max_send_buf_size</a></li><li><a href="#method.http2_only">http2_only</a></li><li><a href="#method.max_buf_size">max_buf_size</a></li><li><a href="#method.new">new</a></li><li><a href="#method.pipeline_flush">pipeline_flush</a></li><li><a href="#method.serve_connection">serve_connection</a></li><li><a href="#method.with_executor">with_executor</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-Http%3CE%3E">Clone</a></li><li><a href="#impl-Debug-for-Http%3CE%3E">Debug</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-Http%3CE%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Http%3CE%3E">Send</a></li><li><a href="#impl-Sync-for-Http%3CE%3E">Sync</a></li><li><a href="#impl-Unpin-for-Http%3CE%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Http%3CE%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-Http%3CE%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-Http%3CE%3E">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-Http%3CE%3E">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-Http%3CE%3E">From<T></a></li><li><a href="#impl-Instrument-for-Http%3CE%3E">Instrument</a></li><li><a href="#impl-Into%3CU%3E-for-Http%3CE%3E">Into<U></a></li><li><a href="#impl-ToOwned-for-Http%3CE%3E">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-Http%3CE%3E">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-Http%3CE%3E">TryInto<U></a></li><li><a href="#impl-WithSubscriber-for-Http%3CE%3E">WithSubscriber</a></li></ul></section><h2><a href="index.html">In hyper::server::conn</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">hyper</a>::<wbr><a href="../index.html">server</a>::<wbr><a href="index.html">conn</a>::<wbr><a class="struct" href="#">Http</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/hyper/server/conn.rs.html#107-121">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 Http<E = Exec> { /* 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 lower-level configuration of the HTTP protocol.</p> |
| <p>This structure is used to configure options for an HTTP server connection.</p> |
| <p>If you don’t have need to manage connections yourself, consider using the |
| higher-level <a href="../index.html">Server</a> API.</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-Http" class="impl has-srclink"><a class="srclink rightside" href="../../../src/hyper/server/conn.rs.html#249-269">source</a><a href="#impl-Http" class="anchor"></a><h3 class="code-header">impl <a class="struct" href="struct.Http.html" title="struct hyper::server::conn::Http">Http</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/hyper/server/conn.rs.html#252-268">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>() -> <a class="struct" href="struct.Http.html" title="struct hyper::server::conn::Http">Http</a></h4></section></summary><div class="docblock"><p>Creates a new instance of the HTTP protocol, ready to spawn a server or |
| start accepting connections.</p> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Http%3CE%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/hyper/server/conn.rs.html#273-720">source</a><a href="#impl-Http%3CE%3E" class="anchor"></a><h3 class="code-header">impl<E> <a class="struct" href="struct.Http.html" title="struct hyper::server::conn::Http">Http</a><E></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http1_only" class="method has-srclink"><a class="srclink rightside" href="../../../src/hyper/server/conn.rs.html#279-289">source</a><h4 class="code-header">pub fn <a href="#method.http1_only" class="fnname">http1_only</a>(&mut self, val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</h4></section></summary><div class="docblock"><p>Sets whether HTTP1 is required.</p> |
| <p>Default is false</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http1_half_close" class="method has-srclink"><a class="srclink rightside" href="../../../src/hyper/server/conn.rs.html#301-304">source</a><h4 class="code-header">pub fn <a href="#method.http1_half_close" class="fnname">http1_half_close</a>(&mut self, val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</h4></section></summary><div class="docblock"><p>Set whether HTTP/1 connections should support half-closures.</p> |
| <p>Clients can chose to shutdown their write-side while waiting |
| for the server to respond. Setting this to <code>true</code> will |
| prevent closing the connection immediately if <code>read</code> |
| detects an EOF in the middle of a request.</p> |
| <p>Default is <code>false</code>.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http1_keep_alive" class="method has-srclink"><a class="srclink rightside" href="../../../src/hyper/server/conn.rs.html#311-314">source</a><h4 class="code-header">pub fn <a href="#method.http1_keep_alive" class="fnname">http1_keep_alive</a>(&mut self, val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</h4></section></summary><div class="docblock"><p>Enables or disables HTTP/1 keep-alive.</p> |
| <p>Default is true.</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/hyper/server/conn.rs.html#324-327">source</a><h4 class="code-header">pub fn <a href="#method.http1_title_case_headers" class="fnname">http1_title_case_headers</a>(&mut self, enabled: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</h4></section></summary><div class="docblock"><p>Set whether HTTP/1 connections will write header names as title case at |
| the socket level.</p> |
| <p>Note that this setting does not affect HTTP/2.</p> |
| <p>Default is false.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http1_preserve_header_case" class="method has-srclink"><a class="srclink rightside" href="../../../src/hyper/server/conn.rs.html#344-347">source</a><h4 class="code-header">pub fn <a href="#method.http1_preserve_header_case" class="fnname">http1_preserve_header_case</a>(&mut self, enabled: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</h4></section></summary><div class="docblock"><p>Set whether to support preserving original header cases.</p> |
| <p>Currently, this will record the original cases received, and store them |
| in a private extension on the <code>Request</code>. It will also look for and use |
| such an extension in any provided <code>Response</code>.</p> |
| <p>Since the relevant extension is still private, there is no way to |
| interact with the original cases. The only effect this can have now is |
| to forward the cases in a proxy-like fashion.</p> |
| <p>Note that this setting does not affect HTTP/2.</p> |
| <p>Default is false.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http1_header_read_timeout" class="method has-srclink"><a class="srclink rightside" href="../../../src/hyper/server/conn.rs.html#355-358">source</a><h4 class="code-header">pub fn <a href="#method.http1_header_read_timeout" class="fnname">http1_header_read_timeout</a>(&mut self, read_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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</h4></section></summary><div class="docblock"><p>Set a timeout for reading client request headers. If a client does not |
| transmit the entire header within this time, the connection is closed.</p> |
| <p>Default is None.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http1_writev" class="method has-srclink"><a class="srclink rightside" href="../../../src/hyper/server/conn.rs.html#375-378">source</a><h4 class="code-header">pub fn <a href="#method.http1_writev" class="fnname">http1_writev</a>(&mut self, val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</h4></section></summary><div class="docblock"><p>Set whether HTTP/1 connections should try to use vectored writes, |
| or always flatten into a single buffer.</p> |
| <p>Note that setting this to false may mean more copies of body data, |
| but may also improve performance when an IO transport doesn’t |
| support vectored writes well, such as most TLS implementations.</p> |
| <p>Setting this to true will force hyper to use queued strategy |
| which may eliminate unnecessary cloning on some TLS backends</p> |
| <p>Default is <code>auto</code>. In this mode hyper will try to guess which |
| mode to use</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http2_only" class="method has-srclink"><a class="srclink rightside" href="../../../src/hyper/server/conn.rs.html#385-395">source</a><h4 class="code-header">pub fn <a href="#method.http2_only" class="fnname">http2_only</a>(&mut self, val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</h4></section></summary><div class="docblock"><p>Sets whether HTTP2 is required.</p> |
| <p>Default is false</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http2_max_pending_accept_reset_streams" class="method has-srclink"><a class="srclink rightside" href="../../../src/hyper/server/conn.rs.html#405-412">source</a><h4 class="code-header">pub fn <a href="#method.http2_max_pending_accept_reset_streams" class="fnname">http2_max_pending_accept_reset_streams</a>(<br> &mut self,<br> max: 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.usize.html">usize</a>>><br>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</h4></section></summary><div class="docblock"><p>Configures the maximum number of pending reset streams allowed before a GOAWAY will be sent.</p> |
| <p>This will default to the default value set by the <a href="https://crates.io/crates/h2"><code>h2</code> crate</a>. |
| As of v0.3.17, it is 20.</p> |
| <p>See <a href="https://github.com/hyperium/hyper/issues/2877">https://github.com/hyperium/hyper/issues/2877</a> for more information.</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/hyper/server/conn.rs.html#424-430">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> &mut 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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</h4></section></summary><div class="docblock"><p>Sets the <a href="https://http2.github.io/http2-spec/#SETTINGS_INITIAL_WINDOW_SIZE"><code>SETTINGS_INITIAL_WINDOW_SIZE</code></a> option for HTTP2 |
| stream-level flow control.</p> |
| <p>Passing <code>None</code> will do nothing.</p> |
| <p>If not set, hyper will use a default.</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/hyper/server/conn.rs.html#439-448">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> &mut 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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</h4></section></summary><div class="docblock"><p>Sets the max connection-level flow control for HTTP2.</p> |
| <p>Passing <code>None</code> will do nothing.</p> |
| <p>If not set, hyper will use a default.</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/hyper/server/conn.rs.html#457-466">source</a><h4 class="code-header">pub fn <a href="#method.http2_adaptive_window" class="fnname">http2_adaptive_window</a>(&mut self, enabled: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</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/hyper/server/conn.rs.html#475-480">source</a><h4 class="code-header">pub fn <a href="#method.http2_max_frame_size" class="fnname">http2_max_frame_size</a>(&mut 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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</h4></section></summary><div class="docblock"><p>Sets the maximum frame size to use for HTTP2.</p> |
| <p>Passing <code>None</code> will do nothing.</p> |
| <p>If not set, hyper will use a default.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http2_max_concurrent_streams" class="method has-srclink"><a class="srclink rightside" href="../../../src/hyper/server/conn.rs.html#490-493">source</a><h4 class="code-header">pub fn <a href="#method.http2_max_concurrent_streams" class="fnname">http2_max_concurrent_streams</a>(<br> &mut self,<br> max: 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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</h4></section></summary><div class="docblock"><p>Sets the <a href="https://http2.github.io/http2-spec/#SETTINGS_MAX_CONCURRENT_STREAMS"><code>SETTINGS_MAX_CONCURRENT_STREAMS</code></a> option for HTTP2 |
| connections.</p> |
| <p>Default is no limit (<code>std::u32::MAX</code>). Passing <code>None</code> will do nothing.</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/hyper/server/conn.rs.html#508-514">source</a><h4 class="code-header">pub fn <a href="#method.http2_keep_alive_interval" class="fnname">http2_keep_alive_interval</a>(<br> &mut 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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</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.</p> |
| <p>Default is currently disabled.</p> |
| <h5 id="cargo-feature"><a href="#cargo-feature">Cargo Feature</a></h5> |
| <p>Requires the <code>runtime</code> cargo feature to be enabled.</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/hyper/server/conn.rs.html#529-532">source</a><h4 class="code-header">pub fn <a href="#method.http2_keep_alive_timeout" class="fnname">http2_keep_alive_timeout</a>(&mut 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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</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.</p> |
| <p>Default is 20 seconds.</p> |
| <h5 id="cargo-feature-1"><a href="#cargo-feature-1">Cargo Feature</a></h5> |
| <p>Requires the <code>runtime</code> cargo feature to be enabled.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http2_max_send_buf_size" class="method has-srclink"><a class="srclink rightside" href="../../../src/hyper/server/conn.rs.html#543-547">source</a><h4 class="code-header">pub fn <a href="#method.http2_max_send_buf_size" class="fnname">http2_max_send_buf_size</a>(&mut self, max: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</h4></section></summary><div class="docblock"><p>Set the maximum write buffer size for each HTTP/2 stream.</p> |
| <p>Default is currently ~400KB, but may change.</p> |
| <h5 id="panics"><a href="#panics">Panics</a></h5> |
| <p>The value must be no larger than <code>u32::MAX</code>.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http2_enable_connect_protocol" class="method has-srclink"><a class="srclink rightside" href="../../../src/hyper/server/conn.rs.html#553-556">source</a><h4 class="code-header">pub fn <a href="#method.http2_enable_connect_protocol" class="fnname">http2_enable_connect_protocol</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</h4></section></summary><div class="docblock"><p>Enables the <a href="https://datatracker.ietf.org/doc/html/rfc8441#section-4">extended CONNECT protocol</a>.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.http2_max_header_list_size" class="method has-srclink"><a class="srclink rightside" href="../../../src/hyper/server/conn.rs.html#563-566">source</a><h4 class="code-header">pub fn <a href="#method.http2_max_header_list_size" class="fnname">http2_max_header_list_size</a>(&mut self, max: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</h4></section></summary><div class="docblock"><p>Sets the max size of received header frames.</p> |
| <p>Default is currently ~16MB, but may change.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.max_buf_size" class="method has-srclink"><a class="srclink rightside" href="../../../src/hyper/server/conn.rs.html#577-584">source</a><h4 class="code-header">pub fn <a href="#method.max_buf_size" class="fnname">max_buf_size</a>(&mut self, max: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</h4></section></summary><div class="docblock"><p>Set the maximum buffer size for the connection.</p> |
| <p>Default is ~400kb.</p> |
| <h5 id="panics-1"><a href="#panics-1">Panics</a></h5> |
| <p>The minimum value allowed is 8192. This method panics if the passed <code>max</code> is less than the minimum.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.pipeline_flush" class="method has-srclink"><a class="srclink rightside" href="../../../src/hyper/server/conn.rs.html#591-594">source</a><h4 class="code-header">pub fn <a href="#method.pipeline_flush" class="fnname">pipeline_flush</a>(&mut self, enabled: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</h4></section></summary><div class="docblock"><p>Aggregates flushes to better support pipelined responses.</p> |
| <p>Experimental, may have bugs.</p> |
| <p>Default is false.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_executor" class="method has-srclink"><a class="srclink rightside" href="../../../src/hyper/server/conn.rs.html#599-615">source</a><h4 class="code-header">pub fn <a href="#method.with_executor" class="fnname">with_executor</a><E2>(self, exec: E2) -> <a class="struct" href="struct.Http.html" title="struct hyper::server::conn::Http">Http</a><E2></h4></section></summary><div class="docblock"><p>Set the executor used to spawn background tasks.</p> |
| <p>Default uses implicit default (like <code>tokio::spawn</code>).</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.serve_connection" class="method has-srclink"><a class="srclink rightside" href="../../../src/hyper/server/conn.rs.html#645-719">source</a><h4 class="code-header">pub fn <a href="#method.serve_connection" class="fnname">serve_connection</a><S, I, Bd>(&self, io: I, service: S) -> <a class="struct" href="struct.Connection.html" title="struct hyper::server::conn::Connection">Connection</a><I, S, E><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.Connection.html" title="struct hyper::server::conn::Connection">Connection</a><I, S, E></span><code class="content"><span class="where fmt-newline">impl<I, B, S, E> <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a> for <a class="struct" href="struct.Connection.html" title="struct hyper::server::conn::Connection">Connection</a><I, S, E><span class="where fmt-newline">where<br> S: HttpService<<a class="struct" href="../../body/struct.Body.html" title="struct hyper::body::Body">Body</a>, ResBody = B>,<br> S::Error: <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="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/error/trait.Error.html" title="trait core::error::Error">StdError</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>>>,<br> I: <a class="trait" href="../../../tokio/io/async_read/trait.AsyncRead.html" title="trait tokio::io::async_read::AsyncRead">AsyncRead</a> + <a class="trait" href="../../../tokio/io/async_write/trait.AsyncWrite.html" title="trait tokio::io::async_write::AsyncWrite">AsyncWrite</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,<br> B: <a class="trait" href="../../body/trait.HttpBody.html" title="trait hyper::body::HttpBody">HttpBody</a> + 'static,<br> B::<a class="associatedtype" href="../../body/trait.HttpBody.html#associatedtype.Error" title="type hyper::body::HttpBody::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="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/error/trait.Error.html" title="trait core::error::Error">StdError</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>>>,<br> E: ConnStreamExec<S::Future, B>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="type" href="../../type.Result.html" title="type hyper::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>>;</span></code></span></span></span></span><span class="where fmt-newline">where<br> S: HttpService<<a class="struct" href="../../body/struct.Body.html" title="struct hyper::body::Body">Body</a>, ResBody = Bd>,<br> S::Error: <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="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/error/trait.Error.html" title="trait core::error::Error">StdError</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>>>,<br> Bd: <a class="trait" href="../../body/trait.HttpBody.html" title="trait hyper::body::HttpBody">HttpBody</a> + 'static,<br> Bd::<a class="associatedtype" href="../../body/trait.HttpBody.html#associatedtype.Error" title="type hyper::body::HttpBody::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="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/error/trait.Error.html" title="trait core::error::Error">StdError</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>>>,<br> I: <a class="trait" href="../../../tokio/io/async_read/trait.AsyncRead.html" title="trait tokio::io::async_read::AsyncRead">AsyncRead</a> + <a class="trait" href="../../../tokio/io/async_write/trait.AsyncWrite.html" title="trait tokio::io::async_write::AsyncWrite">AsyncWrite</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,<br> E: ConnStreamExec<S::Future, Bd>,</span></h4></section></summary><div class="docblock"><p>Bind a connection together with a <a href="../../service/trait.Service.html"><code>Service</code></a>.</p> |
| <p>This returns a Future that must be polled in order for HTTP to be |
| driven on the connection.</p> |
| <h5 id="example"><a href="#example">Example</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>http = Http::new(); |
| <span class="kw">let </span>conn = http.serve_connection(some_io, some_service); |
| |
| <span class="kw">if let </span><span class="prelude-val">Err</span>(e) = conn.<span class="kw">await </span>{ |
| <span class="macro">eprintln!</span>(<span class="string">"server connection error: {}"</span>, e); |
| }</code></pre></div> |
| </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-Clone-for-Http%3CE%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/hyper/server/conn.rs.html#98">source</a><a href="#impl-Clone-for-Http%3CE%3E" class="anchor"></a><h3 class="code-header">impl<E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Http.html" title="struct hyper::server::conn::Http">Http</a><E></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/hyper/server/conn.rs.html#98">source</a><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.Http.html" title="struct hyper::server::conn::Http">Http</a><E></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">const fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-Http%3CE%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/hyper/server/conn.rs.html#98">source</a><a href="#impl-Debug-for-Http%3CE%3E" class="anchor"></a><h3 class="code-header">impl<E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>> <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.Http.html" title="struct hyper::server::conn::Http">Http</a><E></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/hyper/server/conn.rs.html#98">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></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-Http%3CE%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-Http%3CE%3E" class="anchor"></a><h3 class="code-header">impl<E> <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.Http.html" title="struct hyper::server::conn::Http">Http</a><E><span class="where fmt-newline">where<br> E: <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>,</span></h3></section><section id="impl-Send-for-Http%3CE%3E" class="impl has-srclink"><a href="#impl-Send-for-Http%3CE%3E" class="anchor"></a><h3 class="code-header">impl<E> <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.Http.html" title="struct hyper::server::conn::Http">Http</a><E><span class="where fmt-newline">where<br> E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</span></h3></section><section id="impl-Sync-for-Http%3CE%3E" class="impl has-srclink"><a href="#impl-Sync-for-Http%3CE%3E" class="anchor"></a><h3 class="code-header">impl<E> <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.Http.html" title="struct hyper::server::conn::Http">Http</a><E><span class="where fmt-newline">where<br> E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</span></h3></section><section id="impl-Unpin-for-Http%3CE%3E" class="impl has-srclink"><a href="#impl-Unpin-for-Http%3CE%3E" class="anchor"></a><h3 class="code-header">impl<E> <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.Http.html" title="struct hyper::server::conn::Http">Http</a><E><span class="where fmt-newline">where<br> E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</span></h3></section><section id="impl-UnwindSafe-for-Http%3CE%3E" class="impl has-srclink"><a href="#impl-UnwindSafe-for-Http%3CE%3E" class="anchor"></a><h3 class="code-header">impl<E> <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.Http.html" title="struct hyper::server::conn::Http">Http</a><E><span class="where fmt-newline">where<br> E: <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>,</span></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-Http%3CE%3E" 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-Http%3CE%3E" 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-Http%3CE%3E" 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-Http%3CE%3E" 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-Http%3CE%3E" 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-Http%3CE%3E" 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-Http%3CE%3E" 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-Http%3CE%3E" 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-Http%3CE%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/tracing/instrument.rs.html#276">source</a><a href="#impl-Instrument-for-Http%3CE%3E" 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-Http%3CE%3E" 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-Http%3CE%3E" 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-ToOwned-for-Http%3CE%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#83">source</a><a href="#impl-ToOwned-for-Http%3CE%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-Http%3CE%3E" 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-Http%3CE%3E" 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-Http%3CE%3E" 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-Http%3CE%3E" 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-Http%3CE%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/tracing/instrument.rs.html#334">source</a><a href="#impl-WithSubscriber-for-Http%3CE%3E" 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="hyper" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html> |