2022-09-21 11:18:37 +02: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 Basic auth." > < meta name = "keywords" content = "rust, rustlang, rust-lang, BasicAuth" > < title > BasicAuth in actix_web_httpauth::extractors::basic - Rust< / 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 = "sidebar-items.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 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 = "../../../rust-logo.svg" alt = "logo" > < / div > < / a > < h2 class = "location" > < / h2 > < / nav > < nav class = "sidebar" > < a class = "sidebar-logo" href = "../../../actix_web_httpauth/index.html" > < div class = "logo-container" > < img class = "rust-logo" src = "../../../rust-logo.svg" alt = "logo" > < / div > < / a > < h2 class = "location" > < a href = "#" > BasicAuth< / a > < / h2 > < div class = "sidebar-elems" > < section > < div class = "block" > < h3 class = "sidebar-title" > < a href = "#implementations" > Methods< / a > < / h3 > < ul > < li > < a href = "#method.password" > password< / a > < / li > < li > < a href = "#method.user_id" > user_id< / a > < / li > < / ul > < / div > < div class = "block" > < h3 class = "sidebar-title" > < a href = "#trait-implementations" > Trait Implementations< / a > < / h3 > < ul > < li > < a href = "#impl-Clone-for-BasicAuth" > Clone< / a > < / li > < li > < a href = "#impl-Debug-for-BasicAuth" > Debug< / a > < / li > < li > < a href = "#impl-FromRequest-for-BasicAuth" > FromRequest< / a > < / li > < / ul > < / div > < div class = "block" > < h3 class = "sidebar-title" > < a href = "#synthetic-implementations" > Auto Trait Implementations< / a > < / h3 > < ul > < li > < a href = "#impl-RefUnwindSafe-for-BasicAuth" > RefUnwindSafe< / a > < / li > < li > < a href = "#impl-Send-for-BasicAuth" > Send< / a > < / li > < li > < a href = "#impl-Sync-for-BasicAuth" > Sync< / a > < / li > < li > < a href = "#impl-Unpin-for-BasicAuth" > Unpin< / a > < / li > < li > < a href = "#impl-UnwindSafe-for-BasicAuth" > UnwindSafe< / a > < / li > < / ul > < / div > < div class = "block" > < h3 class = "sidebar-title" > < a href = "#blanket-implementations" > Blanket Implementations< / a > < / h3 > < ul > < li > < a href = "#impl-Any-for-BasicAuth" > Any< / a > < / li > < li > < a href = "#impl-Borrow%3CT%3E-for-BasicAuth" > Borrow< T> < / a > < / li > < li > < a href = "#impl-BorrowMut%3CT%3E-for-BasicAuth" > BorrowMut< T> < / a > < / li > < li > < a href = "#impl-From%3CT%3E-for-BasicAuth" > From< T> < / a > < / li > < li > < a href = "#impl-Instrument-for-BasicAuth" > Instrument< / a > < / li > < li > < a href = "#impl-Into%3CU%3E-for-BasicAuth" > Into< U> < / a > < / li > < li > < a href = "#impl-Same%3CT%3E-for-BasicAuth" > Same< T> < / a > < / li > < li > < a href = "#impl-ToOwned-for-BasicAuth" > ToOwned< / a > < / li > < li > < a href = "#impl-TryFrom%3CU%3
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::basic::BasicAuth;
2021-03-22 12:49:07 +01:00
2022-08-24 19:10:06 +02:00
< span class = "kw" > async fn < / span > index(auth: BasicAuth) -> String {
< span class = "macro" > format!< / span > (< span class = "string" > " Hello, {}!" < / span > , auth.user_id())
2021-08-31 00:13:55 +02:00
}< / code > < / pre > < / div >
2022-07-21 03:52:33 +02:00
< p > If authentication fails, this extractor fetches the < a href = "struct.Config.html" title = "Config" > < code > Config< / code > < / a > instance from the < a href = "https://docs.rs/actix-web/4/actix_web/struct.App.html#method.app_data" > app data< / a > in
order to properly form the < code > WWW-Authenticate< / code > response header.< / p >
< 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::basic::{< span class = "self" > self< / span > , BasicAuth};
2021-03-22 12:49:07 +01:00
2022-08-24 19:10:06 +02:00
< span class = "kw" > async fn < / span > index(auth: BasicAuth) -> String {
< span class = "macro" > format!< / span > (< span class = "string" > " Hello, {}!" < / span > , auth.user_id())
2021-03-22 12:49:07 +01:00
}
2022-08-24 19:10:06 +02:00
App::new()
.app_data(basic::Config::default().realm(< span class = "string" > " Restricted area" < / span > ))
.service(web::resource(< span class = "string" > " /index.html" < / span > ).route(web::get().to(index)));< / code > < / pre > < / div >
2022-08-28 21:33:30 +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-BasicAuth" class = "impl has-srclink" > < a class = "srclink rightside" href = "../../../src/actix_web_httpauth/extractors/basic.rs.html#80-90" > source< / a > < a href = "#impl-BasicAuth" class = "anchor" > < / a > < h3 class = "code-header in-band" > impl < a class = "struct" href = "struct.BasicAuth.html" title = "struct actix_web_httpauth::extractors::basic::BasicAuth" > BasicAuth< / a > < / h3 > < / section > < / summary > < div class = "impl-items" > < details class = "rustdoc-toggle method-toggle" open > < summary > < section id = "method.user_id" class = "method has-srclink" > < a class = "srclink rightside" href = "../../../src/actix_web_httpauth/extractors/basic.rs.html#82-84" > source< / a > < h4 class = "code-header" > pub fn < a href = "#method.user_id" class = "fnname" > user_id< / 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 client’ s user-ID.< / p >
< / div > < / details > < details class = "rustdoc-toggle method-toggle" open > < summary > < section id = "method.password" class = "method has-srclink" > < a class = "srclink rightside" href = "../../../src/actix_web_httpauth/extractors/basic.rs.html#87-89" > source< / a > < h4 class = "code-header" > pub fn < a href = "#method.password" class = "fnname" > password< / a > (& self) -> < a class = "enum" href = "https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title = "enum core::option::Option" > Option< / a > < & < a class = "primitive" href = "https://doc.rust-lang.org/nightly/std/primitive.str.html" > str< / a > > < / h4 > < / section > < / summary > < div class = "docblock" > < p > Returns client’ s password.< / p >
2022-09-25 22:12:08 +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-BasicAuth" class = "impl has-srclink" > < a class = "srclink rightside" href = "../../../src/actix_web_httpauth/extractors/basic.rs.html#77" > source< / a > < a href = "#impl-Clone-for-BasicAuth" class = "anchor" > < / a > < h3 class = "code-header in-band" > 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.BasicAuth.html" title = "struct actix_web_httpauth::extractors::basic::BasicAuth" > BasicAuth< / 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/basic.rs.html#77" > 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.BasicAuth.html" title = "struct actix_web_httpauth::extractors::basic::BasicAuth" > BasicAuth< / 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-BasicAuth" class = "impl has-srclink" > < a class = "srclink rightside" href = "../../../src/actix_web_httpauth/extractors/basic.rs.html#77" > source< / a > < a href = "#impl-Debug-for-BasicAuth" class = "anchor" > < / a > < h3 class = "code-header in-band" > 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.BasicAuth.html" title = "struct actix_web_httpauth::extractors::basic::BasicAuth" > BasicAuth< / 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/basic.rs.html#77" > 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-toggle"
2022-09-21 11:18:37 +02:00
< / div > < / details > < / div > < / details > < details class = "rustdoc-toggle implementors-toggle" > < summary > < section id = "impl-Instrument-for-BasicAuth" class = "impl has-srclink" > < a class = "srclink rightside" href = "https://docs.rs/tracing/0.1.36/src/tracing/instrument.rs.html#276" > source< / a > < a href = "#impl-Instrument-for-BasicAuth" class = "anchor" > < / a > < h3 class = "code-header in-band" > impl< T> < a class = "trait" href = "https://docs.rs/tracing/0.1.36/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.36/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.36/tracing/instrument/trait.Instrument.html#method.instrument" class = "fnname" > instrument< / a > (self, span: < a class = "struct" href = "https://docs.rs/tracing/0.1.36/tracing/span/struct.Span.html" title = "struct tracing::span::Span" > Span< / a > ) -> < a class = "struct" href = "https://docs.rs/tracing/0.1.36/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.36/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.36/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.36/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.36/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.36/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.36/tracing/span/struct.Span.html#method.current" > current< / a > < a href = "https://docs.rs/tracing/0.1.36/tracing/span/struct.Span.html" > < code > Span< / code > < / a > , returning an
2022-09-25 22:12:08 +02:00
< code > Instrumented< / code > wrapper. < a href = "https://docs.rs/tracing/0.1.36/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-BasicAuth" class = "impl has-srclink" > < a class = "srclink rightside" href = "https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#549" > source< / a > < a href = "#impl-Into%3CU%3E-for-BasicAuth" class = "anchor" > < / a > < h3 class = "code-header in-band" > 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#557" > 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-09-25 22:12:08 +02:00
< / div > < / details > < / div > < / details > < details class = "rustdoc-toggle implementors-toggle" > < summary > < section id = "impl-Same%3CT%3E-for-BasicAuth" 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-BasicAuth" class = "anchor" > < / a > < h3 class = "code-header in-band" > 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-BasicAuth" class = "impl has-srclink" > < a class = "srclink rightside" href = "https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#83" > source< / a > < a href = "#impl-ToOwned-for-BasicAuth" class = "anchor" > < / a > < h3 class = "code-header in-band" > 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#88" > 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#92" > 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-BasicAuth" class = "impl has-srclink" > < a class = "srclink rightside" href = "https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#607" > source< / a > < a href = "#impl-TryFrom%3CU%3E-for-BasicAuth" class = "anchor" > < / a > < h3 class = "code-header in-band" > impl< T, U> < a class
2022-09-21 11:18:37 +02:00
< a href = "https://docs.rs/tracing/0.1.36/tracing/instrument/struct.WithDispatch.html" title = "WithDispatch" > < code > WithDispatch< / code > < / a > wrapper. < a href = "https://docs.rs/tracing/0.1.36/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.36/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.36/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.36/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.36/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-09-25 22:12:08 +02:00
< a href = "https://docs.rs/tracing/0.1.36/tracing/instrument/struct.WithDispatch.html" title = "WithDispatch" > < code > WithDispatch< / code > < / a > wrapper. < a href = "https://docs.rs/tracing/0.1.36/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-current-crate = "actix_web_httpauth" data-themes = "ayu,dark,light" data-resource-suffix = "" data-rustdoc-version = "1.66.0-nightly (3f83906b3 2022-09-24)" > < / div > < / body > < / html >