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

Deploying to gh-pages from @ 441d604c000145e9ecb6e442cce001d21d79f244 🚀

This commit is contained in:
robjtede 2023-01-07 02:24:32 +00:00
parent 367a6de033
commit a62a50adfa
13 changed files with 56 additions and 222 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
<!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="Failure modes of identity operations."><meta name="keywords" content="rust, rustlang, rust-lang, error"><title>actix_identity::error - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-a67221f24dabeddb.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../static.files/light-4743e13df3dfe8c4.css"><link rel="stylesheet" disabled href="../../static.files/dark-0e1b889528bd466b.css"><link rel="stylesheet" disabled href="../../static.files/ayu-65289d5d067c7c66.css"><script id="default-settings" ></script><script src="../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../../static.files/main-bc1b32400f872ddb.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="logo-container" href="../../actix_identity/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../actix_identity/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">Module error</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Module <a href="../index.html">actix_identity</a>::<wbr><a class="mod" href="#">error</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/actix_identity/error.rs.html#1-156">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Failure modes of identity operations.</p> <!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="Failure modes of identity operations."><meta name="keywords" content="rust, rustlang, rust-lang, error"><title>actix_identity::error - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-a67221f24dabeddb.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../static.files/light-4743e13df3dfe8c4.css"><link rel="stylesheet" disabled href="../../static.files/dark-0e1b889528bd466b.css"><link rel="stylesheet" disabled href="../../static.files/ayu-65289d5d067c7c66.css"><script id="default-settings" ></script><script src="../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../../static.files/main-bc1b32400f872ddb.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="logo-container" href="../../actix_identity/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../actix_identity/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">Module error</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Module <a href="../index.html">actix_identity</a>::<wbr><a class="mod" href="#">error</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/actix_identity/error.rs.html#1-70">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Failure modes of identity operations.</p>
</div></details><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.LoginError.html" title="actix_identity::error::LoginError struct">LoginError</a></div><div class="item-right docblock-short">Error that can occur during login attempts.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.LostIdentityError.html" title="actix_identity::error::LostIdentityError struct">LostIdentityError</a></div><div class="item-right docblock-short">The identity information has been lost.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.MissingIdentityError.html" title="actix_identity::error::MissingIdentityError struct">MissingIdentityError</a></div><div class="item-right docblock-short">There is no identity information attached to the current session.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SessionExpiryError.html" title="actix_identity::error::SessionExpiryError struct">SessionExpiryError</a></div><div class="item-right docblock-short">Error encountered when working with a session that has expired.</div></div></div><h2 id="enums" class="small-section-header"><a href="#enums">Enums</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.GetIdentityError.html" title="actix_identity::error::GetIdentityError enum">GetIdentityError</a></div><div class="item-right docblock-short">Errors that can occur while retrieving an identity.</div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_identity" data-themes="" data-resource-suffix="" data-rustdoc-version="1.68.0-nightly (0fb8b72ce 2023-01-06)" data-search-js="search-181581080540673f.js" data-settings-js="settings-bebeae96e00e4617.js" data-settings-css="settings-58836c674e2f7bd2.css" ></div></body></html> </div></details><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.LoginError.html" title="actix_identity::error::LoginError struct">LoginError</a></div><div class="item-right docblock-short">Error that can occur during login attempts.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.LostIdentityError.html" title="actix_identity::error::LostIdentityError struct">LostIdentityError</a></div><div class="item-right docblock-short">The identity information has been lost.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.MissingIdentityError.html" title="actix_identity::error::MissingIdentityError struct">MissingIdentityError</a></div><div class="item-right docblock-short">There is no identity information attached to the current session.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SessionExpiryError.html" title="actix_identity::error::SessionExpiryError struct">SessionExpiryError</a></div><div class="item-right docblock-short">Error encountered when working with a session that has expired.</div></div></div><h2 id="enums" class="small-section-header"><a href="#enums">Enums</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.GetIdentityError.html" title="actix_identity::error::GetIdentityError enum">GetIdentityError</a></div><div class="item-right docblock-short">Errors that can occur while retrieving an identity.</div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_identity" data-themes="" data-resource-suffix="" data-rustdoc-version="1.68.0-nightly (0fb8b72ce 2023-01-06)" data-search-js="search-181581080540673f.js" data-settings-js="settings-bebeae96e00e4617.js" data-settings-css="settings-58836c674e2f7bd2.css" ></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1 @@
<!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="Documentation for Rustdoc"><meta name="keywords" content="rust, rustlang, rust-lang"><title>Rustdoc help</title><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="./static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="./static.files/rustdoc-a67221f24dabeddb.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="./static.files/light-4743e13df3dfe8c4.css"><link rel="stylesheet" disabled href="./static.files/dark-0e1b889528bd466b.css"><link rel="stylesheet" disabled href="./static.files/ayu-65289d5d067c7c66.css"><script id="default-settings" ></script><script src="./static.files/storage-d43fa987303ecbbb.js"></script><script defer src="./static.files/main-bc1b32400f872ddb.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-13285aec31fa243e.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="logo-container" href="./actix_settings/index.html"><img src="https://actix.rs/img/logo.png" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="./actix_settings/index.html"> <!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="Documentation for Rustdoc"><meta name="keywords" content="rust, rustlang, rust-lang"><title>Rustdoc help</title><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="./static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="./static.files/rustdoc-a67221f24dabeddb.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="./static.files/light-4743e13df3dfe8c4.css"><link rel="stylesheet" disabled href="./static.files/dark-0e1b889528bd466b.css"><link rel="stylesheet" disabled href="./static.files/ayu-65289d5d067c7c66.css"><script id="default-settings" ></script><script src="./static.files/storage-d43fa987303ecbbb.js"></script><script defer src="./static.files/main-bc1b32400f872ddb.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="./static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="./static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="./static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="logo-container" href="./actix_protobuf/index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="./actix_protobuf/index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location">Help</h2><div class="sidebar-elems"></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="./help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="./settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="./static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Rustdoc help</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section><p>You need to enable Javascript to use keyboard commands or search.</p><p>For more information, browse the <a href="https://doc.rust-lang.org/rustdoc/">rustdoc handbook</a>.</p></section></noscript></section></div></main><div id="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="actix_protobuf" data-themes="" data-resource-suffix="" data-rustdoc-version="1.68.0-nightly (0fb8b72ce 2023-01-06)" data-search-js="search-181581080540673f.js" data-settings-js="settings-bebeae96e00e4617.js" data-settings-css="settings-58836c674e2f7bd2.css" ></div></body></html>
<img src="https://actix.rs/img/logo.png" alt="logo"></a><h2 class="location">Help</h2><div class="sidebar-elems"></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="./help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="./settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="./static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Rustdoc help</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section><p>You need to enable Javascript to use keyboard commands or search.</p><p>For more information, browse the <a href="https://doc.rust-lang.org/rustdoc/">rustdoc handbook</a>.</p></section></noscript></section></div></main><div id="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="actix_settings" data-themes="" data-resource-suffix="" data-rustdoc-version="1.68.0-nightly (0fb8b72ce 2023-01-06)" data-search-js="search-181581080540673f.js" data-settings-js="settings-bebeae96e00e4617.js" data-settings-css="settings-58836c674e2f7bd2.css" ></div></body></html>

View File

@ -1,5 +1,5 @@
(function() {var implementors = { (function() {var implementors = {
"actix_identity":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"actix_session/session/struct.SessionInsertError.html\" title=\"struct actix_session::session::SessionInsertError\">SessionInsertError</a>&gt; for <a class=\"struct\" href=\"actix_identity/error/struct.LoginError.html\" title=\"struct actix_identity::error::LoginError\">LoginError</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"actix_identity/error/struct.LostIdentityError.html\" title=\"struct actix_identity::error::LostIdentityError\">LostIdentityError</a>&gt; for <a class=\"enum\" href=\"actix_identity/error/enum.GetIdentityError.html\" title=\"enum actix_identity::error::GetIdentityError\">GetIdentityError</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"actix_identity/error/struct.MissingIdentityError.html\" title=\"struct actix_identity::error::MissingIdentityError\">MissingIdentityError</a>&gt; for <a class=\"enum\" href=\"actix_identity/error/enum.GetIdentityError.html\" title=\"enum actix_identity::error::GetIdentityError\">GetIdentityError</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;ComponentRange&gt; for <a class=\"enum\" href=\"actix_identity/error/enum.GetIdentityError.html\" title=\"enum actix_identity::error::GetIdentityError\">GetIdentityError</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"actix_session/session/struct.SessionGetError.html\" title=\"struct actix_session::session::SessionGetError\">SessionGetError</a>&gt; for <a class=\"enum\" href=\"actix_identity/error/enum.GetIdentityError.html\" title=\"enum actix_identity::error::GetIdentityError\">GetIdentityError</a>"]], "actix_identity":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;SessionInsertError&gt; for <a class=\"struct\" href=\"actix_identity/error/struct.LoginError.html\" title=\"struct actix_identity::error::LoginError\">LoginError</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"actix_identity/error/struct.LostIdentityError.html\" title=\"struct actix_identity::error::LostIdentityError\">LostIdentityError</a>&gt; for <a class=\"enum\" href=\"actix_identity/error/enum.GetIdentityError.html\" title=\"enum actix_identity::error::GetIdentityError\">GetIdentityError</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"actix_identity/error/struct.MissingIdentityError.html\" title=\"struct actix_identity::error::MissingIdentityError\">MissingIdentityError</a>&gt; for <a class=\"enum\" href=\"actix_identity/error/enum.GetIdentityError.html\" title=\"enum actix_identity::error::GetIdentityError\">GetIdentityError</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"actix_identity/error/struct.SessionExpiryError.html\" title=\"struct actix_identity::error::SessionExpiryError\">SessionExpiryError</a>&gt; for <a class=\"enum\" href=\"actix_identity/error/enum.GetIdentityError.html\" title=\"enum actix_identity::error::GetIdentityError\">GetIdentityError</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;SessionGetError&gt; for <a class=\"enum\" href=\"actix_identity/error/enum.GetIdentityError.html\" title=\"enum actix_identity::error::GetIdentityError\">GetIdentityError</a>"]],
"actix_limitation":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;ComponentRange&gt; for <a class=\"enum\" href=\"actix_limitation/enum.Error.html\" title=\"enum actix_limitation::Error\">Error</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;RedisError&gt; for <a class=\"enum\" href=\"actix_limitation/enum.Error.html\" title=\"enum actix_limitation::Error\">Error</a>"]], "actix_limitation":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;ComponentRange&gt; for <a class=\"enum\" href=\"actix_limitation/enum.Error.html\" title=\"enum actix_limitation::Error\">Error</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;RedisError&gt; for <a class=\"enum\" href=\"actix_limitation/enum.Error.html\" title=\"enum actix_limitation::Error\">Error</a>"]],
"actix_protobuf":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;PayloadError&gt; for <a class=\"enum\" href=\"actix_protobuf/enum.ProtoBufPayloadError.html\" title=\"enum actix_protobuf::ProtoBufPayloadError\">ProtoBufPayloadError</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"https://docs.rs/prost/0.11.5/prost/error/struct.DecodeError.html\" title=\"struct prost::error::DecodeError\">DecodeError</a>&gt; for <a class=\"enum\" href=\"actix_protobuf/enum.ProtoBufPayloadError.html\" title=\"enum actix_protobuf::ProtoBufPayloadError\">ProtoBufPayloadError</a>"]], "actix_protobuf":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;PayloadError&gt; for <a class=\"enum\" href=\"actix_protobuf/enum.ProtoBufPayloadError.html\" title=\"enum actix_protobuf::ProtoBufPayloadError\">ProtoBufPayloadError</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"https://docs.rs/prost/0.11.5/prost/error/struct.DecodeError.html\" title=\"struct prost::error::DecodeError\">DecodeError</a>&gt; for <a class=\"enum\" href=\"actix_protobuf/enum.ProtoBufPayloadError.html\" title=\"enum actix_protobuf::ProtoBufPayloadError\">ProtoBufPayloadError</a>"]],
"actix_redis":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"enum\" href=\"actix_redis/enum.RespError.html\" title=\"enum actix_redis::RespError\">Error</a>&gt; for <a class=\"enum\" href=\"actix_redis/enum.Error.html\" title=\"enum actix_redis::Error\">Error</a>"]], "actix_redis":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"enum\" href=\"actix_redis/enum.RespError.html\" title=\"enum actix_redis::RespError\">Error</a>&gt; for <a class=\"enum\" href=\"actix_redis/enum.Error.html\" title=\"enum actix_redis::Error\">Error</a>"]],

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Settings of Rustdoc"><meta name="keywords" content="rust, rustlang, rust-lang"><title>Rustdoc settings</title><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="./static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="./static.files/rustdoc-a67221f24dabeddb.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="./static.files/light-4743e13df3dfe8c4.css"><link rel="stylesheet" disabled href="./static.files/dark-0e1b889528bd466b.css"><link rel="stylesheet" disabled href="./static.files/ayu-65289d5d067c7c66.css"><script id="default-settings" ></script><script src="./static.files/storage-d43fa987303ecbbb.js"></script><script defer src="./static.files/main-bc1b32400f872ddb.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-13285aec31fa243e.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="logo-container" href="./actix_settings/index.html"><img src="https://actix.rs/img/logo.png" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="./actix_settings/index.html"> <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Settings of Rustdoc"><meta name="keywords" content="rust, rustlang, rust-lang"><title>Rustdoc settings</title><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="./static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="./static.files/rustdoc-a67221f24dabeddb.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="./static.files/light-4743e13df3dfe8c4.css"><link rel="stylesheet" disabled href="./static.files/dark-0e1b889528bd466b.css"><link rel="stylesheet" disabled href="./static.files/ayu-65289d5d067c7c66.css"><script id="default-settings" ></script><script src="./static.files/storage-d43fa987303ecbbb.js"></script><script defer src="./static.files/main-bc1b32400f872ddb.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="./static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="./static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="./static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="logo-container" href="./actix_protobuf/index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="./actix_protobuf/index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location">Settings</h2><div class="sidebar-elems"></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="./help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="./settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="./static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Rustdoc settings</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section>You need to enable Javascript be able to update your settings.</section></noscript><link rel="stylesheet" href="./static.files/settings-58836c674e2f7bd2.css"><script defer src="./static.files/settings-bebeae96e00e4617.js"></script></section></div></main><div id="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="actix_protobuf" data-themes="" data-resource-suffix="" data-rustdoc-version="1.68.0-nightly (0fb8b72ce 2023-01-06)" data-search-js="search-181581080540673f.js" data-settings-js="settings-bebeae96e00e4617.js" data-settings-css="settings-58836c674e2f7bd2.css" ></div></body></html>
<img src="https://actix.rs/img/logo.png" alt="logo"></a><h2 class="location">Settings</h2><div class="sidebar-elems"></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="./help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="./settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="./static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Rustdoc settings</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section>You need to enable Javascript be able to update your settings.</section></noscript><link rel="stylesheet" href="./static.files/settings-58836c674e2f7bd2.css"><script defer src="./static.files/settings-bebeae96e00e4617.js"></script></section></div></main><div id="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="actix_settings" data-themes="" data-resource-suffix="" data-rustdoc-version="1.68.0-nightly (0fb8b72ce 2023-01-06)" data-search-js="search-181581080540673f.js" data-settings-js="settings-bebeae96e00e4617.js" data-settings-css="settings-58836c674e2f7bd2.css" ></div></body></html>

View File

@ -68,246 +68,74 @@
<a href="#68" id="68">68</a> <a href="#68" id="68">68</a>
<a href="#69" id="69">69</a> <a href="#69" id="69">69</a>
<a href="#70" id="70">70</a> <a href="#70" id="70">70</a>
<a href="#71" id="71">71</a>
<a href="#72" id="72">72</a>
<a href="#73" id="73">73</a>
<a href="#74" id="74">74</a>
<a href="#75" id="75">75</a>
<a href="#76" id="76">76</a>
<a href="#77" id="77">77</a>
<a href="#78" id="78">78</a>
<a href="#79" id="79">79</a>
<a href="#80" id="80">80</a>
<a href="#81" id="81">81</a>
<a href="#82" id="82">82</a>
<a href="#83" id="83">83</a>
<a href="#84" id="84">84</a>
<a href="#85" id="85">85</a>
<a href="#86" id="86">86</a>
<a href="#87" id="87">87</a>
<a href="#88" id="88">88</a>
<a href="#89" id="89">89</a>
<a href="#90" id="90">90</a>
<a href="#91" id="91">91</a>
<a href="#92" id="92">92</a>
<a href="#93" id="93">93</a>
<a href="#94" id="94">94</a>
<a href="#95" id="95">95</a>
<a href="#96" id="96">96</a>
<a href="#97" id="97">97</a>
<a href="#98" id="98">98</a>
<a href="#99" id="99">99</a>
<a href="#100" id="100">100</a>
<a href="#101" id="101">101</a>
<a href="#102" id="102">102</a>
<a href="#103" id="103">103</a>
<a href="#104" id="104">104</a>
<a href="#105" id="105">105</a>
<a href="#106" id="106">106</a>
<a href="#107" id="107">107</a>
<a href="#108" id="108">108</a>
<a href="#109" id="109">109</a>
<a href="#110" id="110">110</a>
<a href="#111" id="111">111</a>
<a href="#112" id="112">112</a>
<a href="#113" id="113">113</a>
<a href="#114" id="114">114</a>
<a href="#115" id="115">115</a>
<a href="#116" id="116">116</a>
<a href="#117" id="117">117</a>
<a href="#118" id="118">118</a>
<a href="#119" id="119">119</a>
<a href="#120" id="120">120</a>
<a href="#121" id="121">121</a>
<a href="#122" id="122">122</a>
<a href="#123" id="123">123</a>
<a href="#124" id="124">124</a>
<a href="#125" id="125">125</a>
<a href="#126" id="126">126</a>
<a href="#127" id="127">127</a>
<a href="#128" id="128">128</a>
<a href="#129" id="129">129</a>
<a href="#130" id="130">130</a>
<a href="#131" id="131">131</a>
<a href="#132" id="132">132</a>
<a href="#133" id="133">133</a>
<a href="#134" id="134">134</a>
<a href="#135" id="135">135</a>
<a href="#136" id="136">136</a>
<a href="#137" id="137">137</a>
<a href="#138" id="138">138</a>
<a href="#139" id="139">139</a>
<a href="#140" id="140">140</a>
<a href="#141" id="141">141</a>
<a href="#142" id="142">142</a>
<a href="#143" id="143">143</a>
<a href="#144" id="144">144</a>
<a href="#145" id="145">145</a>
<a href="#146" id="146">146</a>
<a href="#147" id="147">147</a>
<a href="#148" id="148">148</a>
<a href="#149" id="149">149</a>
<a href="#150" id="150">150</a>
<a href="#151" id="151">151</a>
<a href="#152" id="152">152</a>
<a href="#153" id="153">153</a>
<a href="#154" id="154">154</a>
<a href="#155" id="155">155</a>
<a href="#156" id="156">156</a>
</pre><pre class="rust"><code><span class="doccomment">//! Failure modes of identity operations. </pre><pre class="rust"><code><span class="doccomment">//! Failure modes of identity operations.
</span><span class="kw">use </span>std::fmt; </span><span class="kw">use </span>actix_session::{SessionGetError, SessionInsertError};
<span class="kw">use </span>actix_session::{SessionGetError, SessionInsertError};
<span class="kw">use </span>actix_web::{cookie::time::error::ComponentRange, http::StatusCode, ResponseError}; <span class="kw">use </span>actix_web::{cookie::time::error::ComponentRange, http::StatusCode, ResponseError};
<span class="kw">use </span>derive_more::{Display, Error, From};
<span class="doccomment">/// Error that can occur during login attempts. <span class="doccomment">/// Error that can occur during login attempts.
</span><span class="attr">#[derive(Debug)] </span><span class="attr">#[derive(Debug, Display, Error, From)]
#[display(fmt = <span class="string">&quot;{_0}&quot;</span>)]
</span><span class="kw">pub struct </span>LoginError(SessionInsertError); </span><span class="kw">pub struct </span>LoginError(SessionInsertError);
<span class="kw">impl </span>fmt::Display <span class="kw">for </span>LoginError {
<span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, f: <span class="kw-2">&amp;mut </span>fmt::Formatter&lt;<span class="lifetime">&#39;_</span>&gt;) -&gt; fmt::Result {
<span class="macro">write!</span>(f, <span class="string">&quot;{}&quot;</span>, <span class="self">self</span>.<span class="number">0</span>)
}
}
<span class="kw">impl </span>std::error::Error <span class="kw">for </span>LoginError {
<span class="kw">fn </span>source(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="prelude-ty">Option</span>&lt;<span class="kw-2">&amp;</span>(<span class="kw">dyn </span>std::error::Error + <span class="lifetime">&#39;static</span>)&gt; {
<span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="number">0</span>)
}
}
<span class="kw">impl </span>ResponseError <span class="kw">for </span>LoginError { <span class="kw">impl </span>ResponseError <span class="kw">for </span>LoginError {
<span class="kw">fn </span>status_code(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; StatusCode { <span class="kw">fn </span>status_code(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; StatusCode {
StatusCode::UNAUTHORIZED StatusCode::UNAUTHORIZED
} }
} }
<span class="kw">impl </span>From&lt;SessionInsertError&gt; <span class="kw">for </span>LoginError {
<span class="kw">fn </span>from(error: SessionInsertError) -&gt; <span class="self">Self </span>{
<span class="self">Self</span>(error)
}
}
<span class="doccomment">/// Error encountered when working with a session that has expired. <span class="doccomment">/// Error encountered when working with a session that has expired.
</span><span class="attr">#[derive(Debug)] </span><span class="attr">#[derive(Debug, Display, Error)]
</span><span class="kw">pub struct </span>SessionExpiryError(ComponentRange); #[display(fmt = <span class="string">&quot;The given session has expired and is no longer valid&quot;</span>)]
</span><span class="kw">pub struct </span>SessionExpiryError(<span class="attr">#[error(not(source))] </span><span class="kw">pub</span>(<span class="kw">crate</span>) ComponentRange);
<span class="kw">impl </span>fmt::Display <span class="kw">for </span>SessionExpiryError {
<span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, f: <span class="kw-2">&amp;mut </span>fmt::Formatter&lt;<span class="lifetime">&#39;_</span>&gt;) -&gt; fmt::Result {
f.write_str(<span class="string">&quot;The given session has expired and is no longer valid&quot;</span>)
}
}
<span class="kw">impl </span>std::error::Error <span class="kw">for </span>SessionExpiryError {}
<span class="doccomment">/// The identity information has been lost. <span class="doccomment">/// The identity information has been lost.
/// ///
/// Seeing this error in user code indicates a bug in actix-identity. /// Seeing this error in user code indicates a bug in actix-identity.
</span><span class="attr">#[derive(Debug)] </span><span class="attr">#[derive(Debug, Display, Error)]
#[display(
fmt = <span class="string">&quot;The identity information in the current session has disappeared after having been \
successfully validated. This is likely to be a bug.&quot;
</span>)]
#[non_exhaustive] #[non_exhaustive]
</span><span class="kw">pub struct </span>LostIdentityError; </span><span class="kw">pub struct </span>LostIdentityError;
<span class="kw">impl </span>fmt::Display <span class="kw">for </span>LostIdentityError {
<span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, f: <span class="kw-2">&amp;mut </span>fmt::Formatter&lt;<span class="lifetime">&#39;_</span>&gt;) -&gt; fmt::Result {
f.write_str(
<span class="string">&quot;The identity information in the current session has disappeared \
after having been successfully validated. This is likely to be a bug.&quot;</span>,
)
}
}
<span class="kw">impl </span>std::error::Error <span class="kw">for </span>LostIdentityError {
<span class="kw">fn </span>source(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="prelude-ty">Option</span>&lt;<span class="kw-2">&amp;</span>(<span class="kw">dyn </span>std::error::Error + <span class="lifetime">&#39;static</span>)&gt; {
<span class="prelude-val">Some</span>(<span class="self">self</span>)
}
}
<span class="doccomment">/// There is no identity information attached to the current session. <span class="doccomment">/// There is no identity information attached to the current session.
</span><span class="attr">#[derive(Debug)] </span><span class="attr">#[derive(Debug, Display, Error)]
#[display(fmt = <span class="string">&quot;There is no identity information attached to the current session&quot;</span>)]
#[non_exhaustive] #[non_exhaustive]
</span><span class="kw">pub struct </span>MissingIdentityError; </span><span class="kw">pub struct </span>MissingIdentityError;
<span class="kw">impl </span>fmt::Display <span class="kw">for </span>MissingIdentityError {
<span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, f: <span class="kw-2">&amp;mut </span>fmt::Formatter&lt;<span class="lifetime">&#39;_</span>&gt;) -&gt; fmt::Result {
f.write_str(<span class="string">&quot;There is no identity information attached to the current session.&quot;</span>)
}
}
<span class="kw">impl </span>std::error::Error <span class="kw">for </span>MissingIdentityError {
<span class="kw">fn </span>source(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="prelude-ty">Option</span>&lt;<span class="kw-2">&amp;</span>(<span class="kw">dyn </span>std::error::Error + <span class="lifetime">&#39;static</span>)&gt; {
<span class="prelude-val">Some</span>(<span class="self">self</span>)
}
}
<span class="doccomment">/// Errors that can occur while retrieving an identity. <span class="doccomment">/// Errors that can occur while retrieving an identity.
</span><span class="attr">#[derive(Debug)] </span><span class="attr">#[derive(Debug, Display, Error, From)]
#[non_exhaustive] #[non_exhaustive]
</span><span class="kw">pub enum </span>GetIdentityError { </span><span class="kw">pub enum </span>GetIdentityError {
<span class="doccomment">/// The session has expired. <span class="doccomment">/// The session has expired.
</span><span class="attr">#[display(fmt = <span class="string">&quot;{_0}&quot;</span>)]
</span>SessionExpiryError(SessionExpiryError), </span>SessionExpiryError(SessionExpiryError),
<span class="doccomment">/// No identity is found in a session. <span class="doccomment">/// No identity is found in a session.
</span><span class="attr">#[display(fmt = <span class="string">&quot;{_0}&quot;</span>)]
</span>MissingIdentityError(MissingIdentityError), </span>MissingIdentityError(MissingIdentityError),
<span class="doccomment">/// Failed to accessing the session store. <span class="doccomment">/// Failed to accessing the session store.
</span><span class="attr">#[display(fmt = <span class="string">&quot;{_0}&quot;</span>)]
</span>SessionGetError(SessionGetError), </span>SessionGetError(SessionGetError),
<span class="doccomment">/// Identity info was lost after being validated. <span class="doccomment">/// Identity info was lost after being validated.
/// ///
/// Seeing this error indicates a bug in actix-identity. /// Seeing this error indicates a bug in actix-identity.
</span><span class="attr">#[display(fmt = <span class="string">&quot;{_0}&quot;</span>)]
</span>LostIdentityError(LostIdentityError), </span>LostIdentityError(LostIdentityError),
} }
<span class="kw">impl </span>fmt::Display <span class="kw">for </span>GetIdentityError {
<span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, f: <span class="kw-2">&amp;mut </span>fmt::Formatter&lt;<span class="lifetime">&#39;_</span>&gt;) -&gt; fmt::Result {
<span class="kw">match </span><span class="self">self </span>{
<span class="self">Self</span>::SessionExpiryError(err) =&gt; <span class="macro">write!</span>(f, <span class="string">&quot;{err}&quot;</span>),
<span class="self">Self</span>::MissingIdentityError(err) =&gt; <span class="macro">write!</span>(f, <span class="string">&quot;{err}&quot;</span>),
<span class="self">Self</span>::SessionGetError(err) =&gt; <span class="macro">write!</span>(f, <span class="string">&quot;{err}&quot;</span>),
<span class="self">Self</span>::LostIdentityError(err) =&gt; <span class="macro">write!</span>(f, <span class="string">&quot;{err}&quot;</span>),
}
}
}
<span class="kw">impl </span>std::error::Error <span class="kw">for </span>GetIdentityError {
<span class="kw">fn </span>source(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="prelude-ty">Option</span>&lt;<span class="kw-2">&amp;</span>(<span class="kw">dyn </span>std::error::Error + <span class="lifetime">&#39;static</span>)&gt; {
<span class="kw">match </span><span class="self">self </span>{
<span class="self">Self</span>::SessionExpiryError(err) =&gt; <span class="prelude-val">Some</span>(err),
<span class="self">Self</span>::MissingIdentityError(err) =&gt; <span class="prelude-val">Some</span>(err),
<span class="self">Self</span>::SessionGetError(err) =&gt; <span class="prelude-val">Some</span>(err),
<span class="self">Self</span>::LostIdentityError(err) =&gt; <span class="prelude-val">Some</span>(err),
}
}
}
<span class="kw">impl </span>ResponseError <span class="kw">for </span>GetIdentityError { <span class="kw">impl </span>ResponseError <span class="kw">for </span>GetIdentityError {
<span class="kw">fn </span>status_code(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; StatusCode { <span class="kw">fn </span>status_code(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; StatusCode {
StatusCode::UNAUTHORIZED <span class="kw">match </span><span class="self">self </span>{
} <span class="self">Self</span>::LostIdentityError(<span class="kw">_</span>) =&gt; StatusCode::INTERNAL_SERVER_ERROR,
} <span class="kw">_ </span>=&gt; StatusCode::UNAUTHORIZED,
}
<span class="kw">impl </span>From&lt;LostIdentityError&gt; <span class="kw">for </span>GetIdentityError {
<span class="kw">fn </span>from(error: LostIdentityError) -&gt; <span class="self">Self </span>{
<span class="self">Self</span>::LostIdentityError(error)
}
}
<span class="kw">impl </span>From&lt;MissingIdentityError&gt; <span class="kw">for </span>GetIdentityError {
<span class="kw">fn </span>from(error: MissingIdentityError) -&gt; <span class="self">Self </span>{
<span class="self">Self</span>::MissingIdentityError(error)
}
}
<span class="kw">impl </span>From&lt;ComponentRange&gt; <span class="kw">for </span>GetIdentityError {
<span class="kw">fn </span>from(error: ComponentRange) -&gt; <span class="self">Self </span>{
<span class="self">Self</span>::SessionExpiryError(SessionExpiryError(error))
}
}
<span class="kw">impl </span>From&lt;SessionGetError&gt; <span class="kw">for </span>GetIdentityError {
<span class="kw">fn </span>from(source: SessionGetError) -&gt; <span class="self">Self </span>{
<span class="self">Self</span>::SessionGetError(source)
} }
} }
</code></pre></div> </code></pre></div>

View File

@ -263,6 +263,10 @@
<a href="#263" id="263">263</a> <a href="#263" id="263">263</a>
<a href="#264" id="264">264</a> <a href="#264" id="264">264</a>
<a href="#265" id="265">265</a> <a href="#265" id="265">265</a>
<a href="#266" id="266">266</a>
<a href="#267" id="267">267</a>
<a href="#268" id="268">268</a>
<a href="#269" id="269">269</a>
</pre><pre class="rust"><code><span class="kw">use </span>actix_session::Session; </pre><pre class="rust"><code><span class="kw">use </span>actix_session::Session;
<span class="kw">use </span>actix_utils::future::{ready, Ready}; <span class="kw">use </span>actix_utils::future::{ready, Ready};
<span class="kw">use </span>actix_web::{ <span class="kw">use </span>actix_web::{
@ -274,7 +278,9 @@
<span class="kw">use crate</span>::{ <span class="kw">use crate</span>::{
config::LogoutBehaviour, config::LogoutBehaviour,
error::{GetIdentityError, LoginError, LostIdentityError, MissingIdentityError}, error::{
GetIdentityError, LoginError, LostIdentityError, MissingIdentityError, SessionExpiryError,
},
}; };
<span class="doccomment">/// A verified user identity. It can be used as a request extractor. <span class="doccomment">/// A verified user identity. It can be used as a request extractor.
@ -477,7 +483,8 @@
</span>.session </span>.session
.get(LOGIN_UNIX_TIMESTAMP_KEY)<span class="question-mark">? .get(LOGIN_UNIX_TIMESTAMP_KEY)<span class="question-mark">?
</span>.map(OffsetDateTime::from_unix_timestamp) </span>.map(OffsetDateTime::from_unix_timestamp)
.transpose()<span class="question-mark">?</span>) .transpose()
.map_err(SessionExpiryError)<span class="question-mark">?</span>)
} }
<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>last_visited_at(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="prelude-ty">Option</span>&lt;OffsetDateTime&gt;, GetIdentityError&gt; { <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>last_visited_at(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="prelude-ty">Option</span>&lt;OffsetDateTime&gt;, GetIdentityError&gt; {
@ -486,7 +493,8 @@
</span>.session </span>.session
.get(LAST_VISIT_UNIX_TIMESTAMP_KEY)<span class="question-mark">? .get(LAST_VISIT_UNIX_TIMESTAMP_KEY)<span class="question-mark">?
</span>.map(OffsetDateTime::from_unix_timestamp) </span>.map(OffsetDateTime::from_unix_timestamp)
.transpose()<span class="question-mark">?</span>) .transpose()
.map_err(SessionExpiryError)<span class="question-mark">?</span>)
} }
<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>set_last_visited_at(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="prelude-ty">Result</span>&lt;(), LoginError&gt; { <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>set_last_visited_at(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="prelude-ty">Result</span>&lt;(), LoginError&gt; {