Files
mercator_service/actix_http/struct.ResponseBuilder.html

110 lines
49 KiB
HTML
Raw Permalink 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 `ResponseBuilder` struct in crate `actix_http`."><meta name="keywords" content="rust, rustlang, rust-lang, ResponseBuilder"><title>actix_http::ResponseBuilder - 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="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><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='../actix_http/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct ResponseBuilder</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.body">body</a><a href="#method.content_length">content_length</a><a href="#method.content_type">content_type</a><a href="#method.cookie">cookie</a><a href="#method.del_cookie">del_cookie</a><a href="#method.extensions">extensions</a><a href="#method.extensions_mut">extensions_mut</a><a href="#method.finish">finish</a><a href="#method.force_close">force_close</a><a href="#method.header">header</a><a href="#method.if_some">if_some</a><a href="#method.if_true">if_true</a><a href="#method.json">json</a><a href="#method.json2">json2</a><a href="#method.keep_alive">keep_alive</a><a href="#method.message_body">message_body</a><a href="#method.new">new</a><a href="#method.no_chunking">no_chunking</a><a href="#method.reason">reason</a><a href="#method.set_header">set_header</a><a href="#method.status">status</a><a href="#method.streaming">streaming</a><a href="#method.take">take</a><a href="#method.upgrade">upgrade</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-From%3C%26%27a%20ResponseHead%3E">From&lt;&amp;&#39;a ResponseHead&gt;</a><a href="#impl-From%3CResponse%3CB%3E%3E">From&lt;Response&lt;B&gt;&gt;</a><a href="#impl-From%3CResponseBuilder%3E">From&lt;ResponseBuilder&gt;</a><a href="#impl-IntoFuture">IntoFuture</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-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-IntoFuture">IntoFuture</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='index.html'>actix_http</a></p><script>window.sidebarCurrent = {name: 'ResponseBuilder', 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!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></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><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/actix_http/response.rs.html#315-319' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>actix_http</a>::<wbr><a class="struct" href=''>ResponseBuilder</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct ResponseBuilder { /* fields omitted */ }</pre></div><div class='docblock'><p>An HTTP response builder</p>
<p>This type can be used to construct an instance of <code>Response</code> through a
builder-like pattern.</p>
</div><h2 id='methods' class='small-section-header'>Methods<a href='#methods' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../actix_http/struct.ResponseBuilder.html" title="struct actix_http::ResponseBuilder">ResponseBuilder</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/actix_http/response.rs.html#321-689' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code id='new.v'>pub fn <a href='#method.new' class='fnname'>new</a>(status: <a class="struct" href="../actix_http/http/struct.StatusCode.html" title="struct actix_http::http::StatusCode">StatusCode</a>) -&gt; Self</code><a class='srclink' href='../src/actix_http/response.rs.html#324-330' title='goto source code'>[src]</a></h4><div class='docblock'><p>Create response builder</p>
</div><h4 id='method.status' class="method"><code id='status.v'>pub fn <a href='#method.status' class='fnname'>status</a>(&amp;mut self, status: <a class="struct" href="../actix_http/http/struct.StatusCode.html" title="struct actix_http::http::StatusCode">StatusCode</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self</code><a class='srclink' href='../src/actix_http/response.rs.html#334-339' title='goto source code'>[src]</a></h4><div class='docblock'><p>Set HTTP status code of this response.</p>
</div><h4 id='method.header' class="method"><code id='header.v'>pub fn <a href='#method.header' class='fnname'>header</a>&lt;K, V&gt;(&amp;mut self, key: K, value: V) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="struct" href="../actix_http/http/header/struct.HeaderName.html" title="struct actix_http::http::header::HeaderName">HeaderName</a>: <a class="trait" href="../actix_http/http/trait.HttpTryFrom.html" title="trait actix_http::http::HttpTryFrom">HttpTryFrom</a>&lt;K&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;V: <a class="trait" href="../actix_http/http/header/trait.IntoHeaderValue.html" title="trait actix_http::http::header::IntoHeaderValue">IntoHeaderValue</a>,&nbsp;</span></code><a class='srclink' href='../src/actix_http/response.rs.html#381-398' title='goto source code'>[src]</a></h4><div class='docblock'><p>Append a header to existing headers.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">actix_http</span>::{<span class="ident">http</span>, <span class="ident">Request</span>, <span class="ident">Response</span>};
<span class="kw">fn</span> <span class="ident">index</span>(<span class="ident">req</span>: <span class="ident">Request</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Response</span> {
<span class="ident">Response</span>::<span class="prelude-val">Ok</span>()
.<span class="ident">header</span>(<span class="string">&quot;X-TEST&quot;</span>, <span class="string">&quot;value&quot;</span>)
.<span class="ident">header</span>(<span class="ident">http</span>::<span class="ident">header</span>::<span class="ident">CONTENT_TYPE</span>, <span class="string">&quot;application/json&quot;</span>)
.<span class="ident">finish</span>()
}
<span class="kw">fn</span> <span class="ident">main</span>() {}</pre></div>
</div><h4 id='method.set_header' class="method"><code id='set_header.v'>pub fn <a href='#method.set_header' class='fnname'>set_header</a>&lt;K, V&gt;(&amp;mut self, key: K, value: V) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="struct" href="../actix_http/http/header/struct.HeaderName.html" title="struct actix_http::http::header::HeaderName">HeaderName</a>: <a class="trait" href="../actix_http/http/trait.HttpTryFrom.html" title="trait actix_http::http::HttpTryFrom">HttpTryFrom</a>&lt;K&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;V: <a class="trait" href="../actix_http/http/header/trait.IntoHeaderValue.html" title="trait actix_http::http::header::IntoHeaderValue">IntoHeaderValue</a>,&nbsp;</span></code><a class='srclink' href='../src/actix_http/response.rs.html#413-430' title='goto source code'>[src]</a></h4><div class='docblock'><p>Set a header.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">actix_http</span>::{<span class="ident">http</span>, <span class="ident">Request</span>, <span class="ident">Response</span>};
<span class="kw">fn</span> <span class="ident">index</span>(<span class="ident">req</span>: <span class="ident">Request</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Response</span> {
<span class="ident">Response</span>::<span class="prelude-val">Ok</span>()
.<span class="ident">set_header</span>(<span class="string">&quot;X-TEST&quot;</span>, <span class="string">&quot;value&quot;</span>)
.<span class="ident">set_header</span>(<span class="ident">http</span>::<span class="ident">header</span>::<span class="ident">CONTENT_TYPE</span>, <span class="string">&quot;application/json&quot;</span>)
.<span class="ident">finish</span>()
}
<span class="kw">fn</span> <span class="ident">main</span>() {}</pre></div>
</div><h4 id='method.reason' class="method"><code id='reason.v'>pub fn <a href='#method.reason' class='fnname'>reason</a>(&amp;mut self, reason: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self</code><a class='srclink' href='../src/actix_http/response.rs.html#434-439' title='goto source code'>[src]</a></h4><div class='docblock'><p>Set the custom reason for the response.</p>
</div><h4 id='method.keep_alive' class="method"><code id='keep_alive.v'>pub fn <a href='#method.keep_alive' class='fnname'>keep_alive</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self</code><a class='srclink' href='../src/actix_http/response.rs.html#443-448' title='goto source code'>[src]</a></h4><div class='docblock'><p>Set connection type to KeepAlive</p>
</div><h4 id='method.upgrade' class="method"><code id='upgrade.v'>pub fn <a href='#method.upgrade' class='fnname'>upgrade</a>&lt;V&gt;(&amp;mut self, value: V) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;V: <a class="trait" href="../actix_http/http/header/trait.IntoHeaderValue.html" title="trait actix_http::http::header::IntoHeaderValue">IntoHeaderValue</a>,&nbsp;</span></code><a class='srclink' href='../src/actix_http/response.rs.html#452-460' title='goto source code'>[src]</a></h4><div class='docblock'><p>Set connection type to Upgrade</p>
</div><h4 id='method.force_close' class="method"><code id='force_close.v'>pub fn <a href='#method.force_close' class='fnname'>force_close</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self</code><a class='srclink' href='../src/actix_http/response.rs.html#464-469' title='goto source code'>[src]</a></h4><div class='docblock'><p>Force close connection, even if it is marked as keep-alive</p>
</div><h4 id='method.no_chunking' class="method"><code id='no_chunking.v'>pub fn <a href='#method.no_chunking' class='fnname'>no_chunking</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self</code><a class='srclink' href='../src/actix_http/response.rs.html#473-478' title='goto source code'>[src]</a></h4><div class='docblock'><p>Disable chunked transfer encoding for HTTP/1.1 streaming responses.</p>
</div><h4 id='method.content_type' class="method"><code id='content_type.v'>pub fn <a href='#method.content_type' class='fnname'>content_type</a>&lt;V&gt;(&amp;mut self, value: V) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="struct" href="../actix_http/http/header/struct.HeaderValue.html" title="struct actix_http::http::header::HeaderValue">HeaderValue</a>: <a class="trait" href="../actix_http/http/trait.HttpTryFrom.html" title="trait actix_http::http::HttpTryFrom">HttpTryFrom</a>&lt;V&gt;,&nbsp;</span></code><a class='srclink' href='../src/actix_http/response.rs.html#482-495' title='goto source code'>[src]</a></h4><div class='docblock'><p>Set response content type</p>
</div><h4 id='method.content_length' class="method"><code id='content_length.v'>pub fn <a href='#method.content_length' class='fnname'>content_length</a>(&amp;mut self, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self</code><a class='srclink' href='../src/actix_http/response.rs.html#499-503' title='goto source code'>[src]</a></h4><div class='docblock'><p>Set content length</p>
</div><h4 id='method.cookie' class="method"><code id='cookie.v'>pub fn <a href='#method.cookie' class='fnname'>cookie</a>&lt;'c&gt;(&amp;mut self, cookie: <a class="struct" href="../actix_http/cookie/struct.Cookie.html" title="struct actix_http::cookie::Cookie">Cookie</a>&lt;'c&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self</code><a class='srclink' href='../src/actix_http/response.rs.html#523-532' title='goto source code'>[src]</a></h4><div class='docblock'><p>Set a cookie</p>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">actix_http</span>::{<span class="ident">http</span>, <span class="ident">Request</span>, <span class="ident">Response</span>};
<span class="kw">fn</span> <span class="ident">index</span>(<span class="ident">req</span>: <span class="ident">Request</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Response</span> {
<span class="ident">Response</span>::<span class="prelude-val">Ok</span>()
.<span class="ident">cookie</span>(
<span class="ident">http</span>::<span class="ident">Cookie</span>::<span class="ident">build</span>(<span class="string">&quot;name&quot;</span>, <span class="string">&quot;value&quot;</span>)
.<span class="ident">domain</span>(<span class="string">&quot;www.rust-lang.org&quot;</span>)
.<span class="ident">path</span>(<span class="string">&quot;/&quot;</span>)
.<span class="ident">secure</span>(<span class="bool-val">true</span>)
.<span class="ident">http_only</span>(<span class="bool-val">true</span>)
.<span class="ident">finish</span>(),
)
.<span class="ident">finish</span>()
}</pre></div>
</div><h4 id='method.del_cookie' class="method"><code id='del_cookie.v'>pub fn <a href='#method.del_cookie' class='fnname'>del_cookie</a>&lt;'a&gt;(&amp;mut self, cookie: &amp;<a class="struct" href="../actix_http/cookie/struct.Cookie.html" title="struct actix_http::cookie::Cookie">Cookie</a>&lt;'a&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self</code><a class='srclink' href='../src/actix_http/response.rs.html#549-558' title='goto source code'>[src]</a></h4><div class='docblock'><p>Remove cookie</p>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">actix_http</span>::{<span class="ident">http</span>, <span class="ident">Request</span>, <span class="ident">Response</span>, <span class="ident">HttpMessage</span>};
<span class="kw">fn</span> <span class="ident">index</span>(<span class="ident">req</span>: <span class="ident">Request</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Response</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">builder</span> <span class="op">=</span> <span class="ident">Response</span>::<span class="prelude-val">Ok</span>();
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="kw-2">ref</span> <span class="ident">cookie</span>) <span class="op">=</span> <span class="ident">req</span>.<span class="ident">cookie</span>(<span class="string">&quot;name&quot;</span>) {
<span class="ident">builder</span>.<span class="ident">del_cookie</span>(<span class="ident">cookie</span>);
}
<span class="ident">builder</span>.<span class="ident">finish</span>()
}</pre></div>
</div><h4 id='method.if_true' class="method"><code id='if_true.v'>pub fn <a href='#method.if_true' class='fnname'>if_true</a>&lt;F&gt;(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, f: F) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;mut <a class="struct" href="../actix_http/struct.ResponseBuilder.html" title="struct actix_http::ResponseBuilder">ResponseBuilder</a>),&nbsp;</span></code><a class='srclink' href='../src/actix_http/response.rs.html#562-570' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method calls provided closure with builder reference if value is
true.</p>
</div><h4 id='method.if_some' class="method"><code id='if_some.v'>pub fn <a href='#method.if_some' class='fnname'>if_some</a>&lt;T, F&gt;(&amp;mut self, value: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;T&gt;, f: F) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(T, &amp;mut <a class="struct" href="../actix_http/struct.ResponseBuilder.html" title="struct actix_http::ResponseBuilder">ResponseBuilder</a>),&nbsp;</span></code><a class='srclink' href='../src/actix_http/response.rs.html#574-582' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method calls provided closure with builder reference if value is
Some.</p>
</div><h4 id='method.extensions' class="method"><code id='extensions.v'>pub fn <a href='#method.extensions' class='fnname'>extensions</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/cell/struct.Ref.html" title="struct core::cell::Ref">Ref</a>&lt;<a class="struct" href="../actix_http/struct.Extensions.html" title="struct actix_http::Extensions">Extensions</a>&gt;</code><a class='srclink' href='../src/actix_http/response.rs.html#586-589' title='goto source code'>[src]</a></h4><div class='docblock'><p>Responses extensions</p>
</div><h4 id='method.extensions_mut' class="method"><code id='extensions_mut.v'>pub fn <a href='#method.extensions_mut' class='fnname'>extensions_mut</a>(&amp;mut self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/cell/struct.RefMut.html" title="struct core::cell::RefMut">RefMut</a>&lt;<a class="struct" href="../actix_http/struct.Extensions.html" title="struct actix_http::Extensions">Extensions</a>&gt;</code><a class='srclink' href='../src/actix_http/response.rs.html#593-596' title='goto source code'>[src]</a></h4><div class='docblock'><p>Mutable reference to a the response's extensions</p>
</div><h4 id='method.body' class="method"><code id='body.v'>pub fn <a href='#method.body' class='fnname'>body</a>&lt;B:&nbsp;<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="../actix_http/body/enum.Body.html" title="enum actix_http::body::Body">Body</a>&gt;&gt;(&amp;mut self, body: B) -&gt; <a class="struct" href="../actix_http/struct.Response.html" title="struct actix_http::Response">Response</a></code><a class='srclink' href='../src/actix_http/response.rs.html#602-604' title='goto source code'>[src]</a></h4><div class='docblock'><p>Set a body and generate <code>Response</code>.</p>
<p><code>ResponseBuilder</code> can not be used after this call.</p>
</div><h4 id='method.message_body' class="method"><code id='message_body.v'>pub fn <a href='#method.message_body' class='fnname'>message_body</a>&lt;B&gt;(&amp;mut self, body: B) -&gt; <a class="struct" href="../actix_http/struct.Response.html" title="struct actix_http::Response">Response</a>&lt;B&gt;</code><a class='srclink' href='../src/actix_http/response.rs.html#609-630' title='goto source code'>[src]</a></h4><div class='docblock'><p>Set a body and generate <code>Response</code>.</p>
<p><code>ResponseBuilder</code> can not be used after this call.</p>
</div><h4 id='method.streaming' class="method"><code id='streaming.v'>pub fn <a href='#method.streaming' class='fnname'>streaming</a>&lt;S, E&gt;(&amp;mut self, stream: S) -&gt; <a class="struct" href="../actix_http/struct.Response.html" title="struct actix_http::Response">Response</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&lt;Item = <a class="struct" href="../bytes/bytes/struct.Bytes.html" title="struct bytes::bytes::Bytes">Bytes</a>, Error = E&gt; + 'static,<br>&nbsp;&nbsp;&nbsp;&nbsp;E: <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="../actix_http/error/struct.Error.html" title="struct actix_http::error::Error">Error</a>&gt; + 'static,&nbsp;</span></code><a class='srclink' href='../src/actix_http/response.rs.html#636-642' title='goto source code'>[src]</a></h4><div class='docblock'><p>Set a streaming body and generate <code>Response</code>.</p>
<p><code>ResponseBuilder</code> can not be used after this call.</p>
</div><h4 id='method.json' class="method"><code id='json.v'>pub fn <a href='#method.json' class='fnname'>json</a>&lt;T:&nbsp;<a class="trait" href="../serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a>&gt;(&amp;mut self, value: T) -&gt; <a class="struct" href="../actix_http/struct.Response.html" title="struct actix_http::Response">Response</a></code><a class='srclink' href='../src/actix_http/response.rs.html#648-650' title='goto source code'>[src]</a></h4><div class='docblock'><p>Set a json body and generate <code>Response</code></p>
<p><code>ResponseBuilder</code> can not be used after this call.</p>
</div><h4 id='method.json2' class="method"><code id='json2.v'>pub fn <a href='#method.json2' class='fnname'>json2</a>&lt;T:&nbsp;<a class="trait" href="../serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a>&gt;(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="struct" href="../actix_http/struct.Response.html" title="struct actix_http::Response">Response</a></code><a class='srclink' href='../src/actix_http/response.rs.html#655-671' title='goto source code'>[src]</a></h4><div class='docblock'><p>Set a json body and generate <code>Response</code></p>
<p><code>ResponseBuilder</code> can not be used after this call.</p>
</div><h4 id='method.finish' class="method"><code id='finish.v'>pub fn <a href='#method.finish' class='fnname'>finish</a>(&amp;mut self) -&gt; <a class="struct" href="../actix_http/struct.Response.html" title="struct actix_http::Response">Response</a></code><a class='srclink' href='../src/actix_http/response.rs.html#677-679' title='goto source code'>[src]</a></h4><div class='docblock'><p>Set an empty body and generate <code>Response</code></p>
<p><code>ResponseBuilder</code> can not be used after this call.</p>
</div><h4 id='method.take' class="method"><code id='take.v'>pub fn <a href='#method.take' class='fnname'>take</a>(&amp;mut self) -&gt; <a class="struct" href="../actix_http/struct.ResponseBuilder.html" title="struct actix_http::ResponseBuilder">ResponseBuilder</a></code><a class='srclink' href='../src/actix_http/response.rs.html#682-688' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method construct new <code>ResponseBuilder</code></p>
</div></div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='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="../actix_http/struct.ResponseBuilder.html" title="struct actix_http::ResponseBuilder">ResponseBuilder</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/actix_http/response.rs.html#770-787' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code id='fmt.v'>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>) -&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/actix_http/response.rs.html#771-786' 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-From%3C%26%27a%20ResponseHead%3E' class='impl'><code class='in-band'>impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;&amp;'a <a class="struct" href="../actix_http/struct.ResponseHead.html" title="struct actix_http::ResponseHead">ResponseHead</a>&gt; for <a class="struct" href="../actix_http/struct.ResponseBuilder.html" title="struct actix_http::ResponseBuilder">ResponseBuilder</a></code><a href='#impl-From%3C%26%27a%20ResponseHead%3E' class='anchor'></a><a class='srclink' href='../src/actix_http/response.rs.html#726-758' title='goto source code'>[src]</a></h3><div class='docblock'><p>Convert <code>ResponseHead</code> to a <code>ResponseBuilder</code></p>
</div><div class='impl-items'><h4 id='method.from-1' class="method hidden"><code id='from.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(head: &amp;'a <a class="struct" href="../actix_http/struct.ResponseHead.html" title="struct actix_http::ResponseHead">ResponseHead</a>) -&gt; <a class="struct" href="../actix_http/struct.ResponseBuilder.html" title="struct actix_http::ResponseBuilder">ResponseBuilder</a></code><a class='srclink' href='../src/actix_http/response.rs.html#727-757' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CResponse%3CB%3E%3E' class='impl'><code class='in-band'>impl&lt;B&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../actix_http/struct.Response.html" title="struct actix_http::Response">Response</a>&lt;B&gt;&gt; for <a class="struct" href="../actix_http/struct.ResponseBuilder.html" title="struct actix_http::ResponseBuilder">ResponseBuilder</a></code><a href='#impl-From%3CResponse%3CB%3E%3E' class='anchor'></a><a class='srclink' href='../src/actix_http/response.rs.html#703-723' title='goto source code'>[src]</a></h3><div class='docblock'><p>Convert <code>Response</code> to a <code>ResponseBuilder</code>. Body get dropped.</p>
</div><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(res: <a class="struct" href="../actix_http/struct.Response.html" title="struct actix_http::Response">Response</a>&lt;B&gt;) -&gt; <a class="struct" href="../actix_http/struct.ResponseBuilder.html" title="struct actix_http::ResponseBuilder">ResponseBuilder</a></code><a class='srclink' href='../src/actix_http/response.rs.html#704-722' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CResponseBuilder%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../actix_http/struct.ResponseBuilder.html" title="struct actix_http::ResponseBuilder">ResponseBuilder</a>&gt; for <a class="struct" href="../actix_http/struct.Response.html" title="struct actix_http::Response">Response</a></code><a href='#impl-From%3CResponseBuilder%3E' class='anchor'></a><a class='srclink' href='../src/actix_http/response.rs.html#799-803' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-2' class="method hidden"><code id='from.v-2'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(builder: <a class="struct" href="../actix_http/struct.ResponseBuilder.html" title="struct actix_http::ResponseBuilder">ResponseBuilder</a>) -&gt; Self</code><a class='srclink' href='../src/actix_http/response.rs.html#800-802' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-IntoFuture' class='impl'><code class='in-band'>impl <a class="trait" href="../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a> for <a class="struct" href="../actix_http/struct.ResponseBuilder.html" title="struct actix_http::ResponseBuilder">ResponseBuilder</a></code><a href='#impl-IntoFuture' class='anchor'></a><a class='srclink' href='../src/actix_http/response.rs.html#760-768' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Item' class="type"><code id='Item.t'>type <a href='../futures/future/trait.IntoFuture.html#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../actix_http/struct.Response.html" title="struct actix_http::Response">Response</a></code></h4><div class='docblock'><p>The item that the future may resolve with.</p>
</div><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='../futures/future/trait.IntoFuture.html#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../actix_http/error/struct.Error.html" title="struct actix_http::error::Error">Error</a></code></h4><div class='docblock'><p>The error that the future may resolve with.</p>
</div><h4 id='associatedtype.Future' class="type"><code id='Future.t'>type <a href='../futures/future/trait.IntoFuture.html#associatedtype.Future' class="type">Future</a> = <a class="struct" href="../futures/future/result_/struct.FutureResult.html" title="struct futures::future::result_::FutureResult">FutureResult</a>&lt;<a class="struct" href="../actix_http/struct.Response.html" title="struct actix_http::Response">Response</a>, <a class="struct" href="../actix_http/error/struct.Error.html" title="struct actix_http::error::Error">Error</a>&gt;</code></h4><div class='docblock'><p>The future that this type can be converted into.</p>
</div><h4 id='method.into_future' class="method hidden"><code id='into_future.v'>fn <a href='../futures/future/trait.IntoFuture.html#tymethod.into_future' class='fnname'>into_future</a>(self) -&gt; Self::<a class="type" href="../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a></code><a class='srclink' href='../src/actix_http/response.rs.html#765-767' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Consumes this object and produces a future.</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="../actix_http/struct.ResponseBuilder.html" title="struct actix_http::ResponseBuilder">ResponseBuilder</a></code><a href='#impl-RefUnwindSafe' class='anchor'></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="../actix_http/struct.ResponseBuilder.html" title="struct actix_http::ResponseBuilder">ResponseBuilder</a></code><a href='#impl-Send' class='anchor'></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="../actix_http/struct.ResponseBuilder.html" title="struct actix_http::ResponseBuilder">ResponseBuilder</a></code><a href='#impl-Sync' class='anchor'></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="../actix_http/struct.ResponseBuilder.html" title="struct actix_http::ResponseBuilder">ResponseBuilder</a></code><a href='#impl-Unpin' class='anchor'></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="../actix_http/struct.ResponseBuilder.html" title="struct actix_http::ResponseBuilder">ResponseBuilder</a></code><a href='#impl-UnwindSafe' class='anchor'></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 id='type_id.v'>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#213-217' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>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#214-216' 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#220-224' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>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#221-223' 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#564-568' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-3' class="method hidden"><code id='from.v-3'>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#565-567' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</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#553-560' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>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#557-559' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-IntoFuture-1' class='impl'><code class='in-band'>impl&lt;F&gt; <a class="trait" href="../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a> for F <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,&nbsp;</span></code><a href='#impl-IntoFuture-1' class='anchor'></a><a class='srclink' href='../src/futures/future/mod.rs.html#1052-1060' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Future-1' class="type"><code id='Future.t-1'>type <a href='../futures/future/trait.IntoFuture.html#associatedtype.Future' class="type">Future</a> = F</code></h4><div class='docblock'><p>The future that this type can be converted into.</p>
</div><h4 id='associatedtype.Item-1' class="type"><code id='Item.t-1'>type <a href='../futures/future/trait.IntoFuture.html#associatedtype.Item' class="type">Item</a> = &lt;F as <a class="trait" href="../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&gt;::<a class="type" href="../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a></code></h4><div class='docblock'><p>The item that the future may resolve with.</p>
</div><h4 id='associatedtype.Error-3' class="type"><code id='Error.t-3'>type <a href='../futures/future/trait.IntoFuture.html#associatedtype.Error' class="type">Error</a> = &lt;F as <a class="trait" href="../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&gt;::<a class="type" href="../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a></code></h4><div class='docblock'><p>The error that the future may resolve with.</p>
</div><h4 id='method.into_future-1' class="method hidden"><code id='into_future.v-1'>fn <a href='../futures/future/trait.IntoFuture.html#tymethod.into_future' class='fnname'>into_future</a>(self) -&gt; F</code><a class='srclink' href='../src/futures/future/mod.rs.html#1057-1059' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Consumes this object and produces a future.</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#601-610' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>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 id='try_from.v'>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#607-609' 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#587-596' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-2' class="type"><code id='Error.t-2'>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 id='try_into.v'>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#593-595' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-VZip%3CV%3E' class='impl'><code class='in-band'>impl&lt;V, T&gt; <a class="trait" href="../ppv_lite86/types/types/trait.VZip.html" title="trait ppv_lite86::types::types::VZip">VZip</a>&lt;V&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;V: <a class="trait" href="../ppv_lite86/types/types/trait.MultiLane.html" title="trait ppv_lite86::types::types::MultiLane">MultiLane</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-VZip%3CV%3E' class='anchor'></a><a class='srclink' href='../src/ppv_lite86/types.rs.html#212-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.vzip' class="method hidden"><code id='vzip.v'>fn <a href='../ppv_lite86/types/types/trait.VZip.html#tymethod.vzip' class='fnname'>vzip</a>(self) -&gt; V</code><a class='srclink' href='../src/ppv_lite86/types.rs.html#217-219' title='goto source code'>[src]</a></h4></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "actix_http";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>