Files
mercator_service/actix_web/trait.Responder.html

45 lines
47 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Responder` trait in crate `actix_web`."><meta name="keywords" content="rust, rustlang, rust-lang, Responder"><title>actix_web::Responder - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../actix_web/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Trait Responder</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#associated-types">Associated Types</a><div class="sidebar-links"><a href="#associatedtype.Error">Error</a><a href="#associatedtype.Future">Future</a></div><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.respond_to">respond_to</a></div><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.with_header">with_header</a><a href="#method.with_status">with_status</a></div><a class="sidebar-title" href="#foreign-impls">Implementations on Foreign Types</a><div class="sidebar-links"><a href="#impl-Responder-for-%26%27a%20String">&amp;&#39;a String</a><a href="#impl-Responder-for-%26%27static%20%5Bu8%5D">&amp;&#39;static [u8]</a><a href="#impl-Responder-for-%26%27static%20str">&amp;&#39;static str</a><a href="#impl-Responder-for-()">()</a><a href="#impl-Responder-for-(T%2C%20StatusCode)">(T, StatusCode)</a><a href="#impl-Responder-for-Box%3Cdyn%20Future%3CItem%20=%20I%2C%20Error%20=%20E%3E%3E">Box&lt;dyn Future&lt;Item = I, Error = E&gt;&gt;</a><a href="#impl-Responder-for-Option%3CT%3E">Option&lt;T&gt;</a><a href="#impl-Responder-for-Result%3CT%2C%20E%3E">Result&lt;T, E&gt;</a><a href="#impl-Responder-for-String">String</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='index.html'>actix_web</a></p><script>window.sidebarCurrent = {name: 'Responder', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../src/actix_web/responder.rs.html#16-70' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='index.html'>actix_web</a>::<wbr><a class="trait" href=''>Responder</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub trait Responder {
type <a href='#associatedtype.Error' class="type">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;;
type <a href='#associatedtype.Future' class="type">Future</a>: <a class="trait" href="../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a>, Error = Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Error" title="type actix_web::Responder::Error">Error</a>&gt;;
fn <a href='#tymethod.respond_to' class='fnname'>respond_to</a>(self, req: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>) -&gt; Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Future" title="type actix_web::Responder::Future">Future</a>;
fn <a href='#method.with_status' class='fnname'>with_status</a>(self, status: <a class="struct" href="../actix_web/http/struct.StatusCode.html" title="struct actix_web::http::StatusCode">StatusCode</a>) -&gt; CustomResponder&lt;Self&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
{ ... }
<div class='item-spacer'></div> fn <a href='#method.with_header' class='fnname'>with_header</a>&lt;K, V&gt;(self, key: K, value: V) -&gt; CustomResponder&lt;Self&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="struct" href="../actix_web/http/struct.HeaderName.html" title="struct actix_web::http::HeaderName">HeaderName</a>: <a class="trait" href="../actix_web/http/trait.HttpTryFrom.html" title="trait actix_web::http::HttpTryFrom">HttpTryFrom</a>&lt;K&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;V: <a class="trait" href="../actix_web/http/header/trait.IntoHeaderValue.html" title="trait actix_web::http::header::IntoHeaderValue">IntoHeaderValue</a></span>,
{ ... }
}</pre></div><div class='docblock'><p>Trait implemented by types that can be converted to a http response.</p>
<p>Types that implement this trait can be used as the return type of a handler.</p>
</div>
<h2 id='associated-types' class='small-section-header'>Associated Types<a href='#associated-types' class='anchor'></a></h2><div class='methods'><h3 id='associatedtype.Error' class='method'><code id='Error.t'>type <a href='#associatedtype.Error' class="type">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;</code></h3><div class='docblock'><p>The associated error which can be returned.</p>
</div><h3 id='associatedtype.Future' class='method'><code id='Future.t'>type <a href='#associatedtype.Future' class="type">Future</a>: <a class="trait" href="../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a>, Error = Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Error" title="type actix_web::Responder::Error">Error</a>&gt;</code></h3><div class='docblock'><p>The future response value.</p>
</div></div><span class='loading-content'>Loading content...</span>
<h2 id='required-methods' class='small-section-header'>Required methods<a href='#required-methods' class='anchor'></a></h2><div class='methods'><h3 id='tymethod.respond_to' class='method'><code id='respond_to.v'>fn <a href='#tymethod.respond_to' class='fnname'>respond_to</a>(self, req: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>) -&gt; Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Future" title="type actix_web::Responder::Future">Future</a></code></h3><div class='docblock'><p>Convert itself to <code>AsyncResult</code> or <code>Error</code>.</p>
</div></div><span class='loading-content'>Loading content...</span>
<h2 id='provided-methods' class='small-section-header'>Provided methods<a href='#provided-methods' class='anchor'></a></h2><div class='methods'><h3 id='method.with_status' class='method'><code id='with_status.v'>fn <a href='#method.with_status' class='fnname'>with_status</a>(self, status: <a class="struct" href="../actix_web/http/struct.StatusCode.html" title="struct actix_web::http::StatusCode">StatusCode</a>) -&gt; CustomResponder&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></h3><div class='docblock'><p>Override a status code for a Responder.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">actix_web</span>::{<span class="ident">HttpRequest</span>, <span class="ident">Responder</span>, <span class="ident">http</span>::<span class="ident">StatusCode</span>};
<span class="kw">fn</span> <span class="ident">index</span>(<span class="ident">req</span>: <span class="ident">HttpRequest</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="kw">impl</span> <span class="ident">Responder</span> {
<span class="string">&quot;Welcome!&quot;</span>.<span class="ident">with_status</span>(<span class="ident">StatusCode</span>::<span class="ident">OK</span>)
}</pre></div>
</div><h3 id='method.with_header' class='method'><code id='with_header.v'>fn <a href='#method.with_header' class='fnname'>with_header</a>&lt;K, V&gt;(self, key: K, value: V) -&gt; CustomResponder&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="struct" href="../actix_web/http/struct.HeaderName.html" title="struct actix_web::http::HeaderName">HeaderName</a>: <a class="trait" href="../actix_web/http/trait.HttpTryFrom.html" title="trait actix_web::http::HttpTryFrom">HttpTryFrom</a>&lt;K&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;V: <a class="trait" href="../actix_web/http/header/trait.IntoHeaderValue.html" title="trait actix_web::http::header::IntoHeaderValue">IntoHeaderValue</a>,&nbsp;</span></code></h3><div class='docblock'><p>Add header to the Responder's response.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">actix_web</span>::{<span class="ident">web</span>, <span class="ident">HttpRequest</span>, <span class="ident">Responder</span>};
<span class="kw">use</span> <span class="ident">serde</span>::<span class="ident">Serialize</span>;
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Serialize</span>)]</span>
<span class="kw">struct</span> <span class="ident">MyObj</span> {
<span class="ident">name</span>: <span class="ident">String</span>,
}
<span class="kw">fn</span> <span class="ident">index</span>(<span class="ident">req</span>: <span class="ident">HttpRequest</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="kw">impl</span> <span class="ident">Responder</span> {
<span class="ident">web</span>::<span class="ident">Json</span>(
<span class="ident">MyObj</span>{<span class="ident">name</span>: <span class="string">&quot;Name&quot;</span>.<span class="ident">to_string</span>()}
)
.<span class="ident">with_header</span>(<span class="string">&quot;x-version&quot;</span>, <span class="string">&quot;1.2.3&quot;</span>)
}</pre></div>
</div></div><span class='loading-content'>Loading content...</span>
<h2 id='foreign-impls' class='small-section-header'>Implementations on Foreign Types<a href='#foreign-impls' class='anchor'></a></h2><h3 id='impl-Responder-for-Option%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a> for <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a>,&nbsp;</span></code><a href='#impl-Responder-for-Option%3CT%3E' class='anchor'></a><a class='srclink' href='../src/actix_web/responder.rs.html#82-98' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='#associatedtype.Error' class="type">Error</a> = T::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Error" title="type actix_web::Responder::Error">Error</a></code></h4><h4 id='associatedtype.Future-1' class="type"><code id='Future.t-1'>type <a href='#associatedtype.Future' class="type">Future</a> = <a class="enum" href="../futures/future/either/enum.Either.html" title="enum futures::future::either::Either">EitherFuture</a>&lt;&lt;T::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Future" title="type actix_web::Responder::Future">Future</a> as <a class="trait" href="../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&gt;::<a class="type" href="../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, <a class="struct" href="../futures/future/result_/struct.FutureResult.html" title="struct futures::future::result_::FutureResult">FutureResult</a>&lt;<a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a>, T::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Error" title="type actix_web::Responder::Error">Error</a>&gt;&gt;</code></h4><h4 id='method.respond_to' class="method hidden"><code id='respond_to.v-1'>fn <a href='#method.respond_to' class='fnname'>respond_to</a>(self, req: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>) -&gt; Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Future" title="type actix_web::Responder::Future">Future</a></code><a class='srclink' href='../src/actix_web/responder.rs.html#92-97' title='goto source code'>[src]</a></h4></div><h3 id='impl-Responder-for-Result%3CT%2C%20E%3E' class='impl'><code class='in-band'>impl&lt;T, E&gt; <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a> for <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, E&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;,&nbsp;</span></code><a href='#impl-Responder-for-Result%3CT%2C%20E%3E' class='anchor'></a><a class='srclink' href='../src/actix_web/responder.rs.html#100-119' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-2' class="type"><code id='Error.t-2'>type <a href='#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a></code></h4><h4 id='associatedtype.Future-2' class="type"><code id='Future.t-2'>type <a href='#associatedtype.Future' class="type">Future</a> = <a class="enum" href="../futures/future/either/enum.Either.html" title="enum futures::future::either::Either">EitherFuture</a>&lt;ResponseFuture&lt;&lt;T::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Future" title="type actix_web::Responder::Future">Future</a> as <a class="trait" href="../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&gt;::<a class="type" href="../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt;, <a class="struct" href="../futures/future/result_/struct.FutureResult.html" title="struct futures::future::result_::FutureResult">FutureResult</a>&lt;<a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a>, <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;&gt;</code></h4><h4 id='method.respond_to-1' class="method hidden"><code id='respond_to.v-2'>fn <a href='#method.respond_to' class='fnname'>respond_to</a>(self, req: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>) -&gt; Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Future" title="type actix_web::Responder::Future">Future</a></code><a class='srclink' href='../src/actix_web/responder.rs.html#111-118' title='goto source code'>[src]</a></h4></div><h3 id='impl-Responder-for-()' class='impl'><code class='in-band'>impl <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></code><a href='#impl-Responder-for-()' class='anchor'></a><a class='srclink' href='../src/actix_web/responder.rs.html#131-138' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-3' class="type"><code id='Error.t-3'>type <a href='#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a></code></h4><h4 id='associatedtype.Future-3' class="type"><code id='Future.t-3'>type <a href='#associatedtype.Future' class="type">Future</a> = <a class="struct" href="../futures/future/result_/struct.FutureResult.html" title="struct futures::future::result_::FutureResult">FutureResult</a>&lt;<a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a>, <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;</code></h4><h4 id='method.respond_to-2' class="method hidden"><code id='respond_to.v-3'>fn <a href='#method.respond_to' class='fnname'>respond_to</a>(self, _: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>) -&gt; Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Future" title="type actix_web::Responder::Future">Future</a></code><a class='srclink' href='../src/actix_web/responder.rs.html#135-137' title='goto source code'>[src]</a></h4></div><h3 id='impl-Responder-for-(T%2C%20StatusCode)' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>T, <a class="struct" href="../actix_web/http/struct.StatusCode.html" title="struct actix_web::http::StatusCode">StatusCode</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a>,&nbsp;</span></code><a href='#impl-Responder-for-(T%2C%20StatusCode)' class='anchor'></a><a class='srclink' href='../src/actix_web/responder.rs.html#140-154' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-4' class="type"><code id='Error.t-4'>type <a href='#associatedtype.Error' class="type">Error</a> = T::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Error" title="type actix_web::Responder::Error">Error</a></code></h4><h4 id='associatedtype.Future-4' class="type"><code id='Future.t-4'>type <a href='#associatedtype.Future' class="type">Future</a> = CustomResponderFut&lt;T&gt;</code></h4><h4 id='method.respond_to-3' class="method hidden"><code id='respond_to.v-4'>fn <a href='#method.respond_to' class='fnname'>respond_to</a>(self, req: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>) -&gt; Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Future" title="type actix_web::Responder::Future">Future</a></code><a class='srclink' href='../src/actix_web/responder.rs.html#147-153' title='goto source code'>[src]</a></h4></div><h3 id='impl-Responder-for-%26%27static%20str' class='impl'><code class='in-band'>impl <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a> for &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code><a href='#impl-Responder-for-%26%27static%20str' class='anchor'></a><a class='srclink' href='../src/actix_web/responder.rs.html#156-165' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-5' class="type"><code id='Error.t-5'>type <a href='#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a></code></h4><h4 id='associatedtype.Future-5' class="type"><code id='Future.t-5'>type <a href='#associatedtype.Future' class="type">Future</a> = <a class="struct" href="../futures/future/result_/struct.FutureResult.html" title="struct futures::future::result_::FutureResult">FutureResult</a>&lt;<a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a>, <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;</code></h4><h4 id='method.respond_to-4' class="method hidden"><code id='respond_to.v-5'>fn <a href='#method.respond_to' class='fnname'>respond_to</a>(self, _: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>) -&gt; Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Future" title="type actix_web::Responder::Future">Future</a></code><a class='srclink' href='../src/actix_web/responder.rs.html#160-164' title='goto source code'>[src]</a></h4></div><h3 id='impl-Responder-for-%26%27static%20%5Bu8%5D' class='impl'><code class='in-band'>impl <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'static [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code><a href='#impl-Responder-for-%26%27static%20%5Bu8%5D' class='anchor'></a><a class='srclink' href='../src/actix_web/responder.rs.html#167-176' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-6' class="type"><code id='Error.t-6'>type <a href='#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a></code></h4><h4 id='associatedtype.Future-6' class="type"><code id='Future.t-6'>type <a href='#associatedtype.Future' class="type">Future</a> = <a class="struct" href="../futures/future/result_/struct.FutureResult.html" title="struct futures::future::result_::FutureResult">FutureResult</a>&lt;<a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a>, <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;</code></h4><h4 id='method.respond_to-5' class="method hidden"><code id='respond_to.v-6'>fn <a href='#method.respond_to' class='fnname'>respond_to</a>(self, _: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>) -&gt; Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Future" title="type actix_web::Responder::Future">Future</a></code><a class='srclink' href='../src/actix_web/responder.rs.html#171-175' title='goto source code'>[src]</a></h4></div><h3 id='impl-Responder-for-String' class='impl'><code class='in-band'>impl <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code><a href='#impl-Responder-for-String' class='anchor'></a><a class='srclink' href='../src/actix_web/responder.rs.html#178-187' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-7' class="type"><code id='Error.t-7'>type <a href='#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a></code></h4><h4 id='associatedtype.Future-7' class="type"><code id='Future.t-7'>type <a href='#associatedtype.Future' class="type">Future</a> = <a class="struct" href="../futures/future/result_/struct.FutureResult.html" title="struct futures::future::result_::FutureResult">FutureResult</a>&lt;<a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a>, <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;</code></h4><h4 id='method.respond_to-6' class="method hidden"><code id='respond_to.v-7'>fn <a href='#method.respond_to' class='fnname'>respond_to</a>(self, _: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>) -&gt; Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Future" title="type actix_web::Responder::Future">Future</a></code><a class='srclink' href='../src/actix_web/responder.rs.html#182-186' title='goto source code'>[src]</a></h4></div><h3 id='impl-Responder-for-%26%27a%20String' class='impl'><code class='in-band'>impl&lt;'a&gt; <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a> for &amp;'a <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code><a href='#impl-Responder-for-%26%27a%20String' class='anchor'></a><a class='srclink' href='../src/actix_web/responder.rs.html#189-198' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-8' class="type"><code id='Error.t-8'>type <a href='#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a></code></h4><h4 id='associatedtype.Future-8' class="type"><code id='Future.t-8'>type <a href='#associatedtype.Future' class="type">Future</a> = <a class="struct" href="../futures/future/result_/struct.FutureResult.html" title="struct futures::future::result_::FutureResult">FutureResult</a>&lt;<a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a>, <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;</code></h4><h4 id='method.respond_to-7' class="method hidden"><code id='respond_to.v-8'>fn <a href='#method.respond_to' class='fnname'>respond_to</a>(self, _: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>) -&gt; Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Future" title="type actix_web::Responder::Future">Future</a></code><a class='srclink' href='../src/actix_web/responder.rs.html#193-197' title='goto source code'>[src]</a></h4></div><h3 id='impl-Responder-for-Box%3Cdyn%20Future%3CItem%20=%20I%2C%20Error%20=%20E%3E%3E' class='impl'><code class='in-band'>impl&lt;I, E&gt; <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&lt;Item = I, Error = E&gt;&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a> + 'static,<br>&nbsp;&nbsp;&nbsp;&nbsp;E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt; + 'static,&nbsp;</span></code><a href='#impl-Responder-for-Box%3Cdyn%20Future%3CItem%20=%20I%2C%20Error%20=%20E%3E%3E' class='anchor'></a><a class='srclink' href='../src/actix_web/responder.rs.html#414-430' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-9' class="type"><code id='Error.t-9'>type <a href='#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a></code></h4><h4 id='associatedtype.Future-9' class="type"><code id='Future.t-9'>type <a href='#associatedtype.Future' class="type">Future</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&lt;Item = <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a>, Error = <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;&gt;</code></h4><h4 id='method.respond_to-8' class="method hidden"><code id='respond_to.v-9'>fn <a href='#method.respond_to' class='fnname'>respond_to</a>(self, req: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>) -&gt; Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Future" title="type actix_web::Responder::Future">Future</a></code><a class='srclink' href='../src/actix_web/responder.rs.html#423-429' title='goto source code'>[src]</a></h4></div><span class='loading-content'>Loading content...</span>
<h2 id='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'><h3 id='impl-Responder' class='impl'><code class='in-band'>impl Responder for <a class="struct" href="../actix_web/dev/struct.HttpResponseBuilder.html" title="struct actix_web::dev::HttpResponseBuilder">ResponseBuilder</a></code><a href='#impl-Responder' class='anchor'></a><a class='srclink' href='../src/actix_web/responder.rs.html#121-129' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-10' class="type"><code id='Error.t-10'>type <a href='#associatedtype.Error-10' class="type">Error</a> = <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a></code></h4><h4 id='associatedtype.Future-10' class="type"><code id='Future.t-10'>type <a href='#associatedtype.Future-10' class="type">Future</a> = <a class="struct" href="../futures/future/result_/struct.FutureResult.html" title="struct futures::future::result_::FutureResult">FutureResult</a>&lt;<a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a>, <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;</code></h4><h4 id='method.respond_to-9' class="method hidden"><code id='respond_to.v-10'>fn <a href='#method.respond_to-9' class='fnname'>respond_to</a>(self, _: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>) -&gt; Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Future" title="type actix_web::Responder::Future">Future</a></code><a class='srclink' href='../src/actix_web/responder.rs.html#126-128' title='goto source code'>[src]</a></h4></div><h3 id='impl-Responder-1' class='impl'><code class='in-band'>impl Responder for <a class="struct" href="../actix_web/web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a></code><a href='#impl-Responder-1' class='anchor'></a><a class='srclink' href='../src/actix_web/responder.rs.html#200-209' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-11' class="type"><code id='Error.t-11'>type <a href='#associatedtype.Error-11' class="type">Error</a> = <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a></code></h4><h4 id='associatedtype.Future-11' class="type"><code id='Future.t-11'>type <a href='#associatedtype.Future-11' class="type">Future</a> = <a class="struct" href="../futures/future/result_/struct.FutureResult.html" title="struct futures::future::result_::FutureResult">FutureResult</a>&lt;<a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a>, <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;</code></h4><h4 id='method.respond_to-10' class="method hidden"><code id='respond_to.v-11'>fn <a href='#method.respond_to-10' class='fnname'>respond_to</a>(self, _: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>) -&gt; Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Future" title="type actix_web::Responder::Future">Future</a></code><a class='srclink' href='../src/actix_web/responder.rs.html#204-208' title='goto source code'>[src]</a></h4></div><h3 id='impl-Responder-2' class='impl'><code class='in-band'>impl Responder for <a class="struct" href="../actix_web/web/struct.BytesMut.html" title="struct actix_web::web::BytesMut">BytesMut</a></code><a href='#impl-Responder-2' class='anchor'></a><a class='srclink' href='../src/actix_web/responder.rs.html#211-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-12' class="type"><code id='Error.t-12'>type <a href='#associatedtype.Error-12' class="type">Error</a> = <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a></code></h4><h4 id='associatedtype.Future-12' class="type"><code id='Future.t-12'>type <a href='#associatedtype.Future-12' class="type">Future</a> = <a class="struct" href="../futures/future/result_/struct.FutureResult.html" title="struct futures::future::result_::FutureResult">FutureResult</a>&lt;<a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a>, <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;</code></h4><h4 id='method.respond_to-11' class="method hidden"><code id='respond_to.v-12'>fn <a href='#method.respond_to-11' class='fnname'>respond_to</a>(self, _: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>) -&gt; Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Future" title="type actix_web::Responder::Future">Future</a></code><a class='srclink' href='../src/actix_web/responder.rs.html#215-219' title='goto source code'>[src]</a></h4></div><h3 id='impl-Responder-3' class='impl'><code class='in-band'>impl Responder for <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a></code><a href='#impl-Responder-3' class='anchor'></a><a class='srclink' href='../src/actix_web/responder.rs.html#72-80' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-13' class="type"><code id='Error.t-13'>type <a href='#associatedtype.Error-13' class="type">Error</a> = <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a></code></h4><h4 id='associatedtype.Future-13' class="type"><code id='Future.t-13'>type <a href='#associatedtype.Future-13' class="type">Future</a> = <a class="struct" href="../futures/future/result_/struct.FutureResult.html" title="struct futures::future::result_::FutureResult">FutureResult</a>&lt;<a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a>, <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;</code></h4><h4 id='method.respond_to-12' class="method hidden"><code id='respond_to.v-13'>fn <a href='#method.respond_to-12' class='fnname'>respond_to</a>(self, _: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>) -&gt; Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Future" title="type actix_web::Responder::Future">Future</a></code><a class='srclink' href='../src/actix_web/responder.rs.html#77-79' title='goto source code'>[src]</a></h4></div><h3 id='impl-Responder-4' class='impl'><code class='in-band'>impl&lt;A, B&gt; Responder for <a class="enum" href="../actix_web/enum.Either.html" title="enum actix_web::Either">Either</a>&lt;A, B&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a>,&nbsp;</span></code><a href='#impl-Responder-4' class='anchor'></a><a class='srclink' href='../src/actix_web/responder.rs.html#366-383' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-14' class="type"><code id='Error.t-14'>type <a href='#associatedtype.Error-14' class="type">Error</a> = <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a></code></h4><h4 id='associatedtype.Future-14' class="type"><code id='Future.t-14'>type <a href='#associatedtype.Future-14' class="type">Future</a> = EitherResponder&lt;&lt;A::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Future" title="type actix_web::Responder::Future">Future</a> as <a class="trait" href="../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&gt;::<a class="type" href="../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, &lt;B::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Future" title="type actix_web::Responder::Future">Future</a> as <a class="trait" href="../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&gt;::<a class="type" href="../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt;</code></h4><h4 id='method.respond_to-13' class="method hidden"><code id='respond_to.v-14'>fn <a href='#method.respond_to-13' class='fnname'>respond_to</a>(self, req: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>) -&gt; Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Future" title="type actix_web::Responder::Future">Future</a></code><a class='srclink' href='../src/actix_web/responder.rs.html#377-382' title='goto source code'>[src]</a></h4></div><h3 id='impl-Responder-5' class='impl'><code class='in-band'>impl&lt;T&gt; Responder for <a class="struct" href="../actix_web/error/struct.InternalError.html" title="struct actix_web::error::InternalError">InternalError</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + 'static,&nbsp;</span></code><a href='#impl-Responder-5' class='anchor'></a><a class='srclink' href='../src/actix_web/responder.rs.html#432-443' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-15' class="type"><code id='Error.t-15'>type <a href='#associatedtype.Error-15' class="type">Error</a> = <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a></code></h4><h4 id='associatedtype.Future-15' class="type"><code id='Future.t-15'>type <a href='#associatedtype.Future-15' class="type">Future</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="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a>, <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;</code></h4><h4 id='method.respond_to-14' class="method hidden"><code id='respond_to.v-15'>fn <a href='#method.respond_to-14' class='fnname'>respond_to</a>(self, _: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>) -&gt; Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Future" title="type actix_web::Responder::Future">Future</a></code><a class='srclink' href='../src/actix_web/responder.rs.html#439-442' title='goto source code'>[src]</a></h4></div><h3 id='impl-Responder-6' class='impl'><code class='in-band'>impl&lt;T:&nbsp;<a class="trait" href="../serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a>&gt; Responder for <a class="struct" href="../actix_web/web/struct.Form.html" title="struct actix_web::web::Form">Form</a>&lt;T&gt;</code><a href='#impl-Responder-6' class='anchor'></a><a class='srclink' href='../src/actix_web/types/form.rs.html#150-164' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-16' class="type"><code id='Error.t-16'>type <a href='#associatedtype.Error-16' class="type">Error</a> = <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a></code></h4><h4 id='associatedtype.Future-16' class="type"><code id='Future.t-16'>type <a href='#associatedtype.Future-16' class="type">Future</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="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a>, <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;</code></h4><h4 id='method.respond_to-15' class="method hidden"><code id='respond_to.v-16'>fn <a href='#method.respond_to-15' class='fnname'>respond_to</a>(self, _: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>) -&gt; Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Future" title="type actix_web::Responder::Future">Future</a></code><a class='srclink' href='../src/actix_web/types/form.rs.html#154-163' title='goto source code'>[src]</a></h4></div><h3 id='impl-Responder-7' class='impl'><code class='in-band'>impl&lt;T:&nbsp;<a class="trait" href="../serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a>&gt; Responder for <a class="struct" href="../actix_web/web/struct.Json.html" title="struct actix_web::web::Json">Json</a>&lt;T&gt;</code><a href='#impl-Responder-7' class='anchor'></a><a class='srclink' href='../src/actix_web/types/json.rs.html#119-133' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-17' class="type"><code id='Error.t-17'>type <a href='#associatedtype.Error-17' class="type">Error</a> = <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a></code></h4><h4 id='associatedtype.Future-17' class="type"><code id='Future.t-17'>type <a href='#associatedtype.Future-17' class="type">Future</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="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a>, <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;</code></h4><h4 id='method.respond_to-16' class="method hidden"><code id='respond_to.v-17'>fn <a href='#method.respond_to-16' class='fnname'>respond_to</a>(self, _: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>) -&gt; Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Future" title="type actix_web::Responder::Future">Future</a></code><a class='srclink' href='../src/actix_web/types/json.rs.html#123-132' title='goto source code'>[src]</a></h4></div></div><span class='loading-content'>Loading content...</span><script type="text/javascript" src="../implementors/actix_web/trait.Responder.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "actix_web";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>