<!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="`Authorization` header, defined in RFC 7235"><metaname="keywords"content="rust, rustlang, rust-lang, Authorization"><title>Authorization in actix_web_httpauth::headers::authorization - 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-04897efae0a76fcd.css"id="mainThemeStyle"><linkrel="stylesheet"id="themeStyle"href="../../../static.files/light-4743e13df3dfe8c4.css"><linkrel="stylesheet"disabledhref="../../../static.files/dark-0e1b889528bd466b.css"><linkrel="stylesheet"disabledhref="../../../static.files/ayu-65289d5d067c7c66.css"><scriptid="default-settings"></script><scriptsrc="../../../static.files/storage-d43fa987303ecbbb.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../../../static.files/main-bc1b32400f872ddb.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 struct"><!--[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="logo-container"href="../../../actix_web_httpauth/index.html"><imgclass="rust-logo"src="../../../static.files/rust-logo-151179464ae7ed46.svg"alt="logo"></a><h2></h2></nav><navclass="sidebar"><aclass="logo-container"href="../../../actix_web_httpauth/index.html"><imgclass="rust-logo"src="../../../static.files/rust-logo-151179464ae7ed46.svg"alt="logo"></a><h2class="location"><ahref="#">Authorization</a></h2><divclass="sidebar-elems"><section><h3><ahref="#implementations">Methods</a></h3><ulclass="block"><li><ahref="#method.into_scheme">into_scheme</a></li></ul><h3><ahref="#trait-implementations">Trait Implementations</a></h3><ulclass="block"><li><ahref="#impl-AsMut%3CS%3E-for-Authorization%3CS%3E">AsMut<S></a></li><li><ahref="#impl-AsRef%3CS%3E-for-Authorization%3CS%3E">AsRef<S></a></li><li><ahref="#impl-Clone-for-Authorization%3CS%3E">Clone</a></li><li><ahref="#impl-Debug-for-Authorization%3CS%3E">Debug</a></li><li><ahref="#impl-Default-for-Authorization%3CS%3E">Default</a></li><li><ahref="#impl-Display-for-Authorization%3CS%3E">Display</a></li><li><ahref="#impl-Eq-for-Authorization%3CS%3E">Eq</a></li><li><ahref="#impl-From%3CS%3E-for-Authorization%3CS%3E">From<S></a></li><li><ahref="#impl-Hash-for-Authorization%3CS%3E">Hash</a></li><li><ahref="#impl-Header-for-Authorization%3CS%3E">Header</a></li><li><ahref="#impl-Ord-for-Authorization%3CS%3E">Ord</a></li><li><ahref="#impl-PartialEq%3CAuthorization%3CS%3E%3E-for-Authorization%3CS%3E">PartialEq<Authorizati
</div></details></div></details></div><h2id="trait-implementations"class="small-section-header">Trait Implementations<ahref="#trait-implementations"class="anchor">§</a></h2><divid="trait-implementations-list"><detailsclass="rustdoc-toggle implementors-toggle"open><summary><sectionid="impl-AsMut%3CS%3E-for-Authorization%3CS%3E"class="impl has-srclink"><aclass="srclink rightside"href="../../../src/actix_web_httpauth/headers/authorization/header.rs.html#52-56">source</a><ahref="#impl-AsMut%3CS%3E-for-Authorization%3CS%3E"class="anchor">§</a><h3class="code-header">impl<S: <aclass="trait"href="trait.Scheme.html"title="trait actix_web_httpauth::headers::authorization::Scheme">Scheme</a>><aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html"title="trait core::convert::AsMut">AsMut</a><S> for <aclass="struct"href="struct.Authorization.html"title="struct actix_web_httpauth::headers::authorization::Authorization">Authorization</a><S></h3></section></summary><divclass="impl-items"><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.as_mut"class="method trait-impl has-srclink"><aclass="srclink rightside"href="../../../src/actix_web_httpauth/headers/authorization/header.rs.html#53-55">source</a><ahref="#method.as_mut"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html#tymethod.as_mut"class="fn">as_mut</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>S</h4></section></summary><divclass='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"open><summary><sectionid="impl-AsRef%3CS%3E-for-Authorization%3CS%3E"class="impl has-srclink"><aclass="srclink rightside"href="../../../src/actix_web_httpauth/headers/authorization/header.rs.html#46-50">source</a><ahref="#impl-AsRef%3CS%3E-for-Authorization%3CS%3E"class="anchor">§</a><h3class="code-header">impl<S: <aclass="trait"href="trait.Scheme.html"title="trait actix_web_httpauth::headers::authorization::Scheme">Scheme</a>><aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html"title="trait core::convert::AsRef">AsRef</a><S> for <aclass="struct"href="struct.Authorization.html"title="struct actix_web_httpauth::headers::authorization::Authorization">Authorization</a><S></h3></section></summary><divclass="impl-items"><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.as_ref"class="method trait-impl has-srclink"><aclass="srclink rightside"href="../../../src/actix_web_httpauth/headers/authorization/header.rs.html#47-49">source</a><ahref="#method.as_ref"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html#tymethod.as_ref"class="fn">as_ref</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>S</h4></section></summary><divclass='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"open><summary><sectionid="impl-Clone-for-Authorization%3CS%3E"class="impl has-srclink"><aclass="srclink rightside"href="../../../src/actix_web_httpauth/headers/authorization/header.rs.html#30">source</a><ahref="#impl-Clone-for-Authorization%3CS%3E"class="anchor">§</a><h3class="code-header">impl<S: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a> + <aclass="trait"href="trait.Scheme.html"title="trait actix_web_httpauth::headers::authorization::Scheme">Scheme</a>><aclass="trait"href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a> fo
by <code>==</code>.</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.ne"class="method trait-impl has-srclink"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="srclink"href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><ahref="#method.ne"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"open><summary><sectionid="impl-PartialOrd%3CAuthorization%3CS%3E%3E-for-Authorization%3CS%3E"class="impl has-srclink"><aclass="srclink rightside"href="../../../src/actix_web_httpauth/headers/authorization/header.rs.html#30">source</a><ahref="#impl-PartialOrd%3CAuthorization%3CS%3E%3E-for-Authorization%3CS%3E"class="anchor">§</a><h3class="code-header">impl<S: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html"title="trait core::cmp::PartialOrd">PartialOrd</a> + <aclass="trait"href="trait.Scheme.html"title="trait actix_web_httpauth::headers::authorization::Scheme">Scheme</a>><aclass="trait"href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html"title="trait core::cmp::PartialOrd">PartialOrd</a><<aclass="struct"href="struct.Authorization.html"title="struct actix_web_httpauth::headers::authorization::Authorization">Authorization</a><S>> for <aclass="struct"href="struct.Authorization.html"title="struct actix_web_httpauth::headers::authorization::Authorization">Authorization</a><S></h3></section></summary><divclass="impl-items"><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.partial_cmp"class="method trait-impl has-srclink"><aclass="srclink rightside"href="../../../src/actix_web_httpauth/headers/authorization/header.rs.html#30">source</a><ahref="#method.partial_cmp"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp"class="fn">partial_cmp</a>(&self, other: &<aclass="struct"href="struct.Authorization.html"title="struct actix_web_httpauth::headers::authorization::Authorization">Authorization</a><S>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="enum"href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><divclass='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.lt"class="method trait-impl has-srclink"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="srclink"href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1096">source</a></span><ahref="#method.lt"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt"class="fn">lt</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.le"class="method trait-impl has-srclink"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="srclink"href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1115">source</a></span><ahref="#method.le"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le"class="fn">le</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) ->
operator. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.gt"class="method trait-impl has-srclink"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="srclink"href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1133">source</a></span><ahref="#method.gt"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt"class="fn">gt</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.ge"class="method trait-impl has-srclink"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="srclink"href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1152">source</a></span><ahref="#method.ge"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge"class="fn">ge</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code>
operator. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"open><summary><sectionid="impl-TryIntoHeaderValue-for-Authorization%3CS%3E"class="impl has-srclink"><aclass="srclink rightside"href="../../../src/actix_web_httpauth/headers/authorization/header.rs.html#78-84">source</a><ahref="#impl-TryIntoHeaderValue-for-Authorization%3CS%3E"class="anchor">§</a><h3class="code-header">impl<S: <aclass="trait"href="trait.Scheme.html"title="trait actix_web_httpauth::headers::authorization::Scheme">Scheme</a>> TryIntoHeaderValue for <aclass="struct"href="struct.Authorization.html"title="struct actix_web_httpauth::headers::authorization::Authorization">Authorization</a><S></h3></section></summary><divclass="impl-items"><detailsclass="rustdoc-toggle"open><summary><sectionid="associatedtype.Error"class="associatedtype trait-impl has-srclink"><ahref="#associatedtype.Error"class="anchor">§</a><h4class="code-header">type <aclass="associatedtype">Error</a> = <S as TryIntoHeaderValue>::Error</h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.try_into_value"class="method trait-impl has-srclink"><aclass="srclink rightside"href="../../../src/actix_web_httpauth/headers/authorization/header.rs.html#81-83">source</a><ahref="#method.try_into_value"class="anchor">§</a><h4class="code-header">fn <aclass="fn">try_into_value</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="https://docs.rs/http/0.2.8/http/header/value/struct.HeaderValue.html"title="struct http::header::value::HeaderValue">HeaderValue</a>, Self::Error></h4></section></summary><divclass='docblock'>Try to convert value to a HeaderValue.</div></details></div></details><sectionid="impl-Eq-for-Authorization%3CS%3E"class="impl has-srclink"><aclass="srclink rightside"href="../../../src/actix_web_httpauth/headers/authorization/header.rs.html#30">source</a><ahref="#impl-Eq-for-Authorization%3CS%3E"class="anchor">§</a><h3class="code-header">impl<S: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html"title="trait core::cmp::Eq">Eq</a> + <aclass="trait"href="trait.Scheme.html"title="trait actix_web_httpauth::headers::authorization::Scheme">Scheme</a>><aclass="trait"href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html"title="trait core::cmp::Eq">Eq</a> for <aclass="struct"href="struct.Authorization.html"title="struct actix_web_httpauth::headers::authorization::Authorization">Authorization</a><S></h3></section><sectionid="impl-StructuralEq-for-Authorization%3CS%3E"class="impl has-srclink"><aclass="srclink rightside"href="../../../src/actix_web_httpauth/headers/authorization/header.rs.html#30">source</a><ahref="#impl-StructuralEq-for-Authorization%3CS%3E"class="anchor">§</a><h3class="code-header">impl<S: <aclass="trait"href="trait.Scheme.html"title="trait actix_web_httpauth::headers::authorization::Scheme">Scheme</a>><aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralEq.html"title="trait core::marker::StructuralEq">StructuralEq</a> for <aclass="struct"href="struct.Authorization.html"title="struct actix_web_httpauth::headers::authorization::Authorization">Authorization</a><S></h3></section><sectionid="impl-StructuralPartialEq-for-Authorization%3CS%3E"class="impl has-srclink"><aclass="srclink rightside"href="../../../src/actix_web_httpauth/headers/authorization/header.rs.html#30">source</a><ahref="#impl-StructuralPartialEq-for-Authorization%3CS%3E"class="anchor">§</a><h3class="code-header">impl<S: <aclass="trait"href="trait.Scheme.html"title="traitactix_web_httpauth::headers::authorization::Sc
</div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"><summary><sectionid="impl-Instrument-for-Authorization%3CS%3E"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-Authorization%3CS%3E"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="fn">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="fn">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="fn">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