mirror of
https://github.com/actix/actix-extras.git
synced 2025-09-03 05:19:23 +02:00
Deploying to gh-pages from @ 8fd166435f
🚀
This commit is contained in:
@@ -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/headers/authorization/scheme/bearer.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>bearer.rs - source</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="../../../../../source-script.js"></script><script defer src="../../../../../source-files.js"></script><script defer src="../../../../../main.js"></script><noscript><link rel="stylesheet" href="../../../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../../../favicon.svg"></head><body class="rustdoc source"><!--[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><div class="width-limiter"><nav class="sub"><a class="sub-logo-container" href="../../../../../actix_web_httpauth/index.html"><img class="rust-logo" src="../../../../../rust-logo.svg" alt="logo"></a><form class="search-form"><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"><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="../../../../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><pre class="src-line-numbers"><span id="1">1</span>
|
||||
<!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/headers/authorization/scheme/bearer.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>bearer.rs - source</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-ef244fc9943488f7.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../../../../static.files/light-c11f492748536797.css"><link rel="stylesheet" disabled href="../../../../../static.files/dark-a78f946771c40031.css"><link rel="stylesheet" disabled href="../../../../../static.files/ayu-70b683d68cb31790.css"><script id="default-settings" ></script><script src="../../../../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../../../../../static.files/source-script-74087aa2e88f4475.js"></script><script defer src="../../../../../source-files.js"></script><script defer src="../../../../../static.files/main-0dede64717b247ca.js"></script><noscript><link rel="stylesheet" href="../../../../../static.files/noscript-201a7e04dc4c6fce.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 source"><!--[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><div class="width-limiter"><nav class="sub"><a class="sub-logo-container" href="../../../../../actix_web_httpauth/index.html"><img class="rust-logo" src="../../../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><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"><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="example-wrap"><pre class="src-line-numbers"><span id="1">1</span>
|
||||
<span id="2">2</span>
|
||||
<span id="3">3</span>
|
||||
<span id="4">4</span>
|
||||
@@ -150,7 +150,7 @@
|
||||
/// Should be used in combination with [`Authorization`](super::Authorization) header.
|
||||
///
|
||||
/// [RFC 6750]: https://tools.ietf.org/html/rfc6750
|
||||
</span><span class="attribute">#[derive(Clone, Eq, Ord, PartialEq, PartialOrd)]
|
||||
</span><span class="attr">#[derive(Clone, Eq, Ord, PartialEq, PartialOrd)]
|
||||
</span><span class="kw">pub struct </span>Bearer {
|
||||
token: Cow<<span class="lifetime">'static</span>, str>,
|
||||
}
|
||||
@@ -224,11 +224,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="attribute">#[cfg(test)]
|
||||
<span class="attr">#[cfg(test)]
|
||||
</span><span class="kw">mod </span>tests {
|
||||
<span class="kw">use super</span>::<span class="kw-2">*</span>;
|
||||
|
||||
<span class="attribute">#[test]
|
||||
<span class="attr">#[test]
|
||||
</span><span class="kw">fn </span>test_parse_header() {
|
||||
<span class="kw">let </span>value = HeaderValue::from_static(<span class="string">"Bearer mF_9.B5f-4.1JqM"</span>);
|
||||
<span class="kw">let </span>scheme = Bearer::parse(<span class="kw-2">&</span>value);
|
||||
@@ -238,7 +238,7 @@
|
||||
<span class="macro">assert_eq!</span>(scheme.token, <span class="string">"mF_9.B5f-4.1JqM"</span>);
|
||||
}
|
||||
|
||||
<span class="attribute">#[test]
|
||||
<span class="attr">#[test]
|
||||
</span><span class="kw">fn </span>test_empty_header() {
|
||||
<span class="kw">let </span>value = HeaderValue::from_static(<span class="string">""</span>);
|
||||
<span class="kw">let </span>scheme = Bearer::parse(<span class="kw-2">&</span>value);
|
||||
@@ -246,7 +246,7 @@
|
||||
<span class="macro">assert!</span>(scheme.is_err());
|
||||
}
|
||||
|
||||
<span class="attribute">#[test]
|
||||
<span class="attr">#[test]
|
||||
</span><span class="kw">fn </span>test_wrong_scheme() {
|
||||
<span class="kw">let </span>value = HeaderValue::from_static(<span class="string">"OAuthToken foo"</span>);
|
||||
<span class="kw">let </span>scheme = Bearer::parse(<span class="kw-2">&</span>value);
|
||||
@@ -254,7 +254,7 @@
|
||||
<span class="macro">assert!</span>(scheme.is_err());
|
||||
}
|
||||
|
||||
<span class="attribute">#[test]
|
||||
<span class="attr">#[test]
|
||||
</span><span class="kw">fn </span>test_missing_token() {
|
||||
<span class="kw">let </span>value = HeaderValue::from_static(<span class="string">"Bearer "</span>);
|
||||
<span class="kw">let </span>scheme = Bearer::parse(<span class="kw-2">&</span>value);
|
||||
@@ -262,7 +262,7 @@
|
||||
<span class="macro">assert!</span>(scheme.is_err());
|
||||
}
|
||||
|
||||
<span class="attribute">#[test]
|
||||
<span class="attr">#[test]
|
||||
</span><span class="kw">fn </span>test_into_header_value() {
|
||||
<span class="kw">let </span>bearer = Bearer::new(<span class="string">"mF_9.B5f-4.1JqM"</span>);
|
||||
|
||||
@@ -275,4 +275,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5e9772042 2022-10-29)" ></div></body></html>
|
||||
</section></div></main><div id="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.67.0-nightly (73c9eaf21 2022-11-07)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html>
|
Reference in New Issue
Block a user