1
0
mirror of https://github.com/actix/actix-website synced 2025-06-30 16:54:27 +02:00

update stable docs

This commit is contained in:
Nikolay Kim
2018-07-26 10:53:41 -07:00
parent 0c2153597f
commit 90165ac1cc
2025 changed files with 116162 additions and 2957 deletions

View File

@ -8,7 +8,7 @@ Default <code>Logger</code> could be created with <code>default</code> method, i
default format:</p>
<div class='information'><div class='tooltip ignore'><span class='tooltiptext'>This example is not tested</span></div></div><pre class="rust rust-example-rendered ignore">
<span class="op">%</span><span class="ident">a</span> <span class="op">%</span><span class="ident">t</span> <span class="string">&quot;%r&quot;</span> <span class="op">%</span><span class="ident">s</span> <span class="op">%</span><span class="ident">b</span> <span class="string">&quot;%{Referer}i&quot;</span> <span class="string">&quot;%{User-Agent}i&quot;</span> <span class="op">%</span><span class="ident">T</span></pre>
<span class="op">%</span><span class="ident">a</span> <span class="string">&quot;%r&quot;</span> <span class="op">%</span><span class="ident">s</span> <span class="op">%</span><span class="ident">b</span> <span class="string">&quot;%{Referer}i&quot;</span> <span class="string">&quot;%{User-Agent}i&quot;</span> <span class="op">%</span><span class="ident">T</span></pre>
<pre class="rust rust-example-rendered">
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">env_logger</span>;
@ -50,7 +50,7 @@ default format:</p>
<div id='implementations-list'><h3 id='impl-Default' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../../actix_web/middleware/struct.Logger.html" title="struct actix_web::middleware::Logger">Logger</a></code><a href='#impl-Default' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/actix_web/middleware/logger.rs.html#93-105' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.default' class="method"><span id='default.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -&gt; <a class="struct" href="../../actix_web/middleware/struct.Logger.html" title="struct actix_web::middleware::Logger">Logger</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/actix_web/middleware/logger.rs.html#99-104' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Create <code>Logger</code> middleware with format:</p>
<div class='information'><div class='tooltip ignore'><span class='tooltiptext'>This example is not tested</span></div></div><pre class="rust rust-example-rendered ignore">
<span class="op">%</span><span class="ident">a</span> <span class="op">%</span><span class="ident">t</span> <span class="string">&quot;%r&quot;</span> <span class="op">%</span><span class="ident">s</span> <span class="op">%</span><span class="ident">b</span> <span class="string">&quot;%{Referer}i&quot;</span> <span class="string">&quot;%{User-Agent}i&quot;</span> <span class="op">%</span><span class="ident">T</span></pre>
<span class="op">%</span><span class="ident">a</span> <span class="string">&quot;%r&quot;</span> <span class="op">%</span><span class="ident">s</span> <span class="op">%</span><span class="ident">b</span> <span class="string">&quot;%{Referer}i&quot;</span> <span class="string">&quot;%{User-Agent}i&quot;</span> <span class="op">%</span><span class="ident">T</span></pre>
</div></div><h3 id='impl-Middleware%3CS%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;S&gt; <a class="trait" href="../../actix_web/middleware/trait.Middleware.html" title="trait actix_web::middleware::Middleware">Middleware</a>&lt;S&gt; for <a class="struct" href="../../actix_web/middleware/struct.Logger.html" title="struct actix_web::middleware::Logger">Logger</a></code><a href='#impl-Middleware%3CS%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/actix_web/middleware/logger.rs.html#123-135' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.start' class="method"><span id='start.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../actix_web/middleware/trait.Middleware.html#method.start' class='fnname'>start</a>(&amp;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="type" href="../../actix_web/error/type.Result.html" title="type actix_web::error::Result">Result</a>&lt;<a class="enum" href="../../actix_web/middleware/enum.Started.html" title="enum actix_web::middleware::Started">Started</a>&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/actix_web/middleware/logger.rs.html#124-129' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Method is called when request is ready. It may return future, which should resolve before next middleware get called. <a href="../../actix_web/middleware/trait.Middleware.html#method.start">Read more</a></p>
</div><h4 id='method.finish' class="method"><span id='finish.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../actix_web/middleware/trait.Middleware.html#method.finish' class='fnname'>finish</a>(&amp;self, req: &amp;<a class="struct" href="../../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>&lt;S&gt;, resp: &amp;<a class="struct" href="../../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>) -&gt; <a class="enum" href="../../actix_web/middleware/enum.Finished.html" title="enum actix_web::middleware::Finished">Finished</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/actix_web/middleware/logger.rs.html#131-134' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Method is called after body stream get sent to peer.</p>
</div><h4 id='method.response' class="method"><span id='response.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../actix_web/middleware/trait.Middleware.html#method.response' class='fnname'>response</a>(&amp;self, req: &amp;<a class="struct" href="../../actix_web/struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>&lt;S&gt;, resp: <a class="struct" href="../../actix_web/struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a>) -&gt; <a class="type" href="../../actix_web/error/type.Result.html" title="type actix_web::error::Result">Result</a>&lt;<a class="enum" href="../../actix_web/middleware/enum.Response.html" title="enum actix_web::middleware::Response">Response</a>&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/actix_web/middleware/mod.rs.html#60-62' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Method is called when handler returns response, but before sending http message to peer. <a href="../../actix_web/middleware/trait.Middleware.html#method.response">Read more</a></p>