mirror of
https://github.com/actix/actix-website
synced 2024-11-24 00:41:07 +01:00
57 lines
39 KiB
HTML
57 lines
39 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="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">☰</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<T></a><a href="#impl-Responder">Result<T, E></a><a href="#impl-Responder">Box<Future<Item = I, Error = E>></a><a href="#impl-Responder">&'static str</a><a href="#impl-Responder">&'static [u8]</a><a href="#impl-Responder">String</a><a href="#impl-Responder">&'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'>−</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><<a class="struct" href="../actix_web/dev/struct.AsyncResult.html" title="struct actix_web::dev::AsyncResult">AsyncResult</a><<a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>>>;
|
||
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><<a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>>;
|
||
fn <a href='#tymethod.respond_to' class='fnname'>respond_to</a><S: 'static>(<br> self, <br> req: &<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a><S><br> ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><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>>;
|
||
}</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><<a class="struct" href="../actix_web/dev/struct.AsyncResult.html" title="struct actix_web::dev::AsyncResult">AsyncResult</a><<a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>>></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><<a class="struct" href="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>></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><S: 'static>(<br> self, <br> req: &<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a><S><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><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>></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<T> <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><T> <span class="where fmt-newline">where<br> T: <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a>, </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><<a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>></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><S: 'static>(<br> self, <br> req: &<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a><S><br>) -> <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="../actix_web/dev/struct.AsyncResult.html" title="struct actix_web::dev::AsyncResult">AsyncResult</a><<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>></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<T: <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a>, E: <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="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>>> <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><T, E></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> = <T as <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a>>::<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><S: 'static>(<br> self, <br> req: &<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a><S><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><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>></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<I, E> <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><<a class="trait" href="https://docs.rs/futures/0.1/futures/future/trait.Future.html" title="trait futures::future::Future">Future</a><Item = I, Error = E>> <span class="where fmt-newline">where<br> I: <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a> + 'static,<br> E: <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="../actix_web/error/struct.Error.html" title="struct actix_web::error::Error">Error</a>> + 'static, </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><<a class="struct" href="../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>></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><S: 'static>(<br> self, <br> req: &<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a><S><br>) -> <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="../actix_web/dev/struct.AsyncResult.html" title="struct actix_web::dev::AsyncResult">AsyncResult</a><<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>></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 &'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><S>(self, req: &<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a><S>) -> <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="../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>></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">&'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><S>(self, req: &<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a><S>) -> <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="../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>></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><S>(self, req: &<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a><S>) -> <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="../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>></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<'a> <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a> for &'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><S>(self, req: &<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a><S>) -> <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="../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>></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><S>(self, req: &<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a><S>) -> <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="../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>></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><S>(self, req: &<a class="struct" href="../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a><S>) -> <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="../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>></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<A, B> Responder for <a class="enum" href="../actix_web/enum.Either.html" title="enum actix_web::Either">Either</a><A, B> <span class="where fmt-newline">where<br> A: <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a>,<br> B: <a class="trait" href="../actix_web/trait.Responder.html" title="trait actix_web::Responder">Responder</a>, </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><<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/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><<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><<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/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><<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/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<T: <a class="trait" href="https://docs.rs/serde/1.0.70/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a>> Responder for <a class="struct" href="../actix_web/struct.Json.html" title="struct actix_web::Json">Json</a><T><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<T> Responder for <a class="struct" href="../actix_web/error/struct.InternalError.html" title="struct actix_web::error::InternalError">InternalError</a><T> <span class="where fmt-newline">where<br> 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, </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<C: <a class="trait" href="../actix_web/fs/trait.StaticFileConfig.html" title="trait actix_web::fs::StaticFileConfig">StaticFileConfig</a>> Responder for <a class="struct" href="../actix_web/fs/struct.NamedFile.html" title="struct actix_web::fs::NamedFile">NamedFile</a><C><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>⏎</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> |