mirror of
https://github.com/actix/actix-extras.git
synced 2025-08-30 19:10:20 +02:00
Deploying to gh-pages from @ 99e98f1a29
🚀
This commit is contained in:
@@ -149,6 +149,8 @@
|
||||
<span id="146">146</span>
|
||||
<span id="147">147</span>
|
||||
<span id="148">148</span>
|
||||
<span id="149">149</span>
|
||||
<span id="150">150</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">VecDeque</span>;
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>;
|
||||
@@ -189,8 +191,10 @@
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">start</span><span class="op"><</span><span class="ident">S</span>: <span class="ident">Into</span><span class="op"><</span><span class="ident">String</span><span class="op">></span><span class="op">></span>(<span class="ident">addr</span>: <span class="ident">S</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Addr</span><span class="op"><</span><span class="ident">RedisActor</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">addr</span> <span class="op">=</span> <span class="ident">addr</span>.<span class="ident">into</span>();
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">backoff</span> <span class="op">=</span> <span class="ident">ExponentialBackoff</span>::<span class="ident">default</span>();
|
||||
<span class="ident">backoff</span>.<span class="ident">max_elapsed_time</span> <span class="op">=</span> <span class="prelude-val">None</span>;
|
||||
<span class="kw">let</span> <span class="ident">backoff</span> <span class="op">=</span> <span class="ident">ExponentialBackoff</span> {
|
||||
<span class="ident">max_elapsed_time</span>: <span class="prelude-val">None</span>,
|
||||
..<span class="ident">Default</span>::<span class="ident">default</span>()
|
||||
};
|
||||
|
||||
<span class="ident">Supervisor</span>::<span class="ident">start</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">RedisActor</span> {
|
||||
<span class="ident">addr</span>,
|
||||
|
Reference in New Issue
Block a user