<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="`LogoutBehaviour` controls what actions are going to be performed when `Identity::logout` is invoked."><metaname="keywords"content="rust, rustlang, rust-lang, LogoutBehaviour"><title>LogoutBehaviour in actix_identity::config - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><linkrel="stylesheet"href="../../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../../static.files/rustdoc-eabf764633b9d7be.css"id="mainThemeStyle"><linkrel="stylesheet"id="themeStyle"href="../../static.files/light-777f3e9583f8c92d.css"><linkrel="stylesheet"disabledhref="../../static.files/dark-e2f4109f2e82e3af.css"><linkrel="stylesheet"disabledhref="../../static.files/ayu-c360e709a65bed99.css"><scriptid="default-settings"></script><scriptsrc="../../static.files/storage-d43fa987303ecbbb.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><linkrel="stylesheet"href="../../static.files/noscript-13285aec31fa243e.css"></noscript><linkrel="alternate icon"type="image/png"href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><linkrel="alternate icon"type="image/png"href="../../static.files/favicon-32x32-422f7d1d52889060.png"><linkrel="icon"type="image/svg+xml"href="../../static.files/favicon-2c020d218678b618.svg"></head><bodyclass="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle">☰</button><aclass="sidebar-logo"href="../../actix_identity/index.html"><divclass="logo-container"><imgclass="rust-logo"src="../../static.files/rust-logo-151179464ae7ed46.svg"alt="logo"></div></a><h2></h2></nav><navclass="sidebar"><aclass="sidebar-logo"href="../../actix_identity/index.html"><divclass="logo-container"><imgclass="rust-logo"src="../../static.files/rust-logo-151179464ae7ed46.svg"alt="logo"></div></a><h2class="location"><ahref="#">LogoutBehaviour</a></h2><divclass="sidebar-elems"><section><h3><ahref="#variants">Variants</a></h3><ulclass="block"><li><ahref="#variant.DeleteIdentityKeys">DeleteIdentityKeys</a></li><li><ahref="#variant.PurgeSession">PurgeSession</a></li></ul><h3><ahref="#trait-implementations">Trait Implementations</a></h3><ulclass="block"><li><ahref="#impl-Clone-for-LogoutBehaviour">Clone</a></li><li><ahref="#impl-Debug-for-LogoutBehaviour">Debug</a></li></ul><h3><ahref="#synthetic-implementations">Auto Trait Implementations</a></h3><ulclass="block"><li><ahref="#impl-RefUnwindSafe-for-LogoutBehaviour">RefUnwindSafe</a></li><li><ahref="#impl-Send-for-LogoutBehaviour">Send</a></li><li><ahref="#impl-Sync-for-LogoutBehaviour">Sync</a></li><li><ahref="#impl-Unpin-for-LogoutBehaviour">Unpin</a></li><li><ahref="#impl-UnwindSafe-for-LogoutBehaviour">UnwindSafe</a></li></ul><h3><ahref="#blanket-implementations">Blanket Implementations</a></h3><ulclass="block"><li><ahref="#impl-Any-for-LogoutBehaviour">Any</a></li><li><ahref="#impl-Borrow%3CT%3E-for-LogoutBehaviour">Borrow<T></a
}</code></pre></div><detailsclass="rustdoc-toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p><code>LogoutBehaviour</code> controls what actions are going to be performed when <ahref="../struct.Identity.html#method.logout"><code>Identity::logout</code></a> is
invoked.</p>
</div></details><h2id="variants"class="variants small-section-header">Variants (Non-exhaustive)<ahref="#variants"class="anchor"></a></h2><detailsclass="rustdoc-toggle non-exhaustive"><summaryclass="hideme"><span>This enum is marked as non-exhaustive</span></summary><divclass="docblock">Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.</div></details><h3id="variant.PurgeSession"class="variant small-section-header"><ahref="#variant.PurgeSession"class="anchor field"></a><code>PurgeSession</code></h3><divclass="docblock"><p>When <ahref="../struct.Identity.html#method.logout"><code>Identity::logout</code></a> is called, purge the current session.</p>
<p>This behaviour might be desirable when you have stored additional information in the
session state that are tied to the user’s identity and should not be retained after logout.</p>
</div><h3id="variant.DeleteIdentityKeys"class="variant small-section-header"><ahref="#variant.DeleteIdentityKeys"class="anchor field"></a><code>DeleteIdentityKeys</code></h3><divclass="docblock"><p>When <ahref="../struct.Identity.html#method.logout"><code>Identity::logout</code></a> is called, remove the identity
information from the current session state. The session itself is not destroyed.</p>
<p>This behaviour might be desirable when you have stored information in the session state that
is not tied to the user’s identity and should be retained after logout.</p>
</div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"><summary><sectionid="impl-Instrument-for-LogoutBehaviour"class="impl has-srclink"><aclass="srclink rightside"href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#276">source</a><ahref="#impl-Instrument-for-LogoutBehaviour"class="anchor"></a><h3class="code-header">impl<T><aclass="trait"href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html"title="trait tracing::instrument::Instrument">Instrument</a> for T</h3></section></summary><divclass="impl-items"><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.instrument"class="method trait-impl has-srclink"><aclass="srclink rightside"href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#82">source</a><ahref="#method.instrument"class="anchor"></a><h4class="code-header">fn <ahref="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.instrument"class="fnname">instrument</a>(self, span: <aclass="struct"href="https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html"title="struct tracing::span::Span">Span</a>) -><aclass="struct"href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.Instrumented.html"title="struct tracing::instrument::Instrumented">Instrumented</a><Self></h4></section></summary><divclass='docblock'>Instruments this type with the provided <ahref="https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html"title="Span"><code>Span</code></a>, returning an
<code>Instrumented</code> wrapper. <ahref="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.in_current_span"class="method trait-impl has-srclink"><aclass="srclink rightside"href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#121">source</a><ahref="#method.in_current_span"class="anchor"></a><h4class="code-header">fn <ahref="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.in_current_span"class="fnname">in_current_span</a>(self) -><aclass="struct"href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.Instrumented.html"title="struct tracing::instrument::Instrumented">Instrumented</a><Self></h4></section></summary><divclass='docblock'>Instruments this type with the <ahref="https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html#method.current">current</a><ahref="https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html"><code>Span</code></a>, returning an
<ahref="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.WithDispatch.html"title="WithDispatch"><code>WithDispatch</code></a> wrapper. <ahref="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.WithSubscriber.html#method.with_subscriber">Read more</a></div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.with_current_subscriber"class="method trait-impl has-srclink"><aclass="srclink rightside"href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#221">source</a><ahref="#method.with_current_subscriber"class="anchor"></a><h4class="code-header">fn <ahref="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.WithSubscriber.html#method.with_current_subscriber"class="fnname">with_current_subscriber</a>(self) -><aclass="struct"href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.WithDispatch.html"title="struct tracing::instrument::WithDispatch">WithDispatch</a><Self></h4></section></summary><divclass='docblock'>Attaches the current <ahref="https://docs.rs/tracing/0.1.37/tracing/dispatcher/index.html#setting-the-default-subscriber">default</a><ahref="https://docs.rs/tracing-core/0.1.22/tracing_core/subscriber/trait.Subscriber.html"><code>Subscriber</code></a> to this type, returning a