1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-24 16:02:59 +01:00
actix-extras/actix_session/config/struct.SessionMiddlewareBuilder.html

60 lines
42 KiB
HTML
Raw Normal View History

<!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="A fluent, customized [`SessionMiddleware`] builder."><meta name="keywords" content="rust, rustlang, rust-lang, SessionMiddlewareBuilder"><title>SessionMiddlewareBuilder in actix_session::config - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../actix_session/index.html"><div class="logo-container"><img src="https://actix.rs/img/logo.png" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../actix_session/index.html"><div class="logo-container">
<img src="https://actix.rs/img/logo.png" alt="logo"></div></a><h2 class="location"><a href="#">SessionMiddlewareBuilder</a></h2><div class="sidebar-elems"><section><div class="block"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><ul><li><a href="#method.build">build</a></li><li><a href="#method.cookie_content_security">cookie_content_security</a></li><li><a href="#method.cookie_domain">cookie_domain</a></li><li><a href="#method.cookie_http_only">cookie_http_only</a></li><li><a href="#method.cookie_name">cookie_name</a></li><li><a href="#method.cookie_path">cookie_path</a></li><li><a href="#method.cookie_same_site">cookie_same_site</a></li><li><a href="#method.cookie_secure">cookie_secure</a></li><li><a href="#method.session_lifecycle">session_lifecycle</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul><li><a href="#impl-RefUnwindSafe-for-SessionMiddlewareBuilder%3CStore%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-SessionMiddlewareBuilder%3CStore%3E">Send</a></li><li><a href="#impl-Sync-for-SessionMiddlewareBuilder%3CStore%3E">Sync</a></li><li><a href="#impl-Unpin-for-SessionMiddlewareBuilder%3CStore%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-SessionMiddlewareBuilder%3CStore%3E">UnwindSafe</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><ul><li><a href="#impl-Any-for-SessionMiddlewareBuilder%3CStore%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-SessionMiddlewareBuilder%3CStore%3E">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-SessionMiddlewareBuilder%3CStore%3E">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-From%3CT%3E-for-SessionMiddlewareBuilder%3CStore%3E">From&lt;T&gt;</a></li><li><a href="#impl-Instrument-for-SessionMiddlewareBuilder%3CStore%3E">Instrument</a></li><li><a href="#impl-Into%3CU%3E-for-SessionMiddlewareBuilder%3CStore%3E">Into&lt;U&gt;</a></li><li><a href="#impl-Same%3CT%3E-for-SessionMiddlewareBuilder%3CStore%3E">Same&lt;T&gt;</a></li><li><a href="#impl-TryFrom%3CU%3E-for-SessionMiddlewareBuilder%3CStore%3E">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-SessionMiddlewareBuilder%3CStore%3E">TryInto&lt;U&gt;</a></li><li><a href="#impl-VZip%3CV%3E-for-SessionMiddlewareBuilder%3CStore%3E">VZip&lt;V&gt;</a></li><li><a href="#impl-WithSubscriber-for-SessionMiddlewareBuilder%3CStore%3E">WithSubscriber</a></li></ul></div></section><h2 class="location"><a href="index.html">In actix_session::config</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../actix_session/index.html">
<img src="https://actix.rs/img/logo.png" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">actix_session</a>::<wbr><a href="index.html">config</a>::<wbr><a class="struct" href="#">SessionMiddlewareBuilder</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/actix_session/config.rs.html#214-217">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct SessionMiddlewareBuilder&lt;Store:&nbsp;<a class="trait" href="../storage/trait.SessionStore.html" title="trait actix_session::storage::SessionStore">SessionStore</a>&gt; { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A fluent, customized <a href="../struct.SessionMiddleware.html" title="SessionMiddleware"><code>SessionMiddleware</code></a> builder.</p>
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-SessionMiddlewareBuilder%3CStore%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/actix_session/config.rs.html#219-351">source</a><a href="#impl-SessionMiddlewareBuilder%3CStore%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;Store:&nbsp;<a class="trait" href="../storage/trait.SessionStore.html" title="trait actix_session::storage::SessionStore">SessionStore</a>&gt; <a class="struct" href="struct.SessionMiddlewareBuilder.html" title="struct actix_session::config::SessionMiddlewareBuilder">SessionMiddlewareBuilder</a>&lt;Store&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cookie_name" class="method has-srclink"><a class="srclink rightside" href="../../src/actix_session/config.rs.html#230-233">source</a><h4 class="code-header">pub fn <a href="#method.cookie_name" class="fnname">cookie_name</a>(self, name: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>Set the name of the cookie used to store the session ID.</p>
<p>Defaults to <code>id</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cookie_secure" class="method has-srclink"><a class="srclink rightside" href="../../src/actix_session/config.rs.html#241-244">source</a><h4 class="code-header">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>) -&gt; Self</h4></section></summary><div class="docblock"><p>Set the <code>Secure</code> attribute for the cookie used to store the session ID.</p>
<p>If the cookie is set as secure, it will only be transmitted when the connection is secure
(using <code>https</code>).</p>
<p>Default is <code>true</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.session_lifecycle" class="method has-srclink"><a class="srclink rightside" href="../../src/actix_session/config.rs.html#266-287">source</a><h4 class="code-header">pub fn <a href="#method.session_lifecycle" class="fnname">session_lifecycle</a>&lt;S:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="enum.SessionLifecycle.html" title="enum actix_session::config::SessionLifecycle">SessionLifecycle</a>&gt;&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;self,<br>&nbsp;&nbsp;&nbsp;&nbsp;session_lifecycle: S<br>) -&gt; Self</h4></section></summary><div class="docblock"><p>Determines what type of session cookie should be used and how its lifecycle should be managed.
Check out <a href="enum.SessionLifecycle.html" title="SessionLifecycle"><code>SessionLifecycle</code></a>s documentation for more details on the available options.</p>
<p>Default is <a href="enum.SessionLifecycle.html#variant.BrowserSession" title="SessionLifecycle::BrowserSession"><code>SessionLifecycle::BrowserSession</code></a>.</p>
<h5 id="examples"><a href="#examples">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>actix_web::cookie::{Key, time::Duration};
<span class="kw">use </span>actix_session::{SessionMiddleware, config::PersistentSession};
<span class="kw">use </span>actix_session::storage::CookieSessionStore;
<span class="kw">const </span>SECS_IN_WEEK: i64 = <span class="number">60 </span>* <span class="number">60 </span>* <span class="number">24 </span>* <span class="number">7</span>;
<span class="comment">// creates a session middleware with a time-to-live (expiry) of 1 week
</span>SessionMiddleware::builder(CookieSessionStore::default(), Key::from(<span class="kw-2">&amp;</span>[<span class="number">0</span>; <span class="number">64</span>]))
.session_lifecycle(
PersistentSession::default().session_ttl(Duration::seconds(SECS_IN_WEEK))
)
.build();</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cookie_same_site" class="method has-srclink"><a class="srclink rightside" href="../../src/actix_session/config.rs.html#292-295">source</a><h4 class="code-header">pub fn <a href="#method.cookie_same_site" class="fnname">cookie_same_site</a>(self, same_site: <a class="enum" href="https://docs.rs/cookie/0.16/cookie/draft/enum.SameSite.html" title="enum cookie::draft::SameSite">SameSite</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>Set the <code>SameSite</code> attribute for the cookie used to store the session ID.</p>
<p>By default, the attribute is set to <code>Lax</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cookie_path" class="method has-srclink"><a class="srclink rightside" href="../../src/actix_session/config.rs.html#300-303">source</a><h4 class="code-header">pub fn <a href="#method.cookie_path" class="fnname">cookie_path</a>(self, path: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>Set the <code>Path</code> attribute for the cookie used to store the session ID.</p>
<p>By default, the attribute is set to <code>/</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cookie_domain" class="method has-srclink"><a class="srclink rightside" href="../../src/actix_session/config.rs.html#311-314">source</a><h4 class="code-header">pub fn <a href="#method.cookie_domain" class="fnname">cookie_domain</a>(self, domain: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;) -&gt; Self</h4></section></summary><div class="docblock"><p>Set the <code>Domain</code> attribute for the cookie used to store the session ID.</p>
<p>Use <code>None</code> to leave the attribute unspecified. If unspecified, the attribute defaults
to the same host that set the cookie, excluding subdomains.</p>
<p>By default, the attribute is left unspecified.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cookie_content_security" class="method has-srclink"><a class="srclink rightside" href="../../src/actix_session/config.rs.html#330-333">source</a><h4 class="code-header">pub fn <a href="#method.cookie_content_security" class="fnname">cookie_content_security</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self,<br>&nbsp;&nbsp;&nbsp;&nbsp;content_security: <a class="enum" href="enum.CookieContentSecurity.html" title="enum actix_session::config::CookieContentSecurity">CookieContentSecurity</a><br>) -&gt; Self</h4></section></summary><div class="docblock"><p>Choose how the session cookie content should be secured.</p>
<ul>
<li><a href="enum.CookieContentSecurity.html#variant.Private" title="CookieContentSecurity::Private"><code>CookieContentSecurity::Private</code></a> selects encrypted cookie content.</li>
<li><a href="enum.CookieContentSecurity.html#variant.Signed" title="CookieContentSecurity::Signed"><code>CookieContentSecurity::Signed</code></a> selects signed cookie content.</li>
</ul>
<h5 id="default"><a href="#default">Default</a></h5>
<p>By default, the cookie content is encrypted. Encrypted was chosen instead of signed as
default because it reduces the chances of sensitive information being exposed in the session
key by accident, regardless of <a href="../storage/trait.SessionStore.html" title="SessionStore"><code>SessionStore</code></a> implementation you chose to use.</p>
<p>For example, if you are using cookie-based storage, you definitely want the cookie content
to be encrypted—the whole session state is embedded in the cookie! If you are using
Redis-based storage, signed is more than enough - the cookie content is just a unique
tamper-proof session key.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cookie_http_only" class="method has-srclink"><a class="srclink rightside" href="../../src/actix_session/config.rs.html#341-344">source</a><h4 class="code-header">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>) -&gt; Self</h4></section></summary><div class="docblock"><p>Set the <code>HttpOnly</code> attribute for the cookie used to store the session ID.</p>
<p>If the cookie is set as <code>HttpOnly</code>, it will not be visible to any JavaScript snippets
running in the browser.</p>
<p>Default is <code>true</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.build" class="method has-srclink"><a class="srclink rightside" href="../../src/actix_session/config.rs.html#348-350">source</a><h4 class="code-header">pub fn <a href="#method.build" class="fnname">build</a>(self) -&gt; <a class="struct" href="../struct.SessionMiddleware.html" title="struct actix_session::SessionMiddleware">SessionMiddleware</a>&lt;Store&gt;</h4></section></summary><div class="docblock"><p>Finalise the builder and return a <a href="../struct.SessionMiddleware.html" title="SessionMiddleware"><code>SessionMiddleware</code></a> instance.</p>
</div></details></div></details></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"><section id="impl-RefUnwindSafe-for-SessionMiddlewareBuilder%3CStore%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-SessionMiddlewareBuilder%3CStore%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;Store&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.SessionMiddlewareBuilder.html" title="struct actix_session::config::SessionMiddlewareBuilder">SessionMiddlewareBuilder</a>&lt;Store&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Store: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</span></h3></section><section id="impl-Send-for-SessionMiddlewareBuilder%3CStore%3E" class="impl has-srclink"><a href="#impl-Send-for-SessionMiddlewareBuilder%3CStore%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;Store&gt; <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="struct.SessionMiddlewareBuilder.html" title="struct actix_session::config::SessionMiddlewareBuilder">SessionMiddlewareBuilder</a>&lt;Store&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Store: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</span></h3></section><section id="impl-Sync-for-SessionMiddlewareBuilder%3CStore%3E" class="impl has-srclink"><a href="#impl-Sync-for-SessionMiddlewareBuilder%3CStore%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;Store&gt; <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="struct.SessionMiddlewareBuilder.html" title="struct actix_session::config::SessionMiddlewareBuilder">SessionMiddlewareBuilder</a>&lt;Store&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Store: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</span></h3></section><section id="impl-Unpin-for-SessionMiddlewareBuilder%3CStore%3E" class="impl has-srclink"><a href="#impl-Unpin-for-SessionMiddlewareBuilder%3CStore%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;Store&gt; <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="struct.SessionMiddlewareBuilder.html" title="struct actix_session::config::SessionMiddlewareBuilder">SessionMiddlewareBuilder</a>&lt;Store&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Store: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</span></h3></section><section id="impl-UnwindSafe-for-SessionMiddlewareBuilder%3CStore%3E" class="impl has-srclink"><a href="#impl-UnwindSafe-for-SessionMiddlewareBuilder%3CStore%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;Store&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.SessionMiddlewareBuilder.html" title="struct actix_session::config::SessionMiddlewareBuilder">SessionMiddlewareBuilder</a>&lt;Store&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Store: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe:
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Instrument-for-SessionMiddlewareBuilder%3CStore%3E" class="impl has-srclink"><a class="srclink rightside" href="https://docs.rs/tracing/0.1.36/src/tracing/instrument.rs.html#276">source</a><a href="#impl-Instrument-for-SessionMiddlewareBuilder%3CStore%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://docs.rs/tracing/0.1.36/tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.instrument" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://docs.rs/tracing/0.1.36/src/tracing/instrument.rs.html#82">source</a><a href="#method.instrument" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/tracing/0.1.36/tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.36/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -&gt; <a class="struct" href="https://docs.rs/tracing/0.1.36/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a>&lt;Self&gt;</h4></section></summary><div class='docblock'>Instruments this type with the provided <a href="https://docs.rs/tracing/0.1.36/tracing/span/struct.Span.html" title="Span"><code>Span</code></a>, returning an
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.36/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.in_current_span" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://docs.rs/tracing/0.1.36/src/tracing/instrument.rs.html#121">source</a><a href="#method.in_current_span" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/tracing/0.1.36/tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -&gt; <a class="struct" href="https://docs.rs/tracing/0.1.36/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a>&lt;Self&gt;</h4></section></summary><div class='docblock'>Instruments this type with the <a href="https://docs.rs/tracing/0.1.36/tracing/span/struct.Span.html#method.current">current</a> <a href="https://docs.rs/tracing/0.1.36/tracing/span/struct.Span.html"><code>Span</code></a>, returning an
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.36/tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-SessionMiddlewareBuilder%3CStore%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#543">source</a><a href="#impl-Into%3CU%3E-for-SessionMiddlewareBuilder%3CStore%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#551">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Same%3CT%3E-for-SessionMiddlewareBuilder%3CStore%3E" class="impl has-srclink"><a class="srclink rightside" href="https://docs.rs/typenum/1.15.0/src/typenum/type_operators.rs.html#34">source</a><a href="#impl-Same%3CT%3E-for-SessionMiddlewareBuilder%3CStore%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://docs.rs/typenum/1.15.0/typenum/type_operators/trait.Same.html" title="trait typenum::type_operators::Same">Same</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output" class="anchor"></a><h4 class="code-header">type <a href="https://docs.rs/typenum/1.15.0/typenum/type_operators/trait.Same.html#associatedtype.Output" class="associatedtype">Output</a> = T</h4></section></summary><div class='docblock'>Should always be <code>Self</code></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-SessionMiddlewareBuilder%3CStore%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#601">source</a><a href="#impl-TryFrom%3CU%3E-for-SessionMiddlewareBuilder%3CStore%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#607">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-SessionMiddlewareBuilder%3CStore%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#586">source</a><a href="#impl-TryInto%3CU%3E-for-SessionMiddlewareBuilder%3C
<a href="https://docs.rs/tracing/0.1.36/tracing/instrument/struct.WithDispatch.html" title="WithDispatch"><code>WithDispatch</code></a> wrapper. <a href="https://docs.rs/tracing/0.1.36/tracing/instrument/trait.WithSubscriber.html#method.with_subscriber">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_current_subscriber" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://docs.rs/tracing/0.1.36/src/tracing/instrument.rs.html#221">source</a><a href="#method.with_current_subscriber" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/tracing/0.1.36/tracing/instrument/trait.WithSubscriber.html#method.with_current_subscriber" class="fnname">with_current_subscriber</a>(self) -&gt; <a class="struct" href="https://docs.rs/tracing/0.1.36/tracing/instrument/struct.WithDispatch.html" title="struct tracing::instrument::WithDispatch">WithDispatch</a>&lt;Self&gt;</h4></section></summary><div class='docblock'>Attaches the current <a href="https://docs.rs/tracing/0.1.36/tracing/dispatcher/index.html#setting-the-default-subscriber">default</a> <a href="https://docs.rs/tracing-core/0.1.22/tracing_core/subscriber/trait.Subscriber.html"><code>Subscriber</code></a> to this type, returning a
<a href="https://docs.rs/tracing/0.1.36/tracing/instrument/struct.WithDispatch.html" title="WithDispatch"><code>WithDispatch</code></a> wrapper. <a href="https://docs.rs/tracing/0.1.36/tracing/instrument/trait.WithSubscriber.html#method.with_current_subscriber">Read more</a></div></details></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (9062b780b 2022-09-21)" ></div></body></html>