mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-24 07:53:00 +01:00
Deploying to gh-pages from @ ca85f6b245
🚀
This commit is contained in:
parent
dfb4198ce4
commit
be5f9780c1
@ -3,4 +3,4 @@
|
|||||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[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><a href='../actix_redis/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate actix_redis</p><div class="block version"><p>Version 0.9.2</p></div><a id="all-types" href="index.html"><p>Back to index</p></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[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><a href='../actix_redis/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate actix_redis</p><div class="block version"><p>Version 0.9.2</p></div><a id="all-types" href="index.html"><p>Back to index</p></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||||
<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="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 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="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>
|
||||||
</span>
|
</span>
|
||||||
<span class="in-band">List of all items</span></h1><h3 id="Structs">Structs</h3><ul class="structs docblock"><li><a href="struct.Command.html">Command</a></li><li><a href="struct.RedisActor.html">RedisActor</a></li><li><a href="struct.RedisSession.html">RedisSession</a></li></ul><h3 id="Enums">Enums</h3><ul class="enums docblock"><li><a href="enum.Error.html">Error</a></li><li><a href="enum.RespError.html">RespError</a></li><li><a href="enum.RespValue.html">RespValue</a></li><li><a href="enum.SameSite.html">SameSite</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "actix_redis";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
<span class="in-band">List of all items</span></h1><h3 id="Structs">Structs</h3><ul class="structs docblock"><li><a href="struct.RedisClient.html">RedisClient</a></li><li><a href="struct.RedisSession.html">RedisSession</a></li></ul><h3 id="Enums">Enums</h3><ul class="enums docblock"><li><a href="enum.Error.html">Error</a></li><li><a href="enum.RespError.html">RespError</a></li><li><a href="enum.RespValue.html">RespValue</a></li><li><a href="enum.SameSite.html">SameSite</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "actix_redis";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
@ -1,15 +1,19 @@
|
|||||||
<!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 `Error` enum in crate `actix_redis`."><meta name="keywords" content="rust, rustlang, rust-lang, Error"><title>actix_redis::Error - 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="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
<!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 `Error` enum in crate `actix_redis`."><meta name="keywords" content="rust, rustlang, rust-lang, Error"><title>actix_redis::Error - 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="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[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><a href='../actix_redis/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Enum Error</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Disconnected">Disconnected</a><a href="#variant.NotConnected">NotConnected</a><a href="#variant.Redis">Redis</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Display">Display</a><a href="#impl-Error">Error</a><a href="#impl-From%3CError%3E">From<Error></a><a href="#impl-ResponseError">ResponseError</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="index.html">actix_redis</a></p><script>window.sidebarCurrent = {name: "Error", ty: "enum", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[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><a href='../actix_redis/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Enum Error</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Disconnected">Disconnected</a><a href="#variant.InvalidAddress">InvalidAddress</a><a href="#variant.NotConnected">NotConnected</a><a href="#variant.Redis">Redis</a><a href="#variant.ResolveError">ResolveError</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Display">Display</a><a href="#impl-Error">Error</a><a href="#impl-From%3CError%3E">From<Error></a><a href="#impl-ResponseError">ResponseError</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="index.html">actix_redis</a></p><script>window.sidebarCurrent = {name: "Error", ty: "enum", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||||
<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="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_redis/lib.rs.html#19-28" title="goto source code">[src]</a></span><span class="in-band">Enum <a href="index.html">actix_redis</a>::<wbr><a class="enum" href="">Error</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum">pub enum Error {
|
<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="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_redis/lib.rs.html#19-34" title="goto source code">[src]</a></span><span class="in-band">Enum <a href="index.html">actix_redis</a>::<wbr><a class="enum" href="">Error</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum">pub enum Error {
|
||||||
Redis(<a class="enum" href="../actix_redis/enum.RespError.html" title="enum actix_redis::RespError">Error</a>),
|
Redis(<a class="enum" href="../actix_redis/enum.RespError.html" title="enum actix_redis::RespError">Error</a>),
|
||||||
NotConnected,
|
NotConnected,
|
||||||
Disconnected,
|
Disconnected,
|
||||||
|
InvalidAddress,
|
||||||
|
ResolveError,
|
||||||
}</pre></div><div class="docblock"><p>General purpose actix redis error</p>
|
}</pre></div><div class="docblock"><p>General purpose actix redis error</p>
|
||||||
</div><h2 id="variants" class="variants small-section-header">
|
</div><h2 id="variants" class="variants small-section-header">
|
||||||
Variants<a href="#variants" class="anchor"></a></h2>
|
Variants<a href="#variants" class="anchor"></a></h2>
|
||||||
<div id="variant.Redis" class="variant small-section-header"><a href="#variant.Redis" class="anchor field"></a><code>Redis(<a class="enum" href="../actix_redis/enum.RespError.html" title="enum actix_redis::RespError">Error</a>)</code></div><div id="variant.NotConnected" class="variant small-section-header"><a href="#variant.NotConnected" class="anchor field"></a><code>NotConnected</code></div><div class="docblock"><p>Receiving message during reconnecting</p>
|
<div id="variant.Redis" class="variant small-section-header"><a href="#variant.Redis" class="anchor field"></a><code>Redis(<a class="enum" href="../actix_redis/enum.RespError.html" title="enum actix_redis::RespError">Error</a>)</code></div><div id="variant.NotConnected" class="variant small-section-header"><a href="#variant.NotConnected" class="anchor field"></a><code>NotConnected</code></div><div class="docblock"><p>Receiving message during reconnecting</p>
|
||||||
</div><div id="variant.Disconnected" class="variant small-section-header"><a href="#variant.Disconnected" class="anchor field"></a><code>Disconnected</code></div><div class="docblock"><p>Cancel all waters when connection get dropped</p>
|
</div><div id="variant.Disconnected" class="variant small-section-header"><a href="#variant.Disconnected" class="anchor field"></a><code>Disconnected</code></div><div class="docblock"><p>Cancel all waters when connection get dropped</p>
|
||||||
|
</div><div id="variant.InvalidAddress" class="variant small-section-header"><a href="#variant.InvalidAddress" class="anchor field"></a><code>InvalidAddress</code></div><div class="docblock"><p>Invalid address</p>
|
||||||
|
</div><div id="variant.ResolveError" class="variant small-section-header"><a href="#variant.ResolveError" class="anchor field"></a><code>ResolveError</code></div><div class="docblock"><p>DNS resolve error</p>
|
||||||
</div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#18" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/actix_redis/lib.rs.html#18" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
</div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#18" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/actix_redis/lib.rs.html#18" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||||
</div></div><h3 id="impl-Display" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a></code><a href="#impl-Display" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#18" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt-1" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&self, _derive_more_display_formatter: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/actix_redis/lib.rs.html#18" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p>
|
</div></div><h3 id="impl-Display" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a></code><a href="#impl-Display" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#18" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt-1" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&self, _derive_more_display_formatter: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/actix_redis/lib.rs.html#18" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p>
|
||||||
</div></div><h3 id="impl-Error" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a> for <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a></code><a href="#impl-Error" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#18" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.source" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.source" class="fnname">source</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&(dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a> + 'static)></code><a class="srclink" href="../src/actix_redis/lib.rs.html#18" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>The lower-level source of this error, if any. <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.source">Read more</a></p>
|
</div></div><h3 id="impl-Error" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a> for <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a></code><a href="#impl-Error" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#18" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.source" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.source" class="fnname">source</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&(dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a> + 'static)></code><a class="srclink" href="../src/actix_redis/lib.rs.html#18" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>The lower-level source of this error, if any. <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.source">Read more</a></p>
|
||||||
@ -17,19 +21,15 @@
|
|||||||
</div><h4 id="method.description" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.description" class="fnname">description</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/error.rs.html#140-142" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab deprecated"><span class="emoji">👎</span> Deprecated since 1.42.0: <p>use the Display impl or to_string()</p>
|
</div><h4 id="method.description" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.description" class="fnname">description</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/error.rs.html#140-142" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab deprecated"><span class="emoji">👎</span> Deprecated since 1.42.0: <p>use the Display impl or to_string()</p>
|
||||||
</div></div><div class='docblock hidden'> <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.description">Read more</a></div><h4 id="method.cause" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.cause" class="fnname">cause</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a>></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/error.rs.html#150-152" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab deprecated"><span class="emoji">👎</span> Deprecated since 1.33.0: <p>replaced by Error::source, which can support downcasting</p>
|
</div></div><div class='docblock hidden'> <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.description">Read more</a></div><h4 id="method.cause" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.cause" class="fnname">cause</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a>></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/error.rs.html#150-152" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab deprecated"><span class="emoji">👎</span> Deprecated since 1.33.0: <p>replaced by Error::source, which can support downcasting</p>
|
||||||
</div></div></div><h3 id="impl-From%3CError%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="enum" href="../actix_redis/enum.RespError.html" title="enum actix_redis::RespError">Error</a>> for <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a></code><a href="#impl-From%3CError%3E" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#18" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(original: <a class="enum" href="../actix_redis/enum.RespError.html" title="enum actix_redis::RespError">Error</a>) -> <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a></code><a class="srclink" href="../src/actix_redis/lib.rs.html#18" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
</div></div></div><h3 id="impl-From%3CError%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="enum" href="../actix_redis/enum.RespError.html" title="enum actix_redis::RespError">Error</a>> for <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a></code><a href="#impl-From%3CError%3E" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#18" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(original: <a class="enum" href="../actix_redis/enum.RespError.html" title="enum actix_redis::RespError">Error</a>) -> <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a></code><a class="srclink" href="../src/actix_redis/lib.rs.html#18" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||||
</div></div><h3 id="impl-ResponseError" class="impl"><code class="in-band">impl ResponseError for <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a></code><a href="#impl-ResponseError" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#31" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.status_code" class="method hidden"><code>pub fn <a href="#method.status_code" class="fnname">status_code</a>(&self) -> <a class="struct" href="https://docs.rs/http/0.2.3/http/status/struct.StatusCode.html" title="struct http::status::StatusCode">StatusCode</a></code></h4><div class='docblock hidden'><p>Response's status code <a href="#method.status_code">Read more</a></p>
|
</div></div><h3 id="impl-ResponseError" class="impl"><code class="in-band">impl ResponseError for <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a></code><a href="#impl-ResponseError" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#37" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.status_code" class="method hidden"><code>pub fn <a href="#method.status_code" class="fnname">status_code</a>(&self) -> <a class="struct" href="https://docs.rs/http/0.2.3/http/status/struct.StatusCode.html" title="struct http::status::StatusCode">StatusCode</a></code></h4><div class='docblock hidden'><p>Response's status code <a href="#method.status_code">Read more</a></p>
|
||||||
</div><h4 id="method.error_response" class="method hidden"><code>pub fn <a href="#method.error_response" class="fnname">error_response</a>(&self) -> Response<Body></code></h4><div class='docblock hidden'><p>Create response for error <a href="#method.error_response">Read more</a></p>
|
</div><h4 id="method.error_response" class="method hidden"><code>pub fn <a href="#method.error_response" class="fnname">error_response</a>(&self) -> Response<Body></code></h4><div class='docblock hidden'><p>Create response for error <a href="#method.error_response">Read more</a></p>
|
||||||
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||||
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-1" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-1" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||||
</div></div><h3 id="impl-Instrument" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html" title="trait tracing_futures::Instrument">Instrument</a> for T</code><a href="#impl-Instrument" class="anchor"></a><a class="srclink" href="https://docs.rs/tracing-futures/0.2.5/src/tracing_futures/lib.rs.html#273" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing-futures/0.2.5/src/tracing_futures/lib.rs.html#154-156" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
|
</div></div><h3 id="impl-Instrument" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</code><a href="#impl-Instrument" class="anchor"></a><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#155" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#38-40" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.instrument">Read more</a></p>
|
|
||||||
</div><h4 id="method.in_current_span" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing-futures/0.2.5/src/tracing_futures/lib.rs.html#191-193" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="https://docs.rs/tracing/latest/tracing/span/struct.Span.html#method.current">current</a> <code>Span</code>, returning an
|
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.in_current_span">Read more</a></p>
|
|
||||||
</div></div><h3 id="impl-Instrument-1" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</code><a href="#impl-Instrument-1" class="anchor"></a><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#155" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument-1" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#38-40" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
|
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></p>
|
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></p>
|
||||||
</div><h4 id="method.in_current_span-1" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#74-76" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="../struct.Span.html#method.current">current</a> <code>Span</code>, returning an
|
</div><h4 id="method.in_current_span" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#74-76" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="../struct.Span.html#method.current">current</a> <code>Span</code>, returning an
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></p>
|
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></p>
|
||||||
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||||
</div></div><h3 id="impl-Same%3CT%3E" class="impl"><code class="in-band">impl<T> Same<T> for T</code><a href="#impl-Same%3CT%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="associatedtype.Output" class="type"><code>type <a href="#associatedtype.Output" class="type">Output</a> = T</code></h4><div class='docblock'><p>Should always be <code>Self</code></p>
|
</div></div><h3 id="impl-Same%3CT%3E" class="impl"><code class="in-band">impl<T> Same<T> for T</code><a href="#impl-Same%3CT%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="associatedtype.Output" class="type"><code>type <a href="#associatedtype.Output" class="type">Output</a> = T</code></h4><div class='docblock'><p>Should always be <code>Self</code></p>
|
||||||
|
@ -34,13 +34,9 @@ a proper option.</p>
|
|||||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||||
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-3" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-3" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||||
</div></div><h3 id="impl-Instrument" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html" title="trait tracing_futures::Instrument">Instrument</a> for T</code><a href="#impl-Instrument" class="anchor"></a><a class="srclink" href="https://docs.rs/tracing-futures/0.2.5/src/tracing_futures/lib.rs.html#273" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing-futures/0.2.5/src/tracing_futures/lib.rs.html#154-156" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
|
</div></div><h3 id="impl-Instrument" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</code><a href="#impl-Instrument" class="anchor"></a><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#155" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#38-40" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.instrument">Read more</a></p>
|
|
||||||
</div><h4 id="method.in_current_span" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing-futures/0.2.5/src/tracing_futures/lib.rs.html#191-193" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="https://docs.rs/tracing/latest/tracing/span/struct.Span.html#method.current">current</a> <code>Span</code>, returning an
|
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.in_current_span">Read more</a></p>
|
|
||||||
</div></div><h3 id="impl-Instrument-1" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</code><a href="#impl-Instrument-1" class="anchor"></a><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#155" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument-1" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#38-40" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
|
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></p>
|
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></p>
|
||||||
</div><h4 id="method.in_current_span-1" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#74-76" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="../struct.Span.html#method.current">current</a> <code>Span</code>, returning an
|
</div><h4 id="method.in_current_span" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#74-76" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="../struct.Span.html#method.current">current</a> <code>Span</code>, returning an
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></p>
|
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></p>
|
||||||
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||||
</div></div><h3 id="impl-Same%3CT%3E" class="impl"><code class="in-band">impl<T> Same<T> for T</code><a href="#impl-Same%3CT%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="associatedtype.Output" class="type"><code>type <a href="#associatedtype.Output" class="type">Output</a> = T</code></h4><div class='docblock'><p>Should always be <code>Self</code></p>
|
</div></div><h3 id="impl-Same%3CT%3E" class="impl"><code class="in-band">impl<T> Same<T> for T</code><a href="#impl-Same%3CT%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="associatedtype.Output" class="type"><code>type <a href="#associatedtype.Output" class="type">Output</a> = T</code></h4><div class='docblock'><p>Should always be <code>Self</code></p>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<!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 `RespValue` enum in crate `actix_redis`."><meta name="keywords" content="rust, rustlang, rust-lang, RespValue"><title>actix_redis::RespValue - 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="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
<!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 `RespValue` enum in crate `actix_redis`."><meta name="keywords" content="rust, rustlang, rust-lang, RespValue"><title>actix_redis::RespValue - 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="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[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><a href='../actix_redis/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Enum RespValue</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Array">Array</a><a href="#variant.BulkString">BulkString</a><a href="#variant.Error">Error</a><a href="#variant.Integer">Integer</a><a href="#variant.Nil">Nil</a><a href="#variant.SimpleString">SimpleString</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.append">append</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Eq">Eq</a><a href="#impl-From%3C%26%27a%20%5Bu8%5D%3E">From<&'a [u8]></a><a href="#impl-From%3C%26%27a%20String%3E">From<&'a String></a><a href="#impl-From%3C%26%27a%20str%3E">From<&'a str></a><a href="#impl-From%3CString%3E">From<String></a><a href="#impl-From%3CVec%3Cu8%2C%20Global%3E%3E">From<Vec<u8, Global>></a><a href="#impl-From%3Cusize%3E">From<usize></a><a href="#impl-FromResp">FromResp</a><a href="#impl-PartialEq%3CRespValue%3E">PartialEq<RespValue></a><a href="#impl-StructuralEq">StructuralEq</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Equivalent%3CK%3E">Equivalent<K></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="index.html">actix_redis</a></p><script>window.sidebarCurrent = {name: "RespValue", ty: "enum", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[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><a href='../actix_redis/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Enum RespValue</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Array">Array</a><a href="#variant.BulkString">BulkString</a><a href="#variant.Error">Error</a><a href="#variant.Integer">Integer</a><a href="#variant.Nil">Nil</a><a href="#variant.SimpleString">SimpleString</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.append">append</a><a href="#method.push">push</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Eq">Eq</a><a href="#impl-From%3C%26%27a%20%5Bu8%5D%3E">From<&'a [u8]></a><a href="#impl-From%3C%26%27a%20String%3E">From<&'a String></a><a href="#impl-From%3C%26%27a%20str%3E">From<&'a str></a><a href="#impl-From%3CArc%3Cstr%3E%3E">From<Arc<str>></a><a href="#impl-From%3CString%3E">From<String></a><a href="#impl-From%3CVec%3Cu8%2C%20Global%3E%3E">From<Vec<u8, Global>></a><a href="#impl-From%3Cusize%3E">From<usize></a><a href="#impl-FromResp">FromResp</a><a href="#impl-PartialEq%3CRespValue%3E">PartialEq<RespValue></a><a href="#impl-StructuralEq">StructuralEq</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Equivalent%3CK%3E">Equivalent<K></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="index.html">actix_redis</a></p><script>window.sidebarCurrent = {name: "RespValue", ty: "enum", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||||
<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="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></span><span class="in-band">Enum <a href="index.html">actix_redis</a>::<wbr><a class="enum" href="">RespValue</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum">pub enum RespValue {
|
<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="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></span><span class="in-band">Enum <a href="index.html">actix_redis</a>::<wbr><a class="enum" href="">RespValue</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum">pub enum RespValue {
|
||||||
Nil,
|
Nil,
|
||||||
Array(<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>),
|
Array(<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>),
|
||||||
@ -22,15 +22,18 @@ https://redis.io/topics/protocol#resp-integers</p>
|
|||||||
</div><div id="variant.SimpleString" class="variant small-section-header"><a href="#variant.SimpleString" class="anchor field"></a><code>SimpleString(<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>)</code></div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl" class="anchor"></a></h3><div class="impl-items"><h4 id="method.append" class="method"><code>pub fn <a href="#method.append" class="fnname">append</a><T>(self, other: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = T>) -> <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a>>, </span></code></h4><div class="docblock"><p>Convenience function for building dynamic Redis commands with variable numbers of
|
</div><div id="variant.SimpleString" class="variant small-section-header"><a href="#variant.SimpleString" class="anchor field"></a><code>SimpleString(<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>)</code></div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl" class="anchor"></a></h3><div class="impl-items"><h4 id="method.append" class="method"><code>pub fn <a href="#method.append" class="fnname">append</a><T>(self, other: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = T>) -> <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a>>, </span></code></h4><div class="docblock"><p>Convenience function for building dynamic Redis commands with variable numbers of
|
||||||
arguments, e.g. RPUSH</p>
|
arguments, e.g. RPUSH</p>
|
||||||
<p>This will panic if called for anything other than arrays</p>
|
<p>This will panic if called for anything other than arrays</p>
|
||||||
|
</div><h4 id="method.push" class="method"><code>pub fn <a href="#method.push" class="fnname">push</a><T>(&mut self, item: T) <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a>>, </span></code></h4><div class="docblock"><p>Push item to Resp array</p>
|
||||||
|
<p>This will panic if called for anything other than arrays</p>
|
||||||
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl-Clone" class="anchor"></a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl-Clone" class="anchor"></a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||||
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||||
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl-Debug" class="anchor"></a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></code></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl-Debug" class="anchor"></a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></code></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||||
</div></div><h3 id="impl-Eq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl-Eq" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-From%3C%26%27a%20%5Bu8%5D%3E" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</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>> for <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl-From%3C%26%27a%20%5Bu8%5D%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.from-1" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(from: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</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>) -> <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
</div></div><h3 id="impl-Eq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl-Eq" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-From%3C%26%27a%20%5Bu8%5D%3E" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</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>> for <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl-From%3C%26%27a%20%5Bu8%5D%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.from-2" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(from: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</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>) -> <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||||
</div></div><h3 id="impl-From%3C%26%27a%20String%3E" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>> for <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl-From%3C%26%27a%20String%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.from-5" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(from: &'a <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
</div></div><h3 id="impl-From%3C%26%27a%20String%3E" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>> for <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl-From%3C%26%27a%20String%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.from-4" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(from: &'a <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||||
</div></div><h3 id="impl-From%3C%26%27a%20str%3E" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>> for <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl-From%3C%26%27a%20str%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.from-2" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(from: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
</div></div><h3 id="impl-From%3C%26%27a%20str%3E" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>> for <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl-From%3C%26%27a%20str%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.from-6" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(from: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||||
</div></div><h3 id="impl-From%3CString%3E" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>> for <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl-From%3CString%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(from: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
</div></div><h3 id="impl-From%3CArc%3Cstr%3E%3E" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>> for <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl-From%3CArc%3Cstr%3E%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.from-3" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(from: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>) -> <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||||
</div></div><h3 id="impl-From%3CVec%3Cu8%2C%20Global%3E%3E" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>> for <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl-From%3CVec%3Cu8%2C%20Global%3E%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.from-3" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(from: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>) -> <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
</div></div><h3 id="impl-From%3CString%3E" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>> for <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl-From%3CString%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.from-5" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(from: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||||
</div></div><h3 id="impl-From%3Cusize%3E" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>> for <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl-From%3Cusize%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.from-4" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(from: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
</div></div><h3 id="impl-From%3CVec%3Cu8%2C%20Global%3E%3E" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>> for <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl-From%3CVec%3Cu8%2C%20Global%3E%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.from-1" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(from: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>) -> <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||||
|
</div></div><h3 id="impl-From%3Cusize%3E" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>> for <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl-From%3Cusize%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(from: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||||
</div></div><h3 id="impl-FromResp" class="impl"><code class="in-band">impl FromResp for <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl-FromResp" class="anchor"></a></h3><div class="impl-items"><h4 id="method.from_resp_int" class="method hidden"><code>pub fn <a href="#method.from_resp_int" class="fnname">from_resp_int</a>(resp: <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a>, <a class="enum" href="../actix_redis/enum.RespError.html" title="enum actix_redis::RespError">Error</a>></code></h4><h4 id="method.from_resp" class="method hidden"><code>pub fn <a href="#method.from_resp" class="fnname">from_resp</a>(resp: <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a>) -> <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="enum" href="../actix_redis/enum.RespError.html" title="enum actix_redis::RespError">Error</a>></code></h4><div class='docblock hidden'><p>Return a <code>Result</code> containing either <code>Self</code> or <code>Error</code>. Errors can occur due to either: a) the particular
|
</div></div><h3 id="impl-FromResp" class="impl"><code class="in-band">impl FromResp for <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl-FromResp" class="anchor"></a></h3><div class="impl-items"><h4 id="method.from_resp_int" class="method hidden"><code>pub fn <a href="#method.from_resp_int" class="fnname">from_resp_int</a>(resp: <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a>, <a class="enum" href="../actix_redis/enum.RespError.html" title="enum actix_redis::RespError">Error</a>></code></h4><h4 id="method.from_resp" class="method hidden"><code>pub fn <a href="#method.from_resp" class="fnname">from_resp</a>(resp: <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a>) -> <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="enum" href="../actix_redis/enum.RespError.html" title="enum actix_redis::RespError">Error</a>></code></h4><div class='docblock hidden'><p>Return a <code>Result</code> containing either <code>Self</code> or <code>Error</code>. Errors can occur due to either: a) the particular
|
||||||
<code>RespValue</code> being incompatible with the required type, or b) a remote Redis error occuring. <a href="#method.from_resp">Read more</a></p>
|
<code>RespValue</code> being incompatible with the required type, or b) a remote Redis error occuring. <a href="#method.from_resp">Read more</a></p>
|
||||||
</div></div><h3 id="impl-PartialEq%3CRespValue%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a>> for <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl-PartialEq%3CRespValue%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
</div></div><h3 id="impl-PartialEq%3CRespValue%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a>> for <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a></code><a href="#impl-PartialEq%3CRespValue%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||||||
@ -40,14 +43,10 @@ by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Pa
|
|||||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||||
</div></div><h3 id="impl-Equivalent%3CK%3E" class="impl"><code class="in-band">impl<Q, K> <a class="trait" href="https://docs.rs/indexmap/1/indexmap/equivalent/trait.Equivalent.html" title="trait indexmap::equivalent::Equivalent">Equivalent</a><K> for Q <span class="where fmt-newline">where<br> K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><Q> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> Q: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Equivalent%3CK%3E" class="anchor"></a><a class="srclink" href="https://docs.rs/indexmap/1/src/indexmap/equivalent.rs.html#18-27" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.equivalent" class="method hidden"><code>pub fn <a href="https://docs.rs/indexmap/1/indexmap/equivalent/trait.Equivalent.html#tymethod.equivalent" class="fnname">equivalent</a>(&self, key: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>K) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="https://docs.rs/indexmap/1/src/indexmap/equivalent.rs.html#24-26" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Compare self to <code>key</code> and return <code>true</code> if they are equal.</p>
|
</div></div><h3 id="impl-Equivalent%3CK%3E" class="impl"><code class="in-band">impl<Q, K> <a class="trait" href="https://docs.rs/indexmap/1/indexmap/equivalent/trait.Equivalent.html" title="trait indexmap::equivalent::Equivalent">Equivalent</a><K> for Q <span class="where fmt-newline">where<br> K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><Q> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> Q: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Equivalent%3CK%3E" class="anchor"></a><a class="srclink" href="https://docs.rs/indexmap/1/src/indexmap/equivalent.rs.html#18-27" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.equivalent" class="method hidden"><code>pub fn <a href="https://docs.rs/indexmap/1/indexmap/equivalent/trait.Equivalent.html#tymethod.equivalent" class="fnname">equivalent</a>(&self, key: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>K) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="https://docs.rs/indexmap/1/src/indexmap/equivalent.rs.html#24-26" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Compare self to <code>key</code> and return <code>true</code> if they are equal.</p>
|
||||||
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-6" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-7" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||||
</div></div><h3 id="impl-Instrument" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html" title="trait tracing_futures::Instrument">Instrument</a> for T</code><a href="#impl-Instrument" class="anchor"></a><a class="srclink" href="https://docs.rs/tracing-futures/0.2.5/src/tracing_futures/lib.rs.html#273" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing-futures/0.2.5/src/tracing_futures/lib.rs.html#154-156" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
|
</div></div><h3 id="impl-Instrument" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</code><a href="#impl-Instrument" class="anchor"></a><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#155" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#38-40" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.instrument">Read more</a></p>
|
|
||||||
</div><h4 id="method.in_current_span" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing-futures/0.2.5/src/tracing_futures/lib.rs.html#191-193" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="https://docs.rs/tracing/latest/tracing/span/struct.Span.html#method.current">current</a> <code>Span</code>, returning an
|
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.in_current_span">Read more</a></p>
|
|
||||||
</div></div><h3 id="impl-Instrument-1" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</code><a href="#impl-Instrument-1" class="anchor"></a><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#155" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument-1" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#38-40" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
|
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></p>
|
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></p>
|
||||||
</div><h4 id="method.in_current_span-1" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#74-76" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="../struct.Span.html#method.current">current</a> <code>Span</code>, returning an
|
</div><h4 id="method.in_current_span" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#74-76" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="../struct.Span.html#method.current">current</a> <code>Span</code>, returning an
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></p>
|
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></p>
|
||||||
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||||
</div></div><h3 id="impl-Same%3CT%3E" class="impl"><code class="in-band">impl<T> Same<T> for T</code><a href="#impl-Same%3CT%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="associatedtype.Output" class="type"><code>type <a href="#associatedtype.Output" class="type">Output</a> = T</code></h4><div class='docblock'><p>Should always be <code>Self</code></p>
|
</div></div><h3 id="impl-Same%3CT%3E" class="impl"><code class="in-band">impl<T> Same<T> for T</code><a href="#impl-Same%3CT%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="associatedtype.Output" class="type"><code>type <a href="#associatedtype.Output" class="type">Output</a> = T</code></h4><div class='docblock'><p>Should always be <code>Self</code></p>
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,11 +1,9 @@
|
|||||||
<!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 `actix_redis` crate."><meta name="keywords" content="rust, rustlang, rust-lang, actix_redis"><title>actix_redis - 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="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
<!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 `actix_redis` crate."><meta name="keywords" content="rust, rustlang, rust-lang, actix_redis"><title>actix_redis - 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="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[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><a href='../actix_redis/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate actix_redis</p><div class="block version"><p>Version 0.9.2</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all actix_redis's items</p></a><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><p class="location"></p><script>window.sidebarCurrent = {name: "actix_redis", ty: "mod", relpath: "../"};</script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[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><a href='../actix_redis/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate actix_redis</p><div class="block version"><p>Version 0.9.2</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all actix_redis's items</p></a><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><p class="location"></p><script>window.sidebarCurrent = {name: "actix_redis", ty: "mod", relpath: "../"};</script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||||
<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="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_redis/lib.rs.html#1-35" title="goto source code">[src]</a></span><span class="in-band">Crate <a class="mod" href="">actix_redis</a></span></h1><div class="docblock"><p>Redis integration for Actix and session store for Actix Web.</p>
|
<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="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_redis/lib.rs.html#1-41" title="goto source code">[src]</a></span><span class="in-band">Crate <a class="mod" href="">actix_redis</a></span></h1><div class="docblock"><p>Redis integration for Actix and session store for Actix Web.</p>
|
||||||
</div><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
</div><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||||
<table><tr class="module-item"><td><a class="struct" href="struct.Command.html" title="actix_redis::Command struct">Command</a></td><td class="docblock-short"><p>Command for send data to Redis</p>
|
<table><tr class="module-item"><td><a class="struct" href="struct.RedisClient.html" title="actix_redis::RedisClient struct">RedisClient</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.RedisSession.html" title="actix_redis::RedisSession struct">RedisSession</a></td><td class="docblock-short"><p>Use redis as session storage.</p>
|
||||||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.RedisActor.html" title="actix_redis::RedisActor struct">RedisActor</a></td><td class="docblock-short"><p>Redis comminucation actor</p>
|
|
||||||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.RedisSession.html" title="actix_redis::RedisSession struct">RedisSession</a></td><td class="docblock-short"><p>Use redis as session storage.</p>
|
|
||||||
</td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
|
</td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
|
||||||
<table><tr class="module-item"><td><a class="enum" href="enum.Error.html" title="actix_redis::Error enum">Error</a></td><td class="docblock-short"><p>General purpose actix redis error</p>
|
<table><tr class="module-item"><td><a class="enum" href="enum.Error.html" title="actix_redis::Error enum">Error</a></td><td class="docblock-short"><p>General purpose actix redis error</p>
|
||||||
</td></tr><tr class="module-item"><td><a class="enum" href="enum.RespError.html" title="actix_redis::RespError enum">RespError</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.RespValue.html" title="actix_redis::RespValue enum">RespValue</a></td><td class="docblock-short"><p>A single RESP value, this owns the data that is read/to-be written to Redis.</p>
|
</td></tr><tr class="module-item"><td><a class="enum" href="enum.RespError.html" title="actix_redis::RespError enum">RespError</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.RespValue.html" title="actix_redis::RespValue enum">RespValue</a></td><td class="docblock-short"><p>A single RESP value, this owns the data that is read/to-be written to Redis.</p>
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="refresh" content="0;URL=../../actix_redis/struct.Command.html">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<p>Redirecting to <a href="../../actix_redis/struct.Command.html">../../actix_redis/struct.Command.html</a>...</p>
|
|
||||||
<script>location.replace("../../actix_redis/struct.Command.html" + location.search + location.hash);</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,10 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="refresh" content="0;URL=../../actix_redis/struct.RedisActor.html">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<p>Redirecting to <a href="../../actix_redis/struct.RedisActor.html">../../actix_redis/struct.RedisActor.html</a>...</p>
|
|
||||||
<script>location.replace("../../actix_redis/struct.RedisActor.html" + location.search + location.hash);</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
10
actix_redis/redis/struct.RedisClient.html
Normal file
10
actix_redis/redis/struct.RedisClient.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="refresh" content="0;URL=../../actix_redis/struct.RedisClient.html">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>Redirecting to <a href="../../actix_redis/struct.RedisClient.html">../../actix_redis/struct.RedisClient.html</a>...</p>
|
||||||
|
<script>location.replace("../../actix_redis/struct.RedisClient.html" + location.search + location.hash);</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -1 +1 @@
|
|||||||
initSidebarItems({"enum":[["Error","General purpose actix redis error"],["RespError",""],["RespValue","A single RESP value, this owns the data that is read/to-be written to Redis."],["SameSite","The `SameSite` cookie attribute."]],"struct":[["Command","Command for send data to Redis"],["RedisActor","Redis comminucation actor"],["RedisSession","Use redis as session storage."]]});
|
initSidebarItems({"enum":[["Error","General purpose actix redis error"],["RespError",""],["RespValue","A single RESP value, this owns the data that is read/to-be written to Redis."],["SameSite","The `SameSite` cookie attribute."]],"struct":[["RedisClient",""],["RedisSession","Use redis as session storage."]]});
|
@ -1,28 +0,0 @@
|
|||||||
<!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 `Command` struct in crate `actix_redis`."><meta name="keywords" content="rust, rustlang, rust-lang, Command"><title>actix_redis::Command - 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="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
|
||||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
|
||||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[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><a href='../actix_redis/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Struct Command</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Handler%3CCommand%3E">Handler<Command></a><a href="#impl-Message">Message</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="index.html">actix_redis</a></p><script>window.sidebarCurrent = {name: "Command", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
|
||||||
<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="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_redis/redis.rs.html#21" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="index.html">actix_redis</a>::<wbr><a class="struct" href="">Command</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Command(pub <a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a>);</pre></div><div class="docblock"><p>Command for send data to Redis</p>
|
|
||||||
</div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../actix_redis/struct.Command.html" title="struct actix_redis::Command">Command</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/actix_redis/redis.rs.html#20" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/actix_redis/redis.rs.html#20" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
|
||||||
</div></div><h3 id="impl-Handler%3CCommand%3E" class="impl"><code class="in-band">impl Handler<<a class="struct" href="../actix_redis/struct.Command.html" title="struct actix_redis::Command">Command</a>> for <a class="struct" href="../actix_redis/struct.RedisActor.html" title="struct actix_redis::RedisActor">RedisActor</a></code><a href="#impl-Handler%3CCommand%3E" class="anchor"></a><a class="srclink" href="../src/actix_redis/redis.rs.html#133-150" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Result" class="type"><code>type <a href="#associatedtype.Result" class="type">Result</a> = ResponseFuture<<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a>, <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a>>></code></h4><div class='docblock'><p>The type of value that this handler will return. <a href="#associatedtype.Result">Read more</a></p>
|
|
||||||
</div><h4 id="method.handle" class="method hidden"><code>fn <a href="#method.handle" class="fnname">handle</a>(&mut self, msg: <a class="struct" href="../actix_redis/struct.Command.html" title="struct actix_redis::Command">Command</a>, _: &mut Self::Context) -> Self::Result</code><a class="srclink" href="../src/actix_redis/redis.rs.html#136-149" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method is called for every message received by this actor.</p>
|
|
||||||
</div></div><h3 id="impl-Message" class="impl"><code class="in-band">impl Message for <a class="struct" href="../actix_redis/struct.Command.html" title="struct actix_redis::Command">Command</a></code><a href="#impl-Message" class="anchor"></a><a class="srclink" href="../src/actix_redis/redis.rs.html#23-25" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Result-1" class="type"><code>type <a href="#associatedtype.Result" class="type">Result</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a>, <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a>></code></h4><div class='docblock'><p>The type of value that this message will resolved with if it is
|
|
||||||
successful. <a href="#associatedtype.Result">Read more</a></p>
|
|
||||||
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../actix_redis/struct.Command.html" title="struct actix_redis::Command">Command</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../actix_redis/struct.Command.html" title="struct actix_redis::Command">Command</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../actix_redis/struct.Command.html" title="struct actix_redis::Command">Command</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../actix_redis/struct.Command.html" title="struct actix_redis::Command">Command</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../actix_redis/struct.Command.html" title="struct actix_redis::Command">Command</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
|
||||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
|
||||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
|
||||||
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
|
||||||
</div></div><h3 id="impl-Instrument" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html" title="trait tracing_futures::Instrument">Instrument</a> for T</code><a href="#impl-Instrument" class="anchor"></a><a class="srclink" href="https://docs.rs/tracing-futures/0.2.5/src/tracing_futures/lib.rs.html#273" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing-futures/0.2.5/src/tracing_futures/lib.rs.html#154-156" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
|
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.instrument">Read more</a></p>
|
|
||||||
</div><h4 id="method.in_current_span" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing-futures/0.2.5/src/tracing_futures/lib.rs.html#191-193" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="https://docs.rs/tracing/latest/tracing/span/struct.Span.html#method.current">current</a> <code>Span</code>, returning an
|
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.in_current_span">Read more</a></p>
|
|
||||||
</div></div><h3 id="impl-Instrument-1" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</code><a href="#impl-Instrument-1" class="anchor"></a><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#155" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument-1" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#38-40" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
|
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></p>
|
|
||||||
</div><h4 id="method.in_current_span-1" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#74-76" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="../struct.Span.html#method.current">current</a> <code>Span</code>, returning an
|
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></p>
|
|
||||||
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
|
||||||
</div></div><h3 id="impl-Same%3CT%3E" class="impl"><code class="in-band">impl<T> Same<T> for T</code><a href="#impl-Same%3CT%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="associatedtype.Output" class="type"><code>type <a href="#associatedtype.Output" class="type">Output</a> = T</code></h4><div class='docblock'><p>Should always be <code>Self</code></p>
|
|
||||||
</div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#589-598" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
|
||||||
</div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#595-597" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
|
||||||
</div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#575-584" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
|
||||||
</div><h4 id="method.try_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#581-583" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
|
||||||
</div></div><h3 id="impl-VZip%3CV%3E" class="impl"><code class="in-band">impl<V, T> VZip<V> for T <span class="where fmt-newline">where<br> V: MultiLane<T>, </span></code><a href="#impl-VZip%3CV%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.vzip" class="method hidden"><code>pub fn <a href="#method.vzip" class="fnname">vzip</a>(self) -> V</code></h4></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "actix_redis";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
|
@ -1,43 +0,0 @@
|
|||||||
<!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 `RedisActor` struct in crate `actix_redis`."><meta name="keywords" content="rust, rustlang, rust-lang, RedisActor"><title>actix_redis::RedisActor - 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="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
|
||||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
|
||||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[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><a href='../actix_redis/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Struct RedisActor</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.start">start</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Actor">Actor</a><a href="#impl-Handler%3CCommand%3E">Handler<Command></a><a href="#impl-StreamHandler%3CResult%3CRespValue%2C%20Error%3E%3E">StreamHandler<Result<RespValue, Error>></a><a href="#impl-Supervised">Supervised</a><a href="#impl-WriteHandler%3CError%3E">WriteHandler<Error></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="index.html">actix_redis</a></p><script>window.sidebarCurrent = {name: "RedisActor", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
|
||||||
<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="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_redis/redis.rs.html#28-33" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="index.html">actix_redis</a>::<wbr><a class="struct" href="">RedisActor</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct RedisActor { /* fields omitted */ }</pre></div><div class="docblock"><p>Redis comminucation actor</p>
|
|
||||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../actix_redis/struct.RedisActor.html" title="struct actix_redis::RedisActor">RedisActor</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/actix_redis/redis.rs.html#35-52" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.start" class="method"><code>pub fn <a href="#method.start" class="fnname">start</a><S: <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="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>>(addr: S) -> Addr<<a class="struct" href="../actix_redis/struct.RedisActor.html" title="struct actix_redis::RedisActor">RedisActor</a>></code><a class="srclink" href="../src/actix_redis/redis.rs.html#37-51" title="goto source code">[src]</a></h4><div class="docblock"><p>Start new <code>Supervisor</code> with <code>RedisActor</code>.</p>
|
|
||||||
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Actor" class="impl"><code class="in-band">impl Actor for <a class="struct" href="../actix_redis/struct.RedisActor.html" title="struct actix_redis::RedisActor">RedisActor</a></code><a href="#impl-Actor" class="anchor"></a><a class="srclink" href="../src/actix_redis/redis.rs.html#54-97" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Context" class="type"><code>type <a href="#associatedtype.Context" class="type">Context</a> = Context<Self></code></h4><div class='docblock'><p>Actor execution context type</p>
|
|
||||||
</div><h4 id="method.started" class="method hidden"><code>fn <a href="#method.started" class="fnname">started</a>(&mut self, ctx: &mut Context<Self>)</code><a class="srclink" href="../src/actix_redis/redis.rs.html#57-96" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Called when an actor gets polled the first time.</p>
|
|
||||||
</div><h4 id="method.stopping" class="method hidden"><code>pub fn <a href="#method.stopping" class="fnname">stopping</a>(&mut self, ctx: &mut Self::Context) -> Running</code></h4><div class='docblock hidden'><p>Called after an actor is in <code>Actor::Stopping</code> state. <a href="#method.stopping">Read more</a></p>
|
|
||||||
</div><h4 id="method.stopped" class="method hidden"><code>pub fn <a href="#method.stopped" class="fnname">stopped</a>(&mut self, ctx: &mut Self::Context)</code></h4><div class='docblock hidden'><p>Called after an actor is stopped. <a href="#method.stopped">Read more</a></p>
|
|
||||||
</div><h4 id="method.start-1" class="method hidden"><code>pub fn <a href="#method.start" class="fnname">start</a>(self) -> Addr<Self> <span class="where fmt-newline">where<br> Self: Actor<Context = Context<Self>>, </span></code></h4><div class='docblock hidden'><p>Start a new asynchronous actor, returning its address. <a href="#method.start">Read more</a></p>
|
|
||||||
</div><h4 id="method.start_default" class="method hidden"><code>pub fn <a href="#method.start_default" class="fnname">start_default</a>() -> Addr<Self> <span class="where fmt-newline">where<br> Self: Actor<Context = Context<Self>> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>, </span></code></h4><div class='docblock hidden'><p>Construct and start a new asynchronous actor, returning its
|
|
||||||
address. <a href="#method.start_default">Read more</a></p>
|
|
||||||
</div><h4 id="method.start_in_arbiter" class="method hidden"><code>pub fn <a href="#method.start_in_arbiter" class="fnname">start_in_arbiter</a><F>(arb: &Arbiter, f: F) -> Addr<Self> <span class="where fmt-newline">where<br> Self: Actor<Context = Context<Self>>,<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&mut Context<Self>) -> Self + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static, </span></code></h4><div class='docblock hidden'><p>Start new actor in arbiter's thread.</p>
|
|
||||||
</div><h4 id="method.create" class="method hidden"><code>pub fn <a href="#method.create" class="fnname">create</a><F>(f: F) -> Addr<Self> <span class="where fmt-newline">where<br> Self: Actor<Context = Context<Self>>,<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&mut Context<Self>) -> Self, </span></code></h4><div class='docblock hidden'><p>Start a new asynchronous actor given a <code>Context</code>. <a href="#method.create">Read more</a></p>
|
|
||||||
</div></div><h3 id="impl-Handler%3CCommand%3E" class="impl"><code class="in-band">impl Handler<<a class="struct" href="../actix_redis/struct.Command.html" title="struct actix_redis::Command">Command</a>> for <a class="struct" href="../actix_redis/struct.RedisActor.html" title="struct actix_redis::RedisActor">RedisActor</a></code><a href="#impl-Handler%3CCommand%3E" class="anchor"></a><a class="srclink" href="../src/actix_redis/redis.rs.html#133-150" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Result" class="type"><code>type <a href="#associatedtype.Result" class="type">Result</a> = ResponseFuture<<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a>, <a class="enum" href="../actix_redis/enum.Error.html" title="enum actix_redis::Error">Error</a>>></code></h4><div class='docblock'><p>The type of value that this handler will return. <a href="#associatedtype.Result">Read more</a></p>
|
|
||||||
</div><h4 id="method.handle" class="method hidden"><code>fn <a href="#method.handle" class="fnname">handle</a>(&mut self, msg: <a class="struct" href="../actix_redis/struct.Command.html" title="struct actix_redis::Command">Command</a>, _: &mut Self::Context) -> Self::Result</code><a class="srclink" href="../src/actix_redis/redis.rs.html#136-149" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method is called for every message received by this actor.</p>
|
|
||||||
</div></div><h3 id="impl-StreamHandler%3CResult%3CRespValue%2C%20Error%3E%3E" class="impl"><code class="in-band">impl StreamHandler<<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a>, <a class="enum" href="../actix_redis/enum.RespError.html" title="enum actix_redis::RespError">Error</a>>> for <a class="struct" href="../actix_redis/struct.RedisActor.html" title="struct actix_redis::RedisActor">RedisActor</a></code><a href="#impl-StreamHandler%3CResult%3CRespValue%2C%20Error%3E%3E" class="anchor"></a><a class="srclink" href="../src/actix_redis/redis.rs.html#115-131" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.handle-1" class="method hidden"><code>fn <a href="#method.handle" class="fnname">handle</a>(&mut self, msg: <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../actix_redis/enum.RespValue.html" title="enum actix_redis::RespValue">RespValue</a>, <a class="enum" href="../actix_redis/enum.RespError.html" title="enum actix_redis::RespError">RespError</a>>, ctx: &mut Self::Context)</code><a class="srclink" href="../src/actix_redis/redis.rs.html#116-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Method is called for every message received by this Actor</p>
|
|
||||||
</div><h4 id="method.started-1" class="method hidden"><code>pub fn <a href="#method.started" class="fnname">started</a>(&mut self, ctx: &mut Self::Context)</code></h4><div class='docblock hidden'><p>Method is called when stream get polled first time.</p>
|
|
||||||
</div><h4 id="method.finished" class="method hidden"><code>pub fn <a href="#method.finished" class="fnname">finished</a>(&mut self, ctx: &mut Self::Context)</code></h4><div class='docblock hidden'><p>Method is called when stream finishes. <a href="#method.finished">Read more</a></p>
|
|
||||||
</div><h4 id="method.add_stream" class="method hidden"><code>pub fn <a href="#method.add_stream" class="fnname">add_stream</a><S>(fut: S, ctx: &mut Self::Context) -> SpawnHandle <span class="where fmt-newline">where<br> S: Stream<Item = I> + 'static,<br> I: 'static,<br> Self::Context: AsyncContext<Self>, </span></code></h4><div class='docblock hidden'><p>This method register stream to an actor context and
|
|
||||||
allows to handle <code>Stream</code> in similar way as normal actor messages. <a href="#method.add_stream">Read more</a></p>
|
|
||||||
</div></div><h3 id="impl-Supervised" class="impl"><code class="in-band">impl Supervised for <a class="struct" href="../actix_redis/struct.RedisActor.html" title="struct actix_redis::RedisActor">RedisActor</a></code><a href="#impl-Supervised" class="anchor"></a><a class="srclink" href="../src/actix_redis/redis.rs.html#99-106" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.restarting" class="method hidden"><code>fn <a href="#method.restarting" class="fnname">restarting</a>(&mut self, _: &mut Self::Context)</code><a class="srclink" href="../src/actix_redis/redis.rs.html#100-105" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Called when the supervisor restarts a failed actor.</p>
|
|
||||||
</div></div><h3 id="impl-WriteHandler%3CError%3E" class="impl"><code class="in-band">impl WriteHandler<<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>> for <a class="struct" href="../actix_redis/struct.RedisActor.html" title="struct actix_redis::RedisActor">RedisActor</a></code><a href="#impl-WriteHandler%3CError%3E" class="anchor"></a><a class="srclink" href="../src/actix_redis/redis.rs.html#108-113" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.error" class="method hidden"><code>fn <a href="#method.error" class="fnname">error</a>(&mut self, err: <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>, _: &mut Self::Context) -> Running</code><a class="srclink" href="../src/actix_redis/redis.rs.html#109-112" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Called when the writer emits error. <a href="#method.error">Read more</a></p>
|
|
||||||
</div><h4 id="method.finished-1" class="method hidden"><code>pub fn <a href="#method.finished" class="fnname">finished</a>(&mut self, ctx: &mut Self::Context)</code></h4><div class='docblock hidden'><p>Called when the writer finishes. <a href="#method.finished">Read more</a></p>
|
|
||||||
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../actix_redis/struct.RedisActor.html" title="struct actix_redis::RedisActor">RedisActor</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../actix_redis/struct.RedisActor.html" title="struct actix_redis::RedisActor">RedisActor</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../actix_redis/struct.RedisActor.html" title="struct actix_redis::RedisActor">RedisActor</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../actix_redis/struct.RedisActor.html" title="struct actix_redis::RedisActor">RedisActor</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../actix_redis/struct.RedisActor.html" title="struct actix_redis::RedisActor">RedisActor</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
|
||||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
|
||||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
|
||||||
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
|
||||||
</div></div><h3 id="impl-Instrument" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html" title="trait tracing_futures::Instrument">Instrument</a> for T</code><a href="#impl-Instrument" class="anchor"></a><a class="srclink" href="https://docs.rs/tracing-futures/0.2.5/src/tracing_futures/lib.rs.html#273" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing-futures/0.2.5/src/tracing_futures/lib.rs.html#154-156" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
|
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.instrument">Read more</a></p>
|
|
||||||
</div><h4 id="method.in_current_span" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing-futures/0.2.5/src/tracing_futures/lib.rs.html#191-193" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="https://docs.rs/tracing/latest/tracing/span/struct.Span.html#method.current">current</a> <code>Span</code>, returning an
|
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.in_current_span">Read more</a></p>
|
|
||||||
</div></div><h3 id="impl-Instrument-1" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</code><a href="#impl-Instrument-1" class="anchor"></a><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#155" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument-1" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#38-40" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
|
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></p>
|
|
||||||
</div><h4 id="method.in_current_span-1" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#74-76" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="../struct.Span.html#method.current">current</a> <code>Span</code>, returning an
|
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></p>
|
|
||||||
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
|
||||||
</div></div><h3 id="impl-Same%3CT%3E" class="impl"><code class="in-band">impl<T> Same<T> for T</code><a href="#impl-Same%3CT%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="associatedtype.Output" class="type"><code>type <a href="#associatedtype.Output" class="type">Output</a> = T</code></h4><div class='docblock'><p>Should always be <code>Self</code></p>
|
|
||||||
</div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#589-598" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
|
||||||
</div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#595-597" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
|
||||||
</div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#575-584" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
|
||||||
</div><h4 id="method.try_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#581-583" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
|
||||||
</div></div><h3 id="impl-VZip%3CV%3E" class="impl"><code class="in-band">impl<V, T> VZip<V> for T <span class="where fmt-newline">where<br> V: MultiLane<T>, </span></code><a href="#impl-VZip%3CV%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.vzip" class="method hidden"><code>pub fn <a href="#method.vzip" class="fnname">vzip</a>(self) -> V</code></h4></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "actix_redis";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
|
18
actix_redis/struct.RedisClient.html
Normal file
18
actix_redis/struct.RedisClient.html
Normal file
File diff suppressed because one or more lines are too long
@ -1,50 +1,43 @@
|
|||||||
<!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 `RedisSession` struct in crate `actix_redis`."><meta name="keywords" content="rust, rustlang, rust-lang, RedisSession"><title>actix_redis::RedisSession - 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="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
<!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 `RedisSession` struct in crate `actix_redis`."><meta name="keywords" content="rust, rustlang, rust-lang, RedisSession"><title>actix_redis::RedisSession - 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="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[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><a href='../actix_redis/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Struct RedisSession</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.cache_keygen">cache_keygen</a><a href="#method.cookie_domain">cookie_domain</a><a href="#method.cookie_http_only">cookie_http_only</a><a href="#method.cookie_max_age">cookie_max_age</a><a href="#method.cookie_name">cookie_name</a><a href="#method.cookie_path">cookie_path</a><a href="#method.cookie_same_site">cookie_same_site</a><a href="#method.cookie_secure">cookie_secure</a><a href="#method.new">new</a><a href="#method.ttl">ttl</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Transform%3CS%3E">Transform<S></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="index.html">actix_redis</a></p><script>window.sidebarCurrent = {name: "RedisSession", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[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><a href='../actix_redis/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Struct RedisSession</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.cache_keygen">cache_keygen</a><a href="#method.cookie_domain">cookie_domain</a><a href="#method.cookie_http_only">cookie_http_only</a><a href="#method.cookie_max_age">cookie_max_age</a><a href="#method.cookie_name">cookie_name</a><a href="#method.cookie_path">cookie_path</a><a href="#method.cookie_same_site">cookie_same_site</a><a href="#method.cookie_secure">cookie_secure</a><a href="#method.new">new</a><a href="#method.ttl">ttl</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Transform%3CS%2C%20ServiceRequest%3E">Transform<S, ServiceRequest></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="index.html">actix_redis</a></p><script>window.sidebarCurrent = {name: "RedisSession", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||||
<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="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_redis/session.rs.html#28" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="index.html">actix_redis</a>::<wbr><a class="struct" href="">RedisSession</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct RedisSession(_);</pre></div><div class="docblock"><p>Use redis as session storage.</p>
|
<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="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_redis/session.rs.html#27" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="index.html">actix_redis</a>::<wbr><a class="struct" href="">RedisSession</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct RedisSession(_);</pre></div><div class="docblock"><p>Use redis as session storage.</p>
|
||||||
<p>You need to pass an address of the redis server and random value to the
|
<p>You need to pass an address of the redis server and random value to the
|
||||||
constructor of <code>RedisSession</code>. This is private key for cookie
|
constructor of <code>RedisSession</code>. This is private key for cookie
|
||||||
session, When this value is changed, all session data is lost.</p>
|
session, When this value is changed, all session data is lost.</p>
|
||||||
<p>Constructor panics if key length is less than 32 bytes.</p>
|
<p>Constructor panics if key length is less than 32 bytes.</p>
|
||||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../actix_redis/struct.RedisSession.html" title="struct actix_redis::RedisSession">RedisSession</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/actix_redis/session.rs.html#30-114" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a><S: <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="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>>(addr: S, key: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</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>) -> <a class="struct" href="../actix_redis/struct.RedisSession.html" title="struct actix_redis::RedisSession">RedisSession</a></code><a class="srclink" href="../src/actix_redis/session.rs.html#34-48" title="goto source code">[src]</a></h4><div class="docblock"><p>Create new redis session backend</p>
|
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../actix_redis/struct.RedisSession.html" title="struct actix_redis::RedisSession">RedisSession</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/actix_redis/session.rs.html#29-113" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a><S: <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="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>>(addr: S, key: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</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>) -> <a class="struct" href="../actix_redis/struct.RedisSession.html" title="struct actix_redis::RedisSession">RedisSession</a></code><a class="srclink" href="../src/actix_redis/session.rs.html#33-47" title="goto source code">[src]</a></h4><div class="docblock"><p>Create new redis session backend</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><code>addr</code> - address of the redis server</li>
|
<li><code>addr</code> - address of the redis server</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div><h4 id="method.ttl" class="method"><code>pub fn <a href="#method.ttl" class="fnname">ttl</a>(self, ttl: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> Self</code><a class="srclink" href="../src/actix_redis/session.rs.html#51-54" title="goto source code">[src]</a></h4><div class="docblock"><p>Set time to live in seconds for session value.</p>
|
</div><h4 id="method.ttl" class="method"><code>pub fn <a href="#method.ttl" class="fnname">ttl</a>(self, ttl: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> Self</code><a class="srclink" href="../src/actix_redis/session.rs.html#50-53" title="goto source code">[src]</a></h4><div class="docblock"><p>Set time to live in seconds for session value.</p>
|
||||||
</div><h4 id="method.cookie_name" class="method"><code>pub fn <a href="#method.cookie_name" class="fnname">cookie_name</a>(self, name: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> Self</code><a class="srclink" href="../src/actix_redis/session.rs.html#57-60" title="goto source code">[src]</a></h4><div class="docblock"><p>Set custom cookie name for session ID.</p>
|
</div><h4 id="method.cookie_name" class="method"><code>pub fn <a href="#method.cookie_name" class="fnname">cookie_name</a>(self, name: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> Self</code><a class="srclink" href="../src/actix_redis/session.rs.html#56-59" title="goto source code">[src]</a></h4><div class="docblock"><p>Set custom cookie name for session ID.</p>
|
||||||
</div><h4 id="method.cookie_path" class="method"><code>pub fn <a href="#method.cookie_path" class="fnname">cookie_path</a>(self, path: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> Self</code><a class="srclink" href="../src/actix_redis/session.rs.html#63-66" title="goto source code">[src]</a></h4><div class="docblock"><p>Set custom cookie path.</p>
|
</div><h4 id="method.cookie_path" class="method"><code>pub fn <a href="#method.cookie_path" class="fnname">cookie_path</a>(self, path: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> Self</code><a class="srclink" href="../src/actix_redis/session.rs.html#62-65" title="goto source code">[src]</a></h4><div class="docblock"><p>Set custom cookie path.</p>
|
||||||
</div><h4 id="method.cookie_domain" class="method"><code>pub fn <a href="#method.cookie_domain" class="fnname">cookie_domain</a>(self, domain: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> Self</code><a class="srclink" href="../src/actix_redis/session.rs.html#69-72" title="goto source code">[src]</a></h4><div class="docblock"><p>Set custom cookie domain.</p>
|
</div><h4 id="method.cookie_domain" class="method"><code>pub fn <a href="#method.cookie_domain" class="fnname">cookie_domain</a>(self, domain: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> Self</code><a class="srclink" href="../src/actix_redis/session.rs.html#68-71" title="goto source code">[src]</a></h4><div class="docblock"><p>Set custom cookie domain.</p>
|
||||||
</div><h4 id="method.cookie_secure" class="method"><code>pub fn <a href="#method.cookie_secure" class="fnname">cookie_secure</a>(self, secure: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> Self</code><a class="srclink" href="../src/actix_redis/session.rs.html#80-83" title="goto source code">[src]</a></h4><div class="docblock"><p>Set custom cookie secure.</p>
|
</div><h4 id="method.cookie_secure" class="method"><code>pub fn <a href="#method.cookie_secure" class="fnname">cookie_secure</a>(self, secure: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> Self</code><a class="srclink" href="../src/actix_redis/session.rs.html#79-82" title="goto source code">[src]</a></h4><div class="docblock"><p>Set custom cookie secure.</p>
|
||||||
<p>If the <code>secure</code> field is set, a cookie will only be transmitted when the
|
<p>If the <code>secure</code> field is set, a cookie will only be transmitted when the
|
||||||
connection is secure - i.e. <code>https</code>.</p>
|
connection is secure - i.e. <code>https</code>.</p>
|
||||||
<p>Default is false.</p>
|
<p>Default is false.</p>
|
||||||
</div><h4 id="method.cookie_max_age" class="method"><code>pub fn <a href="#method.cookie_max_age" class="fnname">cookie_max_age</a>(self, max_age: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Duration>>) -> Self</code><a class="srclink" href="../src/actix_redis/session.rs.html#88-91" title="goto source code">[src]</a></h4><div class="docblock"><p>Set custom cookie max-age.</p>
|
</div><h4 id="method.cookie_max_age" class="method"><code>pub fn <a href="#method.cookie_max_age" class="fnname">cookie_max_age</a>(self, max_age: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Duration>>) -> Self</code><a class="srclink" href="../src/actix_redis/session.rs.html#87-90" title="goto source code">[src]</a></h4><div class="docblock"><p>Set custom cookie max-age.</p>
|
||||||
<p>Use <code>None</code> for session-only cookies.</p>
|
<p>Use <code>None</code> for session-only cookies.</p>
|
||||||
</div><h4 id="method.cookie_same_site" class="method"><code>pub fn <a href="#method.cookie_same_site" class="fnname">cookie_same_site</a>(self, same_site: <a class="enum" href="../actix_redis/enum.SameSite.html" title="enum actix_redis::SameSite">SameSite</a>) -> Self</code><a class="srclink" href="../src/actix_redis/session.rs.html#96-99" title="goto source code">[src]</a></h4><div class="docblock"><p>Set custom cookie <code>SameSite</code> attribute.</p>
|
</div><h4 id="method.cookie_same_site" class="method"><code>pub fn <a href="#method.cookie_same_site" class="fnname">cookie_same_site</a>(self, same_site: <a class="enum" href="../actix_redis/enum.SameSite.html" title="enum actix_redis::SameSite">SameSite</a>) -> Self</code><a class="srclink" href="../src/actix_redis/session.rs.html#95-98" title="goto source code">[src]</a></h4><div class="docblock"><p>Set custom cookie <code>SameSite</code> attribute.</p>
|
||||||
<p>By default, the attribute is omitted.</p>
|
<p>By default, the attribute is omitted.</p>
|
||||||
</div><h4 id="method.cookie_http_only" class="method"><code>pub fn <a href="#method.cookie_http_only" class="fnname">cookie_http_only</a>(self, http_only: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> Self</code><a class="srclink" href="../src/actix_redis/session.rs.html#104-107" title="goto source code">[src]</a></h4><div class="docblock"><p>Set custom cookie <code>HttpOnly</code> policy.</p>
|
</div><h4 id="method.cookie_http_only" class="method"><code>pub fn <a href="#method.cookie_http_only" class="fnname">cookie_http_only</a>(self, http_only: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> Self</code><a class="srclink" href="../src/actix_redis/session.rs.html#103-106" title="goto source code">[src]</a></h4><div class="docblock"><p>Set custom cookie <code>HttpOnly</code> policy.</p>
|
||||||
<p>Default is true.</p>
|
<p>Default is true.</p>
|
||||||
</div><h4 id="method.cache_keygen" class="method"><code>pub fn <a href="#method.cache_keygen" class="fnname">cache_keygen</a>(self, keygen: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <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 class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>) -> Self</code><a class="srclink" href="../src/actix_redis/session.rs.html#110-113" title="goto source code">[src]</a></h4><div class="docblock"><p>Set a custom cache key generation strategy, expecting session key as input.</p>
|
</div><h4 id="method.cache_keygen" class="method"><code>pub fn <a href="#method.cache_keygen" class="fnname">cache_keygen</a>(self, keygen: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <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 class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>) -> Self</code><a class="srclink" href="../src/actix_redis/session.rs.html#109-112" title="goto source code">[src]</a></h4><div class="docblock"><p>Set a custom cache key generation strategy, expecting session key as input.</p>
|
||||||
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Transform%3CS%3E" class="impl"><code class="in-band">impl<S, B> Transform<S> for <a class="struct" href="../actix_redis/struct.RedisSession.html" title="struct actix_redis::RedisSession">RedisSession</a> <span class="where fmt-newline">where<br> S: Service<Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error> + 'static,<br> S::Future: 'static,<br> B: 'static, </span></code><a href="#impl-Transform%3CS%3E" class="anchor"></a><a class="srclink" href="../src/actix_redis/session.rs.html#116-136" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Request" class="type"><code>type <a href="#associatedtype.Request" class="type">Request</a> = ServiceRequest</code></h4><div class='docblock'><p>Requests handled by the service.</p>
|
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Transform%3CS%2C%20ServiceRequest%3E" class="impl"><code class="in-band">impl<S, B> Transform<S, ServiceRequest> for <a class="struct" href="../actix_redis/struct.RedisSession.html" title="struct actix_redis::RedisSession">RedisSession</a> <span class="where fmt-newline">where<br> S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = Error> + 'static,<br> S::Future: 'static,<br> B: 'static, </span></code><a href="#impl-Transform%3CS%2C%20ServiceRequest%3E" class="anchor"></a><a class="srclink" href="../src/actix_redis/session.rs.html#115-133" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Response" class="type"><code>type <a href="#associatedtype.Response" class="type">Response</a> = ServiceResponse<B></code></h4><div class='docblock'><p>Responses produced by the service.</p>
|
||||||
</div><h4 id="associatedtype.Response" class="type"><code>type <a href="#associatedtype.Response" class="type">Response</a> = ServiceResponse<B></code></h4><div class='docblock'><p>Responses given by the service.</p>
|
|
||||||
</div><h4 id="associatedtype.Error" class="type"><code>type <a href="#associatedtype.Error" class="type">Error</a> = S::Error</code></h4><div class='docblock'><p>Errors produced by the service.</p>
|
</div><h4 id="associatedtype.Error" class="type"><code>type <a href="#associatedtype.Error" class="type">Error</a> = S::Error</code></h4><div class='docblock'><p>Errors produced by the service.</p>
|
||||||
</div><h4 id="associatedtype.InitError" class="type"><code>type <a href="#associatedtype.InitError" class="type">InitError</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></code></h4><div class='docblock'><p>Errors produced while building a transform service.</p>
|
</div><h4 id="associatedtype.InitError" class="type"><code>type <a href="#associatedtype.InitError" class="type">InitError</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></code></h4><div class='docblock'><p>Errors produced while building a transform service.</p>
|
||||||
</div><h4 id="associatedtype.Transform" class="type"><code>type <a href="#associatedtype.Transform" class="type">Transform</a> = RedisSessionMiddleware<S></code></h4><div class='docblock'><p>The <code>TransformService</code> value created by this factory</p>
|
</div><h4 id="associatedtype.Transform" class="type"><code>type <a href="#associatedtype.Transform" class="type">Transform</a> = RedisSessionMiddleware<S></code></h4><div class='docblock'><p>The <code>TransformService</code> value created by this factory</p>
|
||||||
</div><h4 id="associatedtype.Future" class="type"><code>type <a href="#associatedtype.Future" class="type">Future</a> = Ready<<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::Transform, Self::InitError>></code></h4><div class='docblock'><p>The future response value.</p>
|
</div><h4 id="associatedtype.Future" class="type"><code>type <a href="#associatedtype.Future" class="type">Future</a> = Ready<<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::Transform, Self::InitError>></code></h4><div class='docblock'><p>The future response value.</p>
|
||||||
</div><h4 id="method.new_transform" class="method hidden"><code>fn <a href="#method.new_transform" class="fnname">new_transform</a>(&self, service: S) -> Self::Future</code><a class="srclink" href="../src/actix_redis/session.rs.html#130-135" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates and returns a new Transform component, asynchronously</p>
|
</div><h4 id="method.new_transform" class="method hidden"><code>fn <a href="#method.new_transform" class="fnname">new_transform</a>(&self, service: S) -> Self::Future</code><a class="srclink" href="../src/actix_redis/session.rs.html#127-132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates and returns a new Transform component, asynchronously</p>
|
||||||
</div><h4 id="method.map_init_err" class="method hidden"><code>pub fn <a href="#method.map_init_err" class="fnname">map_init_err</a><F, E>(self, f: F) -> TransformMapInitErr<Self, S, F, E> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(Self::InitError) -> E + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></code></h4><div class='docblock hidden'><p>Map this transforms's factory error to a different error,
|
|
||||||
returning a new transform service factory. <a href="#method.map_init_err">Read more</a></p>
|
|
||||||
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../actix_redis/struct.RedisSession.html" title="struct actix_redis::RedisSession">RedisSession</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../actix_redis/struct.RedisSession.html" title="struct actix_redis::RedisSession">RedisSession</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../actix_redis/struct.RedisSession.html" title="struct actix_redis::RedisSession">RedisSession</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../actix_redis/struct.RedisSession.html" title="struct actix_redis::RedisSession">RedisSession</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../actix_redis/struct.RedisSession.html" title="struct actix_redis::RedisSession">RedisSession</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../actix_redis/struct.RedisSession.html" title="struct actix_redis::RedisSession">RedisSession</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../actix_redis/struct.RedisSession.html" title="struct actix_redis::RedisSession">RedisSession</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../actix_redis/struct.RedisSession.html" title="struct actix_redis::RedisSession">RedisSession</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../actix_redis/struct.RedisSession.html" title="struct actix_redis::RedisSession">RedisSession</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../actix_redis/struct.RedisSession.html" title="struct actix_redis::RedisSession">RedisSession</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../src/actix_redis/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||||
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||||
</div></div><h3 id="impl-Instrument" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html" title="trait tracing_futures::Instrument">Instrument</a> for T</code><a href="#impl-Instrument" class="anchor"></a><a class="srclink" href="https://docs.rs/tracing-futures/0.2.5/src/tracing_futures/lib.rs.html#273" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing-futures/0.2.5/src/tracing_futures/lib.rs.html#154-156" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
|
</div></div><h3 id="impl-Instrument" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</code><a href="#impl-Instrument" class="anchor"></a><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#155" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#38-40" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.instrument">Read more</a></p>
|
|
||||||
</div><h4 id="method.in_current_span" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing-futures/0.2.5/src/tracing_futures/lib.rs.html#191-193" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="https://docs.rs/tracing/latest/tracing/span/struct.Span.html#method.current">current</a> <code>Span</code>, returning an
|
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing-futures/0.2.5/tracing_futures/trait.Instrument.html#method.in_current_span">Read more</a></p>
|
|
||||||
</div></div><h3 id="impl-Instrument-1" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</code><a href="#impl-Instrument-1" class="anchor"></a><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#155" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument-1" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#38-40" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
|
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></p>
|
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></p>
|
||||||
</div><h4 id="method.in_current_span-1" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#74-76" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="../struct.Span.html#method.current">current</a> <code>Span</code>, returning an
|
</div><h4 id="method.in_current_span" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing/0.1.25/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.25/src/tracing/instrument.rs.html#74-76" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="../struct.Span.html#method.current">current</a> <code>Span</code>, returning an
|
||||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></p>
|
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.25/tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></p>
|
||||||
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||||
</div></div><h3 id="impl-Same%3CT%3E" class="impl"><code class="in-band">impl<T> Same<T> for T</code><a href="#impl-Same%3CT%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="associatedtype.Output" class="type"><code>type <a href="#associatedtype.Output" class="type">Output</a> = T</code></h4><div class='docblock'><p>Should always be <code>Self</code></p>
|
</div></div><h3 id="impl-Same%3CT%3E" class="impl"><code class="in-band">impl<T> Same<T> for T</code><a href="#impl-Same%3CT%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="associatedtype.Output" class="type"><code>type <a href="#associatedtype.Output" class="type">Output</a> = T</code></h4><div class='docblock'><p>Should always be <code>Self</code></p>
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
(function() {var implementors = {};
|
|
||||||
implementors["actix_redis"] = [{"text":"impl Actor for RedisActor","synthetic":false,"types":[]}];
|
|
||||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
|
@ -1,3 +0,0 @@
|
|||||||
(function() {var implementors = {};
|
|
||||||
implementors["actix_redis"] = [{"text":"impl Supervised for RedisActor","synthetic":false,"types":[]}];
|
|
||||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
|
@ -1,3 +0,0 @@
|
|||||||
(function() {var implementors = {};
|
|
||||||
implementors["actix_redis"] = [{"text":"impl Handler<Command> for RedisActor","synthetic":false,"types":[]}];
|
|
||||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
|
@ -1,3 +0,0 @@
|
|||||||
(function() {var implementors = {};
|
|
||||||
implementors["actix_redis"] = [{"text":"impl Message for Command","synthetic":false,"types":[]}];
|
|
||||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
|
@ -1,3 +0,0 @@
|
|||||||
(function() {var implementors = {};
|
|
||||||
implementors["actix_redis"] = [{"text":"impl WriteHandler<Error> for RedisActor","synthetic":false,"types":[]}];
|
|
||||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
|
@ -1,3 +0,0 @@
|
|||||||
(function() {var implementors = {};
|
|
||||||
implementors["actix_redis"] = [{"text":"impl StreamHandler<Result<RespValue, Error>> for RedisActor","synthetic":false,"types":[]}];
|
|
||||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
|
@ -1,3 +1,3 @@
|
|||||||
(function() {var implementors = {};
|
(function() {var implementors = {};
|
||||||
implementors["actix_redis"] = [{"text":"impl<S, B> Transform<S> for RedisSession <span class=\"where fmt-newline\">where<br> S: Service<Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error> + 'static,<br> S::Future: 'static,<br> B: 'static, </span>","synthetic":false,"types":[]}];
|
implementors["actix_redis"] = [{"text":"impl<S, B> Transform<S, ServiceRequest> for RedisSession <span class=\"where fmt-newline\">where<br> S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = Error> + 'static,<br> S::Future: 'static,<br> B: 'static, </span>","synthetic":false,"types":[]}];
|
||||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
|||||||
(function() {var implementors = {};
|
(function() {var implementors = {};
|
||||||
implementors["actix_redis"] = [{"text":"impl Debug for Command","synthetic":false,"types":[]},{"text":"impl Debug for Error","synthetic":false,"types":[]}];
|
implementors["actix_redis"] = [{"text":"impl Debug for Error","synthetic":false,"types":[]}];
|
||||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
|||||||
(function() {var implementors = {};
|
(function() {var implementors = {};
|
||||||
implementors["actix_redis"] = [{"text":"impl Freeze for Command","synthetic":true,"types":[]},{"text":"impl Freeze for RedisActor","synthetic":true,"types":[]},{"text":"impl Freeze for RedisSession","synthetic":true,"types":[]},{"text":"impl Freeze for Error","synthetic":true,"types":[]}];
|
implementors["actix_redis"] = [{"text":"impl !Freeze for RedisClient","synthetic":true,"types":[]},{"text":"impl Freeze for RedisSession","synthetic":true,"types":[]},{"text":"impl Freeze for Error","synthetic":true,"types":[]}];
|
||||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
|||||||
(function() {var implementors = {};
|
(function() {var implementors = {};
|
||||||
implementors["actix_redis"] = [{"text":"impl Send for Command","synthetic":true,"types":[]},{"text":"impl !Send for RedisActor","synthetic":true,"types":[]},{"text":"impl !Send for RedisSession","synthetic":true,"types":[]},{"text":"impl Send for Error","synthetic":true,"types":[]}];
|
implementors["actix_redis"] = [{"text":"impl Send for RedisClient","synthetic":true,"types":[]},{"text":"impl !Send for RedisSession","synthetic":true,"types":[]},{"text":"impl Send for Error","synthetic":true,"types":[]}];
|
||||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
|||||||
(function() {var implementors = {};
|
(function() {var implementors = {};
|
||||||
implementors["actix_redis"] = [{"text":"impl Sync for Command","synthetic":true,"types":[]},{"text":"impl !Sync for RedisActor","synthetic":true,"types":[]},{"text":"impl !Sync for RedisSession","synthetic":true,"types":[]},{"text":"impl Sync for Error","synthetic":true,"types":[]}];
|
implementors["actix_redis"] = [{"text":"impl Sync for RedisClient","synthetic":true,"types":[]},{"text":"impl !Sync for RedisSession","synthetic":true,"types":[]},{"text":"impl Sync for Error","synthetic":true,"types":[]}];
|
||||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
|||||||
(function() {var implementors = {};
|
(function() {var implementors = {};
|
||||||
implementors["actix_redis"] = [{"text":"impl Unpin for Command","synthetic":true,"types":[]},{"text":"impl Unpin for RedisActor","synthetic":true,"types":[]},{"text":"impl Unpin for RedisSession","synthetic":true,"types":[]},{"text":"impl Unpin for Error","synthetic":true,"types":[]}];
|
implementors["actix_redis"] = [{"text":"impl Unpin for RedisClient","synthetic":true,"types":[]},{"text":"impl Unpin for RedisSession","synthetic":true,"types":[]},{"text":"impl Unpin for Error","synthetic":true,"types":[]}];
|
||||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
|||||||
(function() {var implementors = {};
|
(function() {var implementors = {};
|
||||||
implementors["actix_redis"] = [{"text":"impl RefUnwindSafe for Command","synthetic":true,"types":[]},{"text":"impl !RefUnwindSafe for RedisActor","synthetic":true,"types":[]},{"text":"impl !RefUnwindSafe for RedisSession","synthetic":true,"types":[]},{"text":"impl !RefUnwindSafe for Error","synthetic":true,"types":[]}];
|
implementors["actix_redis"] = [{"text":"impl !RefUnwindSafe for RedisClient","synthetic":true,"types":[]},{"text":"impl !RefUnwindSafe for RedisSession","synthetic":true,"types":[]},{"text":"impl !RefUnwindSafe for Error","synthetic":true,"types":[]}];
|
||||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
|||||||
(function() {var implementors = {};
|
(function() {var implementors = {};
|
||||||
implementors["actix_redis"] = [{"text":"impl UnwindSafe for Command","synthetic":true,"types":[]},{"text":"impl !UnwindSafe for RedisActor","synthetic":true,"types":[]},{"text":"impl !UnwindSafe for RedisSession","synthetic":true,"types":[]},{"text":"impl !UnwindSafe for Error","synthetic":true,"types":[]}];
|
implementors["actix_redis"] = [{"text":"impl !UnwindSafe for RedisClient","synthetic":true,"types":[]},{"text":"impl !UnwindSafe for RedisSession","synthetic":true,"types":[]},{"text":"impl !UnwindSafe for Error","synthetic":true,"types":[]}];
|
||||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
File diff suppressed because one or more lines are too long
@ -36,13 +36,19 @@
|
|||||||
<span id="33">33</span>
|
<span id="33">33</span>
|
||||||
<span id="34">34</span>
|
<span id="34">34</span>
|
||||||
<span id="35">35</span>
|
<span id="35">35</span>
|
||||||
|
<span id="36">36</span>
|
||||||
|
<span id="37">37</span>
|
||||||
|
<span id="38">38</span>
|
||||||
|
<span id="39">39</span>
|
||||||
|
<span id="40">40</span>
|
||||||
|
<span id="41">41</span>
|
||||||
</pre><div class="example-wrap"><pre class="rust ">
|
</pre><div class="example-wrap"><pre class="rust ">
|
||||||
<span class="doccomment">//! Redis integration for Actix and session store for Actix Web.</span>
|
<span class="doccomment">//! Redis integration for Actix and session store for Actix Web.</span>
|
||||||
|
|
||||||
<span class="attribute">#![<span class="ident">deny</span>(<span class="ident">rust_2018_idioms</span>)]</span>
|
<span class="attribute">#![<span class="ident">deny</span>(<span class="ident">rust_2018_idioms</span>)]</span>
|
||||||
|
|
||||||
<span class="kw">mod</span> <span class="ident">redis</span>;
|
<span class="kw">mod</span> <span class="ident">redis</span>;
|
||||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident">redis</span>::{<span class="ident">Command</span>, <span class="ident">RedisActor</span>};
|
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident">redis</span>::<span class="ident">RedisClient</span>;
|
||||||
|
|
||||||
<span class="kw">use</span> <span class="ident">derive_more</span>::{<span class="ident">Display</span>, <span class="ident">Error</span>, <span class="ident">From</span>};
|
<span class="kw">use</span> <span class="ident">derive_more</span>::{<span class="ident">Display</span>, <span class="ident">Error</span>, <span class="ident">From</span>};
|
||||||
|
|
||||||
@ -64,6 +70,12 @@
|
|||||||
<span class="doccomment">/// Cancel all waters when connection get dropped</span>
|
<span class="doccomment">/// Cancel all waters when connection get dropped</span>
|
||||||
<span class="attribute">#[<span class="ident">display</span>(<span class="ident">fmt</span> <span class="op">=</span> <span class="string">"Redis: Disconnected"</span>)]</span>
|
<span class="attribute">#[<span class="ident">display</span>(<span class="ident">fmt</span> <span class="op">=</span> <span class="string">"Redis: Disconnected"</span>)]</span>
|
||||||
<span class="ident">Disconnected</span>,
|
<span class="ident">Disconnected</span>,
|
||||||
|
<span class="doccomment">/// Invalid address</span>
|
||||||
|
<span class="attribute">#[<span class="ident">display</span>(<span class="ident">fmt</span> <span class="op">=</span> <span class="string">"Redis: Invalid address"</span>)]</span>
|
||||||
|
<span class="ident">InvalidAddress</span>,
|
||||||
|
<span class="doccomment">/// DNS resolve error</span>
|
||||||
|
<span class="attribute">#[<span class="ident">display</span>(<span class="ident">fmt</span> <span class="op">=</span> <span class="string">"Redis: DNS resolve error"</span>)]</span>
|
||||||
|
<span class="ident">ResolveError</span>,
|
||||||
}
|
}
|
||||||
|
|
||||||
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">feature</span> <span class="op">=</span> <span class="string">"web"</span>)]</span>
|
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">feature</span> <span class="op">=</span> <span class="string">"web"</span>)]</span>
|
||||||
|
@ -10,297 +10,193 @@
|
|||||||
<span id="7"> 7</span>
|
<span id="7"> 7</span>
|
||||||
<span id="8"> 8</span>
|
<span id="8"> 8</span>
|
||||||
<span id="9"> 9</span>
|
<span id="9"> 9</span>
|
||||||
<span id="10"> 10</span>
|
<span id="10">10</span>
|
||||||
<span id="11"> 11</span>
|
<span id="11">11</span>
|
||||||
<span id="12"> 12</span>
|
<span id="12">12</span>
|
||||||
<span id="13"> 13</span>
|
<span id="13">13</span>
|
||||||
<span id="14"> 14</span>
|
<span id="14">14</span>
|
||||||
<span id="15"> 15</span>
|
<span id="15">15</span>
|
||||||
<span id="16"> 16</span>
|
<span id="16">16</span>
|
||||||
<span id="17"> 17</span>
|
<span id="17">17</span>
|
||||||
<span id="18"> 18</span>
|
<span id="18">18</span>
|
||||||
<span id="19"> 19</span>
|
<span id="19">19</span>
|
||||||
<span id="20"> 20</span>
|
<span id="20">20</span>
|
||||||
<span id="21"> 21</span>
|
<span id="21">21</span>
|
||||||
<span id="22"> 22</span>
|
<span id="22">22</span>
|
||||||
<span id="23"> 23</span>
|
<span id="23">23</span>
|
||||||
<span id="24"> 24</span>
|
<span id="24">24</span>
|
||||||
<span id="25"> 25</span>
|
<span id="25">25</span>
|
||||||
<span id="26"> 26</span>
|
<span id="26">26</span>
|
||||||
<span id="27"> 27</span>
|
<span id="27">27</span>
|
||||||
<span id="28"> 28</span>
|
<span id="28">28</span>
|
||||||
<span id="29"> 29</span>
|
<span id="29">29</span>
|
||||||
<span id="30"> 30</span>
|
<span id="30">30</span>
|
||||||
<span id="31"> 31</span>
|
<span id="31">31</span>
|
||||||
<span id="32"> 32</span>
|
<span id="32">32</span>
|
||||||
<span id="33"> 33</span>
|
<span id="33">33</span>
|
||||||
<span id="34"> 34</span>
|
<span id="34">34</span>
|
||||||
<span id="35"> 35</span>
|
<span id="35">35</span>
|
||||||
<span id="36"> 36</span>
|
<span id="36">36</span>
|
||||||
<span id="37"> 37</span>
|
<span id="37">37</span>
|
||||||
<span id="38"> 38</span>
|
<span id="38">38</span>
|
||||||
<span id="39"> 39</span>
|
<span id="39">39</span>
|
||||||
<span id="40"> 40</span>
|
<span id="40">40</span>
|
||||||
<span id="41"> 41</span>
|
<span id="41">41</span>
|
||||||
<span id="42"> 42</span>
|
<span id="42">42</span>
|
||||||
<span id="43"> 43</span>
|
<span id="43">43</span>
|
||||||
<span id="44"> 44</span>
|
<span id="44">44</span>
|
||||||
<span id="45"> 45</span>
|
<span id="45">45</span>
|
||||||
<span id="46"> 46</span>
|
<span id="46">46</span>
|
||||||
<span id="47"> 47</span>
|
<span id="47">47</span>
|
||||||
<span id="48"> 48</span>
|
<span id="48">48</span>
|
||||||
<span id="49"> 49</span>
|
<span id="49">49</span>
|
||||||
<span id="50"> 50</span>
|
<span id="50">50</span>
|
||||||
<span id="51"> 51</span>
|
<span id="51">51</span>
|
||||||
<span id="52"> 52</span>
|
<span id="52">52</span>
|
||||||
<span id="53"> 53</span>
|
<span id="53">53</span>
|
||||||
<span id="54"> 54</span>
|
<span id="54">54</span>
|
||||||
<span id="55"> 55</span>
|
<span id="55">55</span>
|
||||||
<span id="56"> 56</span>
|
<span id="56">56</span>
|
||||||
<span id="57"> 57</span>
|
<span id="57">57</span>
|
||||||
<span id="58"> 58</span>
|
<span id="58">58</span>
|
||||||
<span id="59"> 59</span>
|
<span id="59">59</span>
|
||||||
<span id="60"> 60</span>
|
<span id="60">60</span>
|
||||||
<span id="61"> 61</span>
|
<span id="61">61</span>
|
||||||
<span id="62"> 62</span>
|
<span id="62">62</span>
|
||||||
<span id="63"> 63</span>
|
<span id="63">63</span>
|
||||||
<span id="64"> 64</span>
|
<span id="64">64</span>
|
||||||
<span id="65"> 65</span>
|
<span id="65">65</span>
|
||||||
<span id="66"> 66</span>
|
<span id="66">66</span>
|
||||||
<span id="67"> 67</span>
|
<span id="67">67</span>
|
||||||
<span id="68"> 68</span>
|
<span id="68">68</span>
|
||||||
<span id="69"> 69</span>
|
<span id="69">69</span>
|
||||||
<span id="70"> 70</span>
|
<span id="70">70</span>
|
||||||
<span id="71"> 71</span>
|
<span id="71">71</span>
|
||||||
<span id="72"> 72</span>
|
<span id="72">72</span>
|
||||||
<span id="73"> 73</span>
|
<span id="73">73</span>
|
||||||
<span id="74"> 74</span>
|
<span id="74">74</span>
|
||||||
<span id="75"> 75</span>
|
<span id="75">75</span>
|
||||||
<span id="76"> 76</span>
|
<span id="76">76</span>
|
||||||
<span id="77"> 77</span>
|
<span id="77">77</span>
|
||||||
<span id="78"> 78</span>
|
<span id="78">78</span>
|
||||||
<span id="79"> 79</span>
|
<span id="79">79</span>
|
||||||
<span id="80"> 80</span>
|
<span id="80">80</span>
|
||||||
<span id="81"> 81</span>
|
<span id="81">81</span>
|
||||||
<span id="82"> 82</span>
|
<span id="82">82</span>
|
||||||
<span id="83"> 83</span>
|
<span id="83">83</span>
|
||||||
<span id="84"> 84</span>
|
<span id="84">84</span>
|
||||||
<span id="85"> 85</span>
|
<span id="85">85</span>
|
||||||
<span id="86"> 86</span>
|
<span id="86">86</span>
|
||||||
<span id="87"> 87</span>
|
<span id="87">87</span>
|
||||||
<span id="88"> 88</span>
|
<span id="88">88</span>
|
||||||
<span id="89"> 89</span>
|
<span id="89">89</span>
|
||||||
<span id="90"> 90</span>
|
<span id="90">90</span>
|
||||||
<span id="91"> 91</span>
|
<span id="91">91</span>
|
||||||
<span id="92"> 92</span>
|
<span id="92">92</span>
|
||||||
<span id="93"> 93</span>
|
<span id="93">93</span>
|
||||||
<span id="94"> 94</span>
|
<span id="94">94</span>
|
||||||
<span id="95"> 95</span>
|
<span id="95">95</span>
|
||||||
<span id="96"> 96</span>
|
<span id="96">96</span>
|
||||||
<span id="97"> 97</span>
|
<span id="97">97</span>
|
||||||
<span id="98"> 98</span>
|
<span id="98">98</span>
|
||||||
<span id="99"> 99</span>
|
|
||||||
<span id="100">100</span>
|
|
||||||
<span id="101">101</span>
|
|
||||||
<span id="102">102</span>
|
|
||||||
<span id="103">103</span>
|
|
||||||
<span id="104">104</span>
|
|
||||||
<span id="105">105</span>
|
|
||||||
<span id="106">106</span>
|
|
||||||
<span id="107">107</span>
|
|
||||||
<span id="108">108</span>
|
|
||||||
<span id="109">109</span>
|
|
||||||
<span id="110">110</span>
|
|
||||||
<span id="111">111</span>
|
|
||||||
<span id="112">112</span>
|
|
||||||
<span id="113">113</span>
|
|
||||||
<span id="114">114</span>
|
|
||||||
<span id="115">115</span>
|
|
||||||
<span id="116">116</span>
|
|
||||||
<span id="117">117</span>
|
|
||||||
<span id="118">118</span>
|
|
||||||
<span id="119">119</span>
|
|
||||||
<span id="120">120</span>
|
|
||||||
<span id="121">121</span>
|
|
||||||
<span id="122">122</span>
|
|
||||||
<span id="123">123</span>
|
|
||||||
<span id="124">124</span>
|
|
||||||
<span id="125">125</span>
|
|
||||||
<span id="126">126</span>
|
|
||||||
<span id="127">127</span>
|
|
||||||
<span id="128">128</span>
|
|
||||||
<span id="129">129</span>
|
|
||||||
<span id="130">130</span>
|
|
||||||
<span id="131">131</span>
|
|
||||||
<span id="132">132</span>
|
|
||||||
<span id="133">133</span>
|
|
||||||
<span id="134">134</span>
|
|
||||||
<span id="135">135</span>
|
|
||||||
<span id="136">136</span>
|
|
||||||
<span id="137">137</span>
|
|
||||||
<span id="138">138</span>
|
|
||||||
<span id="139">139</span>
|
|
||||||
<span id="140">140</span>
|
|
||||||
<span id="141">141</span>
|
|
||||||
<span id="142">142</span>
|
|
||||||
<span id="143">143</span>
|
|
||||||
<span id="144">144</span>
|
|
||||||
<span id="145">145</span>
|
|
||||||
<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 ">
|
</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">collections</span>::<span class="ident">VecDeque</span>;
|
||||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>;
|
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">net</span>::<span class="ident">SocketAddr</span>;
|
||||||
|
|
||||||
<span class="kw">use</span> <span class="ident">actix</span>::<span class="ident">actors</span>::<span class="ident">resolver</span>::{<span class="ident">Connect</span>, <span class="ident">Resolver</span>};
|
<span class="kw">use</span> <span class="ident">redis_async</span>::<span class="ident">client</span>::{<span class="ident">paired_connect</span>, <span class="ident">PairedConnection</span>};
|
||||||
<span class="kw">use</span> <span class="ident">actix</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
<span class="kw">use</span> <span class="ident">redis_async</span>::<span class="ident">resp</span>::<span class="ident">RespValue</span>;
|
||||||
<span class="kw">use</span> <span class="ident">actix_utils</span>::<span class="ident">oneshot</span>;
|
<span class="kw">use</span> <span class="ident">tokio</span>::<span class="ident">sync</span>::<span class="ident">Mutex</span>;
|
||||||
<span class="kw">use</span> <span class="ident">backoff</span>::<span class="ident">backoff</span>::<span class="ident">Backoff</span>;
|
<span class="kw">use</span> <span class="ident">trust_dns_resolver</span>::<span class="ident">config</span>::{<span class="ident">ResolverConfig</span>, <span class="ident">ResolverOpts</span>};
|
||||||
<span class="kw">use</span> <span class="ident">backoff</span>::<span class="ident">ExponentialBackoff</span>;
|
<span class="kw">use</span> <span class="ident">trust_dns_resolver</span>::<span class="ident">TokioAsyncResolver</span> <span class="kw">as</span> <span class="ident">AsyncResolver</span>;
|
||||||
<span class="kw">use</span> <span class="ident">futures_util</span>::<span class="ident">FutureExt</span>;
|
|
||||||
<span class="kw">use</span> <span class="ident">log</span>::{<span class="ident">error</span>, <span class="ident">info</span>, <span class="ident">warn</span>};
|
|
||||||
<span class="kw">use</span> <span class="ident">redis_async</span>::<span class="ident">error</span>::<span class="ident">Error</span> <span class="kw">as</span> <span class="ident">RespError</span>;
|
|
||||||
<span class="kw">use</span> <span class="ident">redis_async</span>::<span class="ident">resp</span>::{<span class="ident">RespCodec</span>, <span class="ident">RespValue</span>};
|
|
||||||
<span class="kw">use</span> <span class="ident">tokio</span>::<span class="ident">io</span>::{<span class="ident">split</span>, <span class="ident">WriteHalf</span>};
|
|
||||||
<span class="kw">use</span> <span class="ident">tokio</span>::<span class="ident">net</span>::<span class="ident">TcpStream</span>;
|
|
||||||
<span class="kw">use</span> <span class="ident">tokio_util</span>::<span class="ident">codec</span>::<span class="ident">FramedRead</span>;
|
|
||||||
|
|
||||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">Error</span>;
|
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">Error</span>;
|
||||||
|
|
||||||
<span class="doccomment">/// Command for send data to Redis</span>
|
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">RedisClient</span> {
|
||||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>)]</span>
|
|
||||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Command</span>(<span class="kw">pub</span> <span class="ident">RespValue</span>);
|
|
||||||
|
|
||||||
<span class="kw">impl</span> <span class="ident">Message</span> <span class="kw">for</span> <span class="ident">Command</span> {
|
|
||||||
<span class="kw">type</span> <span class="prelude-ty">Result</span> <span class="op">=</span> <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">RespValue</span>, <span class="ident">Error</span><span class="op">></span>;
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class="doccomment">/// Redis comminucation actor</span>
|
|
||||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">RedisActor</span> {
|
|
||||||
<span class="ident">addr</span>: <span class="ident">String</span>,
|
<span class="ident">addr</span>: <span class="ident">String</span>,
|
||||||
<span class="ident">backoff</span>: <span class="ident">ExponentialBackoff</span>,
|
<span class="ident">connection</span>: <span class="ident">Mutex</span><span class="op"><</span><span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">PairedConnection</span><span class="op">></span><span class="op">></span>,
|
||||||
<span class="ident">cell</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">actix</span>::<span class="ident">io</span>::<span class="ident">FramedWrite</span><span class="op"><</span><span class="ident">RespValue</span>, <span class="ident">WriteHalf</span><span class="op"><</span><span class="ident">TcpStream</span><span class="op">></span>, <span class="ident">RespCodec</span><span class="op">></span><span class="op">></span>,
|
|
||||||
<span class="ident">queue</span>: <span class="ident">VecDeque</span><span class="op"><</span><span class="ident">oneshot</span>::<span class="ident">Sender</span><span class="op"><</span><span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">RespValue</span>, <span class="ident">Error</span><span class="op">></span><span class="op">></span><span class="op">></span>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
<span class="kw">impl</span> <span class="ident">RedisActor</span> {
|
<span class="kw">impl</span> <span class="ident">RedisClient</span> {
|
||||||
<span class="doccomment">/// Start new `Supervisor` with `RedisActor`.</span>
|
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">addr</span>: <span class="kw">impl</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="op">></span> <span class="self">Self</span> {
|
||||||
<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="self">Self</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="ident">addr</span>: <span class="ident">addr</span>.<span class="ident">into</span>(),
|
||||||
|
<span class="ident">connection</span>: <span class="ident">Mutex</span>::<span class="ident">new</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="kw">async</span> <span class="kw">fn</span> <span class="ident">get_connection</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">PairedConnection</span>, <span class="ident">Error</span><span class="op">></span> {
|
||||||
<span class="ident">max_elapsed_time</span>: <span class="prelude-val">None</span>,
|
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">connection</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">connection</span>.<span class="ident">lock</span>().<span class="kw">await</span>;
|
||||||
..<span class="ident">Default</span>::<span class="ident">default</span>()
|
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="kw-2">ref</span> <span class="ident">connection</span>) <span class="op">=</span> <span class="kw-2">*</span><span class="ident">connection</span> {
|
||||||
};
|
<span class="kw">return</span> <span class="prelude-val">Ok</span>(<span class="ident">connection</span>.<span class="ident">clone</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="kw">let</span> <span class="kw-2">mut</span> <span class="ident">addrs</span> <span class="op">=</span> <span class="ident">resolve</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">addr</span>).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||||
<span class="ident">addr</span>,
|
<span class="kw">loop</span> {
|
||||||
<span class="ident">cell</span>: <span class="prelude-val">None</span>,
|
<span class="comment">// try to connect</span>
|
||||||
<span class="ident">backoff</span>,
|
<span class="kw">let</span> <span class="ident">socket_addr</span> <span class="op">=</span> <span class="ident">addrs</span>.<span class="ident">pop_front</span>().<span class="ident">ok_or_else</span>(<span class="op">|</span><span class="op">|</span> {
|
||||||
<span class="ident">queue</span>: <span class="ident">VecDeque</span>::<span class="ident">new</span>(),
|
<span class="ident">log</span>::<span class="macro">warn</span><span class="macro">!</span>(<span class="string">"Cannot connect to {}."</span>, <span class="self">self</span>.<span class="ident">addr</span>);
|
||||||
|
<span class="ident">Error</span>::<span class="ident">NotConnected</span>
|
||||||
|
})<span class="question-mark">?</span>;
|
||||||
|
<span class="kw">match</span> <span class="ident">paired_connect</span>(<span class="ident">socket_addr</span>).<span class="kw">await</span> {
|
||||||
|
<span class="prelude-val">Ok</span>(<span class="ident">conn</span>) <span class="op">=</span><span class="op">></span> {
|
||||||
|
<span class="kw-2">*</span><span class="ident">connection</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">conn</span>.<span class="ident">clone</span>());
|
||||||
|
<span class="kw">return</span> <span class="prelude-val">Ok</span>(<span class="ident">conn</span>);
|
||||||
|
}
|
||||||
|
<span class="prelude-val">Err</span>(<span class="ident">err</span>) <span class="op">=</span><span class="op">></span> <span class="ident">log</span>::<span class="macro">warn</span><span class="macro">!</span>(
|
||||||
|
<span class="string">"Attempt to connect to {} as {} failed: {}."</span>,
|
||||||
|
<span class="self">self</span>.<span class="ident">addr</span>,
|
||||||
|
<span class="ident">socket_addr</span>,
|
||||||
|
<span class="ident">err</span>
|
||||||
|
),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
<span class="kw">pub</span> <span class="kw">async</span> <span class="kw">fn</span> <span class="ident">send</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">req</span>: <span class="ident">RespValue</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">RespValue</span>, <span class="ident">Error</span><span class="op">></span> {
|
||||||
|
<span class="kw">let</span> <span class="ident">res</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">get_connection</span>().<span class="kw">await</span><span class="question-mark">?</span>.<span class="ident">send</span>(<span class="ident">req</span>).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||||
|
<span class="prelude-val">Ok</span>(<span class="ident">res</span>)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
<span class="kw">fn</span> <span class="ident">parse_addr</span>(<span class="ident">addr</span>: <span class="kw-2">&</span><span class="ident">str</span>, <span class="ident">default_port</span>: <span class="ident">u16</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span>(<span class="kw-2">&</span><span class="ident">str</span>, <span class="ident">u16</span>)<span class="op">></span> {
|
||||||
|
<span class="comment">// split the string by ':' and convert the second part to u16</span>
|
||||||
|
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">parts_iter</span> <span class="op">=</span> <span class="ident">addr</span>.<span class="ident">splitn</span>(<span class="number">2</span>, <span class="string">':'</span>);
|
||||||
|
<span class="kw">let</span> <span class="ident">host</span> <span class="op">=</span> <span class="ident">parts_iter</span>.<span class="ident">next</span>()<span class="question-mark">?</span>;
|
||||||
|
<span class="kw">let</span> <span class="ident">port_str</span> <span class="op">=</span> <span class="ident">parts_iter</span>.<span class="ident">next</span>().<span class="ident">unwrap_or</span>(<span class="string">""</span>);
|
||||||
|
<span class="kw">let</span> <span class="ident">port</span>: <span class="ident">u16</span> <span class="op">=</span> <span class="ident">port_str</span>.<span class="ident">parse</span>().<span class="ident">unwrap_or</span>(<span class="ident">default_port</span>);
|
||||||
|
<span class="prelude-val">Some</span>((<span class="ident">host</span>, <span class="ident">port</span>))
|
||||||
|
}
|
||||||
|
|
||||||
|
<span class="kw">async</span> <span class="kw">fn</span> <span class="ident">resolve</span>(<span class="ident">addr</span>: <span class="kw-2">&</span><span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">VecDeque</span><span class="op"><</span><span class="ident">SocketAddr</span><span class="op">></span>, <span class="ident">Error</span><span class="op">></span> {
|
||||||
|
<span class="comment">// try to parse as a regular SocketAddr first</span>
|
||||||
|
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Ok</span>(<span class="ident">addr</span>) <span class="op">=</span> <span class="ident">addr</span>.<span class="ident">parse</span>::<span class="op"><</span><span class="ident">SocketAddr</span><span class="op">></span>() {
|
||||||
|
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">addrs</span> <span class="op">=</span> <span class="ident">VecDeque</span>::<span class="ident">new</span>();
|
||||||
|
<span class="ident">addrs</span>.<span class="ident">push_back</span>(<span class="ident">addr</span>);
|
||||||
|
<span class="kw">return</span> <span class="prelude-val">Ok</span>(<span class="ident">addrs</span>);
|
||||||
|
}
|
||||||
|
|
||||||
|
<span class="kw">let</span> (<span class="ident">host</span>, <span class="ident">port</span>) <span class="op">=</span> <span class="ident">parse_addr</span>(<span class="ident">addr</span>, <span class="number">6379</span>).<span class="ident">ok_or</span>(<span class="ident">Error</span>::<span class="ident">InvalidAddress</span>)<span class="question-mark">?</span>;
|
||||||
|
|
||||||
|
<span class="comment">// we need to do dns resolution</span>
|
||||||
|
<span class="kw">let</span> <span class="ident">resolver</span> <span class="op">=</span> <span class="ident">AsyncResolver</span>::<span class="ident">tokio_from_system_conf</span>()
|
||||||
|
.<span class="ident">or_else</span>(<span class="op">|</span><span class="ident">err</span><span class="op">|</span> {
|
||||||
|
<span class="ident">log</span>::<span class="macro">warn</span><span class="macro">!</span>(<span class="string">"Cannot create system DNS resolver: {}"</span>, <span class="ident">err</span>);
|
||||||
|
<span class="ident">AsyncResolver</span>::<span class="ident">tokio</span>(<span class="ident">ResolverConfig</span>::<span class="ident">default</span>(), <span class="ident">ResolverOpts</span>::<span class="ident">default</span>())
|
||||||
})
|
})
|
||||||
}
|
.<span class="ident">map_err</span>(<span class="op">|</span><span class="ident">err</span><span class="op">|</span> {
|
||||||
}
|
<span class="ident">log</span>::<span class="macro">error</span><span class="macro">!</span>(<span class="string">"Cannot create DNS resolver: {}"</span>, <span class="ident">err</span>);
|
||||||
|
<span class="ident">Error</span>::<span class="ident">ResolveError</span>
|
||||||
|
})<span class="question-mark">?</span>;
|
||||||
|
|
||||||
<span class="kw">impl</span> <span class="ident">Actor</span> <span class="kw">for</span> <span class="ident">RedisActor</span> {
|
<span class="kw">let</span> <span class="ident">addrs</span> <span class="op">=</span> <span class="ident">resolver</span>
|
||||||
<span class="kw">type</span> <span class="ident">Context</span> <span class="op">=</span> <span class="ident">Context</span><span class="op"><</span><span class="self">Self</span><span class="op">></span>;
|
.<span class="ident">lookup_ip</span>(<span class="ident">host</span>)
|
||||||
|
.<span class="kw">await</span>
|
||||||
|
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error</span>::<span class="ident">ResolveError</span>)<span class="question-mark">?</span>
|
||||||
|
.<span class="ident">into_iter</span>()
|
||||||
|
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">ip</span><span class="op">|</span> <span class="ident">SocketAddr</span>::<span class="ident">new</span>(<span class="ident">ip</span>, <span class="ident">port</span>))
|
||||||
|
.<span class="ident">collect</span>();
|
||||||
|
|
||||||
<span class="kw">fn</span> <span class="ident">started</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">Context</span><span class="op"><</span><span class="self">Self</span><span class="op">></span>) {
|
<span class="prelude-val">Ok</span>(<span class="ident">addrs</span>)
|
||||||
<span class="ident">Resolver</span>::<span class="ident">from_registry</span>()
|
|
||||||
.<span class="ident">send</span>(<span class="ident">Connect</span>::<span class="ident">host</span>(<span class="self">self</span>.<span class="ident">addr</span>.<span class="ident">as_str</span>()))
|
|
||||||
.<span class="ident">into_actor</span>(<span class="self">self</span>)
|
|
||||||
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">res</span>, <span class="ident">act</span>, <span class="ident">ctx</span><span class="op">|</span> <span class="kw">match</span> <span class="ident">res</span> {
|
|
||||||
<span class="prelude-val">Ok</span>(<span class="ident">res</span>) <span class="op">=</span><span class="op">></span> <span class="kw">match</span> <span class="ident">res</span> {
|
|
||||||
<span class="prelude-val">Ok</span>(<span class="ident">stream</span>) <span class="op">=</span><span class="op">></span> {
|
|
||||||
<span class="macro">info</span><span class="macro">!</span>(<span class="string">"Connected to redis server: {}"</span>, <span class="ident">act</span>.<span class="ident">addr</span>);
|
|
||||||
|
|
||||||
<span class="kw">let</span> (<span class="ident">r</span>, <span class="ident">w</span>) <span class="op">=</span> <span class="ident">split</span>(<span class="ident">stream</span>);
|
|
||||||
|
|
||||||
<span class="comment">// configure write side of the connection</span>
|
|
||||||
<span class="kw">let</span> <span class="ident">framed</span> <span class="op">=</span> <span class="ident">actix</span>::<span class="ident">io</span>::<span class="ident">FramedWrite</span>::<span class="ident">new</span>(<span class="ident">w</span>, <span class="ident">RespCodec</span>, <span class="ident">ctx</span>);
|
|
||||||
<span class="ident">act</span>.<span class="ident">cell</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">framed</span>);
|
|
||||||
|
|
||||||
<span class="comment">// read side of the connection</span>
|
|
||||||
<span class="ident">ctx</span>.<span class="ident">add_stream</span>(<span class="ident">FramedRead</span>::<span class="ident">new</span>(<span class="ident">r</span>, <span class="ident">RespCodec</span>));
|
|
||||||
|
|
||||||
<span class="ident">act</span>.<span class="ident">backoff</span>.<span class="ident">reset</span>();
|
|
||||||
}
|
|
||||||
<span class="prelude-val">Err</span>(<span class="ident">err</span>) <span class="op">=</span><span class="op">></span> {
|
|
||||||
<span class="macro">error</span><span class="macro">!</span>(<span class="string">"Can not connect to redis server: {}"</span>, <span class="ident">err</span>);
|
|
||||||
<span class="comment">// re-connect with backoff time.</span>
|
|
||||||
<span class="comment">// we stop current context, supervisor will restart it.</span>
|
|
||||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">timeout</span>) <span class="op">=</span> <span class="ident">act</span>.<span class="ident">backoff</span>.<span class="ident">next_backoff</span>() {
|
|
||||||
<span class="ident">ctx</span>.<span class="ident">run_later</span>(<span class="ident">timeout</span>, <span class="op">|</span><span class="kw">_</span>, <span class="ident">ctx</span><span class="op">|</span> <span class="ident">ctx</span>.<span class="ident">stop</span>());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
<span class="prelude-val">Err</span>(<span class="ident">err</span>) <span class="op">=</span><span class="op">></span> {
|
|
||||||
<span class="macro">error</span><span class="macro">!</span>(<span class="string">"Can not connect to redis server: {}"</span>, <span class="ident">err</span>);
|
|
||||||
<span class="comment">// re-connect with backoff time.</span>
|
|
||||||
<span class="comment">// we stop current context, supervisor will restart it.</span>
|
|
||||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">timeout</span>) <span class="op">=</span> <span class="ident">act</span>.<span class="ident">backoff</span>.<span class="ident">next_backoff</span>() {
|
|
||||||
<span class="ident">ctx</span>.<span class="ident">run_later</span>(<span class="ident">timeout</span>, <span class="op">|</span><span class="kw">_</span>, <span class="ident">ctx</span><span class="op">|</span> <span class="ident">ctx</span>.<span class="ident">stop</span>());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.<span class="ident">wait</span>(<span class="ident">ctx</span>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class="kw">impl</span> <span class="ident">Supervised</span> <span class="kw">for</span> <span class="ident">RedisActor</span> {
|
|
||||||
<span class="kw">fn</span> <span class="ident">restarting</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="kw">_</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">Self</span>::<span class="ident">Context</span>) {
|
|
||||||
<span class="self">self</span>.<span class="ident">cell</span>.<span class="ident">take</span>();
|
|
||||||
<span class="kw">for</span> <span class="ident">tx</span> <span class="kw">in</span> <span class="self">self</span>.<span class="ident">queue</span>.<span class="ident">drain</span>(..) {
|
|
||||||
<span class="kw">let</span> <span class="kw">_</span> <span class="op">=</span> <span class="ident">tx</span>.<span class="ident">send</span>(<span class="prelude-val">Err</span>(<span class="ident">Error</span>::<span class="ident">Disconnected</span>));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class="kw">impl</span> <span class="ident">actix</span>::<span class="ident">io</span>::<span class="ident">WriteHandler</span><span class="op"><</span><span class="ident">io</span>::<span class="ident">Error</span><span class="op">></span> <span class="kw">for</span> <span class="ident">RedisActor</span> {
|
|
||||||
<span class="kw">fn</span> <span class="ident">error</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">err</span>: <span class="ident">io</span>::<span class="ident">Error</span>, <span class="kw">_</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">Self</span>::<span class="ident">Context</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Running</span> {
|
|
||||||
<span class="macro">warn</span><span class="macro">!</span>(<span class="string">"Redis connection dropped: {} error: {}"</span>, <span class="self">self</span>.<span class="ident">addr</span>, <span class="ident">err</span>);
|
|
||||||
<span class="ident">Running</span>::<span class="ident">Stop</span>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class="kw">impl</span> <span class="ident">StreamHandler</span><span class="op"><</span><span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">RespValue</span>, <span class="ident">RespError</span><span class="op">></span><span class="op">></span> <span class="kw">for</span> <span class="ident">RedisActor</span> {
|
|
||||||
<span class="kw">fn</span> <span class="ident">handle</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">msg</span>: <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">RespValue</span>, <span class="ident">RespError</span><span class="op">></span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">Self</span>::<span class="ident">Context</span>) {
|
|
||||||
<span class="kw">match</span> <span class="ident">msg</span> {
|
|
||||||
<span class="prelude-val">Err</span>(<span class="ident">e</span>) <span class="op">=</span><span class="op">></span> {
|
|
||||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">tx</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">queue</span>.<span class="ident">pop_front</span>() {
|
|
||||||
<span class="kw">let</span> <span class="kw">_</span> <span class="op">=</span> <span class="ident">tx</span>.<span class="ident">send</span>(<span class="prelude-val">Err</span>(<span class="ident">e</span>.<span class="ident">into</span>()));
|
|
||||||
}
|
|
||||||
<span class="ident">ctx</span>.<span class="ident">stop</span>();
|
|
||||||
}
|
|
||||||
<span class="prelude-val">Ok</span>(<span class="ident">val</span>) <span class="op">=</span><span class="op">></span> {
|
|
||||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">tx</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">queue</span>.<span class="ident">pop_front</span>() {
|
|
||||||
<span class="kw">let</span> <span class="kw">_</span> <span class="op">=</span> <span class="ident">tx</span>.<span class="ident">send</span>(<span class="prelude-val">Ok</span>(<span class="ident">val</span>));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class="kw">impl</span> <span class="ident">Handler</span><span class="op"><</span><span class="ident">Command</span><span class="op">></span> <span class="kw">for</span> <span class="ident">RedisActor</span> {
|
|
||||||
<span class="kw">type</span> <span class="prelude-ty">Result</span> <span class="op">=</span> <span class="ident">ResponseFuture</span><span class="op"><</span><span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">RespValue</span>, <span class="ident">Error</span><span class="op">></span><span class="op">></span>;
|
|
||||||
|
|
||||||
<span class="kw">fn</span> <span class="ident">handle</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">msg</span>: <span class="ident">Command</span>, <span class="kw">_</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">Self</span>::<span class="ident">Context</span>) <span class="op">-</span><span class="op">></span> <span class="self">Self</span>::<span class="prelude-ty">Result</span> {
|
|
||||||
<span class="kw">let</span> (<span class="ident">tx</span>, <span class="ident">rx</span>) <span class="op">=</span> <span class="ident">oneshot</span>::<span class="ident">channel</span>();
|
|
||||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="kw-2">ref</span> <span class="kw-2">mut</span> <span class="ident">cell</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">cell</span> {
|
|
||||||
<span class="self">self</span>.<span class="ident">queue</span>.<span class="ident">push_back</span>(<span class="ident">tx</span>);
|
|
||||||
<span class="ident">cell</span>.<span class="ident">write</span>(<span class="ident">msg</span>.<span class="number">0</span>);
|
|
||||||
} <span class="kw">else</span> {
|
|
||||||
<span class="kw">let</span> <span class="kw">_</span> <span class="op">=</span> <span class="ident">tx</span>.<span class="ident">send</span>(<span class="prelude-val">Err</span>(<span class="ident">Error</span>::<span class="ident">NotConnected</span>));
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class="ident">Box</span>::<span class="ident">pin</span>(<span class="ident">rx</span>.<span class="ident">map</span>(<span class="op">|</span><span class="ident">res</span><span class="op">|</span> <span class="kw">match</span> <span class="ident">res</span> {
|
|
||||||
<span class="prelude-val">Ok</span>(<span class="ident">res</span>) <span class="op">=</span><span class="op">></span> <span class="ident">res</span>,
|
|
||||||
<span class="prelude-val">Err</span>(<span class="kw">_</span>) <span class="op">=</span><span class="op">></span> <span class="prelude-val">Err</span>(<span class="ident">Error</span>::<span class="ident">Disconnected</span>),
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "actix_redis";</script><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script><script defer src="../../search-index.js"></script></body></html>
|
</section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "actix_redis";</script><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -701,23 +701,12 @@
|
|||||||
<span id="698">698</span>
|
<span id="698">698</span>
|
||||||
<span id="699">699</span>
|
<span id="699">699</span>
|
||||||
<span id="700">700</span>
|
<span id="700">700</span>
|
||||||
<span id="701">701</span>
|
|
||||||
<span id="702">702</span>
|
|
||||||
<span id="703">703</span>
|
|
||||||
<span id="704">704</span>
|
|
||||||
<span id="705">705</span>
|
|
||||||
<span id="706">706</span>
|
|
||||||
<span id="707">707</span>
|
|
||||||
<span id="708">708</span>
|
|
||||||
<span id="709">709</span>
|
|
||||||
<span id="710">710</span>
|
|
||||||
</pre><div class="example-wrap"><pre class="rust ">
|
</pre><div class="example-wrap"><pre class="rust ">
|
||||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">cell</span>::<span class="ident">RefCell</span>;
|
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">cell</span>::<span class="ident">RefCell</span>;
|
||||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">pin</span>::<span class="ident">Pin</span>;
|
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">pin</span>::<span class="ident">Pin</span>;
|
||||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">task</span>::{<span class="ident">Context</span>, <span class="ident">Poll</span>};
|
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">task</span>::{<span class="ident">Context</span>, <span class="ident">Poll</span>};
|
||||||
<span class="kw">use</span> <span class="ident">std</span>::{<span class="ident">collections</span>::<span class="ident">HashMap</span>, <span class="ident">iter</span>, <span class="ident">rc</span>::<span class="ident">Rc</span>};
|
<span class="kw">use</span> <span class="ident">std</span>::{<span class="ident">collections</span>::<span class="ident">HashMap</span>, <span class="ident">iter</span>, <span class="ident">rc</span>::<span class="ident">Rc</span>};
|
||||||
|
|
||||||
<span class="kw">use</span> <span class="ident">actix</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
|
||||||
<span class="kw">use</span> <span class="ident">actix_service</span>::{<span class="ident">Service</span>, <span class="ident">Transform</span>};
|
<span class="kw">use</span> <span class="ident">actix_service</span>::{<span class="ident">Service</span>, <span class="ident">Transform</span>};
|
||||||
<span class="kw">use</span> <span class="ident">actix_session</span>::{<span class="ident">Session</span>, <span class="ident">SessionStatus</span>};
|
<span class="kw">use</span> <span class="ident">actix_session</span>::{<span class="ident">Session</span>, <span class="ident">SessionStatus</span>};
|
||||||
<span class="kw">use</span> <span class="ident">actix_web</span>::<span class="ident">cookie</span>::{<span class="ident">Cookie</span>, <span class="ident">CookieJar</span>, <span class="ident">Key</span>, <span class="ident">SameSite</span>};
|
<span class="kw">use</span> <span class="ident">actix_web</span>::<span class="ident">cookie</span>::{<span class="ident">Cookie</span>, <span class="ident">CookieJar</span>, <span class="ident">Key</span>, <span class="ident">SameSite</span>};
|
||||||
@ -730,7 +719,7 @@
|
|||||||
<span class="kw">use</span> <span class="ident">redis_async</span>::<span class="ident">resp_array</span>;
|
<span class="kw">use</span> <span class="ident">redis_async</span>::<span class="ident">resp_array</span>;
|
||||||
<span class="kw">use</span> <span class="ident">time</span>::{<span class="self">self</span>, <span class="ident">Duration</span>, <span class="ident">OffsetDateTime</span>};
|
<span class="kw">use</span> <span class="ident">time</span>::{<span class="self">self</span>, <span class="ident">Duration</span>, <span class="ident">OffsetDateTime</span>};
|
||||||
|
|
||||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">redis</span>::{<span class="ident">Command</span>, <span class="ident">RedisActor</span>};
|
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">redis</span>::<span class="ident">RedisClient</span>;
|
||||||
|
|
||||||
<span class="doccomment">/// Use redis as session storage.</span>
|
<span class="doccomment">/// Use redis as session storage.</span>
|
||||||
<span class="doccomment">///</span>
|
<span class="doccomment">///</span>
|
||||||
@ -750,7 +739,7 @@
|
|||||||
<span class="ident">key</span>: <span class="ident">Key</span>::<span class="ident">derive_from</span>(<span class="ident">key</span>),
|
<span class="ident">key</span>: <span class="ident">Key</span>::<span class="ident">derive_from</span>(<span class="ident">key</span>),
|
||||||
<span class="ident">cache_keygen</span>: <span class="ident">Box</span>::<span class="ident">new</span>(<span class="op">|</span><span class="ident">key</span>: <span class="kw-2">&</span><span class="ident">str</span><span class="op">|</span> <span class="macro">format</span><span class="macro">!</span>(<span class="string">"session:{}"</span>, <span class="kw-2">&</span><span class="ident">key</span>)),
|
<span class="ident">cache_keygen</span>: <span class="ident">Box</span>::<span class="ident">new</span>(<span class="op">|</span><span class="ident">key</span>: <span class="kw-2">&</span><span class="ident">str</span><span class="op">|</span> <span class="macro">format</span><span class="macro">!</span>(<span class="string">"session:{}"</span>, <span class="kw-2">&</span><span class="ident">key</span>)),
|
||||||
<span class="ident">ttl</span>: <span class="string">"7200"</span>.<span class="ident">to_owned</span>(),
|
<span class="ident">ttl</span>: <span class="string">"7200"</span>.<span class="ident">to_owned</span>(),
|
||||||
<span class="ident">addr</span>: <span class="ident">RedisActor</span>::<span class="ident">start</span>(<span class="ident">addr</span>),
|
<span class="ident">redis_client</span>: <span class="ident">RedisClient</span>::<span class="ident">new</span>(<span class="ident">addr</span>),
|
||||||
<span class="ident">name</span>: <span class="string">"actix-session"</span>.<span class="ident">to_owned</span>(),
|
<span class="ident">name</span>: <span class="string">"actix-session"</span>.<span class="ident">to_owned</span>(),
|
||||||
<span class="ident">path</span>: <span class="string">"/"</span>.<span class="ident">to_owned</span>(),
|
<span class="ident">path</span>: <span class="string">"/"</span>.<span class="ident">to_owned</span>(),
|
||||||
<span class="ident">domain</span>: <span class="prelude-val">None</span>,
|
<span class="ident">domain</span>: <span class="prelude-val">None</span>,
|
||||||
@ -827,14 +816,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
<span class="kw">impl</span><span class="op"><</span><span class="ident">S</span>, <span class="ident">B</span><span class="op">></span> <span class="ident">Transform</span><span class="op"><</span><span class="ident">S</span><span class="op">></span> <span class="kw">for</span> <span class="ident">RedisSession</span>
|
<span class="kw">impl</span><span class="op"><</span><span class="ident">S</span>, <span class="ident">B</span><span class="op">></span> <span class="ident">Transform</span><span class="op"><</span><span class="ident">S</span>, <span class="ident">ServiceRequest</span><span class="op">></span> <span class="kw">for</span> <span class="ident">RedisSession</span>
|
||||||
<span class="kw">where</span>
|
<span class="kw">where</span>
|
||||||
<span class="ident">S</span>: <span class="ident">Service</span><span class="op"><</span><span class="ident">Request</span> <span class="op">=</span> <span class="ident">ServiceRequest</span>, <span class="ident">Response</span> <span class="op">=</span> <span class="ident">ServiceResponse</span><span class="op"><</span><span class="ident">B</span><span class="op">></span>, <span class="ident">Error</span> <span class="op">=</span> <span class="ident">Error</span><span class="op">></span>
|
<span class="ident">S</span>: <span class="ident">Service</span><span class="op"><</span><span class="ident">ServiceRequest</span>, <span class="ident">Response</span> <span class="op">=</span> <span class="ident">ServiceResponse</span><span class="op"><</span><span class="ident">B</span><span class="op">></span>, <span class="ident">Error</span> <span class="op">=</span> <span class="ident">Error</span><span class="op">></span> <span class="op">+</span> <span class="lifetime">'static</span>,
|
||||||
<span class="op">+</span> <span class="lifetime">'static</span>,
|
|
||||||
<span class="ident">S</span>::<span class="ident">Future</span>: <span class="lifetime">'static</span>,
|
<span class="ident">S</span>::<span class="ident">Future</span>: <span class="lifetime">'static</span>,
|
||||||
<span class="ident">B</span>: <span class="lifetime">'static</span>,
|
<span class="ident">B</span>: <span class="lifetime">'static</span>,
|
||||||
{
|
{
|
||||||
<span class="kw">type</span> <span class="ident">Request</span> <span class="op">=</span> <span class="ident">ServiceRequest</span>;
|
|
||||||
<span class="kw">type</span> <span class="ident">Response</span> <span class="op">=</span> <span class="ident">ServiceResponse</span><span class="op"><</span><span class="ident">B</span><span class="op">></span>;
|
<span class="kw">type</span> <span class="ident">Response</span> <span class="op">=</span> <span class="ident">ServiceResponse</span><span class="op"><</span><span class="ident">B</span><span class="op">></span>;
|
||||||
<span class="kw">type</span> <span class="ident">Error</span> <span class="op">=</span> <span class="ident">S</span>::<span class="ident">Error</span>;
|
<span class="kw">type</span> <span class="ident">Error</span> <span class="op">=</span> <span class="ident">S</span>::<span class="ident">Error</span>;
|
||||||
<span class="kw">type</span> <span class="ident">InitError</span> <span class="op">=</span> ();
|
<span class="kw">type</span> <span class="ident">InitError</span> <span class="op">=</span> ();
|
||||||
@ -855,25 +842,23 @@
|
|||||||
<span class="ident">inner</span>: <span class="ident">Rc</span><span class="op"><</span><span class="ident">Inner</span><span class="op">></span>,
|
<span class="ident">inner</span>: <span class="ident">Rc</span><span class="op"><</span><span class="ident">Inner</span><span class="op">></span>,
|
||||||
}
|
}
|
||||||
|
|
||||||
<span class="kw">impl</span><span class="op"><</span><span class="ident">S</span>, <span class="ident">B</span><span class="op">></span> <span class="ident">Service</span> <span class="kw">for</span> <span class="ident">RedisSessionMiddleware</span><span class="op"><</span><span class="ident">S</span><span class="op">></span>
|
<span class="kw">impl</span><span class="op"><</span><span class="ident">S</span>, <span class="ident">B</span><span class="op">></span> <span class="ident">Service</span><span class="op"><</span><span class="ident">ServiceRequest</span><span class="op">></span> <span class="kw">for</span> <span class="ident">RedisSessionMiddleware</span><span class="op"><</span><span class="ident">S</span><span class="op">></span>
|
||||||
<span class="kw">where</span>
|
<span class="kw">where</span>
|
||||||
<span class="ident">S</span>: <span class="ident">Service</span><span class="op"><</span><span class="ident">Request</span> <span class="op">=</span> <span class="ident">ServiceRequest</span>, <span class="ident">Response</span> <span class="op">=</span> <span class="ident">ServiceResponse</span><span class="op"><</span><span class="ident">B</span><span class="op">></span>, <span class="ident">Error</span> <span class="op">=</span> <span class="ident">Error</span><span class="op">></span>
|
<span class="ident">S</span>: <span class="ident">Service</span><span class="op"><</span><span class="ident">ServiceRequest</span>, <span class="ident">Response</span> <span class="op">=</span> <span class="ident">ServiceResponse</span><span class="op"><</span><span class="ident">B</span><span class="op">></span>, <span class="ident">Error</span> <span class="op">=</span> <span class="ident">Error</span><span class="op">></span> <span class="op">+</span> <span class="lifetime">'static</span>,
|
||||||
<span class="op">+</span> <span class="lifetime">'static</span>,
|
|
||||||
<span class="ident">S</span>::<span class="ident">Future</span>: <span class="lifetime">'static</span>,
|
<span class="ident">S</span>::<span class="ident">Future</span>: <span class="lifetime">'static</span>,
|
||||||
<span class="ident">B</span>: <span class="lifetime">'static</span>,
|
<span class="ident">B</span>: <span class="lifetime">'static</span>,
|
||||||
{
|
{
|
||||||
<span class="kw">type</span> <span class="ident">Request</span> <span class="op">=</span> <span class="ident">ServiceRequest</span>;
|
|
||||||
<span class="kw">type</span> <span class="ident">Response</span> <span class="op">=</span> <span class="ident">ServiceResponse</span><span class="op"><</span><span class="ident">B</span><span class="op">></span>;
|
<span class="kw">type</span> <span class="ident">Response</span> <span class="op">=</span> <span class="ident">ServiceResponse</span><span class="op"><</span><span class="ident">B</span><span class="op">></span>;
|
||||||
<span class="kw">type</span> <span class="ident">Error</span> <span class="op">=</span> <span class="ident">Error</span>;
|
<span class="kw">type</span> <span class="ident">Error</span> <span class="op">=</span> <span class="ident">Error</span>;
|
||||||
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">clippy</span>::<span class="ident">type_complexity</span>)]</span>
|
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">clippy</span>::<span class="ident">type_complexity</span>)]</span>
|
||||||
<span class="kw">type</span> <span class="ident">Future</span> <span class="op">=</span> <span class="ident">Pin</span><span class="op"><</span><span class="ident">Box</span><span class="op"><</span><span class="kw">dyn</span> <span class="ident">Future</span><span class="op"><</span><span class="ident">Output</span> <span class="op">=</span> <span class="prelude-ty">Result</span><span class="op"><</span><span class="self">Self</span>::<span class="ident">Response</span>, <span class="self">Self</span>::<span class="ident">Error</span><span class="op">></span><span class="op">></span><span class="op">></span><span class="op">></span>;
|
<span class="kw">type</span> <span class="ident">Future</span> <span class="op">=</span> <span class="ident">Pin</span><span class="op"><</span><span class="ident">Box</span><span class="op"><</span><span class="kw">dyn</span> <span class="ident">Future</span><span class="op"><</span><span class="ident">Output</span> <span class="op">=</span> <span class="prelude-ty">Result</span><span class="op"><</span><span class="self">Self</span>::<span class="ident">Response</span>, <span class="self">Self</span>::<span class="ident">Error</span><span class="op">></span><span class="op">></span><span class="op">></span><span class="op">></span>;
|
||||||
|
|
||||||
<span class="kw">fn</span> <span class="ident">poll_ready</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">cx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">Context</span><span class="op"><</span><span class="lifetime">'_</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="ident">Poll</span><span class="op"><</span><span class="prelude-ty">Result</span><span class="op"><</span>(), <span class="self">Self</span>::<span class="ident">Error</span><span class="op">></span><span class="op">></span> {
|
<span class="kw">fn</span> <span class="ident">poll_ready</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">cx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">Context</span><span class="op"><</span><span class="lifetime">'_</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="ident">Poll</span><span class="op"><</span><span class="prelude-ty">Result</span><span class="op"><</span>(), <span class="self">Self</span>::<span class="ident">Error</span><span class="op">></span><span class="op">></span> {
|
||||||
<span class="self">self</span>.<span class="ident">service</span>.<span class="ident">borrow_mut</span>().<span class="ident">poll_ready</span>(<span class="ident">cx</span>)
|
<span class="self">self</span>.<span class="ident">service</span>.<span class="ident">borrow_mut</span>().<span class="ident">poll_ready</span>(<span class="ident">cx</span>)
|
||||||
}
|
}
|
||||||
|
|
||||||
<span class="kw">fn</span> <span class="ident">call</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="kw-2">mut</span> <span class="ident">req</span>: <span class="ident">ServiceRequest</span>) <span class="op">-</span><span class="op">></span> <span class="self">Self</span>::<span class="ident">Future</span> {
|
<span class="kw">fn</span> <span class="ident">call</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="kw-2">mut</span> <span class="ident">req</span>: <span class="ident">ServiceRequest</span>) <span class="op">-</span><span class="op">></span> <span class="self">Self</span>::<span class="ident">Future</span> {
|
||||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">srv</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">service</span>.<span class="ident">clone</span>();
|
<span class="kw">let</span> <span class="ident">srv</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">service</span>.<span class="ident">clone</span>();
|
||||||
<span class="kw">let</span> <span class="ident">inner</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">inner</span>.<span class="ident">clone</span>();
|
<span class="kw">let</span> <span class="ident">inner</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">inner</span>.<span class="ident">clone</span>();
|
||||||
|
|
||||||
<span class="ident">Box</span>::<span class="ident">pin</span>(<span class="kw">async</span> <span class="kw">move</span> {
|
<span class="ident">Box</span>::<span class="ident">pin</span>(<span class="kw">async</span> <span class="kw">move</span> {
|
||||||
@ -929,7 +914,7 @@
|
|||||||
<span class="ident">key</span>: <span class="ident">Key</span>,
|
<span class="ident">key</span>: <span class="ident">Key</span>,
|
||||||
<span class="ident">cache_keygen</span>: <span class="ident">Box</span><span class="op"><</span><span class="kw">dyn</span> <span class="ident">Fn</span>(<span class="kw-2">&</span><span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">String</span><span class="op">></span>,
|
<span class="ident">cache_keygen</span>: <span class="ident">Box</span><span class="op"><</span><span class="kw">dyn</span> <span class="ident">Fn</span>(<span class="kw-2">&</span><span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">String</span><span class="op">></span>,
|
||||||
<span class="ident">ttl</span>: <span class="ident">String</span>,
|
<span class="ident">ttl</span>: <span class="ident">String</span>,
|
||||||
<span class="ident">addr</span>: <span class="ident">Addr</span><span class="op"><</span><span class="ident">RedisActor</span><span class="op">></span>,
|
<span class="ident">redis_client</span>: <span class="ident">RedisClient</span>,
|
||||||
<span class="ident">name</span>: <span class="ident">String</span>,
|
<span class="ident">name</span>: <span class="ident">String</span>,
|
||||||
<span class="ident">path</span>: <span class="ident">String</span>,
|
<span class="ident">path</span>: <span class="ident">String</span>,
|
||||||
<span class="ident">domain</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">String</span><span class="op">></span>,
|
<span class="ident">domain</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">String</span><span class="op">></span>,
|
||||||
@ -970,13 +955,11 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
<span class="kw">let</span> <span class="ident">res</span> <span class="op">=</span> <span class="self">self</span>
|
<span class="kw">let</span> <span class="ident">val</span> <span class="op">=</span> <span class="self">self</span>
|
||||||
.<span class="ident">addr</span>
|
.<span class="ident">redis_client</span>
|
||||||
.<span class="ident">send</span>(<span class="ident">Command</span>(<span class="macro">resp_array</span><span class="macro">!</span>[<span class="string">"GET"</span>, <span class="ident">cache_key</span>]))
|
.<span class="ident">send</span>(<span class="macro">resp_array</span><span class="macro">!</span>[<span class="string">"GET"</span>, <span class="ident">cache_key</span>])
|
||||||
.<span class="kw">await</span><span class="question-mark">?</span>;
|
.<span class="kw">await</span><span class="question-mark">?</span>;
|
||||||
|
|
||||||
<span class="kw">let</span> <span class="ident">val</span> <span class="op">=</span> <span class="ident">res</span>.<span class="ident">map_err</span>(<span class="ident">error</span>::<span class="ident">ErrorInternalServerError</span>)<span class="question-mark">?</span>;
|
|
||||||
|
|
||||||
<span class="kw">match</span> <span class="ident">val</span> {
|
<span class="kw">match</span> <span class="ident">val</span> {
|
||||||
<span class="ident">RespValue</span>::<span class="ident">Error</span>(<span class="ident">err</span>) <span class="op">=</span><span class="op">></span> {
|
<span class="ident">RespValue</span>::<span class="ident">Error</span>(<span class="ident">err</span>) <span class="op">=</span><span class="op">></span> {
|
||||||
<span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="ident">error</span>::<span class="ident">ErrorInternalServerError</span>(<span class="ident">err</span>));
|
<span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="ident">error</span>::<span class="ident">ErrorInternalServerError</span>(<span class="ident">err</span>));
|
||||||
@ -1008,6 +991,7 @@
|
|||||||
} <span class="kw">else</span> {
|
} <span class="kw">else</span> {
|
||||||
<span class="kw">let</span> <span class="ident">value</span>: <span class="ident">String</span> <span class="op">=</span> <span class="ident">iter</span>::<span class="ident">repeat</span>(())
|
<span class="kw">let</span> <span class="ident">value</span>: <span class="ident">String</span> <span class="op">=</span> <span class="ident">iter</span>::<span class="ident">repeat</span>(())
|
||||||
.<span class="ident">map</span>(<span class="op">|</span>()<span class="op">|</span> <span class="ident">OsRng</span>.<span class="ident">sample</span>(<span class="ident">Alphanumeric</span>))
|
.<span class="ident">map</span>(<span class="op">|</span>()<span class="op">|</span> <span class="ident">OsRng</span>.<span class="ident">sample</span>(<span class="ident">Alphanumeric</span>))
|
||||||
|
.<span class="ident">map</span>(<span class="ident">char</span>::<span class="ident">from</span>)
|
||||||
.<span class="ident">take</span>(<span class="number">32</span>)
|
.<span class="ident">take</span>(<span class="number">32</span>)
|
||||||
.<span class="ident">collect</span>();
|
.<span class="ident">collect</span>();
|
||||||
|
|
||||||
@ -1045,12 +1029,9 @@
|
|||||||
<span class="prelude-val">Ok</span>(<span class="ident">body</span>) <span class="op">=</span><span class="op">></span> <span class="ident">body</span>,
|
<span class="prelude-val">Ok</span>(<span class="ident">body</span>) <span class="op">=</span><span class="op">></span> <span class="ident">body</span>,
|
||||||
};
|
};
|
||||||
|
|
||||||
<span class="kw">let</span> <span class="ident">cmd</span> <span class="op">=</span> <span class="ident">Command</span>(<span class="macro">resp_array</span><span class="macro">!</span>[<span class="string">"SET"</span>, <span class="ident">cache_key</span>, <span class="ident">body</span>, <span class="string">"EX"</span>, <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">ttl</span>]);
|
<span class="self">self</span>.<span class="ident">redis_client</span>
|
||||||
|
.<span class="ident">send</span>(<span class="macro">resp_array</span><span class="macro">!</span>[<span class="string">"SET"</span>, <span class="ident">cache_key</span>, <span class="ident">body</span>, <span class="string">"EX"</span>, <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">ttl</span>])
|
||||||
<span class="self">self</span>.<span class="ident">addr</span>
|
.<span class="kw">await</span><span class="question-mark">?</span>;
|
||||||
.<span class="ident">send</span>(<span class="ident">cmd</span>)
|
|
||||||
.<span class="kw">await</span><span class="question-mark">?</span>
|
|
||||||
.<span class="ident">map_err</span>(<span class="ident">error</span>::<span class="ident">ErrorInternalServerError</span>)<span class="question-mark">?</span>;
|
|
||||||
|
|
||||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">jar</span>) <span class="op">=</span> <span class="ident">jar</span> {
|
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">jar</span>) <span class="op">=</span> <span class="ident">jar</span> {
|
||||||
<span class="kw">for</span> <span class="ident">cookie</span> <span class="kw">in</span> <span class="ident">jar</span>.<span class="ident">delta</span>() {
|
<span class="kw">for</span> <span class="ident">cookie</span> <span class="kw">in</span> <span class="ident">jar</span>.<span class="ident">delta</span>() {
|
||||||
@ -1066,19 +1047,18 @@
|
|||||||
<span class="kw">async</span> <span class="kw">fn</span> <span class="ident">clear_cache</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">key</span>: <span class="ident">String</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Result</span><span class="op"><</span>(), <span class="ident">Error</span><span class="op">></span> {
|
<span class="kw">async</span> <span class="kw">fn</span> <span class="ident">clear_cache</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">key</span>: <span class="ident">String</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Result</span><span class="op"><</span>(), <span class="ident">Error</span><span class="op">></span> {
|
||||||
<span class="kw">let</span> <span class="ident">cache_key</span> <span class="op">=</span> (<span class="self">self</span>.<span class="ident">cache_keygen</span>)(<span class="kw-2">&</span><span class="ident">key</span>);
|
<span class="kw">let</span> <span class="ident">cache_key</span> <span class="op">=</span> (<span class="self">self</span>.<span class="ident">cache_keygen</span>)(<span class="kw-2">&</span><span class="ident">key</span>);
|
||||||
|
|
||||||
<span class="kw">match</span> <span class="self">self</span>.<span class="ident">addr</span>.<span class="ident">send</span>(<span class="ident">Command</span>(<span class="macro">resp_array</span><span class="macro">!</span>[<span class="string">"DEL"</span>, <span class="ident">cache_key</span>])).<span class="kw">await</span> {
|
<span class="kw">match</span> <span class="self">self</span>
|
||||||
<span class="prelude-val">Err</span>(<span class="ident">e</span>) <span class="op">=</span><span class="op">></span> <span class="prelude-val">Err</span>(<span class="ident">Error</span>::<span class="ident">from</span>(<span class="ident">e</span>)),
|
.<span class="ident">redis_client</span>
|
||||||
<span class="prelude-val">Ok</span>(<span class="ident">res</span>) <span class="op">=</span><span class="op">></span> {
|
.<span class="ident">send</span>(<span class="macro">resp_array</span><span class="macro">!</span>[<span class="string">"DEL"</span>, <span class="ident">cache_key</span>])
|
||||||
<span class="kw">match</span> <span class="ident">res</span> {
|
.<span class="kw">await</span><span class="question-mark">?</span>
|
||||||
|
{
|
||||||
<span class="comment">// redis responds with number of deleted records</span>
|
<span class="comment">// redis responds with number of deleted records</span>
|
||||||
<span class="prelude-val">Ok</span>(<span class="ident">RespValue</span>::<span class="ident">Integer</span>(<span class="ident">x</span>)) <span class="kw">if</span> <span class="ident">x</span> <span class="op">></span> <span class="number">0</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">Ok</span>(()),
|
<span class="ident">RespValue</span>::<span class="ident">Integer</span>(<span class="ident">x</span>) <span class="kw">if</span> <span class="ident">x</span> <span class="op">></span> <span class="number">0</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">Ok</span>(()),
|
||||||
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">Err</span>(<span class="ident">error</span>::<span class="ident">ErrorInternalServerError</span>(
|
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">Err</span>(<span class="ident">error</span>::<span class="ident">ErrorInternalServerError</span>(
|
||||||
<span class="string">"failed to remove session from cache"</span>,
|
<span class="string">"failed to remove session from cache"</span>,
|
||||||
)),
|
)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class="doccomment">/// invalidates session cookie</span>
|
<span class="doccomment">/// invalidates session cookie</span>
|
||||||
<span class="kw">fn</span> <span class="ident">remove_cookie</span><span class="op"><</span><span class="ident">B</span><span class="op">></span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">res</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">ServiceResponse</span><span class="op"><</span><span class="ident">B</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Result</span><span class="op"><</span>(), <span class="ident">Error</span><span class="op">></span> {
|
<span class="kw">fn</span> <span class="ident">remove_cookie</span><span class="op"><</span><span class="ident">B</span><span class="op">></span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">res</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">ServiceResponse</span><span class="op"><</span><span class="ident">B</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Result</span><span class="op"><</span>(), <span class="ident">Error</span><span class="op">></span> {
|
||||||
@ -1120,7 +1100,7 @@
|
|||||||
.<span class="ident">unwrap_or</span>(<span class="prelude-val">Some</span>(<span class="number">0</span>))
|
.<span class="ident">unwrap_or</span>(<span class="prelude-val">Some</span>(<span class="number">0</span>))
|
||||||
.<span class="ident">unwrap_or</span>(<span class="number">0</span>);
|
.<span class="ident">unwrap_or</span>(<span class="number">0</span>);
|
||||||
|
|
||||||
<span class="prelude-val">Ok</span>(<span class="ident">HttpResponse</span>::<span class="prelude-val">Ok</span>().<span class="ident">json</span>(<span class="ident">IndexResponse</span> { <span class="ident">user_id</span>, <span class="ident">counter</span> }))
|
<span class="prelude-val">Ok</span>(<span class="ident">HttpResponse</span>::<span class="prelude-val">Ok</span>().<span class="ident">json</span>(<span class="kw-2">&</span><span class="ident">IndexResponse</span> { <span class="ident">user_id</span>, <span class="ident">counter</span> }))
|
||||||
}
|
}
|
||||||
|
|
||||||
<span class="kw">async</span> <span class="kw">fn</span> <span class="ident">do_something</span>(<span class="ident">session</span>: <span class="ident">Session</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">HttpResponse</span><span class="op">></span> {
|
<span class="kw">async</span> <span class="kw">fn</span> <span class="ident">do_something</span>(<span class="ident">session</span>: <span class="ident">Session</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">HttpResponse</span><span class="op">></span> {
|
||||||
@ -1131,7 +1111,7 @@
|
|||||||
.<span class="ident">map_or</span>(<span class="number">1</span>, <span class="op">|</span><span class="ident">inner</span><span class="op">|</span> <span class="ident">inner</span> <span class="op">+</span> <span class="number">1</span>);
|
.<span class="ident">map_or</span>(<span class="number">1</span>, <span class="op">|</span><span class="ident">inner</span><span class="op">|</span> <span class="ident">inner</span> <span class="op">+</span> <span class="number">1</span>);
|
||||||
<span class="ident">session</span>.<span class="ident">set</span>(<span class="string">"counter"</span>, <span class="ident">counter</span>)<span class="question-mark">?</span>;
|
<span class="ident">session</span>.<span class="ident">set</span>(<span class="string">"counter"</span>, <span class="ident">counter</span>)<span class="question-mark">?</span>;
|
||||||
|
|
||||||
<span class="prelude-val">Ok</span>(<span class="ident">HttpResponse</span>::<span class="prelude-val">Ok</span>().<span class="ident">json</span>(<span class="ident">IndexResponse</span> { <span class="ident">user_id</span>, <span class="ident">counter</span> }))
|
<span class="prelude-val">Ok</span>(<span class="ident">HttpResponse</span>::<span class="prelude-val">Ok</span>().<span class="ident">json</span>(<span class="kw-2">&</span><span class="ident">IndexResponse</span> { <span class="ident">user_id</span>, <span class="ident">counter</span> }))
|
||||||
}
|
}
|
||||||
|
|
||||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Deserialize</span>)]</span>
|
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Deserialize</span>)]</span>
|
||||||
@ -1152,7 +1132,7 @@
|
|||||||
.<span class="ident">unwrap_or</span>(<span class="prelude-val">Some</span>(<span class="number">0</span>))
|
.<span class="ident">unwrap_or</span>(<span class="prelude-val">Some</span>(<span class="number">0</span>))
|
||||||
.<span class="ident">unwrap_or</span>(<span class="number">0</span>);
|
.<span class="ident">unwrap_or</span>(<span class="number">0</span>);
|
||||||
|
|
||||||
<span class="prelude-val">Ok</span>(<span class="ident">HttpResponse</span>::<span class="prelude-val">Ok</span>().<span class="ident">json</span>(<span class="ident">IndexResponse</span> {
|
<span class="prelude-val">Ok</span>(<span class="ident">HttpResponse</span>::<span class="prelude-val">Ok</span>().<span class="ident">json</span>(<span class="kw-2">&</span><span class="ident">IndexResponse</span> {
|
||||||
<span class="ident">user_id</span>: <span class="prelude-val">Some</span>(<span class="ident">id</span>),
|
<span class="ident">user_id</span>: <span class="prelude-val">Some</span>(<span class="ident">id</span>),
|
||||||
<span class="ident">counter</span>,
|
<span class="ident">counter</span>,
|
||||||
}))
|
}))
|
||||||
|
Loading…
Reference in New Issue
Block a user