1
0
mirror of https://github.com/actix/actix-website synced 2024-12-18 09:53:12 +01:00
actix-website/static/api/actix-web/0.7.0/actix_web/trait.Responder.html
2018-07-21 04:09:47 -07:00

57 lines
39 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></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><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.Item">Item</a><a href="#associatedtype.Error">Error</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="#foreign-impls">Implementations on Foreign Types</a><div class="sidebar-links"><a href="#impl-Responder">Option&lt;T&gt;</a><a href="#impl-Responder">Result&lt;T, E&gt;</a><a href="#impl-Responder">Box&lt;Future&lt;Item = I, Error = E&gt;&gt;</a><a href="#impl-Responder">&amp;&#39;static str</a><a href="#impl-Responder">&amp;&#39;static [u8]</a><a href="#impl-Responder">String</a><a href="#impl-Responder">&amp;&#39;a String</a><a href="#impl-Responder">Bytes</a><a href="#impl-Responder">BytesMut</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 js-only"><div class="search-container"><input class="search-input" name="search" autocomplete="off" placeholder="Click or press S to search, ? for more options…" type="search"><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='in-band'>Trait <a href='index.html'>actix_web</a>::<wbr><a class="trait" href=''>Responder</a></span><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/handler.rs.html#26-37' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust trait'>pub trait Responder {
type <a href='#associatedtype.Item' class="type">Item</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/dev/struct.AsyncResult.html" title="struct actix_web::dev::AsyncResult">AsyncResult</a>&lt;<a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&gt;&gt;;
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;;
fn <a href='#tymethod.respond_to' class='fnname'>respond_to</a>&lt;S:&nbsp;'static&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;req: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>&lt;S&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Item" title="type actix_web::Responder::Item">Item</a>, Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Error" title="type actix_web::Responder::Error">Error</a>&gt;;
}</pre></div><div class='docblock'><p>Trait implemented by types that generate responses for clients.</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.Item' class='method'><span id='Item.t' class='invisible'><code>type <a href='#associatedtype.Item' class="type">Item</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/dev/struct.AsyncResult.html" title="struct actix_web::dev::AsyncResult">AsyncResult</a>&lt;<a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&gt;&gt;</code></span></h3><div class='docblock'><p>The associated item which can be returned.</p>
</div><h3 id='associatedtype.Error' class='method'><span id='Error.t' class='invisible'><code>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></span></h3><div class='docblock'><p>The associated error which can be returned.</p>
</div></div>
<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'><span id='respond_to.v' class='invisible'><code>fn <a href='#tymethod.respond_to' class='fnname'>respond_to</a>&lt;S:&nbsp;'static&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;req: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>&lt;S&gt;<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Item" title="type actix_web::Responder::Item">Item</a>, Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Error" title="type actix_web::Responder::Error">Error</a>&gt;</code></span></h3><div class='docblock'><p>Convert itself to <code>AsyncResult</code> or <code>Error</code>.</p>
</div></div>
<h2 id='foreign-impls' class='small-section-header'>
Implementations on Foreign Types<a href='#foreign-impls' class='anchor'></a>
</h2>
<h3 id='impl-Responder' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>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' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/actix_web/handler.rs.html#137-155' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><span class='docblock autohide'><div class='impl-items'><h4 id='associatedtype.Item-1' class="type"><span id='Item.t-1' class='invisible'><code>type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../actix_web/dev/struct.AsyncResult.html" title="struct actix_web::dev::AsyncResult">AsyncResult</a>&lt;<a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&gt;</code></span></h4>
<h4 id='associatedtype.Error-1' class="type"><span id='Error.t-1' class='invisible'><code>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></span></h4>
<h4 id='method.respond_to' class="method"><span id='respond_to.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.respond_to' class='fnname'>respond_to</a>&lt;S:&nbsp;'static&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;req: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>&lt;S&gt;<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../actix_web/dev/struct.AsyncResult.html" title="struct actix_web::dev::AsyncResult">AsyncResult</a>&lt;<a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&gt;, <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/actix_web/handler.rs.html#144-154' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4></div></span><h3 id='impl-Responder-1' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;T:&nbsp;<a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a>, E:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;&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;</code><a href='#impl-Responder-1' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/actix_web/handler.rs.html#321-334' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><span class='docblock autohide'><div class='impl-items'><h4 id='associatedtype.Item-2' class="type"><span id='Item.t-2' class='invisible'><code>type <a href='#associatedtype.Item' class="type">Item</a> = &lt;T as <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a>&gt;::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Item" title="type actix_web::Responder::Item">Item</a></code></span></h4>
<h4 id='associatedtype.Error-2' class="type"><span id='Error.t-2' class='invisible'><code>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></span></h4>
<h4 id='method.respond_to-1' class="method"><span id='respond_to.v-2' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.respond_to' class='fnname'>respond_to</a>&lt;S:&nbsp;'static&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;req: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>&lt;S&gt;<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="type" href="../actix_web/trait.Responder.html#associatedtype.Item" title="type actix_web::Responder::Item">Item</a>, <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/actix_web/handler.rs.html#325-333' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4></div></span><h3 id='impl-Responder-2' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>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;<a class="trait" href="https://docs.rs/futures/0.1/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-2' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/actix_web/handler.rs.html#378-402' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><span class='docblock autohide'><div class='impl-items'><h4 id='associatedtype.Item-3' class="type"><span id='Item.t-3' class='invisible'><code>type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../actix_web/dev/struct.AsyncResult.html" title="struct actix_web::dev::AsyncResult">AsyncResult</a>&lt;<a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&gt;</code></span></h4>
<h4 id='associatedtype.Error-3' class="type"><span id='Error.t-3' class='invisible'><code>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></span></h4>
<h4 id='method.respond_to-2' class="method"><span id='respond_to.v-3' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.respond_to' class='fnname'>respond_to</a>&lt;S:&nbsp;'static&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;req: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>&lt;S&gt;<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../actix_web/dev/struct.AsyncResult.html" title="struct actix_web::dev::AsyncResult">AsyncResult</a>&lt;<a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&gt;, <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/actix_web/handler.rs.html#387-401' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4></div></span><h3 id='impl-Responder-3' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>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-3' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/actix_web/httpresponse.rs.html#735-745' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><span class='docblock autohide'><div class='impl-items'><h4 id='associatedtype.Item-4' class="type"><span id='Item.t-4' class='invisible'><code>type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a></code></span></h4>
<h4 id='associatedtype.Error-4' class="type"><span id='Error.t-4' class='invisible'><code>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></span></h4>
<h4 id='method.respond_to-3' class="method"><span id='respond_to.v-4' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.respond_to' class='fnname'>respond_to</a>&lt;S&gt;(self, req: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>&lt;S&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>, <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/actix_web/httpresponse.rs.html#739-744' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4></div></span><h3 id='impl-Responder-4' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>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-4' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/actix_web/httpresponse.rs.html#755-765' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><span class='docblock autohide'><div class='impl-items'><h4 id='associatedtype.Item-5' class="type"><span id='Item.t-5' class='invisible'><code>type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a></code></span></h4>
<h4 id='associatedtype.Error-5' class="type"><span id='Error.t-5' class='invisible'><code>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></span></h4>
<h4 id='method.respond_to-4' class="method"><span id='respond_to.v-5' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.respond_to' class='fnname'>respond_to</a>&lt;S&gt;(self, req: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>&lt;S&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>, <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/actix_web/httpresponse.rs.html#759-764' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4></div></span><h3 id='impl-Responder-5' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>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-5' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/actix_web/httpresponse.rs.html#775-785' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><span class='docblock autohide'><div class='impl-items'><h4 id='associatedtype.Item-6' class="type"><span id='Item.t-6' class='invisible'><code>type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a></code></span></h4>
<h4 id='associatedtype.Error-6' class="type"><span id='Error.t-6' class='invisible'><code>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></span></h4>
<h4 id='method.respond_to-5' class="method"><span id='respond_to.v-6' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.respond_to' class='fnname'>respond_to</a>&lt;S&gt;(self, req: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>&lt;S&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>, <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/actix_web/httpresponse.rs.html#779-784' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4></div></span><h3 id='impl-Responder-6' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>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-6' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/actix_web/httpresponse.rs.html#795-805' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><span class='docblock autohide'><div class='impl-items'><h4 id='associatedtype.Item-7' class="type"><span id='Item.t-7' class='invisible'><code>type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a></code></span></h4>
<h4 id='associatedtype.Error-7' class="type"><span id='Error.t-7' class='invisible'><code>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></span></h4>
<h4 id='method.respond_to-6' class="method"><span id='respond_to.v-7' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.respond_to' class='fnname'>respond_to</a>&lt;S&gt;(self, req: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>&lt;S&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>, <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/actix_web/httpresponse.rs.html#799-804' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4></div></span><h3 id='impl-Responder-7' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a> for <a class="struct" href="https://docs.rs/bytes/0.4.8/bytes/bytes/struct.Bytes.html" title="struct bytes::bytes::Bytes">Bytes</a></code><a href='#impl-Responder-7' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/actix_web/httpresponse.rs.html#815-825' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><span class='docblock autohide'><div class='impl-items'><h4 id='associatedtype.Item-8' class="type"><span id='Item.t-8' class='invisible'><code>type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a></code></span></h4>
<h4 id='associatedtype.Error-8' class="type"><span id='Error.t-8' class='invisible'><code>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></span></h4>
<h4 id='method.respond_to-7' class="method"><span id='respond_to.v-8' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.respond_to' class='fnname'>respond_to</a>&lt;S&gt;(self, req: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>&lt;S&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>, <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/actix_web/httpresponse.rs.html#819-824' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4></div></span><h3 id='impl-Responder-8' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a> for <a class="struct" href="https://docs.rs/bytes/0.4.8/bytes/bytes/struct.BytesMut.html" title="struct bytes::bytes::BytesMut">BytesMut</a></code><a href='#impl-Responder-8' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/actix_web/httpresponse.rs.html#835-845' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><span class='docblock autohide'><div class='impl-items'><h4 id='associatedtype.Item-9' class="type"><span id='Item.t-9' class='invisible'><code>type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a></code></span></h4>
<h4 id='associatedtype.Error-9' class="type"><span id='Error.t-9' class='invisible'><code>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></span></h4>
<h4 id='method.respond_to-8' class="method"><span id='respond_to.v-9' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.respond_to' class='fnname'>respond_to</a>&lt;S&gt;(self, req: &amp;<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>&lt;S&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>, <a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/actix_web/httpresponse.rs.html#839-844' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4></div></span>
<h2 id='implementors' class='small-section-header'>
Implementors<a href='#implementors' class='anchor'></a>
</h2>
<ul class='item-list' id='implementors-list'>
<li><table class='table-display'><tbody><tr><td><code>impl Responder for <a class="enum" href="../actix_web/enum.Binary.html" title="enum actix_web::Binary">Binary</a><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>;</span><span class="where fmt-newline"> 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>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/actix_web/body.rs.html#257-266' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
<li><table class='table-display'><tbody><tr><td><code>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><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../actix_web/dev/struct.AsyncResult.html" title="struct actix_web::dev::AsyncResult">AsyncResult</a>&lt;<a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&gt;;</span><span class="where fmt-newline"> 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>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/actix_web/handler.rs.html#97-119' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
<li><table class='table-display'><tbody><tr><td><code>impl Responder for <a class="struct" href="../actix_web/dev/struct.AsyncResult.html" title="struct actix_web::dev::AsyncResult">AsyncResult</a>&lt;<a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&gt;<span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../actix_web/dev/struct.AsyncResult.html" title="struct actix_web::dev::AsyncResult">AsyncResult</a>&lt;<a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&gt;;</span><span class="where fmt-newline"> 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>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/actix_web/handler.rs.html#291-300' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
<li><table class='table-display'><tbody><tr><td><code>impl Responder for <a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../actix_web/dev/struct.AsyncResult.html" title="struct actix_web::dev::AsyncResult">AsyncResult</a>&lt;<a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>&gt;;</span><span class="where fmt-newline"> 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>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/actix_web/handler.rs.html#302-312' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
<li><table class='table-display'><tbody><tr><td><code>impl Responder for <a class="struct" href="../actix_web/dev/struct.HttpResponseBuilder.html" title="struct actix_web::dev::HttpResponseBuilder">HttpResponseBuilder</a><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>;</span><span class="where fmt-newline"> 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>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/actix_web/httpresponse.rs.html#717-725' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
<li><table class='table-display'><tbody><tr><td><code>impl&lt;T:&nbsp;<a class="trait" href="https://docs.rs/serde/1.0.70/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a>&gt; Responder for <a class="struct" href="../actix_web/struct.Json.html" title="struct actix_web::Json">Json</a>&lt;T&gt;<span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>;</span><span class="where fmt-newline"> 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>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/actix_web/json.rs.html#119-131' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
<li><table class='table-display'><tbody><tr><td><code>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/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <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><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>;</span><span class="where fmt-newline"> 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>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/actix_web/error.rs.html#741-751' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
<li><table class='table-display'><tbody><tr><td><code>impl&lt;C:&nbsp;<a class="trait" href="../actix_web/fs/trait.StaticFileConfig.html" title="trait actix_web::fs::StaticFileConfig">StaticFileConfig</a>&gt; Responder for <a class="struct" href="../actix_web/fs/struct.NamedFile.html" title="struct actix_web::fs::NamedFile">NamedFile</a>&lt;C&gt;<span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/actix_web/fs.rs.html#342-480' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
</ul><script type="text/javascript">window.inlined_types=new Set([]);</script><script type="text/javascript" async
src="../implementors/actix_web/trait.Responder.js">
</script></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd></kbd></dt><dd>Move up in search results</dd><dt><kbd></kbd></dt><dd>Move down in search results</dd><dt><kbd></kbd></dt><dd>Switch tab</dd><dt><kbd>&#9166;</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g. <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g. <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g. <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><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>