2022-11-12 14:34:14 +01:00
<!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 = "Extractor for HTTP Bearer auth" > < meta name = "keywords" content = "rust, rustlang, rust-lang, BearerAuth" > < title > BearerAuth in actix_web_httpauth::extractors::bearer - 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-eabf764633b9d7be.css" id = "mainThemeStyle" > < link rel = "stylesheet" id = "themeStyle" href = "../../../static.files/light-777f3e9583f8c92d.css" > < link rel = "stylesheet" disabled href = "../../../static.files/dark-e2f4109f2e82e3af.css" > < link rel = "stylesheet" disabled href = "../../../static.files/ayu-c360e709a65bed99.css" > < script id = "default-settings" > < / script > < script src = "../../../static.files/storage-d43fa987303ecbbb.js" > < / script > < script defer src = "sidebar-items.js" > < / script > < script defer src = "../../../static.files/main-c2d2a5dbaed13e6b.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 struct" > <!-- [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" > ☰ < / button > < a class = "sidebar-logo" href = "../../../actix_web_httpauth/index.html" > < div class = "logo-container" > < img class = "rust-logo" src = "../../../static.files/rust-logo-151179464ae7ed46.svg" alt = "logo" > < / div > < / a > < h2 > < / h2 > < / nav > < nav class = "sidebar" > < a class = "sidebar-logo" href = "../../../actix_web_httpauth/index.html" > < div class = "logo-container" > < img class = "rust-logo" src = "../../../static.files/rust-logo-151179464ae7ed46.svg" alt = "logo" > < / div > < / a > < h2 class = "location" > < a href = "#" > BearerAuth< / a > < / h2 > < div class = "sidebar-elems" > < section > < h3 > < a href = "#implementations" > Methods< / a > < / h3 > < ul class = "block" > < li > < a href = "#method.token" > token< / a > < / li > < / ul > < h3 > < a href = "#trait-implementations" > Trait Implementations< / a > < / h3 > < ul class = "block" > < li > < a href = "#impl-Clone-for-BearerAuth" > Clone< / a > < / li > < li > < a href = "#impl-Debug-for-BearerAuth" > Debug< / a > < / li > < li > < a href = "#impl-FromRequest-for-BearerAuth" > FromRequest< / a > < / li > < / ul > < h3 > < a href = "#synthetic-implementations" > Auto Trait Implementations< / a > < / h3 > < ul class = "block" > < li > < a href = "#impl-RefUnwindSafe-for-BearerAuth" > RefUnwindSafe< / a > < / li > < li > < a href = "#impl-Send-for-BearerAuth" > Send< / a > < / li > < li > < a href = "#impl-Sync-for-BearerAuth" > Sync< / a > < / li > < li > < a href = "#impl-Unpin-for-BearerAuth" > Unpin< / a > < / li > < li > < a href = "#impl-UnwindSafe-for-BearerAuth" > UnwindSafe< / a > < / li > < / ul > < h3 > < a href = "#blanket-implementations" > Blanket Implementations< / a > < / h3 > < ul class = "block" > < li > < a href = "#impl-Any-for-BearerAuth" > Any< / a > < / li > < li > < a href = "#impl-Borrow%3CT%3E-for-BearerAuth" > Borrow< T> < / a > < / li > < li > < a href = "#impl-BorrowMut%3CT%3E-for-BearerA
2022-07-21 03:52:33 +02:00
< h2 id = "examples" > < a href = "#examples" > Examples< / a > < / h2 >
2022-08-24 19:10:06 +02:00
< div class = "example-wrap" > < pre class = "rust rust-example-rendered" > < code > < span class = "kw" > use < / span > actix_web_httpauth::extractors::bearer::BearerAuth;
2021-03-22 12:49:07 +01:00
2022-08-24 19:10:06 +02:00
< span class = "kw" > async fn < / span > index(auth: BearerAuth) -> String {
< span class = "macro" > format!< / span > (< span class = "string" > " Hello, user with token {}!" < / span > , auth.token())
2021-08-31 00:13:55 +02:00
}< / code > < / pre > < / div >
2021-06-27 08:05:12 +02:00
< p > If authentication fails, this extractor fetches the < a href = "struct.Config.html" title = "Config" > < code > Config< / code > < / a > instance
2021-03-22 12:49:07 +01:00
from the [app data] in order to properly form the < code > WWW-Authenticate< / code >
response header.< / p >
2022-07-21 03:52:33 +02:00
< h2 id = "examples-1" > < a href = "#examples-1" > Examples< / a > < / h2 >
2022-08-24 19:10:06 +02:00
< div class = "example-wrap" > < pre class = "rust rust-example-rendered" > < code > < span class = "kw" > use < / span > actix_web::{web, App};
< span class = "kw" > use < / span > actix_web_httpauth::extractors::bearer::{< span class = "self" > self< / span > , BearerAuth};
2021-03-22 12:49:07 +01:00
2022-08-24 19:10:06 +02:00
< span class = "kw" > async fn < / span > index(auth: BearerAuth) -> String {
< span class = "macro" > format!< / span > (< span class = "string" > " Hello, {}!" < / span > , auth.token())
2021-03-22 12:49:07 +01:00
}
2022-08-24 19:10:06 +02:00
App::new()
.app_data(
bearer::Config::default()
.realm(< span class = "string" > " Restricted area" < / span > )
.scope(< span class = "string" > " email photo" < / span > ),
2022-07-21 03:52:33 +02:00
)
2022-08-24 19:10:06 +02:00
.service(web::resource(< span class = "string" > " /index.html" < / span > ).route(web::get().to(index)));< / code > < / pre > < / div >
2022-10-15 13:40:31 +02:00
< / div > < / details > < h2 id = "implementations" class = "small-section-header" > Implementations< a href = "#implementations" class = "anchor" > < / a > < / h2 > < div id = "implementations-list" > < details class = "rustdoc-toggle implementors-toggle" open > < summary > < section id = "impl-BearerAuth" class = "impl has-srclink" > < a class = "srclink rightside" href = "../../../src/actix_web_httpauth/extractors/bearer.rs.html#86-91" > source< / a > < a href = "#impl-BearerAuth" class = "anchor" > < / a > < h3 class = "code-header" > impl < a class = "struct" href = "struct.BearerAuth.html" title = "struct actix_web_httpauth::extractors::bearer::BearerAuth" > BearerAuth< / a > < / h3 > < / section > < / summary > < div class = "impl-items" > < details class = "rustdoc-toggle method-toggle" open > < summary > < section id = "method.token" class = "method has-srclink" > < a class = "srclink rightside" href = "../../../src/actix_web_httpauth/extractors/bearer.rs.html#88-90" > source< / a > < h4 class = "code-header" > pub fn < a href = "#method.token" class = "fnname" > token< / a > (& self) -> & < a class = "primitive" href = "https://doc.rust-lang.org/nightly/std/primitive.str.html" > str< / a > < / h4 > < / section > < / summary > < div class = "docblock" > < p > Returns bearer token provided by client.< / p >
2022-10-29 00:47:36 +02:00
< / div > < / details > < / div > < / details > < / div > < h2 id = "trait-implementations" class = "small-section-header" > Trait Implementations< a href = "#trait-implementations" class = "anchor" > < / a > < / h2 > < div id = "trait-implementations-list" > < details class = "rustdoc-toggle implementors-toggle" open > < summary > < section id = "impl-Clone-for-BearerAuth" class = "impl has-srclink" > < a class = "srclink rightside" href = "../../../src/actix_web_httpauth/extractors/bearer.rs.html#83" > source< / a > < a href = "#impl-Clone-for-BearerAuth" class = "anchor" > < / a > < h3 class = "code-header" > impl < a class = "trait" href = "https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title = "trait core::clone::Clone" > Clone< / a > for < a class = "struct" href = "struct.BearerAuth.html" title = "struct actix_web_httpauth::extractors::bearer::BearerAuth" > BearerAuth< / a > < / h3 > < / section > < / summary > < div class = "impl-items" > < details class = "rustdoc-toggle method-toggle" open > < summary > < section id = "method.clone" class = "method trait-impl has-srclink" > < a class = "srclink rightside" href = "../../../src/actix_web_httpauth/extractors/bearer.rs.html#83" > source< / a > < a href = "#method.clone" class = "anchor" > < / a > < h4 class = "code-header" > fn < a href = "https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class = "fnname" > clone< / a > (& self) -> < a class = "struct" href = "struct.BearerAuth.html" title = "struct actix_web_httpauth::extractors::bearer::BearerAuth" > BearerAuth< / a > < / h4 > < / section > < / summary > < div class = 'docblock' > Returns a copy of the value. < a href = "https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" > Read more< / a > < / div > < / details > < details class = "rustdoc-toggle method-toggle" open > < summary > < section id = "method.clone_from" class = "method trait-impl has-srclink" > < span class = "rightside" > < span class = "since" title = "Stable since Rust version 1.0.0" > 1.0.0< / span > · < a class = "srclink" href = "https://doc.rust-lang.org/nightly/src/core/clone.rs.html#132-134" > source< / a > < / span > < a href = "#method.clone_from" class = "anchor" > < / a > < h4 class = "code-header" > fn < a href = "https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class = "fnname" > clone_from< / a > (& mut self, source: < a class = "primitive" href = "https://doc.rust-lang.org/nightly/std/primitive.reference.html" > & < / a > Self)< / h4 > < / section > < / summary > < div class = 'docblock' > Performs copy-assignment from < code > source< / code > . < a href = "https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" > Read more< / a > < / div > < / details > < / div > < / details > < details class = "rustdoc-toggle implementors-toggle" open > < summary > < section id = "impl-Debug-for-BearerAuth" class = "impl has-srclink" > < a class = "srclink rightside" href = "../../../src/actix_web_httpauth/extractors/bearer.rs.html#83" > source< / a > < a href = "#impl-Debug-for-BearerAuth" class = "anchor" > < / a > < h3 class = "code-header" > impl < a class = "trait" href = "https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title = "trait core::fmt::Debug" > Debug< / a > for < a class = "struct" href = "struct.BearerAuth.html" title = "struct actix_web_httpauth::extractors::bearer::BearerAuth" > BearerAuth< / a > < / h3 > < / section > < / summary > < div class = "impl-items" > < details class = "rustdoc-toggle method-toggle" open > < summary > < section id = "method.fmt" class = "method trait-impl has-srclink" > < a class = "srclink rightside" href = "../../../src/actix_web_httpauth/extractors/bearer.rs.html#83" > source< / a > < a href = "#method.fmt" class = "anchor" > < / a > < h4 class = "code-header" > fn < a href = "https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class = "fnname" > fmt< / a > (& self, f: & mut < a class = "struct" href = "https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title = "struct core::fmt::Formatter" > Formatter< / a > < '_> ) -> < a class = "type" href = "https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title = "type core::fmt::Result" > Result< / a > < / h4 > < / section > < / summary > < div class = 'docblock' > Formats the value using the given formatter. < a href = "https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" > Read more< / a > < / div > < / details > < / div > < / details > < details class = "rustdoc-toggle implementors-tog
2022-10-15 13:40:31 +02:00
< / div > < / details > < / div > < / details > < details class = "rustdoc-toggle implementors-toggle" > < summary > < section id = "impl-Instrument-for-BearerAuth" class = "impl has-srclink" > < a class = "srclink rightside" href = "https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#276" > source< / a > < a href = "#impl-Instrument-for-BearerAuth" class = "anchor" > < / a > < h3 class = "code-header" > impl< T> < a class = "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 > < div class = "impl-items" > < details class = "rustdoc-toggle method-toggle" open > < summary > < section id = "method.instrument" class = "method trait-impl has-srclink" > < a class = "srclink rightside" href = "https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#82" > source< / a > < a href = "#method.instrument" class = "anchor" > < / a > < h4 class = "code-header" > fn < a href = "https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.instrument" class = "fnname" > instrument< / a > (self, span: < a class = "struct" href = "https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html" title = "struct tracing::span::Span" > Span< / a > ) -> < a class = "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 > < div class = 'docblock' > Instruments this type with the provided < a href = "https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html" title = "Span" > < code > Span< / code > < / a > , returning an
< code > Instrumented< / code > wrapper. < a href = "https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.instrument" > Read more< / a > < / div > < / details > < details class = "rustdoc-toggle method-toggle" open > < summary > < section id = "method.in_current_span" class = "method trait-impl has-srclink" > < a class = "srclink rightside" href = "https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#121" > source< / a > < a href = "#method.in_current_span" class = "anchor" > < / a > < h4 class = "code-header" > fn < a href = "https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.in_current_span" class = "fnname" > in_current_span< / a > (self) -> < a class = "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 > < div class = 'docblock' > Instruments this type with the < a href = "https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html#method.current" > current< / a > < a href = "https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html" > < code > Span< / code > < / a > , returning an
< code > Instrumented< / code > wrapper. < a href = "https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.in_current_span" > Read more< / a > < / div > < / details > < / div > < / details > < details class = "rustdoc-toggle implementors-toggle" > < summary > < section id = "impl-Into%3CU%3E-for-BearerAuth" class = "impl has-srclink" > < a class = "srclink rightside" href = "https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#717" > source< / a > < a href = "#impl-Into%3CU%3E-for-BearerAuth" class = "anchor" > < / a > < h3 class = "code-header" > impl< T, U> < a class = "trait" href = "https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title = "trait core::convert::Into" > Into< / a > < U> for T< span class = "where fmt-newline" > where< br > U: < a class = "trait" href = "https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title = "trait core::convert::From" > From< / a > < T> ,< / span > < / h3 > < / section > < / summary > < div class = "impl-items" > < details class = "rustdoc-toggle method-toggle" open > < summary > < section id = "method.into" class = "method trait-impl has-srclink" > < span class = "rightside" > < span class = "since" title = "const unstable" > const: < a href = "https://github.com/rust-lang/rust/issues/88674" title = "Tracking issue for const_convert" > unstable< / a > < / span > · < a class = "srclink" href = "https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#725" > source< / a > < / span > < a href = "#method.into" class = "anchor" > < / a > < h4 class = "code-header" > fn < a href = "https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class = "fnname" > into< / a > (self) -> U< / h4 > < / section > < / summary > < div class = "docblock" > < p > Calls < code > U::from(self)< / code > .< / p >
2022-02-18 04:35:44 +01:00
< p > That is, this conversion is whatever the implementation of
< code > < a href = "https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title = "From" > From< / a > < T> for U< / code > chooses to do.< / p >
2022-10-30 17:29:12 +01:00
< / div > < / details > < / div > < / details > < details class = "rustdoc-toggle implementors-toggle" > < summary > < section id = "impl-Same%3CT%3E-for-BearerAuth" class = "impl has-srclink" > < a class = "srclink rightside" href = "https://docs.rs/typenum/1.15.0/src/typenum/type_operators.rs.html#34" > source< / a > < a href = "#impl-Same%3CT%3E-for-BearerAuth" class = "anchor" > < / a > < h3 class = "code-header" > impl< T> < a class = "trait" href = "https://docs.rs/typenum/1.15.0/typenum/type_operators/trait.Same.html" title = "trait typenum::type_operators::Same" > Same< / a > < T> for T< / h3 > < / section > < / summary > < div class = "impl-items" > < details class = "rustdoc-toggle" open > < summary > < section id = "associatedtype.Output" class = "associatedtype trait-impl has-srclink" > < a href = "#associatedtype.Output" class = "anchor" > < / a > < h4 class = "code-header" > type < a href = "https://docs.rs/typenum/1.15.0/typenum/type_operators/trait.Same.html#associatedtype.Output" class = "associatedtype" > Output< / a > = T< / h4 > < / section > < / summary > < div class = 'docblock' > Should always be < code > Self< / code > < / div > < / details > < / div > < / details > < details class = "rustdoc-toggle implementors-toggle" > < summary > < section id = "impl-ToOwned-for-BearerAuth" class = "impl has-srclink" > < a class = "srclink rightside" href = "https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#82" > source< / a > < a href = "#impl-ToOwned-for-BearerAuth" class = "anchor" > < / a > < h3 class = "code-header" > impl< T> < a class = "trait" href = "https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title = "trait alloc::borrow::ToOwned" > ToOwned< / a > for T< span class = "where fmt-newline" > where< br > T: < a class = "trait" href = "https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title = "trait core::clone::Clone" > Clone< / a > ,< / span > < / h3 > < / section > < / summary > < div class = "impl-items" > < details class = "rustdoc-toggle" open > < summary > < section id = "associatedtype.Owned" class = "associatedtype trait-impl has-srclink" > < a href = "#associatedtype.Owned" class = "anchor" > < / a > < h4 class = "code-header" > type < a href = "https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class = "associatedtype" > Owned< / a > = T< / h4 > < / section > < / summary > < div class = 'docblock' > The resulting type after obtaining ownership.< / div > < / details > < details class = "rustdoc-toggle method-toggle" open > < summary > < section id = "method.to_owned" class = "method trait-impl has-srclink" > < a class = "srclink rightside" href = "https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#87" > source< / a > < a href = "#method.to_owned" class = "anchor" > < / a > < h4 class = "code-header" > fn < a href = "https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class = "fnname" > to_owned< / a > (& self) -> T< / h4 > < / section > < / summary > < div class = 'docblock' > Creates owned data from borrowed data, usually by cloning. < a href = "https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" > Read more< / a > < / div > < / details > < details class = "rustdoc-toggle method-toggle" open > < summary > < section id = "method.clone_into" class = "method trait-impl has-srclink" > < a class = "srclink rightside" href = "https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#91" > source< / a > < a href = "#method.clone_into" class = "anchor" > < / a > < h4 class = "code-header" > fn < a href = "https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" class = "fnname" > clone_into< / a > (& self, target: < a class = "primitive" href = "https://doc.rust-lang.org/nightly/std/primitive.reference.html" > & mut < / a > T)< / h4 > < / section > < / summary > < div class = 'docblock' > Uses borrowed data to replace owned data, usually by cloning. < a href = "https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" > Read more< / a > < / div > < / details > < / div > < / details > < details class = "rustdoc-toggle implementors-toggle" > < summary > < section id = "impl-TryFrom%3CU%3E-for-BearerAuth" class = "impl has-srclink" > < a class = "srclink rightside" href = "https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#775" > source< / a > < a href = "#impl-TryFrom%3CU%3E-for-BearerAuth" class = "anchor" > < / a > < h3 class = "code-header" > impl< T, U> < a class = "trait" href = "htt
2022-10-15 13:40:31 +02:00
< a href = "https://docs.rs/tracing/0.1.37/tracing/instrument/struct.WithDispatch.html" title = "WithDispatch" > < code > WithDispatch< / code > < / a > wrapper. < a href = "https://docs.rs/tracing/0.1.37/tracing/instrument/trait.WithSubscriber.html#method.with_subscriber" > Read more< / a > < / div > < / details > < details class = "rustdoc-toggle method-toggle" open > < summary > < section id = "method.with_current_subscriber" class = "method trait-impl has-srclink" > < a class = "srclink rightside" href = "https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#221" > source< / a > < a href = "#method.with_current_subscriber" class = "anchor" > < / a > < h4 class = "code-header" > fn < a href = "https://docs.rs/tracing/0.1.37/tracing/instrument/trait.WithSubscriber.html#method.with_current_subscriber" class = "fnname" > with_current_subscriber< / a > (self) -> < a class = "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 > < div class = 'docblock' > Attaches the current < a href = "https://docs.rs/tracing/0.1.37/tracing/dispatcher/index.html#setting-the-default-subscriber" > default< / a > < a href = "https://docs.rs/tracing-core/0.1.22/tracing_core/subscriber/trait.Subscriber.html" > < code > Subscriber< / code > < / a > to this type, returning a
2022-11-12 14:34:14 +01:00
< a href = "https://docs.rs/tracing/0.1.37/tracing/instrument/struct.WithDispatch.html" title = "WithDispatch" > < code > WithDispatch< / code > < / a > wrapper. < a href = "https://docs.rs/tracing/0.1.37/tracing/instrument/trait.WithSubscriber.html#method.with_current_subscriber" > Read more< / a > < / div > < / details > < / div > < / details > < / div > < / 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 (42325c525 2022-11-11)" data-search-js = "search-39ee4160c7dc16c9.js" data-settings-js = "settings-3a0b9947ba1bd99a.js" data-settings-css = "settings-a66f7524084a489a.css" > < / div > < / body > < / html >