mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-23 16:21:06 +01:00
102 lines
44 KiB
HTML
102 lines
44 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="The interface for request handlers."><title>Handler in actix_web - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt="logo"></a><h2><a href="../actix_web/index.html">actix_web</a><span class="version">4.6.0</span></h2></div><h2 class="location"><a href="#">Handler</a></h2><div class="sidebar-elems"><section><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Future">Future</a></li><li><a href="#associatedtype.Output">Output</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.call">call</a></li></ul><h3><a href="#object-safety">Object Safety</a></h3><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In crate actix_web</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="index.html">actix_web</a>::<wbr><a class="trait" href="#">Handler</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../src/actix_web/handler.rs.html#89-94">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub trait Handler<Args>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + 'static {
|
||
type <a href="#associatedtype.Output" class="associatedtype">Output</a>;
|
||
type <a href="#associatedtype.Future" class="associatedtype">Future</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = Self::<a class="associatedtype" href="trait.Handler.html#associatedtype.Output" title="type actix_web::Handler::Output">Output</a>>;
|
||
|
||
// Required method
|
||
fn <a href="#tymethod.call" class="fn">call</a>(&self, args: Args) -> Self::<a class="associatedtype" href="trait.Handler.html#associatedtype.Future" title="type actix_web::Handler::Future">Future</a>;
|
||
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The interface for request handlers.</p>
|
||
<h2 id="what-is-a-request-handler"><a class="doc-anchor" href="#what-is-a-request-handler">§</a>What Is A Request Handler</h2>
|
||
<p>In short, a handler is just an async function that receives request-based arguments, in any
|
||
order, and returns something that can be converted to a response.</p>
|
||
<p>In particular, a request handler has three requirements:</p>
|
||
<ol>
|
||
<li>It is an async function (or a function/closure that returns an appropriate future);</li>
|
||
<li>The function parameters (up to 12) implement <a href="trait.FromRequest.html" title="trait actix_web::FromRequest"><code>FromRequest</code></a>;</li>
|
||
<li>The async function (or future) resolves to a type that can be converted into an
|
||
<a href="struct.HttpResponse.html" title="struct actix_web::HttpResponse"><code>HttpResponse</code></a> (i.e., it implements the <a href="trait.Responder.html" title="trait actix_web::Responder"><code>Responder</code></a> trait).</li>
|
||
</ol>
|
||
<h2 id="compiler-errors"><a class="doc-anchor" href="#compiler-errors">§</a>Compiler Errors</h2>
|
||
<p>If you get the error <code>the trait Handler<_> is not implemented</code>, then your handler does not
|
||
fulfill the <em>first</em> of the above requirements. (It could also mean that you’re attempting to use
|
||
a macro-routed handler in a manual routing context like <code>web::get().to(handler)</code>, which is not
|
||
supported). Breaking the other requirements manifests as errors on implementing <a href="trait.FromRequest.html" title="trait actix_web::FromRequest"><code>FromRequest</code></a>
|
||
and <a href="trait.Responder.html" title="trait actix_web::Responder"><code>Responder</code></a>, respectively.</p>
|
||
<h2 id="how-do-handlers-receive-variable-numbers-of-arguments"><a class="doc-anchor" href="#how-do-handlers-receive-variable-numbers-of-arguments">§</a>How Do Handlers Receive Variable Numbers Of Arguments</h2>
|
||
<p>Rest assured there is no macro magic here; it’s just traits.</p>
|
||
<p>The first thing to note is that <a href="trait.FromRequest.html" title="trait actix_web::FromRequest"><code>FromRequest</code></a> is implemented for tuples (up to 12 in length).</p>
|
||
<p>Secondly, the <code>Handler</code> trait is implemented for functions (up to an <a href="https://en.wikipedia.org/wiki/Arity">arity</a> of 12) in a way
|
||
that aligns their parameter positions with a corresponding tuple of types (becoming the <code>Args</code>
|
||
type parameter for this trait).</p>
|
||
<p>Thanks to Rust’s type system, Actix Web can infer the function parameter types. During the
|
||
extraction step, the parameter types are described as a tuple type, <a href="trait.FromRequest.html#tymethod.from_request" title="associated function actix_web::FromRequest::from_request"><code>from_request</code></a> is run on
|
||
that tuple, and the <code>Handler::call</code> implementation for that particular function arity
|
||
destructures the tuple into its component types and calls your handler function with them.</p>
|
||
<p>In pseudo-code the process looks something like this:</p>
|
||
|
||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">async fn </span>my_handler(body: String, state: web::Data<MyState>) -> <span class="kw">impl </span>Responder {
|
||
...
|
||
}
|
||
|
||
<span class="comment">// the function params above described as a tuple, names do not matter, only position
|
||
</span><span class="kw">type </span>InferredMyHandlerArgs = (String, web::Data<MyState>);
|
||
|
||
<span class="comment">// create tuple of arguments to be passed to handler
|
||
</span><span class="kw">let </span>args = InferredMyHandlerArgs::from_request(<span class="kw-2">&</span>request, <span class="kw-2">&</span>payload).<span class="kw">await</span>;
|
||
|
||
<span class="comment">// call handler with argument tuple
|
||
</span><span class="kw">let </span>response = Handler::call(<span class="kw-2">&</span>my_handler, args).<span class="kw">await</span>;
|
||
|
||
<span class="comment">// which is effectively...
|
||
|
||
</span><span class="kw">let </span>(body, state) = args;
|
||
<span class="kw">let </span>response = my_handler(body, state).<span class="kw">await</span>;</code></pre></div>
|
||
<p>This is the source code for the 2-parameter implementation of <code>Handler</code> to help illustrate the
|
||
bounds of the handler call after argument extraction:</p>
|
||
|
||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">impl</span><Func, Arg1, Arg2, Fut> Handler<(Arg1, Arg2)> <span class="kw">for </span>Func
|
||
<span class="kw">where
|
||
</span>Func: Fn(Arg1, Arg2) -> Fut + Clone + <span class="lifetime">'static</span>,
|
||
Fut: Future,
|
||
{
|
||
<span class="kw">type </span>Output = Fut::Output;
|
||
<span class="kw">type </span>Future = Fut;
|
||
|
||
<span class="kw">fn </span>call(<span class="kw-2">&</span><span class="self">self</span>, (arg1, arg2): (Arg1, Arg2)) -> <span class="self">Self</span>::Future {
|
||
(<span class="self">self</span>)(arg1, arg2)
|
||
}
|
||
}</code></pre></div>
|
||
</div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><section id="associatedtype.Output" class="method"><a class="src rightside" href="../src/actix_web/handler.rs.html#90">source</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a></h4></section><section id="associatedtype.Future" class="method"><a class="src rightside" href="../src/actix_web/handler.rs.html#91">source</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = Self::<a class="associatedtype" href="trait.Handler.html#associatedtype.Output" title="type actix_web::Handler::Output">Output</a>></h4></section></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><section id="tymethod.call" class="method"><a class="src rightside" href="../src/actix_web/handler.rs.html#93">source</a><h4 class="code-header">fn <a href="#tymethod.call" class="fn">call</a>(&self, args: Args) -> Self::<a class="associatedtype" href="trait.Handler.html#associatedtype.Future" title="type actix_web::Handler::Future">Future</a></h4></section></div><h2 id="object-safety" class="section-header">Object Safety<a href="#object-safety" class="anchor">§</a></h2><div class="object-safety-info">This trait is <b>not</b> <a href="https://doc.rust-lang.org/nightly/reference/items/traits.html#object-safety">object safe</a>.</div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-Handler%3C()%3E-for-Func" class="impl"><a class="src rightside" href="../src/actix_web/handler.rs.html#148">source</a><a href="#impl-Handler%3C()%3E-for-Func" class="anchor">§</a><h3 class="code-header">impl<Func, Fut> <a class="trait" href="trait.Handler.html" title="trait actix_web::Handler">Handler</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>> for Func<div class="where">where
|
||
Func: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>() -> Fut + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + 'static,
|
||
Fut: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-1" class="associatedtype trait-impl"><a href="#associatedtype.Output-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <Fut as <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a></h4></section><section id="associatedtype.Future-1" class="associatedtype trait-impl"><a href="#associatedtype.Future-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = Fut</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Handler%3C(A,)%3E-for-Func" class="impl"><a class="src rightside" href="../src/actix_web/handler.rs.html#149">source</a><a href="#impl-Handler%3C(A,)%3E-for-Func" class="anchor">§</a><h3 class="code-header">impl<Func, Fut, A> <a class="trait" href="trait.Handler.html" title="trait actix_web::Handler">Handler</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(A,)</a>> for Func<div class="where">where
|
||
Func: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(A) -> Fut + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + 'static,
|
||
Fut: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-2" class="associatedtype trait-impl"><a href="#associatedtype.Output-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <Fut as <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a></h4></section><section id="associatedtype.Future-2" class="associatedtype trait-impl"><a href="#associatedtype.Future-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = Fut</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Handler%3C(A,+B)%3E-for-Func" class="impl"><a class="src rightside" href="../src/actix_web/handler.rs.html#150">source</a><a href="#impl-Handler%3C(A,+B)%3E-for-Func" class="anchor">§</a><h3 class="code-header">impl<Func, Fut, A, B> <a class="trait" href="trait.Handler.html" title="trait actix_web::Handler">Handler</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(A, B)</a>> for Func<div class="where">where
|
||
Func: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(A, B) -> Fut + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + 'static,
|
||
Fut: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-3" class="associatedtype trait-impl"><a href="#associatedtype.Output-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <Fut as <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a></h4></section><section id="associatedtype.Future-3" class="associatedtype trait-impl"><a href="#associatedtype.Future-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = Fut</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Handler%3C(A,+B,+C)%3E-for-Func" class="impl"><a class="src rightside" href="../src/actix_web/handler.rs.html#151">source</a><a href="#impl-Handler%3C(A,+B,+C)%3E-for-Func" class="anchor">§</a><h3 class="code-header">impl<Func, Fut, A, B, C> <a class="trait" href="trait.Handler.html" title="trait actix_web::Handler">Handler</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(A, B, C)</a>> for Func<div class="where">where
|
||
Func: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(A, B, C) -> Fut + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + 'static,
|
||
Fut: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-4" class="associatedtype trait-impl"><a href="#associatedtype.Output-4" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <Fut as <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a></h4></section><section id="associatedtype.Future-4" class="associatedtype trait-impl"><a href="#associatedtype.Future-4" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = Fut</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Handler%3C(A,+B,+C,+D)%3E-for-Func" class="impl"><a class="src rightside" href="../src/actix_web/handler.rs.html#152">source</a><a href="#impl-Handler%3C(A,+B,+C,+D)%3E-for-Func" class="anchor">§</a><h3 class="code-header">impl<Func, Fut, A, B, C, D> <a class="trait" href="trait.Handler.html" title="trait actix_web::Handler">Handler</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(A, B, C, D)</a>> for Func<div class="where">where
|
||
Func: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(A, B, C, D) -> Fut + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + 'static,
|
||
Fut: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-5" class="associatedtype trait-impl"><a href="#associatedtype.Output-5" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <Fut as <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a></h4></section><section id="associatedtype.Future-5" class="associatedtype trait-impl"><a href="#associatedtype.Future-5" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = Fut</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Handler%3C(A,+B,+C,+D,+E)%3E-for-Func" class="impl"><a class="src rightside" href="../src/actix_web/handler.rs.html#153">source</a><a href="#impl-Handler%3C(A,+B,+C,+D,+E)%3E-for-Func" class="anchor">§</a><h3 class="code-header">impl<Func, Fut, A, B, C, D, E> <a class="trait" href="trait.Handler.html" title="trait actix_web::Handler">Handler</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(A, B, C, D, E)</a>> for Func<div class="where">where
|
||
Func: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(A, B, C, D, E) -> Fut + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + 'static,
|
||
Fut: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-6" class="associatedtype trait-impl"><a href="#associatedtype.Output-6" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <Fut as <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a></h4></section><section id="associatedtype.Future-6" class="associatedtype trait-impl"><a href="#associatedtype.Future-6" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = Fut</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Handler%3C(A,+B,+C,+D,+E,+F)%3E-for-Func" class="impl"><a class="src rightside" href="../src/actix_web/handler.rs.html#154">source</a><a href="#impl-Handler%3C(A,+B,+C,+D,+E,+F)%3E-for-Func" class="anchor">§</a><h3 class="code-header">impl<Func, Fut, A, B, C, D, E, F> <a class="trait" href="trait.Handler.html" title="trait actix_web::Handler">Handler</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(A, B, C, D, E, F)</a>> for Func<div class="where">where
|
||
Func: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(A, B, C, D, E, F) -> Fut + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + 'static,
|
||
Fut: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-7" class="associatedtype trait-impl"><a href="#associatedtype.Output-7" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <Fut as <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a></h4></section><section id="associatedtype.Future-7" class="associatedtype trait-impl"><a href="#associatedtype.Future-7" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = Fut</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Handler%3C(A,+B,+C,+D,+E,+F,+G)%3E-for-Func" class="impl"><a class="src rightside" href="../src/actix_web/handler.rs.html#155">source</a><a href="#impl-Handler%3C(A,+B,+C,+D,+E,+F,+G)%3E-for-Func" class="anchor">§</a><h3 class="code-header">impl<Func, Fut, A, B, C, D, E, F, G> <a class="trait" href="trait.Handler.html" title="trait actix_web::Handler">Handler</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(A, B, C, D, E, F, G)</a>> for Func<div class="where">where
|
||
Func: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(A, B, C, D, E, F, G) -> Fut + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + 'static,
|
||
Fut: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-8" class="associatedtype trait-impl"><a href="#associatedtype.Output-8" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <Fut as <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a></h4></section><section id="associatedtype.Future-8" class="associatedtype trait-impl"><a href="#associatedtype.Future-8" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = Fut</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Handler%3C(A,+B,+C,+D,+E,+F,+G,+H)%3E-for-Func" class="impl"><a class="src rightside" href="../src/actix_web/handler.rs.html#156">source</a><a href="#impl-Handler%3C(A,+B,+C,+D,+E,+F,+G,+H)%3E-for-Func" class="anchor">§</a><h3 class="code-header">impl<Func, Fut, A, B, C, D, E, F, G, H> <a class="trait" href="trait.Handler.html" title="trait actix_web::Handler">Handler</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(A, B, C, D, E, F, G, H)</a>> for Func<div class="where">where
|
||
Func: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(A, B, C, D, E, F, G, H) -> Fut + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + 'static,
|
||
Fut: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-9" class="associatedtype trait-impl"><a href="#associatedtype.Output-9" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <Fut as <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a></h4></section><section id="associatedtype.Future-9" class="associatedtype trait-impl"><a href="#associatedtype.Future-9" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = Fut</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Handler%3C(A,+B,+C,+D,+E,+F,+G,+H,+I)%3E-for-Func" class="impl"><a class="src rightside" href="../src/actix_web/handler.rs.html#157">source</a><a href="#impl-Handler%3C(A,+B,+C,+D,+E,+F,+G,+H,+I)%3E-for-Func" class="anchor">§</a><h3 class="code-header">impl<Func, Fut, A, B, C, D, E, F, G, H, I> <a class="trait" href="trait.Handler.html" title="trait actix_web::Handler">Handler</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(A, B, C, D, E, F, G, H, I)</a>> for Func<div class="where">where
|
||
Func: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(A, B, C, D, E, F, G, H, I) -> Fut + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + 'static,
|
||
Fut: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-10" class="associatedtype trait-impl"><a href="#associatedtype.Output-10" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <Fut as <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a></h4></section><section id="associatedtype.Future-10" class="associatedtype trait-impl"><a href="#associatedtype.Future-10" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = Fut</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Handler%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J)%3E-for-Func" class="impl"><a class="src rightside" href="../src/actix_web/handler.rs.html#158">source</a><a href="#impl-Handler%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J)%3E-for-Func" class="anchor">§</a><h3 class="code-header">impl<Func, Fut, A, B, C, D, E, F, G, H, I, J> <a class="trait" href="trait.Handler.html" title="trait actix_web::Handler">Handler</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J)</a>> for Func<div class="where">where
|
||
Func: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(A, B, C, D, E, F, G, H, I, J) -> Fut + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + 'static,
|
||
Fut: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-11" class="associatedtype trait-impl"><a href="#associatedtype.Output-11" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <Fut as <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a></h4></section><section id="associatedtype.Future-11" class="associatedtype trait-impl"><a href="#associatedtype.Future-11" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = Fut</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Handler%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K)%3E-for-Func" class="impl"><a class="src rightside" href="../src/actix_web/handler.rs.html#159">source</a><a href="#impl-Handler%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K)%3E-for-Func" class="anchor">§</a><h3 class="code-header">impl<Func, Fut, A, B, C, D, E, F, G, H, I, J, K> <a class="trait" href="trait.Handler.html" title="trait actix_web::Handler">Handler</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K)</a>> for Func<div class="where">where
|
||
Func: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(A, B, C, D, E, F, G, H, I, J, K) -> Fut + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + 'static,
|
||
Fut: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-12" class="associatedtype trait-impl"><a href="#associatedtype.Output-12" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <Fut as <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a></h4></section><section id="associatedtype.Future-12" class="associatedtype trait-impl"><a href="#associatedtype.Future-12" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = Fut</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Handler%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)%3E-for-Func" class="impl"><a class="src rightside" href="../src/actix_web/handler.rs.html#160">source</a><a href="#impl-Handler%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)%3E-for-Func" class="anchor">§</a><h3 class="code-header">impl<Func, Fut, A, B, C, D, E, F, G, H, I, J, K, L> <a class="trait" href="trait.Handler.html" title="trait actix_web::Handler">Handler</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K, L)</a>> for Func<div class="where">where
|
||
Func: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(A, B, C, D, E, F, G, H, I, J, K, L) -> Fut + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + 'static,
|
||
Fut: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-13" class="associatedtype trait-impl"><a href="#associatedtype.Output-13" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <Fut as <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a></h4></section><section id="associatedtype.Future-13" class="associatedtype trait-impl"><a href="#associatedtype.Future-13" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = Fut</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Handler%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M)%3E-for-Func" class="impl"><a class="src rightside" href="../src/actix_web/handler.rs.html#161">source</a><a href="#impl-Handler%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M)%3E-for-Func" class="anchor">§</a><h3 class="code-header">impl<Func, Fut, A, B, C, D, E, F, G, H, I, J, K, L, M> <a class="trait" href="trait.Handler.html" title="trait actix_web::Handler">Handler</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K, L, M)</a>> for Func<div class="where">where
|
||
Func: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(A, B, C, D, E, F, G, H, I, J, K, L, M) -> Fut + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + 'static,
|
||
Fut: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-14" class="associatedtype trait-impl"><a href="#associatedtype.Output-14" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <Fut as <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a></h4></section><section id="associatedtype.Future-14" class="associatedtype trait-impl"><a href="#associatedtype.Future-14" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = Fut</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Handler%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N)%3E-for-Func" class="impl"><a class="src rightside" href="../src/actix_web/handler.rs.html#162">source</a><a href="#impl-Handler%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N)%3E-for-Func" class="anchor">§</a><h3 class="code-header">impl<Func, Fut, A, B, C, D, E, F, G, H, I, J, K, L, M, N> <a class="trait" href="trait.Handler.html" title="trait actix_web::Handler">Handler</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K, L, M, N)</a>> for Func<div class="where">where
|
||
Func: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(A, B, C, D, E, F, G, H, I, J, K, L, M, N) -> Fut + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + 'static,
|
||
Fut: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-15" class="associatedtype trait-impl"><a href="#associatedtype.Output-15" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <Fut as <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a></h4></section><section id="associatedtype.Future-15" class="associatedtype trait-impl"><a href="#associatedtype.Future-15" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = Fut</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Handler%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O)%3E-for-Func" class="impl"><a class="src rightside" href="../src/actix_web/handler.rs.html#163">source</a><a href="#impl-Handler%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O)%3E-for-Func" class="anchor">§</a><h3 class="code-header">impl<Func, Fut, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> <a class="trait" href="trait.Handler.html" title="trait actix_web::Handler">Handler</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)</a>> for Func<div class="where">where
|
||
Func: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) -> Fut + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + 'static,
|
||
Fut: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-16" class="associatedtype trait-impl"><a href="#associatedtype.Output-16" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <Fut as <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a></h4></section><section id="associatedtype.Future-16" class="associatedtype trait-impl"><a href="#associatedtype.Future-16" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = Fut</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Handler%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P)%3E-for-Func" class="impl"><a class="src rightside" href="../src/actix_web/handler.rs.html#164">source</a><a href="#impl-Handler%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P)%3E-for-Func" class="anchor">§</a><h3 class="code-header">impl<Func, Fut, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> <a class="trait" href="trait.Handler.html" title="trait actix_web::Handler">Handler</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)</a>> for Func<div class="where">where
|
||
Func: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) -> Fut + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + 'static,
|
||
Fut: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-17" class="associatedtype trait-impl"><a href="#associatedtype.Output-17" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <Fut as <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a></h4></section><section id="associatedtype.Future-17" class="associatedtype trait-impl"><a href="#associatedtype.Future-17" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = Fut</h4></section></div></details></div><script src="../trait.impl/actix_web/handler/trait.Handler.js" async></script></section></div></main></body></html> |