1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-01-19 14:14:41 +01:00
actix-web/actix_web/struct.HttpResponse.html

81 lines
90 KiB
HTML
Raw Normal View History

<!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="An outgoing response."><title>HttpResponse in actix_web - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></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" title="show sidebar"></button><a class="logo-container" href="../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt="logo"></a><h2><a href="../actix_web/index.html">actix_web</a><span class="version">4.6.0</span></h2></div><h2 class="location"><a href="#">HttpResponse</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.Accepted">Accepted</a></li><li><a href="#method.AlreadyReported">AlreadyReported</a></li><li><a href="#method.BadGateway">BadGateway</a></li><li><a href="#method.BadRequest">BadRequest</a></li><li><a href="#method.Conflict">Conflict</a></li><li><a href="#method.Continue">Continue</a></li><li><a href="#method.Created">Created</a></li><li><a href="#method.ExpectationFailed">ExpectationFailed</a></li><li><a href="#method.FailedDependency">FailedDependency</a></li><li><a href="#method.Forbidden">Forbidden</a></li><li><a href="#method.Found">Found</a></li><li><a href="#method.GatewayTimeout">GatewayTimeout</a></li><li><a href="#method.Gone">Gone</a></li><li><a href="#method.ImATeapot">ImATeapot</a></li><li><a href="#method.ImUsed">ImUsed</a></li><li><a href="#method.InsufficientStorage">InsufficientStorage</a></li><li><a href="#method.InternalServerError">InternalServerError</a></li><li><a href="#method.LengthRequired">LengthRequired</a></li><li><a href="#method.Locked">Locked</a></li><li><a href="#method.LoopDetected">LoopDetected</a></li><li><a href="#method.MethodNotAllowed">MethodNotAllowed</a></li><li><a href="#method.MisdirectedRequest">MisdirectedRequest</a></li><li><a href="#method.MovedPermanently">MovedPermanently</a></li><li><a href="#method.MultiStatus">MultiStatus</a></li><li><a href="#method.MultipleChoices">MultipleChoices</a></li><li><a href="#method.NetworkAuthenticationRequired">NetworkAuthenticationRequired</a></li><li><a href="#method.NoContent">NoContent</a></li><li><a href="#method.NonAuthoritativeInformation">NonAuthoritativeInformation</a></li><li><a href="#method.NotAcceptable">NotAcceptable</a></li><li><a href="#method.NotExtended">NotExtended</a></li><li><a href="#method.NotFound">NotFou
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-HttpResponse" class="impl"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#16-96">source</a><a href="#impl-HttpResponse" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a></h3></section></summary><div class="impl-items"><section id="method.Continue" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#17">source</a><h4 class="code-header">pub fn <a href="#method.Continue" class="fn">Continue</a>() -&gt; <a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</a> <a href="#" class="tooltip" data-notable-ty="HttpResponseBuilder"></a></h4></section><section id="method.SwitchingProtocols" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#18">source</a><h4 class="code-header">pub fn <a href="#method.SwitchingProtocols" class="fn">SwitchingProtocols</a>() -&gt; <a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</a> <a href="#" class="tooltip" data-notable-ty="HttpResponseBuilder"></a></h4></section><section id="method.Processing" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#19">source</a><h4 class="code-header">pub fn <a href="#method.Processing" class="fn">Processing</a>() -&gt; <a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</a> <a href="#" class="tooltip" data-notable-ty="HttpResponseBuilder"></a></h4></section><section id="method.Ok" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#21">source</a><h4 class="code-header">pub fn <a href="#method.Ok" class="fn">Ok</a>() -&gt; <a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</a> <a href="#" class="tooltip" data-notable-ty="HttpResponseBuilder"></a></h4></section><section id="method.Created" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#22">source</a><h4 class="code-header">pub fn <a href="#method.Created" class="fn">Created</a>() -&gt; <a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</a> <a href="#" class="tooltip" data-notable-ty="HttpResponseBuilder"></a></h4></section><section id="method.Accepted" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#23">source</a><h4 class="code-header">pub fn <a href="#method.Accepted" class="fn">Accepted</a>() -&gt; <a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</a> <a href="#" class="tooltip" data-notable-ty="HttpResponseBuilder"></a></h4></section><section id="method.NonAuthoritativeInformation" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#24-27">source</a><h4 class="code-header">pub fn <a href="#method.NonAuthoritativeInformation" class="fn">NonAuthoritativeInformation</a>() -&gt; <a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</a> <a href="#" class="tooltip" data-notable-ty="HttpResponseBuilder"></a></h4></section><section id="method.NoContent" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#28">source</a><h4 class="code-header">pub fn <a href="#method.NoContent" class="fn">NoContent</a>() -&gt; <a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuild
</div></details><details class="toggle method-toggle" open><summary><section id="method.build" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#40-42">source</a><h4 class="code-header">pub fn <a href="#method.build" class="fn">build</a>(status: <a class="struct" href="http/struct.StatusCode.html" title="struct actix_web::http::StatusCode">StatusCode</a>) -&gt; <a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</a> <a href="#" class="tooltip" data-notable-ty="HttpResponseBuilder"></a></h4></section></summary><div class="docblock"><p>Constructs a response builder with specific HTTP status.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_error" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#46-51">source</a><h4 class="code-header">pub fn <a href="#method.from_error" class="fn">from_error</a>(error: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;) -&gt; Self</h4></section></summary><div class="docblock"><p>Create an error response.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-HttpResponse%3CB%3E" class="impl"><a class="src rightside" href="../src/actix_web/response/response.rs.html#54-296">source</a><a href="#impl-HttpResponse%3CB%3E" class="anchor">§</a><h3 class="code-header">impl&lt;B&gt; <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&lt;B&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.with_body" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#57-62">source</a><h4 class="code-header">pub fn <a href="#method.with_body" class="fn">with_body</a>(status: <a class="struct" href="http/struct.StatusCode.html" title="struct actix_web::http::StatusCode">StatusCode</a>, body: B) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a response with body</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.head" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#66-68">source</a><h4 class="code-header">pub fn <a href="#method.head" class="fn">head</a>(&amp;self) -&gt; &amp;<a class="struct" href="dev/struct.ResponseHead.html" title="struct actix_web::dev::ResponseHead">ResponseHead</a></h4></section></summary><div class="docblock"><p>Returns a reference to response head.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.head_mut" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#72-74">source</a><h4 class="code-header">pub fn <a href="#method.head_mut" class="fn">head_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="dev/struct.ResponseHead.html" title="struct actix_web::dev::ResponseHead">ResponseHead</a></h4></section></summary><div class="docblock"><p>Returns a mutable reference to response head.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.error" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#78-80">source</a><h4 class="code-header">pub fn <a href="#method.error" class="fn">error</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>The source <code>error</code> for this response</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.status" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#84-86">source</a><h4 class="code-header">pub fn <a href="#method.status" class="fn">status</a>(&amp;self) -&gt; <a class="struct" href="http/struct.StatusCode.html" title="struct actix_web::http::StatusCode">StatusCode</a></h4></section></summary><div class="docblock"><p>Get the response status code</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.status_mut" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#90-92">source</a><h4 class="code-header">pub fn <a href="#method.status_mut" class="fn">status_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="http/struct.StatusCode.html" title="struct actix_web::http::StatusCode">StatusCode</a></h4></section></summary><div class="docblock"><p>Set the <code>StatusCode</code> for this response</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.headers" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#96-98">source</a><h4 class="code-header">pub fn <a href="#method.headers" class="fn">headers</a>(&amp;self) -&gt; &amp;<a class="struct" href="http/header/struct.HeaderMap.html" title="struct actix_web::http::header::HeaderMap">HeaderMap</a></h4></section></summary><div class="docblock"><p>Get the headers from the response</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.headers_mut" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#102-104">source</a><h4 class="code-header">pub fn <a href="#method.headers_mut" class="fn">headers_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="http/header/struct.HeaderMap.html" title="struct actix_web::http::header::HeaderMap">HeaderMap</a></h4></section></summary><div class="docblock"><p>Get a mutable reference to the headers</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.cookies" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#108-112">source</a><h4 class="code-header">pub fn <a href="#method.cookies" class="fn">cookies</a>(&amp;self) -&gt; CookieIter&lt;'_&gt;</h4></section><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>cookies</code></strong> only.</div></span></summary><div class="docblock"><p>Get an iterator for the cookies set by this response.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.add_cookie" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#119-123">source</a><h4 class="code-header">pub fn <a href="#method.add_cookie" class="fn">add_cookie</a>(&amp;mut self, cookie: &amp;<a class="struct" href="cookie/struct.Cookie.html" title="struct actix_web::cookie::Cookie">Cookie</a>&lt;'_&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="error/struct.HttpError.html" title="struct actix_web::error::HttpError">HttpError</a>&gt;</h4></section><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>cookies</code></strong> only.</div></span></summary><div class="docblock"><p>Add a cookie to this response.</p>
<h5 id="errors"><a class="doc-anchor" href="#errors">§</a>Errors</h5>
<p>Returns an error if the cookie results in a malformed <code>Set-Cookie</code> header.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.add_removal_cookie" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#143-150">source</a><h4 class="code-header">pub fn <a href="#method.add_removal_cookie" class="fn">add_removal_cookie</a>(
&amp;mut self,
cookie: &amp;<a class="struct" href="cookie/struct.Cookie.html" title="struct actix_web::cookie::Cookie">Cookie</a>&lt;'_&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="error/struct.HttpError.html" title="struct actix_web::error::HttpError">HttpError</a>&gt;</h4></section><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>cookies</code></strong> only.</div></span></summary><div class="docblock"><p>Add a “removal” cookie to the response that matches attributes of given cookie.</p>
<p>This will cause browsers/clients to remove stored cookies with this name.</p>
<p>The <code>Set-Cookie</code> header added to the response will have:</p>
<ul>
<li>name matching given cookie;</li>
<li>domain matching given cookie;</li>
<li>path matching given cookie;</li>
<li>an empty value;</li>
<li>a max-age of <code>0</code>;</li>
<li>an expiration date far in the past.</li>
</ul>
<p>If the cookie youre trying to remove has an explicit path or domain set, those attributes
will need to be included in the cookie passed in here.</p>
<h5 id="errors-1"><a class="doc-anchor" href="#errors-1">§</a>Errors</h5>
<p>Returns an error if the given name results in a malformed <code>Set-Cookie</code> header.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.del_cookie" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#163-190">source</a><h4 class="code-header">pub fn <a href="#method.del_cookie" class="fn">del_cookie</a>(&amp;mut self, name: &amp;<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.usize.html">usize</a></h4></section><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>cookies</code></strong> only.</div></span></summary><div class="docblock"><p>Remove all cookies with the given name from this response.</p>
<p>Returns the number of cookies removed.</p>
<p>This method can <em>not</em> cause a browser/client to delete any of its stored cookies. Its only
purpose is to delete cookies that were added to this response using <a href="struct.HttpResponse.html#method.add_cookie" title="method actix_web::HttpResponse::add_cookie"><code>add_cookie</code></a>
and <a href="struct.HttpResponse.html#method.add_removal_cookie" title="method actix_web::HttpResponse::add_removal_cookie"><code>add_removal_cookie</code></a>. Use <a href="struct.HttpResponse.html#method.add_removal_cookie" title="method actix_web::HttpResponse::add_removal_cookie"><code>add_removal_cookie</code></a> to send a “removal” cookie.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.upgrade" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#194-196">source</a><h4 class="code-header">pub fn <a href="#method.upgrade" class="fn">upgrade</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Connection upgrade status</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.keep_alive" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#199-201">source</a><h4 class="code-header">pub fn <a href="#method.keep_alive" class="fn">keep_alive</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Keep-alive status for this connection</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.extensions" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#205-207">source</a><h4 class="code-header">pub fn <a href="#method.extensions" class="fn">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="dev/struct.Extensions.html" title="struct actix_web::dev::Extensions">Extensions</a>&gt;</h4></section></summary><div class="docblock"><p>Returns reference to the response-local data/extensions container.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.extensions_mut" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#211-213">source</a><h4 class="code-header">pub fn <a href="#method.extensions_mut" class="fn">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="dev/struct.Extensions.html" title="struct actix_web::dev::Extensions">Extensions</a>&gt;</h4></section></summary><div class="docblock"><p>Returns reference to the response-local data/extensions container.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.body" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#217-219">source</a><h4 class="code-header">pub fn <a href="#method.body" class="fn">body</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;B</a></h4></section></summary><div class="docblock"><p>Returns a reference to this responses body.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_body" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#222-227">source</a><h4 class="code-header">pub fn <a href="#method.set_body" class="fn">set_body</a>&lt;B2&gt;(self, body: B2) -&gt; <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&lt;B2&gt;</h4></section></summary><div class="docblock"><p>Sets new body.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.into_parts" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#234-244">source</a><h4 class="code-header">pub fn <a href="#method.into_parts" class="fn">into_parts</a>(self) -&gt; (<a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;, B)</h4></section></summary><div class="docblock"><p>Returns split head and body.</p>
<h5 id="implementation-notes"><a class="doc-anchor" href="#implementation-notes">§</a>Implementation Notes</h5>
<p>Due to internal performance optimizations, the first element of the returned tuple is an
<code>HttpResponse</code> as well but only contains the head of the response this was called on.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.drop_body" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#247-252">source</a><h4 class="code-header">pub fn <a href="#method.drop_body" class="fn">drop_body</a>(self) -&gt; <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</h4></section></summary><div class="docblock"><p>Drops body and returns new response.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.map_body" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#257-265">source</a><h4 class="code-header">pub fn <a href="#method.map_body" class="fn">map_body</a>&lt;F, B2&gt;(self, f: F) -&gt; <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&lt;B2&gt;<div class="where">where
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="dev/struct.ResponseHead.html" title="struct actix_web::dev::ResponseHead">ResponseHead</a>, B) -&gt; B2,</div></h4></section></summary><div class="docblock"><p>Map the current body type to another using a closure, returning a new response.</p>
<p>Closure receives the response head and the current body type.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.map_into_left_body" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#271-273">source</a><h4 class="code-header">pub fn <a href="#method.map_into_left_body" class="fn">map_into_left_body</a>&lt;R&gt;(self) -&gt; <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&lt;<a class="enum" href="body/enum.EitherBody.html" title="enum actix_web::body::EitherBody">EitherBody</a>&lt;B, R&gt;&gt;</h4></section></summary><div class="docblock"><p>Map the current body type <code>B</code> to <code>EitherBody::Left(B)</code>.</p>
<p>Useful for middleware which can generate their own responses.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.map_into_right_body" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#279-281">source</a><h4 class="code-header">pub fn <a href="#method.map_into_right_body" class="fn">map_into_right_body</a>&lt;L&gt;(self) -&gt; <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&lt;<a class="enum" href="body/enum.EitherBody.html" title="enum actix_web::body::EitherBody">EitherBody</a>&lt;L, B&gt;&gt;</h4></section></summary><div class="docblock"><p>Map the current body type <code>B</code> to <code>EitherBody::Right(B)</code>.</p>
<p>Useful for middleware which can generate their own responses.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.map_into_boxed_body" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#285-290">source</a><h4 class="code-header">pub fn <a href="#method.map_into_boxed_body" class="fn">map_into_boxed_body</a>(self) -&gt; <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&lt;<a class="struct" href="body/struct.BoxBody.html" title="struct actix_web::body::BoxBody">BoxBody</a>&gt;<div class="where">where
B: <a class="trait" href="body/trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> + 'static,</div></h4></section></summary><div class="docblock"><p>Map the current body to a type-erased <code>BoxBody</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.into_body" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#293-295">source</a><h4 class="code-header">pub fn <a href="#method.into_body" class="fn">into_body</a>(self) -&gt; B</h4></section></summary><div class="docblock"><p>Returns the response body, dropping all other parts.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-HttpResponse%3CB%3E" class="impl"><a class="src rightside" href="../src/actix_web/response/response.rs.html#298-308">source</a><a href="#impl-Debug-for-HttpResponse%3CB%3E" class="anchor">§</a><h3 class="code-header">impl&lt;B&gt; <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.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&lt;B&gt;<div class="where">where
B: <a class="trait" href="body/trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../src/actix_web/response/response.rs.html#302-307">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="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CError%3E-for-HttpResponse" class="impl"><a class="src rightside" href="../src/actix_web/response/response.rs.html#316-320">source</a><a href="#impl-From%3CError%3E-for-HttpResponse" class="anchor">§</a><h3 class="code-header">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="error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt; for <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-4" class="method trait-impl"><a class="src rightside" href="../src/actix_web/response/response.rs.html#317-319">source</a><a href="#method.from-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(err: <a class="struct" href="error/struct.Error.html" title="struct actix_web::error::Error">Error</a>) -&gt; Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CHttpResponse%3CB%3E%3E-for-Response%3CB%3E" class="impl"><a class="src rightside" href="../src/actix_web/response/response.rs.html#322-327">source</a><a href="#impl-From%3CHttpResponse%3CB%3E%3E-for-Response%3CB%3E" class="anchor">§</a><h3 class="code-header">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="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&lt;B&gt;&gt; for <a class="struct" href="dev/struct.Response.html" title="struct actix_web::dev::Response">Response</a>&lt;B&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl"><a class="src rightside" href="../src/actix_web/response/response.rs.html#323-326">source</a><a href="#method.from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(res: <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&lt;B&gt;) -&gt; Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CHttpResponseBuilder%3E-for-HttpResponse" class="impl"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#377-381">source</a><a href="#impl-From%3CHttpResponseBuilder%3E-for-HttpResponse" class="anch
B: <a class="trait" href="body/trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> + 'static,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Body" class="associatedtype trait-impl"><a href="#associatedtype.Body" class="anchor">§</a><h4 class="code-header">type <a href="trait.Responder.html#associatedtype.Body" class="associatedtype">Body</a> = B</h4></section><details class="toggle method-toggle" open><summary><section id="method.respond_to" class="method trait-impl"><a class="src rightside" href="../src/actix_web/response/response.rs.html#372-374">source</a><a href="#method.respond_to" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Responder.html#tymethod.respond_to" class="fn">respond_to</a>(self, _: &amp;<a class="struct" href="struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>) -&gt; <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&lt;Self::<a class="associatedtype" href="trait.Responder.html#associatedtype.Body" title="type actix_web::Responder::Body">Body</a>&gt;</h4></section></summary><div class='docblock'>Convert self to <code>HttpResponse</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.customize" class="method trait-impl"><a class="src rightside" href="../src/actix_web/response/responder.rs.html#64-69">source</a><a href="#method.customize" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Responder.html#method.customize" class="fn">customize</a>(self) -&gt; <a class="struct" href="struct.CustomizeResponder.html" title="struct actix_web::CustomizeResponder">CustomizeResponder</a>&lt;Self&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Wraps responder to allow alteration of its response. <a href="trait.Responder.html#method.customize">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-HttpResponse%3CB%3E" class="impl"><a href="#impl-Freeze-for-HttpResponse%3CB%3E" class="anchor">§</a><h3 class="code-header">impl&lt;B = <a class="struct" href="body/struct.BoxBody.html" title="struct actix_web::body::BoxBody">BoxBody</a>&gt; !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&lt;B&gt;</h3></section><section id="impl-RefUnwindSafe-for-HttpResponse%3CB%3E" class="impl"><a href="#impl-RefUnwindSafe-for-HttpResponse%3CB%3E" class="anchor">§</a><h3 class="code-header">impl&lt;B = <a class="struct" href="body/struct.BoxBody.html" title="struct actix_web::body::BoxBody">BoxBody</a>&gt; !<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.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&lt;B&gt;</h3></section><section id="impl-Send-for-HttpResponse%3CB%3E" class="impl"><a href="#impl-Send-for-HttpResponse%3CB%3E" class="anchor">§</a><h3 class="code-header">impl&lt;B = <a class="struct" href="body/struct.BoxBody.html" title="struct actix_web::body::BoxBody">BoxBody</a>&gt; !<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.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&lt;B&gt;</h3></section><section id="impl-Sync-for-HttpResponse%3CB%3E" class="impl"><a href="#impl-Sync-for-HttpResponse%3CB%3E" class="anchor">§</a><h3 class="code-header">impl&lt;B = <a class="struct" href="body/struct.BoxBody.html" title="struct actix_web::body::BoxBody">BoxBody</a>&gt; !<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.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&lt;B&gt;</h3></section><section id="impl-Unpin-for-HttpResponse%3CB%3E" class="impl"><a href="#impl-Unpin-for-HttpResponse%3CB%3E" class="anchor">§</a><h3 class="code-header">impl&lt;B&gt; <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.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&lt;B&gt;<div class="where">where
B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h3></section><section id="impl-UnwindSafe-for-HttpResponse%3CB%3E" class="impl"><a href="#impl-UnwindSafe-for-HttpResponse%3CB%3E" class="anchor">§</a><h3 class="code-header">impl&lt;B = <a class="struct" href="body/struct.BoxBody.html" title="struct actix_web::body::BoxBody">BoxBody</a>&gt; !<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.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&lt;B&gt;</h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">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<div class="where">where
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#141">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="fn">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></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="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">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<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210">source</a><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="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;T</a></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="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">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<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217">source</a><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="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a></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="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#765">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">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</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-5" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#768">source</a><a href="#method.from-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Instrument-for-T" class="impl"><a href="#impl-Instrument-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; Instrument for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.instrument" class="method trait-impl"><a href="#method.instrument" class="anchor">§</a><h4 class="code-header">fn <a class="fn">instrument</a>(self, span: Span) -&gt; Instrumented&lt;Self&gt;</h4></section></summary><div class='docblock'>Instruments this type with the provided [<code>Span</code>], returning an
<code>Instrumented</code> wrapper. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.in_current_span" class="method trait-impl"><a href="#method.in_current_span" class="anchor">§</a><h4 class="code-header">fn <a class="fn">in_current_span</a>(self) -&gt; Instrumented&lt;Self&gt;</h4></section></summary><div class='docblock'>Instruments this type with the <a href="super::Span::current()">current</a> <a href="crate::Span"><code>Span</code></a>, returning an
<code>Instrumented</code> wrapper. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#748-750">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">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<div class="where">where
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;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#758">source</a><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="fn">into</a>(self) -&gt; 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="trait core::convert::From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Same-for-T" class="impl"><a class="src rightside" href="https://docs.rs/typenum/1.17.0/src/typenum/type_operators.rs.html#34">source</a><a href="#impl-Same-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://docs.rs/typenum/1.17.0/typenum/type_operators/trait.Same.html" title="trait typenum::type_operators::Same">Same</a> for T</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl"><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a href="https://docs.rs/typenum/1.17.0/typenum/type_operators/trait.Same.html#associatedtype.Output" class="associatedtype">Output</a> = T</h4></section></summary><div class='docblock'>Should always be <code>Self</code></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#805-807">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">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<div class="where">where
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;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><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="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#812">source</a><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="fn">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="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#790-792">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">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<div class="where">where
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;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><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> = &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="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="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#797">source</a><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="fn">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="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-T" class="impl"><a href="#impl-VZip%3CV%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;V, T&gt; VZip&lt;V&gt; for T<div class="where">where
V: MultiLane&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl"><a href="#method.vzip" class="anchor">§</a><h4 class="code-header">fn <a class="fn">vzip</a>(self) -&gt; V</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-WithSubscriber-for-T" class="impl"><a href="#impl-WithSubscriber-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; WithSubscriber for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.with_subscriber" class="method trait-impl"><a href="#method.with_subscriber" class="anchor">§</a><h4 class="code-header">fn <a class="fn">with_subscriber</a>&lt;S&gt;(self, subscriber: S) -&gt; WithDispatch&lt;Self&gt;<div class="where">where
S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;Dispatch&gt;,</div></h4></section></summary><div class='docblock'>Attaches the provided <a href="super::Subscriber"><code>Subscriber</code></a> to this type, returning a
[<code>WithDispatch</code>] wrapper. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.with_current_subscriber" class="method trait-impl"><a href="#method.with_current_subscriber" class="anchor">§</a><h4 class="code-header">fn <a class="fn">with_current_subscriber</a>(self) -&gt; WithDispatch&lt;Self&gt;</h4></section></summary><div class='docblock'>Attaches the current <a href="crate::dispatcher#setting-the-default-subscriber">default</a> <a href="super::Subscriber"><code>Subscriber</code></a> to this type, returning a
[<code>WithDispatch</code>] wrapper. <a>Read more</a></div></details></div></details></div><script type="text/json" id="notable-traits-data">{"HttpResponseBuilder":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.HttpResponseBuilder.html\" title=\"struct actix_web::HttpResponseBuilder\">HttpResponseBuilder</a></code></h3><pre><code><div class=\"where\">impl <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.HttpResponseBuilder.html\" title=\"struct actix_web::HttpResponseBuilder\">HttpResponseBuilder</a></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"enum\" href=\"https://doc.rust-lang.org/nightly/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;<a class=\"struct\" href=\"struct.HttpResponse.html\" title=\"struct actix_web::HttpResponse\">HttpResponse</a>, <a class=\"struct\" href=\"error/struct.Error.html\" title=\"struct actix_web::error::Error\">Error</a>&gt;;</div>"}</script></section></div></main></body></html>