1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-09-03 05:19:23 +02:00

Deploying to gh-pages from @ actix/actix-extras@2f30fd71a9 🚀

This commit is contained in:
github-merge-queue[bot]
2023-12-06 14:01:24 +00:00
parent 0b3131af9b
commit 258efbfa75
222 changed files with 1494 additions and 1494 deletions

View File

@@ -1,4 +1,4 @@
<!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="Source of the Rust file `actix-web-httpauth/src/extractors/basic.rs`."><title>basic.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.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/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-c67e44d78ab2db17.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="actix_web_httpauth" data-themes="" data-resource-suffix="" data-rustdoc-version="1.76.0-nightly (9fad68599 2023-12-03)" data-channel="nightly" data-search-js="search-5a66c239c06b3a66.js" data-settings-js="settings-fe03fdc259827cd2.js" ><script src="../../../static.files/storage-fec3eaa3851e447d.js"></script><script defer src="../../../static.files/src-script-3280b574d94e47b4.js"></script><script defer src="../../../src-files.js"></script><script defer src="../../../static.files/main-77dede896d6ac08e.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-5d8b3c7633ad77ba.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><nav class="sub"><a class="sub-logo-container" href="../../../actix_web_httpauth/index.html"><img src="https://actix.rs/img/logo.png" alt="actix_web_httpauth"></a><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-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a>
<!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="Source of the Rust file `actix-web-httpauth/src/extractors/basic.rs`."><title>basic.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.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/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-c67e44d78ab2db17.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="actix_web_httpauth" data-themes="" data-resource-suffix="" data-rustdoc-version="1.76.0-nightly (e9013ac0e 2023-12-05)" data-channel="nightly" data-search-js="search-5a66c239c06b3a66.js" data-settings-js="settings-fe03fdc259827cd2.js" ><script src="../../../static.files/storage-fec3eaa3851e447d.js"></script><script defer src="../../../static.files/src-script-3280b574d94e47b4.js"></script><script defer src="../../../src-files.js"></script><script defer src="../../../static.files/main-77dede896d6ac08e.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-5d8b3c7633ad77ba.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><nav class="sub"><a class="sub-logo-container" href="../../../actix_web_httpauth/index.html"><img src="https://actix.rs/img/logo.png" alt="actix_web_httpauth"></a><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-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a>
<a href="#2" id="2">2</a>
<a href="#3" id="3">3</a>
<a href="#4" id="4">4</a>
@@ -116,7 +116,7 @@
<a href="#116" id="116">116</a>
<a href="#117" id="117">117</a>
<a href="#118" id="118">118</a>
</pre></div><pre class="rust"><code><span class="doccomment">//! Extractor for the &quot;Basic&quot; HTTP Authentication Scheme.
</pre></div><pre class="rust"><code><span class="doccomment">//! Extractor for the "Basic" HTTP Authentication Scheme.
</span><span class="kw">use </span>std::borrow::Cow;
@@ -138,11 +138,11 @@
<span class="kw">impl </span>Config {
<span class="doccomment">/// Set challenge `realm` attribute.
///
/// The &quot;realm&quot; attribute indicates the scope of protection in the manner described in HTTP/1.1
/// The "realm" attribute indicates the scope of protection in the manner described in HTTP/1.1
/// [RFC 2617 §1.2](https://tools.ietf.org/html/rfc2617#section-1.2).
</span><span class="kw">pub fn </span>realm&lt;T&gt;(<span class="kw-2">mut </span><span class="self">self</span>, value: T) -&gt; Config
<span class="kw">where
</span>T: Into&lt;Cow&lt;<span class="lifetime">&#39;static</span>, str&gt;&gt;,
</span>T: Into&lt;Cow&lt;<span class="lifetime">'static</span>, str&gt;&gt;,
{
<span class="self">self</span>.<span class="number">0</span>.realm = <span class="prelude-val">Some</span>(value.into());
<span class="self">self
@@ -170,7 +170,7 @@
/// use actix_web_httpauth::extractors::basic::BasicAuth;
///
/// async fn index(auth: BasicAuth) -&gt; String {
/// format!(&quot;Hello, {}!&quot;, auth.user_id())
/// format!("Hello, {}!", auth.user_id())
/// }
/// ```
///
@@ -183,12 +183,12 @@
/// use actix_web_httpauth::extractors::basic::{self, BasicAuth};
///
/// async fn index(auth: BasicAuth) -&gt; String {
/// format!(&quot;Hello, {}!&quot;, auth.user_id())
/// format!("Hello, {}!", auth.user_id())
/// }
///
/// App::new()
/// .app_data(basic::Config::default().realm(&quot;Restricted area&quot;))
/// .service(web::resource(&quot;/index.html&quot;).route(web::get().to(index)));
/// .app_data(basic::Config::default().realm("Restricted area"))
/// .service(web::resource("/index.html").route(web::get().to(index)));
/// ```
///
/// [app data]: https://docs.rs/actix-web/4/actix_web/struct.App.html#method.app_data
@@ -196,12 +196,12 @@
</span><span class="kw">pub struct </span>BasicAuth(Basic);
<span class="kw">impl </span>BasicAuth {
<span class="doccomment">/// Returns client&#39;s user-ID.
<span class="doccomment">/// Returns client's user-ID.
</span><span class="kw">pub fn </span>user_id(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>str {
<span class="self">self</span>.<span class="number">0</span>.user_id()
}
<span class="doccomment">/// Returns client&#39;s password.
<span class="doccomment">/// Returns client's password.
</span><span class="kw">pub fn </span>password(<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>str&gt; {
<span class="self">self</span>.<span class="number">0</span>.password()
}
@@ -222,7 +222,7 @@
Authorization::&lt;Basic&gt;::parse(req)
.map(|auth| BasicAuth(auth.into_scheme()))
.map_err(|err| {
<span class="macro">log::debug!</span>(<span class="string">&quot;`BasicAuth` extract error: {}&quot;</span>, err);
<span class="macro">log::debug!</span>(<span class="string">"`BasicAuth` extract error: {}"</span>, err);
<span class="kw">let </span>challenge = req
.app_data::&lt;Config&gt;()