mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-24 00:21:08 +01:00
81 lines
90 KiB
HTML
81 lines
90 KiB
HTML
<!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<Error></a></li><li><a href="#impl-From%3CHttpResponse%3CB%3E%3E-for-Response%3CB%3E">From<HttpResponse<B>></a></li><li><a href="#impl-From%3CHttpResponseBuilder%3E-for-HttpResponse">From<HttpResponseBuilder></a></li><li><a href="#impl-From%3CResponse%3CB%3E%3E-for-HttpResponse%3CB%3E">From<Response<B>></a></li><li><a href="#impl-From%3CServiceResponse%3CB%3E%3E-for-HttpResponse%3CB%3E">From<ServiceResponse<B>></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<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Instrument-for-T">Instrument</a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-Same-for-T">Same</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E-for-T">VZip<V></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>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct HttpResponse<B = <a class="struct" href="body/struct.BoxBody.html" title="struct actix_web::body::BoxBody">BoxBody</a>> { <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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>() -> <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><<a class="struct" href="body/struct.BoxBody.html" title="struct actix_web::body::BoxBody">BoxBody</a>></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>) -> 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>) -> <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><<a class="struct" href="error/struct.Error.html" title="struct actix_web::error::Error">Error</a>>) -> 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<B> <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a><B></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) -> 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>(&self) -> &<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>(&mut self) -> &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>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="struct" href="error/struct.Error.html" title="struct actix_web::error::Error">Error</a>></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>(&self) -> <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>(&mut self) -> &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>(&self) -> &<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>(&mut self) -> &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>(&self) -> CookieIter<'_></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>(&mut self, cookie: &<a class="struct" href="cookie/struct.Cookie.html" title="struct actix_web::cookie::Cookie">Cookie</a><'_>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<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>></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>(
|
||
&mut self,
|
||
cookie: &<a class="struct" href="cookie/struct.Cookie.html" title="struct actix_web::cookie::Cookie">Cookie</a><'_>
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<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>></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 you’re 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>(&mut self, name: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <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>(&self) -> <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>(&self) -> <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>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/cell/struct.Ref.html" title="struct core::cell::Ref">Ref</a><'_, <a class="struct" href="dev/struct.Extensions.html" title="struct actix_web::dev::Extensions">Extensions</a>></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>(&mut self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/cell/struct.RefMut.html" title="struct core::cell::RefMut">RefMut</a><'_, <a class="struct" href="dev/struct.Extensions.html" title="struct actix_web::dev::Extensions">Extensions</a>></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>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&B</a></h4></section></summary><div class="docblock"><p>Returns a reference to this response’s 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><B2>(self, body: B2) -> <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a><B2></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) -> (<a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>>, 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) -> <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></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><F, B2>(self, f: F) -> <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a><B2><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>(&mut <a class="struct" href="dev/struct.ResponseHead.html" title="struct actix_web::dev::ResponseHead">ResponseHead</a>, B) -> 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><R>(self) -> <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a><<a class="enum" href="body/enum.EitherBody.html" title="enum actix_web::body::EitherBody">EitherBody</a><B, R>></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><L>(self) -> <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a><<a class="enum" href="body/enum.EitherBody.html" title="enum actix_web::body::EitherBody">EitherBody</a><L, B>></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) -> <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a><<a class="struct" href="body/struct.BoxBody.html" title="struct actix_web::body::BoxBody">BoxBody</a>><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) -> 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<B> <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><B><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>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><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><<a class="struct" href="error/struct.Error.html" title="struct actix_web::error::Error">Error</a>> 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>) -> 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<B> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a><B>> for <a class="struct" href="dev/struct.Response.html" title="struct actix_web::dev::Response">Response</a><B></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><B>) -> 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><<a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</a>> 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>) -> 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<B> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="dev/struct.Response.html" title="struct actix_web::dev::Response">Response</a><B>> for <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a><B></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><B>) -> 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<B> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="dev/struct.ServiceResponse.html" title="struct actix_web::dev::ServiceResponse">ServiceResponse</a><B>> for <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a><B></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><B>) -> <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a><B></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<B> <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><B><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, _: &<a class="struct" href="struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>) -> <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a><Self::<a class="associatedtype" href="trait.Responder.html#associatedtype.Body" title="type actix_web::Responder::Body">Body</a>></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) -> <a class="struct" href="struct.CustomizeResponder.html" title="struct actix_web::CustomizeResponder">CustomizeResponder</a><Self><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<B = <a class="struct" href="body/struct.BoxBody.html" title="struct actix_web::body::BoxBody">BoxBody</a>> !<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><B></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<B = <a class="struct" href="body/struct.BoxBody.html" title="struct actix_web::body::BoxBody">BoxBody</a>> !<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><B></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<B = <a class="struct" href="body/struct.BoxBody.html" title="struct actix_web::body::BoxBody">BoxBody</a>> !<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><B></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<B = <a class="struct" href="body/struct.BoxBody.html" title="struct actix_web::body::BoxBody">BoxBody</a>> !<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><B></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<B> <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><B><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<B = <a class="struct" href="body/struct.BoxBody.html" title="struct actix_web::body::BoxBody">BoxBody</a>> !<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><B></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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<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>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<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>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<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>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="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) -> 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<T> 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) -> Instrumented<Self></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) -> Instrumented<Self></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<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<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><T>,</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) -> 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><T> 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<T> <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<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<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><T>,</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) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="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<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<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><T>,</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> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="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) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="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<V, T> VZip<V> for T<div class="where">where
|
||
V: MultiLane<T>,</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) -> 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<T> 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><S>(self, subscriber: S) -> WithDispatch<Self><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><Dispatch>,</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) -> WithDispatch<Self></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><<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>>;</div>"}</script></section></div></main></body></html> |