1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-23 16:21:06 +01:00
actix-web/actix_web/struct.HttpResponse.html
2024-05-27 01:16:31 +00:00

81 lines
90 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="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">NotFound</a></li><li><a href="#method.NotImplemented">NotImplemented</a></li><li><a href="#method.NotModified">NotModified</a></li><li><a href="#method.Ok">Ok</a></li><li><a href="#method.PartialContent">PartialContent</a></li><li><a href="#method.PayloadTooLarge">PayloadTooLarge</a></li><li><a href="#method.PaymentRequired">PaymentRequired</a></li><li><a href="#method.PermanentRedirect">PermanentRedirect</a></li><li><a href="#method.PreconditionFailed">PreconditionFailed</a></li><li><a href="#method.PreconditionRequired">PreconditionRequired</a></li><li><a href="#method.Processing">Processing</a></li><li><a href="#method.ProxyAuthenticationRequired">ProxyAuthenticationRequired</a></li><li><a href="#method.RangeNotSatisfiable">RangeNotSatisfiable</a></li><li><a href="#method.RequestHeaderFieldsTooLarge">RequestHeaderFieldsTooLarge</a></li><li><a href="#method.RequestTimeout">RequestTimeout</a></li><li><a href="#method.ResetContent">ResetContent</a></li><li><a href="#method.SeeOther">SeeOther</a></li><li><a href="#method.ServiceUnavailable">ServiceUnavailable</a></li><li><a href="#method.SwitchingProtocols">SwitchingProtocols</a></li><li><a href="#method.TemporaryRedirect">TemporaryRedirect</a></li><li><a href="#method.TooManyRequests">TooManyRequests</a></li><li><a href="#method.Unauthorized">Unauthorized</a></li><li><a href="#method.UnavailableForLegalReasons">UnavailableForLegalReasons</a></li><li><a href="#method.UnprocessableEntity">UnprocessableEntity</a></li><li><a href="#method.UnsupportedMediaType">UnsupportedMediaType</a></li><li><a href="#method.UpgradeRequired">UpgradeRequired</a></li><li><a href="#method.UriTooLong">UriTooLong</a></li><li><a href="#method.UseProxy">UseProxy</a></li><li><a href="#method.VariantAlsoNegotiates">VariantAlsoNegotiates</a></li><li><a href="#method.VersionNotSupported">VersionNotSupported</a></li><li><a href="#method.add_cookie">add_cookie</a></li><li><a href="#method.add_removal_cookie">add_removal_cookie</a></li><li><a href="#method.body">body</a></li><li><a href="#method.build">build</a></li><li><a href="#method.cookies">cookies</a></li><li><a href="#method.del_cookie">del_cookie</a></li><li><a href="#method.drop_body">drop_body</a></li><li><a href="#method.error">error</a></li><li><a href="#method.extensions">extensions</a></li><li><a href="#method.extensions_mut">extensions_mut</a></li><li><a href="#method.from_error">from_error</a></li><li><a href="#method.head">head</a></li><li><a href="#method.head_mut">head_mut</a></li><li><a href="#method.headers">headers</a></li><li><a href="#method.headers_mut">headers_mut</a></li><li><a href="#method.into_body">into_body</a></li><li><a href="#method.into_parts">into_parts</a></li><li><a href="#method.keep_alive">keep_alive</a></li><li><a href="#method.map_body">map_body</a></li><li><a href="#method.map_into_boxed_body">map_into_boxed_body</a></li><li><a href="#method.map_into_left_body">map_into_left_body</a></li><li><a href="#method.map_into_right_body">map_into_right_body</a></li><li><a href="#method.new">new</a></li><li><a href="#method.set_body">set_body</a></li><li><a href="#method.status">status</a></li><li><a href="#method.status_mut">status_mut</a></li><li><a href="#method.upgrade">upgrade</a></li><li><a href="#method.with_body">with_body</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Debug-for-HttpResponse%3CB%3E">Debug</a></li><li><a href="#impl-From%3CError%3E-for-HttpResponse">From&lt;Error&gt;</a></li><li><a href="#impl-From%3CHttpResponse%3CB%3E%3E-for-Response%3CB%3E">From&lt;HttpResponse&lt;B&gt;&gt;</a></li><li><a href="#impl-From%3CHttpResponseBuilder%3E-for-HttpResponse">From&lt;HttpResponseBuilder&gt;</a></li><li><a href="#impl-From%3CResponse%3CB%3E%3E-for-HttpResponse%3CB%3E">From&lt;Response&lt;B&gt;&gt;</a></li><li><a href="#impl-From%3CServiceResponse%3CB%3E%3E-for-HttpResponse%3CB%3E">From&lt;ServiceResponse&lt;B&gt;&gt;</a></li><li><a href="#impl-Responder-for-HttpResponse%3CB%3E">Responder</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-HttpResponse%3CB%3E">!Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-HttpResponse%3CB%3E">!RefUnwindSafe</a></li><li><a href="#impl-Send-for-HttpResponse%3CB%3E">!Send</a></li><li><a href="#impl-Sync-for-HttpResponse%3CB%3E">!Sync</a></li><li><a href="#impl-UnwindSafe-for-HttpResponse%3CB%3E">!UnwindSafe</a></li><li><a href="#impl-Unpin-for-HttpResponse%3CB%3E">Unpin</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-From%3CT%3E-for-T">From&lt;T&gt;</a></li><li><a href="#impl-Instrument-for-T">Instrument</a></li><li><a href="#impl-Into%3CU%3E-for-T">Into&lt;U&gt;</a></li><li><a href="#impl-Same-for-T">Same</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto&lt;U&gt;</a></li><li><a href="#impl-VZip%3CV%3E-for-T">VZip&lt;V&gt;</a></li><li><a href="#impl-WithSubscriber-for-T">WithSubscriber</a></li></ul></section><h2><a href="index.html">In crate actix_web</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="index.html">actix_web</a>::<wbr><a class="struct" href="#">HttpResponse</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../src/actix_web/response/response.rs.html#23-26">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub struct HttpResponse&lt;B = <a class="struct" href="body/struct.BoxBody.html" title="struct actix_web::body::BoxBody">BoxBody</a>&gt; { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An outgoing response.</p>
</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">HttpResponseBuilder</a> <a href="#" class="tooltip" data-notable-ty="HttpResponseBuilder"></a></h4></section><section id="method.ResetContent" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#29">source</a><h4 class="code-header">pub fn <a href="#method.ResetContent" class="fn">ResetContent</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.PartialContent" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#30">source</a><h4 class="code-header">pub fn <a href="#method.PartialContent" class="fn">PartialContent</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.MultiStatus" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#31">source</a><h4 class="code-header">pub fn <a href="#method.MultiStatus" class="fn">MultiStatus</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.AlreadyReported" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#32">source</a><h4 class="code-header">pub fn <a href="#method.AlreadyReported" class="fn">AlreadyReported</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.ImUsed" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#33">source</a><h4 class="code-header">pub fn <a href="#method.ImUsed" class="fn">ImUsed</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.MultipleChoices" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#35">source</a><h4 class="code-header">pub fn <a href="#method.MultipleChoices" class="fn">MultipleChoices</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.MovedPermanently" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#36">source</a><h4 class="code-header">pub fn <a href="#method.MovedPermanently" class="fn">MovedPermanently</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.Found" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#37">source</a><h4 class="code-header">pub fn <a href="#method.Found" class="fn">Found</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.SeeOther" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#38">source</a><h4 class="code-header">pub fn <a href="#method.SeeOther" class="fn">SeeOther</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.NotModified" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#39">source</a><h4 class="code-header">pub fn <a href="#method.NotModified" class="fn">NotModified</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.UseProxy" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#40">source</a><h4 class="code-header">pub fn <a href="#method.UseProxy" class="fn">UseProxy</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.TemporaryRedirect" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#41">source</a><h4 class="code-header">pub fn <a href="#method.TemporaryRedirect" class="fn">TemporaryRedirect</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.PermanentRedirect" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#42">source</a><h4 class="code-header">pub fn <a href="#method.PermanentRedirect" class="fn">PermanentRedirect</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.BadRequest" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#44">source</a><h4 class="code-header">pub fn <a href="#method.BadRequest" class="fn">BadRequest</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.Unauthorized" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#45">source</a><h4 class="code-header">pub fn <a href="#method.Unauthorized" class="fn">Unauthorized</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.PaymentRequired" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#46">source</a><h4 class="code-header">pub fn <a href="#method.PaymentRequired" class="fn">PaymentRequired</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.Forbidden" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#47">source</a><h4 class="code-header">pub fn <a href="#method.Forbidden" class="fn">Forbidden</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.NotFound" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#48">source</a><h4 class="code-header">pub fn <a href="#method.NotFound" class="fn">NotFound</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.MethodNotAllowed" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#49">source</a><h4 class="code-header">pub fn <a href="#method.MethodNotAllowed" class="fn">MethodNotAllowed</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.NotAcceptable" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#50">source</a><h4 class="code-header">pub fn <a href="#method.NotAcceptable" class="fn">NotAcceptable</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.ProxyAuthenticationRequired" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#51-54">source</a><h4 class="code-header">pub fn <a href="#method.ProxyAuthenticationRequired" class="fn">ProxyAuthenticationRequired</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.RequestTimeout" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#55">source</a><h4 class="code-header">pub fn <a href="#method.RequestTimeout" class="fn">RequestTimeout</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.Conflict" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#56">source</a><h4 class="code-header">pub fn <a href="#method.Conflict" class="fn">Conflict</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.Gone" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#57">source</a><h4 class="code-header">pub fn <a href="#method.Gone" class="fn">Gone</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.LengthRequired" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#58">source</a><h4 class="code-header">pub fn <a href="#method.LengthRequired" class="fn">LengthRequired</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.PreconditionFailed" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#59">source</a><h4 class="code-header">pub fn <a href="#method.PreconditionFailed" class="fn">PreconditionFailed</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.PayloadTooLarge" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#60">source</a><h4 class="code-header">pub fn <a href="#method.PayloadTooLarge" class="fn">PayloadTooLarge</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.UriTooLong" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#61">source</a><h4 class="code-header">pub fn <a href="#method.UriTooLong" class="fn">UriTooLong</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.UnsupportedMediaType" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#62">source</a><h4 class="code-header">pub fn <a href="#method.UnsupportedMediaType" class="fn">UnsupportedMediaType</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.RangeNotSatisfiable" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#63">source</a><h4 class="code-header">pub fn <a href="#method.RangeNotSatisfiable" class="fn">RangeNotSatisfiable</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.ExpectationFailed" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#64">source</a><h4 class="code-header">pub fn <a href="#method.ExpectationFailed" class="fn">ExpectationFailed</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.ImATeapot" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#65">source</a><h4 class="code-header">pub fn <a href="#method.ImATeapot" class="fn">ImATeapot</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.MisdirectedRequest" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#66">source</a><h4 class="code-header">pub fn <a href="#method.MisdirectedRequest" class="fn">MisdirectedRequest</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.UnprocessableEntity" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#67">source</a><h4 class="code-header">pub fn <a href="#method.UnprocessableEntity" class="fn">UnprocessableEntity</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.Locked" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#68">source</a><h4 class="code-header">pub fn <a href="#method.Locked" class="fn">Locked</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.FailedDependency" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#69">source</a><h4 class="code-header">pub fn <a href="#method.FailedDependency" class="fn">FailedDependency</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.UpgradeRequired" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#70">source</a><h4 class="code-header">pub fn <a href="#method.UpgradeRequired" class="fn">UpgradeRequired</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.PreconditionRequired" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#71">source</a><h4 class="code-header">pub fn <a href="#method.PreconditionRequired" class="fn">PreconditionRequired</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.TooManyRequests" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#72">source</a><h4 class="code-header">pub fn <a href="#method.TooManyRequests" class="fn">TooManyRequests</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.RequestHeaderFieldsTooLarge" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#73-76">source</a><h4 class="code-header">pub fn <a href="#method.RequestHeaderFieldsTooLarge" class="fn">RequestHeaderFieldsTooLarge</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.UnavailableForLegalReasons" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#77-80">source</a><h4 class="code-header">pub fn <a href="#method.UnavailableForLegalReasons" class="fn">UnavailableForLegalReasons</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.InternalServerError" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#82">source</a><h4 class="code-header">pub fn <a href="#method.InternalServerError" class="fn">InternalServerError</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.NotImplemented" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#83">source</a><h4 class="code-header">pub fn <a href="#method.NotImplemented" class="fn">NotImplemented</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.BadGateway" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#84">source</a><h4 class="code-header">pub fn <a href="#method.BadGateway" class="fn">BadGateway</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.ServiceUnavailable" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#85">source</a><h4 class="code-header">pub fn <a href="#method.ServiceUnavailable" class="fn">ServiceUnavailable</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.GatewayTimeout" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#86">source</a><h4 class="code-header">pub fn <a href="#method.GatewayTimeout" class="fn">GatewayTimeout</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.VersionNotSupported" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#87">source</a><h4 class="code-header">pub fn <a href="#method.VersionNotSupported" class="fn">VersionNotSupported</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.VariantAlsoNegotiates" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#88">source</a><h4 class="code-header">pub fn <a href="#method.VariantAlsoNegotiates" class="fn">VariantAlsoNegotiates</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.InsufficientStorage" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#89">source</a><h4 class="code-header">pub fn <a href="#method.InsufficientStorage" class="fn">InsufficientStorage</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.LoopDetected" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#90">source</a><h4 class="code-header">pub fn <a href="#method.LoopDetected" class="fn">LoopDetected</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.NotExtended" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#91">source</a><h4 class="code-header">pub fn <a href="#method.NotExtended" class="fn">NotExtended</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.NetworkAuthenticationRequired" class="method"><a class="src rightside" href="../src/actix_web/response/http_codes.rs.html#92-95">source</a><h4 class="code-header">pub fn <a href="#method.NetworkAuthenticationRequired" class="fn">NetworkAuthenticationRequired</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></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-HttpResponse-1" class="impl"><a class="src rightside" href="../src/actix_web/response/response.rs.html#28-52">source</a><a href="#impl-HttpResponse-1" class="anchor">§</a><h3 class="code-header">impl <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;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="src rightside" href="../src/actix_web/response/response.rs.html#31-36">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>(status: <a class="struct" href="http/struct.StatusCode.html" title="struct actix_web::http::StatusCode">StatusCode</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a response.</p>
</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="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="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</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-2" class="method trait-impl"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#378-380">source</a><a href="#method.from-2" 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>(builder: <a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</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%3CResponse%3CB%3E%3E-for-HttpResponse%3CB%3E" class="impl"><a class="src rightside" href="../src/actix_web/response/response.rs.html#310-314">source</a><a href="#impl-From%3CResponse%3CB%3E%3E-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/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="dev/struct.Response.html" title="struct actix_web::dev::Response">Response</a>&lt;B&gt;&gt; for <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.from" class="method trait-impl"><a class="src rightside" href="../src/actix_web/response/response.rs.html#311-313">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(res: <a class="struct" href="dev/struct.Response.html" title="struct actix_web::dev::Response">Response</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%3CServiceResponse%3CB%3E%3E-for-HttpResponse%3CB%3E" class="impl"><a class="src rightside" href="../src/actix_web/service.rs.html#502-506">source</a><a href="#impl-From%3CServiceResponse%3CB%3E%3E-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/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="dev/struct.ServiceResponse.html" title="struct actix_web::dev::ServiceResponse">ServiceResponse</a>&lt;B&gt;&gt; for <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.from-1" class="method trait-impl"><a class="src rightside" href="../src/actix_web/service.rs.html#503-505">source</a><a href="#method.from-1" 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="dev/struct.ServiceResponse.html" title="struct actix_web::dev::ServiceResponse">ServiceResponse</a>&lt;B&gt;) -&gt; <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&lt;B&gt;</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-Responder-for-HttpResponse%3CB%3E" class="impl"><a class="src rightside" href="../src/actix_web/response/response.rs.html#365-375">source</a><a href="#impl-Responder-for-HttpResponse%3CB%3E" class="anchor">§</a><h3 class="code-header">impl&lt;B&gt; <a class="trait" href="trait.Responder.html" title="trait actix_web::Responder">Responder</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> + '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>