1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-02-02 10:59:03 +01:00

Deploying to gh-pages from @ ee71d4cfa78b6e2a3c3381cc2e60d1fc6de578d0 🚀

This commit is contained in:
robjtede 2022-07-11 01:17:58 +00:00
parent 273801aacd
commit d19e3159b9
3 changed files with 10 additions and 8 deletions

View File

@ -10,7 +10,7 @@
<h1 class="fqn"><span class="in-band">Crate <a class="mod" href="#">actix_limitation</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/actix_limitation/lib.rs.html#1-159">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Rate limiter using a fixed window counter for arbitrary keys, backed by Redis for Actix Web.</p>
<div class="example-wrap"><pre class="language-toml"><code>[dependencies]
actix-web = &quot;4&quot;
actix-limitation = &quot;0.1.4&quot;</code></pre></div>
actix-limitation = &quot;0.3&quot;</code></pre></div>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">std::time::Duration</span>;
<span class="kw">use</span> <span class="ident">actix_web</span>::{<span class="ident">get</span>, <span class="ident">web</span>, <span class="ident">App</span>, <span class="ident">HttpServer</span>, <span class="ident">Responder</span>};
<span class="kw">use</span> <span class="ident">actix_limitation</span>::{<span class="ident">Limiter</span>, <span class="ident">RateLimiter</span>};
@ -38,7 +38,7 @@ actix-limitation = &quot;0.1.4&quot;</code></pre></div>
.<span class="ident">app_data</span>(<span class="ident">limiter</span>.<span class="ident">clone</span>())
.<span class="ident">service</span>(<span class="ident">index</span>)
})
.<span class="ident">bind</span>(<span class="string">&quot;127.0.0.1:8080&quot;</span>)<span class="question-mark">?</span>
.<span class="ident">bind</span>((<span class="string">&quot;127.0.0.1&quot;</span>, <span class="number">8080</span>))<span class="question-mark">?</span>
.<span class="ident">run</span>()
.<span class="kw">await</span>
}</code></pre></div>

View File

@ -1,8 +1,10 @@
<!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="Settings of Rustdoc"><meta name="keywords" content="rust, rustlang, rust-lang"><title>Rustdoc settings</title><link rel="preload" as="font" type="font/woff2" crossorigin href="./SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./SourceCodePro-Semibold.ttf.woff2"><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="./ayu.css" disabled><link rel="stylesheet" type="text/css" href="./dark.css" disabled><link rel="stylesheet" type="text/css" href="./light.css" id="themeStyle"><script id="default-settings" ></script><script src="./storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="./main.js"></script><noscript><link rel="stylesheet" href="./noscript.css"></noscript><link rel="alternate icon" type="image/png" href="./favicon-16x16.png"><link rel="alternate icon" type="image/png" href="./favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="./favicon.svg"></head><body class="rustdoc mod"><!--[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">&#9776;</button><a class="sidebar-logo" href="./actix_identity/index.html"><div class="logo-container"><img class="rust-logo" src="./rust-logo.svg" alt="logo"></div>
<!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="Settings of Rustdoc"><meta name="keywords" content="rust, rustlang, rust-lang"><title>Rustdoc settings</title><link rel="preload" as="font" type="font/woff2" crossorigin href="./SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./SourceCodePro-Semibold.ttf.woff2"><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="./ayu.css" disabled><link rel="stylesheet" type="text/css" href="./dark.css" disabled><link rel="stylesheet" type="text/css" href="./light.css" id="themeStyle"><script id="default-settings" ></script><script src="./storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="./main.js"></script><noscript><link rel="stylesheet" href="./noscript.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc mod"><!--[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">&#9776;</button><a class="sidebar-logo" href="./actix_limitation/index.html"><div class="logo-container"><img src="https://actix.rs/img/logo.png" alt="logo"></div>
</a><h2 class="location"></h2>
</nav>
<nav class="sidebar"><a class="sidebar-logo" href="./actix_identity/index.html"><div class="logo-container"><img class="rust-logo" src="./rust-logo.svg" alt="logo"></div>
</a><h2 class="location">Settings</h2><div class="sidebar-elems"></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="./actix_identity/index.html"><img class="rust-logo" src="./rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1">
<nav class="sidebar"><a class="sidebar-logo" href="./actix_limitation/index.html"><div class="logo-container">
<img src="https://actix.rs/img/logo.png" alt="logo"></div>
</a><h2 class="location">Settings</h2><div class="sidebar-elems"></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="./actix_limitation/index.html">
<img src="https://actix.rs/img/logo.png" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1">
<a href="./settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="./wheel.svg"></a></div>
</div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Rustdoc settings</span></h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section>You need to enable Javascript be able to update your settings.</section></noscript><link rel="stylesheet" type="text/css" href="settings.css"><script defer src="settings.js"></script></section></div></main><div id="rustdoc-vars" data-root-path="./" data-current-crate="actix_identity" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0-nightly (c396bb3b8 2022-07-10)" ></div>
</div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Rustdoc settings</span></h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section>You need to enable Javascript be able to update your settings.</section></noscript><link rel="stylesheet" type="text/css" href="settings.css"><script defer src="settings.js"></script></section></div></main><div id="rustdoc-vars" data-root-path="./" data-current-crate="actix_limitation" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0-nightly (c396bb3b8 2022-07-10)" ></div>
</body></html>

View File

@ -170,7 +170,7 @@
<span class="doccomment">//! ```toml</span>
<span class="doccomment">//! [dependencies]</span>
<span class="doccomment">//! actix-web = &quot;4&quot;</span>
<span class="doccomment">//! actix-limitation = &quot;0.1.4&quot;</span>
<span class="attribute">#![<span class="ident">doc</span> <span class="op">=</span> <span class="macro">concat!</span>(<span class="string">&quot;actix-limitation = \&quot;&quot;</span>, <span class="macro">env!</span>(<span class="string">&quot;CARGO_PKG_VERSION_MAJOR&quot;</span>), <span class="string">&quot;.&quot;</span>, <span class="macro">env!</span>(<span class="string">&quot;CARGO_PKG_VERSION_MINOR&quot;</span>),<span class="string">&quot;\&quot;&quot;</span>)]</span>
<span class="doccomment">//! ```</span>
<span class="doccomment">//!</span>
<span class="doccomment">//! ```no_run</span>
@ -201,7 +201,7 @@
<span class="doccomment">//! .app_data(limiter.clone())</span>
<span class="doccomment">//! .service(index)</span>
<span class="doccomment">//! })</span>
<span class="doccomment">//! .bind(&quot;127.0.0.1:8080&quot;)?</span>
<span class="doccomment">//! .bind((&quot;127.0.0.1&quot;, 8080))?</span>
<span class="doccomment">//! .run()</span>
<span class="doccomment">//! .await</span>
<span class="doccomment">//! }</span>