mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-30 16:34:26 +02:00
Deploying to gh-pages from @ actix/actix-web@26efa64278 🚀
This commit is contained in:
137
actix_web/dev/enum.JsonBody.html
Normal file
137
actix_web/dev/enum.JsonBody.html
Normal file
File diff suppressed because one or more lines are too long
270
actix_web/dev/enum.Payload.html
Normal file
270
actix_web/dev/enum.Payload.html
Normal file
File diff suppressed because one or more lines are too long
38
actix_web/dev/fn.fn_factory.html
Normal file
38
actix_web/dev/fn.fn_factory.html
Normal file
@ -0,0 +1,38 @@
|
||||
<!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="Create `ServiceFactory` for function that can produce services"><title>fn_factory in actix_web::dev - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button><a class="logo-container" href="../../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt="logo"></a><h2><a href="../../actix_web/index.html">actix_web</a><span class="version">4.6.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In actix_web::dev</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">actix_web</a>::<wbr><a href="index.html">dev</a>::<wbr><a class="fn" href="#">fn_factory</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn fn_factory<F, Cfg, Srv, Req, Fut, Err>(
|
||||
f: F
|
||||
) -> FnServiceNoConfig<F, Cfg, Srv, Req, Fut, Err><div class="where">where
|
||||
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>() -> Fut,
|
||||
Fut: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Srv, Err>>,
|
||||
Srv: <a class="trait" href="trait.Service.html" title="trait actix_web::dev::Service">Service</a><Req>,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Create <code>ServiceFactory</code> for function that can produce services</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::io;
|
||||
<span class="kw">use </span>actix_service::{fn_factory, fn_service, Service, ServiceFactory};
|
||||
<span class="kw">use </span>futures_util::future::ok;
|
||||
|
||||
<span class="doccomment">/// Service that divides two usize values.
|
||||
</span><span class="kw">async fn </span>div((x, y): (usize, usize)) -> <span class="prelude-ty">Result</span><usize, io::Error> {
|
||||
<span class="kw">if </span>y == <span class="number">0 </span>{
|
||||
<span class="prelude-val">Err</span>(io::Error::new(io::ErrorKind::Other, <span class="string">"divide by zero"</span>))
|
||||
} <span class="kw">else </span>{
|
||||
<span class="prelude-val">Ok</span>(x / y)
|
||||
}
|
||||
}
|
||||
|
||||
<span class="attr">#[actix_rt::main]
|
||||
</span><span class="kw">async fn </span>main() -> io::Result<()> {
|
||||
<span class="comment">// Create service factory that produces `div` services
|
||||
</span><span class="kw">let </span>factory = fn_factory(|| {
|
||||
ok::<<span class="kw">_</span>, io::Error>(fn_service(div))
|
||||
});
|
||||
|
||||
<span class="comment">// construct new service
|
||||
</span><span class="kw">let </span>srv = factory.new_service(()).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
|
||||
<span class="comment">// now we can use `div` service
|
||||
</span><span class="kw">let </span>result = srv.call((<span class="number">10</span>, <span class="number">20</span>)).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
|
||||
<span class="macro">println!</span>(<span class="string">"10 / 20 = {}"</span>, result);
|
||||
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
6
actix_web/dev/fn.fn_service.html
Normal file
6
actix_web/dev/fn.fn_service.html
Normal file
@ -0,0 +1,6 @@
|
||||
<!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="Create `ServiceFactory` for function that can act as a `Service`"><title>fn_service in actix_web::dev - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button><a class="logo-container" href="../../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt="logo"></a><h2><a href="../../actix_web/index.html">actix_web</a><span class="version">4.6.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In actix_web::dev</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">actix_web</a>::<wbr><a href="index.html">dev</a>::<wbr><a class="fn" href="#">fn_service</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn fn_service<F, Fut, Req, Res, Err, Cfg>(
|
||||
f: F
|
||||
) -> FnServiceFactory<F, Fut, Req, Res, Err, Cfg><div class="where">where
|
||||
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(Req) -> Fut + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,
|
||||
Fut: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Res, Err>>,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Create <code>ServiceFactory</code> for function that can act as a <code>Service</code></p>
|
||||
</div></details></section></div></main></body></html>
|
10
actix_web/dev/index.html
Normal file
10
actix_web/dev/index.html
Normal file
File diff suppressed because one or more lines are too long
11
actix_web/dev/macro.always_ready!.html
Normal file
11
actix_web/dev/macro.always_ready!.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=macro.always_ready.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="macro.always_ready.html">macro.always_ready.html</a>...</p>
|
||||
<script>location.replace("macro.always_ready.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
24
actix_web/dev/macro.always_ready.html
Normal file
24
actix_web/dev/macro.always_ready.html
Normal file
@ -0,0 +1,24 @@
|
||||
<!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="An implementation of `poll_ready` that always signals readiness."><title>always_ready in actix_web::dev - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc macro"><!--[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" title="show sidebar"></button><a class="logo-container" href="../../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt="logo"></a><h2><a href="../../actix_web/index.html">actix_web</a><span class="version">4.6.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In actix_web::dev</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Macro <a href="../index.html">actix_web</a>::<wbr><a href="index.html">dev</a>::<wbr><a class="macro" href="#">always_ready</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><span class="macro">macro_rules!</span> always_ready {
|
||||
() => { ... };
|
||||
}</pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An implementation of <a href=""><code>poll_ready</code></a> that always signals readiness.</p>
|
||||
<p>This should only be used for basic leaf services that have no concept of un-readiness.
|
||||
For wrapper or other service types, use [<code>forward_ready!</code>] for simple cases or write a bespoke
|
||||
<code>poll_ready</code> implementation.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>actix_service::Service;
|
||||
<span class="kw">use </span>futures_util::future::{ready, Ready};
|
||||
|
||||
<span class="kw">struct </span>IdentityService;
|
||||
|
||||
<span class="kw">impl </span>Service<u32> <span class="kw">for </span>IdentityService {
|
||||
<span class="kw">type </span>Response = u32;
|
||||
<span class="kw">type </span>Error = ();
|
||||
<span class="kw">type </span>Future = Ready<<span class="prelude-ty">Result</span><<span class="self">Self</span>::Response, <span class="self">Self</span>::Error>>;
|
||||
|
||||
<span class="macro">actix_service::always_ready!</span>();
|
||||
|
||||
<span class="kw">fn </span>call(<span class="kw-2">&</span><span class="self">self</span>, req: u32) -> <span class="self">Self</span>::Future {
|
||||
ready(<span class="prelude-val">Ok</span>(req))
|
||||
}
|
||||
}</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
11
actix_web/dev/macro.forward_ready!.html
Normal file
11
actix_web/dev/macro.forward_ready!.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=macro.forward_ready.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="macro.forward_ready.html">macro.forward_ready.html</a>...</p>
|
||||
<script>location.replace("macro.forward_ready.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
28
actix_web/dev/macro.forward_ready.html
Normal file
28
actix_web/dev/macro.forward_ready.html
Normal file
@ -0,0 +1,28 @@
|
||||
<!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="An implementation of `poll_ready` that forwards readiness checks to a named struct field."><title>forward_ready in actix_web::dev - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc macro"><!--[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" title="show sidebar"></button><a class="logo-container" href="../../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt="logo"></a><h2><a href="../../actix_web/index.html">actix_web</a><span class="version">4.6.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In actix_web::dev</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Macro <a href="../index.html">actix_web</a>::<wbr><a href="index.html">dev</a>::<wbr><a class="macro" href="#">forward_ready</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><span class="macro">macro_rules!</span> forward_ready {
|
||||
(<span class="macro-nonterminal">$field</span>:ident) => { ... };
|
||||
}</pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An implementation of <a href="trait.Service.html#tymethod.poll_ready" title="method actix_web::dev::Service::poll_ready"><code>poll_ready</code></a> that forwards readiness checks to a
|
||||
named struct field.</p>
|
||||
<p>Tuple structs are not supported.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>actix_service::Service;
|
||||
<span class="kw">use </span>futures_util::future::{ready, Ready};
|
||||
|
||||
<span class="kw">struct </span>WrapperService<S> {
|
||||
inner: S,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span><S> Service<()> <span class="kw">for </span>WrapperService<S>
|
||||
<span class="kw">where
|
||||
</span>S: Service<()>,
|
||||
{
|
||||
<span class="kw">type </span>Response = S::Response;
|
||||
<span class="kw">type </span>Error = S::Error;
|
||||
<span class="kw">type </span>Future = S::Future;
|
||||
|
||||
<span class="macro">actix_service::forward_ready!</span>(inner);
|
||||
|
||||
<span class="kw">fn </span>call(<span class="kw-2">&</span><span class="self">self</span>, req: ()) -> <span class="self">Self</span>::Future {
|
||||
<span class="self">self</span>.inner.call(req)
|
||||
}
|
||||
}</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
1
actix_web/dev/sidebar-items.js
Normal file
1
actix_web/dev/sidebar-items.js
Normal file
@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"enum":["JsonBody","Payload"],"fn":["fn_factory","fn_service"],"macro":["always_ready","forward_ready"],"struct":["AppConfig","AppService","ConnectionInfo","Decompress","Extensions","Path","PeerAddr","Readlines","RequestHead","ResourceDef","ResourceMap","Response","ResponseHead","Server","ServerHandle","ServiceRequest","ServiceResponse","Url","UrlEncoded","WebService"],"trait":["HttpServiceFactory","ResourcePath","Service","ServiceFactory","Transform"]};
|
34
actix_web/dev/struct.AppConfig.html
Normal file
34
actix_web/dev/struct.AppConfig.html
Normal file
File diff suppressed because one or more lines are too long
32
actix_web/dev/struct.AppService.html
Normal file
32
actix_web/dev/struct.AppService.html
Normal file
@ -0,0 +1,32 @@
|
||||
<!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="Application configuration"><title>AppService in actix_web::dev - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></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" title="show sidebar"></button><a class="logo-container" href="../../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt="logo"></a><h2><a href="../../actix_web/index.html">actix_web</a><span class="version">4.6.0</span></h2></div><h2 class="location"><a href="#">AppService</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.config">config</a></li><li><a href="#method.default_service">default_service</a></li><li><a href="#method.is_root">is_root</a></li><li><a href="#method.register_service">register_service</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-AppService">!RefUnwindSafe</a></li><li><a href="#impl-Send-for-AppService">!Send</a></li><li><a href="#impl-Sync-for-AppService">!Sync</a></li><li><a href="#impl-UnwindSafe-for-AppService">!UnwindSafe</a></li><li><a href="#impl-Freeze-for-AppService">Freeze</a></li><li><a href="#impl-Unpin-for-AppService">Unpin</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Instrument-for-T">Instrument</a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-Same-for-T">Same</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E-for-T">VZip<V></a></li><li><a href="#impl-WithSubscriber-for-T">WithSubscriber</a></li></ul></section><h2><a href="index.html">In actix_web::dev</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">actix_web</a>::<wbr><a href="index.html">dev</a>::<wbr><a class="struct" href="#">AppService</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/actix_web/config.rs.html#22-33">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct AppService { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Application configuration</p>
|
||||
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-AppService" class="impl"><a class="src rightside" href="../../src/actix_web/config.rs.html#35-107">source</a><a href="#impl-AppService" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.AppService.html" title="struct actix_web::dev::AppService">AppService</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.is_root" class="method"><a class="src rightside" href="../../src/actix_web/config.rs.html#47-49">source</a><h4 class="code-header">pub fn <a href="#method.is_root" class="fn">is_root</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Check if root is being configured</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.config" class="method"><a class="src rightside" href="../../src/actix_web/config.rs.html#78-80">source</a><h4 class="code-header">pub fn <a href="#method.config" class="fn">config</a>(&self) -> &<a class="struct" href="struct.AppConfig.html" title="struct actix_web::dev::AppConfig">AppConfig</a></h4></section></summary><div class="docblock"><p>Returns reference to configuration.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.default_service" class="method"><a class="src rightside" href="../../src/actix_web/config.rs.html#83-85">source</a><h4 class="code-header">pub fn <a href="#method.default_service" class="fn">default_service</a>(
|
||||
&self
|
||||
) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc">Rc</a><BoxServiceFactory<<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="struct.ServiceRequest.html" title="struct actix_web::dev::ServiceRequest">ServiceRequest</a>, <a class="struct" href="struct.ServiceResponse.html" title="struct actix_web::dev::ServiceResponse">ServiceResponse</a><<a class="struct" href="../body/struct.BoxBody.html" title="struct actix_web::body::BoxBody">BoxBody</a>>, <a class="struct" href="../error/struct.Error.html" title="struct actix_web::error::Error">Error</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>>></h4></section></summary><div class="docblock"><p>Returns default handler factory.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.register_service" class="method"><a class="src rightside" href="../../src/actix_web/config.rs.html#88-106">source</a><h4 class="code-header">pub fn <a href="#method.register_service" class="fn">register_service</a><F, S>(
|
||||
&mut self,
|
||||
rdef: <a class="struct" href="struct.ResourceDef.html" title="struct actix_web::dev::ResourceDef">ResourceDef</a>,
|
||||
guards: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="../guard/trait.Guard.html" title="trait actix_web::guard::Guard">Guard</a>>>>,
|
||||
factory: F,
|
||||
nested: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc">Rc</a><<a class="struct" href="struct.ResourceMap.html" title="struct actix_web::dev::ResourceMap">ResourceMap</a>>>
|
||||
)<div class="where">where
|
||||
F: IntoServiceFactory<S, <a class="struct" href="struct.ServiceRequest.html" title="struct actix_web::dev::ServiceRequest">ServiceRequest</a>>,
|
||||
S: <a class="trait" href="trait.ServiceFactory.html" title="trait actix_web::dev::ServiceFactory">ServiceFactory</a><<a class="struct" href="struct.ServiceRequest.html" title="struct actix_web::dev::ServiceRequest">ServiceRequest</a>, Response = <a class="struct" href="struct.ServiceResponse.html" title="struct actix_web::dev::ServiceResponse">ServiceResponse</a>, Error = <a class="struct" href="../error/struct.Error.html" title="struct actix_web::error::Error">Error</a>, Config = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, InitError = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>> + 'static,</div></h4></section></summary><div class="docblock"><p>Register HTTP service.</p>
|
||||
</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-AppService" class="impl"><a href="#impl-Freeze-for-AppService" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.AppService.html" title="struct actix_web::dev::AppService">AppService</a></h3></section><section id="impl-RefUnwindSafe-for-AppService" class="impl"><a href="#impl-RefUnwindSafe-for-AppService" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.AppService.html" title="struct actix_web::dev::AppService">AppService</a></h3></section><section id="impl-Send-for-AppService" class="impl"><a href="#impl-Send-for-AppService" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.AppService.html" title="struct actix_web::dev::AppService">AppService</a></h3></section><section id="impl-Sync-for-AppService" class="impl"><a href="#impl-Sync-for-AppService" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.AppService.html" title="struct actix_web::dev::AppService">AppService</a></h3></section><section id="impl-Unpin-for-AppService" class="impl"><a href="#impl-Unpin-for-AppService" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.AppService.html" title="struct actix_web::dev::AppService">AppService</a></h3></section><section id="impl-UnwindSafe-for-AppService" class="impl"><a href="#impl-UnwindSafe-for-AppService" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.AppService.html" title="struct actix_web::dev::AppService">AppService</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
|
||||
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where
|
||||
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where
|
||||
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#765">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#768">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
|
||||
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Instrument-for-T" class="impl"><a href="#impl-Instrument-for-T" class="anchor">§</a><h3 class="code-header">impl<T> Instrument for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.instrument" class="method trait-impl"><a href="#method.instrument" class="anchor">§</a><h4 class="code-header">fn <a class="fn">instrument</a>(self, span: Span) -> Instrumented<Self></h4></section></summary><div class='docblock'>Instruments this type with the provided [<code>Span</code>], returning an
|
||||
<code>Instrumented</code> wrapper. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.in_current_span" class="method trait-impl"><a href="#method.in_current_span" class="anchor">§</a><h4 class="code-header">fn <a class="fn">in_current_span</a>(self) -> Instrumented<Self></h4></section></summary><div class='docblock'>Instruments this type with the <a href="super::Span::current()">current</a> <a href="crate::Span"><code>Span</code></a>, returning an
|
||||
<code>Instrumented</code> wrapper. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#748-750">source</a><a href="#impl-Into%3CU%3E-for-T" 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<div class="where">where
|
||||
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#758">source</a><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="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
|
||||
<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="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
|
||||
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Same-for-T" class="impl"><a class="src rightside" href="https://docs.rs/typenum/1.17.0/src/typenum/type_operators.rs.html#34">source</a><a href="#impl-Same-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://docs.rs/typenum/1.17.0/typenum/type_operators/trait.Same.html" title="trait typenum::type_operators::Same">Same</a> for T</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl"><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a href="https://docs.rs/typenum/1.17.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="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#805-807">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where
|
||||
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#812">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#790-792">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where
|
||||
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#797">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-T" class="impl"><a href="#impl-VZip%3CV%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<V, T> VZip<V> for T<div class="where">where
|
||||
V: MultiLane<T>,</div></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl"><a href="#method.vzip" class="anchor">§</a><h4 class="code-header">fn <a class="fn">vzip</a>(self) -> V</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-WithSubscriber-for-T" class="impl"><a href="#impl-WithSubscriber-for-T" class="anchor">§</a><h3 class="code-header">impl<T> WithSubscriber for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.with_subscriber" class="method trait-impl"><a href="#method.with_subscriber" class="anchor">§</a><h4 class="code-header">fn <a class="fn">with_subscriber</a><S>(self, subscriber: S) -> WithDispatch<Self><div class="where">where
|
||||
S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><Dispatch>,</div></h4></section></summary><div class='docblock'>Attaches the provided <a href="super::Subscriber"><code>Subscriber</code></a> to this type, returning a
|
||||
[<code>WithDispatch</code>] wrapper. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.with_current_subscriber" class="method trait-impl"><a href="#method.with_current_subscriber" class="anchor">§</a><h4 class="code-header">fn <a class="fn">with_current_subscriber</a>(self) -> WithDispatch<Self></h4></section></summary><div class='docblock'>Attaches the current <a href="crate::dispatcher#setting-the-default-subscriber">default</a> <a href="super::Subscriber"><code>Subscriber</code></a> to this type, returning a
|
||||
[<code>WithDispatch</code>] wrapper. <a>Read more</a></div></details></div></details></div></section></div></main></body></html>
|
66
actix_web/dev/struct.ConnectionInfo.html
Normal file
66
actix_web/dev/struct.ConnectionInfo.html
Normal file
File diff suppressed because one or more lines are too long
260
actix_web/dev/struct.Decompress.html
Normal file
260
actix_web/dev/struct.Decompress.html
Normal file
File diff suppressed because one or more lines are too long
70
actix_web/dev/struct.Extensions.html
Normal file
70
actix_web/dev/struct.Extensions.html
Normal file
File diff suppressed because one or more lines are too long
51
actix_web/dev/struct.Path.html
Normal file
51
actix_web/dev/struct.Path.html
Normal file
File diff suppressed because one or more lines are too long
44
actix_web/dev/struct.PeerAddr.html
Normal file
44
actix_web/dev/struct.PeerAddr.html
Normal file
File diff suppressed because one or more lines are too long
260
actix_web/dev/struct.Readlines.html
Normal file
260
actix_web/dev/struct.Readlines.html
Normal file
File diff suppressed because one or more lines are too long
36
actix_web/dev/struct.RequestHead.html
Normal file
36
actix_web/dev/struct.RequestHead.html
Normal file
File diff suppressed because one or more lines are too long
412
actix_web/dev/struct.ResourceDef.html
Normal file
412
actix_web/dev/struct.ResourceDef.html
Normal file
File diff suppressed because one or more lines are too long
41
actix_web/dev/struct.ResourceMap.html
Normal file
41
actix_web/dev/struct.ResourceMap.html
Normal file
File diff suppressed because one or more lines are too long
58
actix_web/dev/struct.Response.html
Normal file
58
actix_web/dev/struct.Response.html
Normal file
File diff suppressed because one or more lines are too long
35
actix_web/dev/struct.ResponseHead.html
Normal file
35
actix_web/dev/struct.ResponseHead.html
Normal file
File diff suppressed because one or more lines are too long
176
actix_web/dev/struct.Server.html
Normal file
176
actix_web/dev/struct.Server.html
Normal file
File diff suppressed because one or more lines are too long
23
actix_web/dev/struct.ServerHandle.html
Normal file
23
actix_web/dev/struct.ServerHandle.html
Normal file
File diff suppressed because one or more lines are too long
84
actix_web/dev/struct.ServiceRequest.html
Normal file
84
actix_web/dev/struct.ServiceRequest.html
Normal file
File diff suppressed because one or more lines are too long
40
actix_web/dev/struct.ServiceResponse.html
Normal file
40
actix_web/dev/struct.ServiceResponse.html
Normal file
File diff suppressed because one or more lines are too long
20
actix_web/dev/struct.Url.html
Normal file
20
actix_web/dev/struct.Url.html
Normal file
File diff suppressed because one or more lines are too long
121
actix_web/dev/struct.UrlEncoded.html
Normal file
121
actix_web/dev/struct.UrlEncoded.html
Normal file
File diff suppressed because one or more lines are too long
37
actix_web/dev/struct.WebService.html
Normal file
37
actix_web/dev/struct.WebService.html
Normal file
File diff suppressed because one or more lines are too long
8
actix_web/dev/trait.HttpServiceFactory.html
Normal file
8
actix_web/dev/trait.HttpServiceFactory.html
Normal file
File diff suppressed because one or more lines are too long
4
actix_web/dev/trait.ResourcePath.html
Normal file
4
actix_web/dev/trait.ResourcePath.html
Normal file
@ -0,0 +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="API documentation for the Rust `ResourcePath` trait in crate `actix_web`."><title>ResourcePath in actix_web::dev - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc trait"><!--[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" title="show sidebar"></button><a class="logo-container" href="../../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt="logo"></a><h2><a href="../../actix_web/index.html">actix_web</a><span class="version">4.6.0</span></h2></div><h2 class="location"><a href="#">ResourcePath</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.path">path</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-ResourcePath-for-%26str">&'a str</a></li><li><a href="#impl-ResourcePath-for-ByteString">ByteString</a></li><li><a href="#impl-ResourcePath-for-String">String</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In actix_web::dev</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../index.html">actix_web</a>::<wbr><a href="index.html">dev</a>::<wbr><a class="trait" href="#">ResourcePath</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/actix_router/resource_path.rs.html#12">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub trait ResourcePath {
|
||||
// Required method
|
||||
fn <a href="#tymethod.path" class="fn">path</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>;
|
||||
}</code></pre><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><section id="tymethod.path" class="method"><a class="src rightside" href="../../src/actix_router/resource_path.rs.html#13">source</a><h4 class="code-header">fn <a href="#tymethod.path" class="fn">path</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></h4></section></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-ResourcePath-for-String" class="impl"><a class="src rightside" href="../../src/actix_router/resource_path.rs.html#16">source</a><a href="#impl-ResourcePath-for-String" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ResourcePath.html" title="trait actix_web::dev::ResourcePath">ResourcePath</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h3></section></summary><div class="impl-items"><section id="method.path" class="method trait-impl"><a class="src rightside" href="../../src/actix_router/resource_path.rs.html#17">source</a><a href="#method.path" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.path" class="fn">path</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ResourcePath-for-ByteString" class="impl"><a class="src rightside" href="../../src/actix_router/resource_path.rs.html#28">source</a><a href="#impl-ResourcePath-for-ByteString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ResourcePath.html" title="trait actix_web::dev::ResourcePath">ResourcePath</a> for ByteString</h3></section></summary><div class="impl-items"><section id="method.path-1" class="method trait-impl"><a class="src rightside" href="../../src/actix_router/resource_path.rs.html#29">source</a><a href="#method.path-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.path" class="fn">path</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ResourcePath-for-%26str" class="impl"><a class="src rightside" href="../../src/actix_router/resource_path.rs.html#22">source</a><a href="#impl-ResourcePath-for-%26str" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="trait.ResourcePath.html" title="trait actix_web::dev::ResourcePath">ResourcePath</a> for &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><section id="method.path-2" class="method trait-impl"><a class="src rightside" href="../../src/actix_router/resource_path.rs.html#23">source</a><a href="#method.path-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.path" class="fn">path</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-ResourcePath-for-Uri" class="impl"><a class="src rightside" href="../../src/actix_router/resource_path.rs.html#35">source</a><a href="#impl-ResourcePath-for-Uri" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ResourcePath.html" title="trait actix_web::dev::ResourcePath">ResourcePath</a> for <a class="struct" href="../http/struct.Uri.html" title="struct actix_web::http::Uri">Uri</a></h3><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>http</code></strong> only.</div></span></section><section id="impl-ResourcePath-for-Url" class="impl"><a class="src rightside" href="../../src/actix_router/url.rs.html#56">source</a><a href="#impl-ResourcePath-for-Url" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ResourcePath.html" title="trait actix_web::dev::ResourcePath">ResourcePath</a> for <a class="struct" href="struct.Url.html" title="struct actix_web::dev::Url">Url</a></h3></section></div><script src="../../trait.impl/actix_router/resource_path/trait.ResourcePath.js" data-ignore-extern-crates="http,alloc,actix_router,bytestring,std" async></script></section></div></main></body></html>
|
176
actix_web/dev/trait.Service.html
Normal file
176
actix_web/dev/trait.Service.html
Normal file
File diff suppressed because one or more lines are too long
135
actix_web/dev/trait.ServiceFactory.html
Normal file
135
actix_web/dev/trait.ServiceFactory.html
Normal file
File diff suppressed because one or more lines are too long
89
actix_web/dev/trait.Transform.html
Normal file
89
actix_web/dev/trait.Transform.html
Normal file
@ -0,0 +1,89 @@
|
||||
<!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="Defines the interface of a service factory that wraps inner service during construction."><title>Transform in actix_web::dev - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc trait"><!--[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" title="show sidebar"></button><a class="logo-container" href="../../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt="logo"></a><h2><a href="../../actix_web/index.html">actix_web</a><span class="version">4.6.0</span></h2></div><h2 class="location"><a href="#">Transform</a></h2><div class="sidebar-elems"><section><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Error">Error</a></li><li><a href="#associatedtype.Future">Future</a></li><li><a href="#associatedtype.InitError">InitError</a></li><li><a href="#associatedtype.Response">Response</a></li><li><a href="#associatedtype.Transform">Transform</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.new_transform">new_transform</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-Transform%3CS,+Req%3E-for-Arc%3CT%3E">Arc<T></a></li><li><a href="#impl-Transform%3CS,+Req%3E-for-Rc%3CT%3E">Rc<T></a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In actix_web::dev</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../index.html">actix_web</a>::<wbr><a href="index.html">dev</a>::<wbr><a class="trait" href="#">Transform</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub trait Transform<S, Req> {
|
||||
type <a href="#associatedtype.Response" class="associatedtype">Response</a>;
|
||||
type <a href="#associatedtype.Error" class="associatedtype">Error</a>;
|
||||
type <a href="#associatedtype.Transform" class="associatedtype">Transform</a>: <a class="trait" href="trait.Service.html" title="trait actix_web::dev::Service">Service</a><Req, Response = Self::<a class="associatedtype" href="trait.Transform.html#associatedtype.Response" title="type actix_web::dev::Transform::Response">Response</a>, Error = Self::<a class="associatedtype" href="trait.Transform.html#associatedtype.Error" title="type actix_web::dev::Transform::Error">Error</a>>;
|
||||
type <a href="#associatedtype.InitError" class="associatedtype">InitError</a>;
|
||||
type <a href="#associatedtype.Future" class="associatedtype">Future</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="trait.Transform.html#associatedtype.Transform" title="type actix_web::dev::Transform::Transform">Transform</a>, Self::<a class="associatedtype" href="trait.Transform.html#associatedtype.InitError" title="type actix_web::dev::Transform::InitError">InitError</a>>>;
|
||||
|
||||
// Required method
|
||||
fn <a href="#tymethod.new_transform" class="fn">new_transform</a>(&self, service: S) -> Self::<a class="associatedtype" href="trait.Transform.html#associatedtype.Future" title="type actix_web::dev::Transform::Future">Future</a>;
|
||||
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Defines the interface of a service factory that wraps inner service during construction.</p>
|
||||
<p>Transformers wrap an inner service and runs during inbound and/or outbound processing in the
|
||||
service lifecycle. It may modify request and/or response.</p>
|
||||
<p>For example, a timeout service wrapper:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">pub struct </span>Timeout<S> {
|
||||
service: S,
|
||||
timeout: Duration,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span><S: Service<Req>, Req> Service<Req> <span class="kw">for </span>Timeout<S> {
|
||||
<span class="kw">type </span>Response = S::Response;
|
||||
<span class="kw">type </span>Error = TimeoutError<S::Error>;
|
||||
<span class="kw">type </span>Future = TimeoutServiceResponse<S>;
|
||||
|
||||
<span class="macro">actix_service::forward_ready!</span>(service);
|
||||
|
||||
<span class="kw">fn </span>call(<span class="kw-2">&</span><span class="self">self</span>, req: Req) -> <span class="self">Self</span>::Future {
|
||||
TimeoutServiceResponse {
|
||||
fut: <span class="self">self</span>.service.call(req),
|
||||
sleep: Sleep::new(clock::now() + <span class="self">self</span>.timeout),
|
||||
}
|
||||
}
|
||||
}</code></pre></div>
|
||||
<p>This wrapper service is decoupled from the underlying service implementation and could be
|
||||
applied to any service.</p>
|
||||
<p>The <code>Transform</code> trait defines the interface of a service wrapper. <code>Transform</code> is often
|
||||
implemented for middleware, defining how to construct a middleware Service. A Service that is
|
||||
constructed by the factory takes the Service that follows it during execution as a parameter,
|
||||
assuming ownership of the next Service.</p>
|
||||
<p>A transform for the <code>Timeout</code> middleware could look like this:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">pub struct </span>TimeoutTransform {
|
||||
timeout: Duration,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span><S: Service<Req>, Req> Transform<S, Req> <span class="kw">for </span>TimeoutTransform {
|
||||
<span class="kw">type </span>Response = S::Response;
|
||||
<span class="kw">type </span>Error = TimeoutError<S::Error>;
|
||||
<span class="kw">type </span>InitError = S::Error;
|
||||
<span class="kw">type </span>Transform = Timeout<S>;
|
||||
<span class="kw">type </span>Future = Ready<<span class="prelude-ty">Result</span><<span class="self">Self</span>::Transform, <span class="self">Self</span>::InitError>>;
|
||||
|
||||
<span class="kw">fn </span>new_transform(<span class="kw-2">&</span><span class="self">self</span>, service: S) -> <span class="self">Self</span>::Future {
|
||||
ready(<span class="prelude-val">Ok</span>(Timeout {
|
||||
service,
|
||||
timeout: <span class="self">self</span>.timeout,
|
||||
}))
|
||||
}
|
||||
}</code></pre></div>
|
||||
</div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.Response" class="method"><h4 class="code-header">type <a href="#associatedtype.Response" class="associatedtype">Response</a></h4></section></summary><div class="docblock"><p>Responses produced by the service.</p>
|
||||
</div></details><details class="toggle" open><summary><section id="associatedtype.Error" class="method"><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a></h4></section></summary><div class="docblock"><p>Errors produced by the service.</p>
|
||||
</div></details><details class="toggle" open><summary><section id="associatedtype.Transform" class="method"><h4 class="code-header">type <a href="#associatedtype.Transform" class="associatedtype">Transform</a>: <a class="trait" href="trait.Service.html" title="trait actix_web::dev::Service">Service</a><Req, Response = Self::<a class="associatedtype" href="trait.Transform.html#associatedtype.Response" title="type actix_web::dev::Transform::Response">Response</a>, Error = Self::<a class="associatedtype" href="trait.Transform.html#associatedtype.Error" title="type actix_web::dev::Transform::Error">Error</a>></h4></section></summary><div class="docblock"><p>The <code>TransformService</code> value created by this factory</p>
|
||||
</div></details><details class="toggle" open><summary><section id="associatedtype.InitError" class="method"><h4 class="code-header">type <a href="#associatedtype.InitError" class="associatedtype">InitError</a></h4></section></summary><div class="docblock"><p>Errors produced while building a transform service.</p>
|
||||
</div></details><details class="toggle" open><summary><section id="associatedtype.Future" class="method"><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="trait.Transform.html#associatedtype.Transform" title="type actix_web::dev::Transform::Transform">Transform</a>, Self::<a class="associatedtype" href="trait.Transform.html#associatedtype.InitError" title="type actix_web::dev::Transform::InitError">InitError</a>>></h4></section></summary><div class="docblock"><p>The future response value.</p>
|
||||
</div></details></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.new_transform" class="method"><h4 class="code-header">fn <a href="#tymethod.new_transform" class="fn">new_transform</a>(&self, service: S) -> Self::<a class="associatedtype" href="trait.Transform.html#associatedtype.Future" title="type actix_web::dev::Transform::Future">Future</a></h4></section></summary><div class="docblock"><p>Creates and returns a new Transform component, asynchronously</p>
|
||||
</div></details></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-Transform%3CS,+Req%3E-for-Rc%3CT%3E" class="impl"><a href="#impl-Transform%3CS,+Req%3E-for-Rc%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T, S, Req> <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc">Rc</a><T><div class="where">where
|
||||
T: <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Response-1" class="associatedtype trait-impl"><a href="#associatedtype.Response-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Response" class="associatedtype">Response</a> = <T as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.Response" title="type actix_web::dev::Transform::Response">Response</a></h4></section><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <T as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.Error" title="type actix_web::dev::Transform::Error">Error</a></h4></section><section id="associatedtype.Transform-1" class="associatedtype trait-impl"><a href="#associatedtype.Transform-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Transform" class="associatedtype">Transform</a> = <T as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.Transform" title="type actix_web::dev::Transform::Transform">Transform</a></h4></section><section id="associatedtype.InitError-1" class="associatedtype trait-impl"><a href="#associatedtype.InitError-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.InitError" class="associatedtype">InitError</a> = <T as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.InitError" title="type actix_web::dev::Transform::InitError">InitError</a></h4></section><section id="associatedtype.Future-1" class="associatedtype trait-impl"><a href="#associatedtype.Future-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = <T as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.Future" title="type actix_web::dev::Transform::Future">Future</a></h4></section><section id="method.new_transform" class="method trait-impl"><a href="#method.new_transform" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.new_transform" class="fn">new_transform</a>(&self, service: S) -> <T as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.Future" title="type actix_web::dev::Transform::Future">Future</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Transform%3CS,+Req%3E-for-Arc%3CT%3E" class="impl"><a href="#impl-Transform%3CS,+Req%3E-for-Arc%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T, S, Req> <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><T><div class="where">where
|
||||
T: <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Response-2" class="associatedtype trait-impl"><a href="#associatedtype.Response-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Response" class="associatedtype">Response</a> = <T as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.Response" title="type actix_web::dev::Transform::Response">Response</a></h4></section><section id="associatedtype.Error-2" class="associatedtype trait-impl"><a href="#associatedtype.Error-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <T as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.Error" title="type actix_web::dev::Transform::Error">Error</a></h4></section><section id="associatedtype.Transform-2" class="associatedtype trait-impl"><a href="#associatedtype.Transform-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Transform" class="associatedtype">Transform</a> = <T as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.Transform" title="type actix_web::dev::Transform::Transform">Transform</a></h4></section><section id="associatedtype.InitError-2" class="associatedtype trait-impl"><a href="#associatedtype.InitError-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.InitError" class="associatedtype">InitError</a> = <T as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.InitError" title="type actix_web::dev::Transform::InitError">InitError</a></h4></section><section id="associatedtype.Future-2" class="associatedtype trait-impl"><a href="#associatedtype.Future-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = <T as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.Future" title="type actix_web::dev::Transform::Future">Future</a></h4></section><section id="method.new_transform-1" class="method trait-impl"><a href="#method.new_transform-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.new_transform" class="fn">new_transform</a>(&self, service: S) -> <T as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.Future" title="type actix_web::dev::Transform::Future">Future</a></h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-Transform%3CS,+ServiceRequest%3E-for-Compress" class="impl"><a class="src rightside" href="../../src/actix_web/middleware/compress.rs.html#79-93">source</a><a href="#impl-Transform%3CS,+ServiceRequest%3E-for-Compress" class="anchor">§</a><h3 class="code-header">impl<S, B> <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, <a class="struct" href="struct.ServiceRequest.html" title="struct actix_web::dev::ServiceRequest">ServiceRequest</a>> for <a class="struct" href="../middleware/struct.Compress.html" title="struct actix_web::middleware::Compress">Compress</a><div class="where">where
|
||||
B: <a class="trait" href="../body/trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a>,
|
||||
S: <a class="trait" href="trait.Service.html" title="trait actix_web::dev::Service">Service</a><<a class="struct" href="struct.ServiceRequest.html" title="struct actix_web::dev::ServiceRequest">ServiceRequest</a>, Response = <a class="struct" href="struct.ServiceResponse.html" title="struct actix_web::dev::ServiceResponse">ServiceResponse</a><B>, Error = <a class="struct" href="../error/struct.Error.html" title="struct actix_web::error::Error">Error</a>>,</div></h3><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>__compress</code></strong> only.</div></span></section></summary><div class="impl-items"><section id="associatedtype.Response-3" class="associatedtype trait-impl"><a href="#associatedtype.Response-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Response" class="associatedtype">Response</a> = <a class="struct" href="struct.ServiceResponse.html" title="struct actix_web::dev::ServiceResponse">ServiceResponse</a><<a class="enum" href="../body/enum.EitherBody.html" title="enum actix_web::body::EitherBody">EitherBody</a><<a class="struct" href="../../actix_http/encoding/encoder/struct.Encoder.html" title="struct actix_http::encoding::encoder::Encoder">Encoder</a><B>>></h4></section><section id="associatedtype.Error-3" class="associatedtype trait-impl"><a href="#associatedtype.Error-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="struct" href="../error/struct.Error.html" title="struct actix_web::error::Error">Error</a></h4></section><section id="associatedtype.Transform-3" class="associatedtype trait-impl"><a href="#associatedtype.Transform-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Transform" class="associatedtype">Transform</a> = CompressMiddleware<S></h4></section><section id="associatedtype.InitError-3" class="associatedtype trait-impl"><a href="#associatedtype.InitError-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.InitError" class="associatedtype">InitError</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h4></section><section id="associatedtype.Future-3" class="associatedtype trait-impl"><a href="#associatedtype.Future-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = Ready<<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<<a class="struct" href="../middleware/struct.Compress.html" title="struct actix_web::middleware::Compress">Compress</a> as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, <a class="struct" href="struct.ServiceRequest.html" title="struct actix_web::dev::ServiceRequest">ServiceRequest</a>>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.Transform" title="type actix_web::dev::Transform::Transform">Transform</a>, <<a class="struct" href="../middleware/struct.Compress.html" title="struct actix_web::middleware::Compress">Compress</a> as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, <a class="struct" href="struct.ServiceRequest.html" title="struct actix_web::dev::ServiceRequest">ServiceRequest</a>>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.InitError" title="type actix_web::dev::Transform::InitError">InitError</a>>></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Transform%3CS,+ServiceRequest%3E-for-DefaultHeaders" class="impl"><a class="src rightside" href="../../src/actix_web/middleware/default_headers.rs.html#108-125">source</a><a href="#impl-Transform%3CS,+ServiceRequest%3E-for-DefaultHeaders" class="anchor">§</a><h3 class="code-header">impl<S, B> <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, <a class="struct" href="struct.ServiceRequest.html" title="struct actix_web::dev::ServiceRequest">ServiceRequest</a>> for <a class="struct" href="../middleware/struct.DefaultHeaders.html" title="struct actix_web::middleware::DefaultHeaders">DefaultHeaders</a><div class="where">where
|
||||
S: <a class="trait" href="trait.Service.html" title="trait actix_web::dev::Service">Service</a><<a class="struct" href="struct.ServiceRequest.html" title="struct actix_web::dev::ServiceRequest">ServiceRequest</a>, Response = <a class="struct" href="struct.ServiceResponse.html" title="struct actix_web::dev::ServiceResponse">ServiceResponse</a><B>, Error = <a class="struct" href="../error/struct.Error.html" title="struct actix_web::error::Error">Error</a>>,
|
||||
S::<a class="associatedtype" href="trait.Service.html#associatedtype.Future" title="type actix_web::dev::Service::Future">Future</a>: 'static,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Response-4" class="associatedtype trait-impl"><a href="#associatedtype.Response-4" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Response" class="associatedtype">Response</a> = <a class="struct" href="struct.ServiceResponse.html" title="struct actix_web::dev::ServiceResponse">ServiceResponse</a><B></h4></section><section id="associatedtype.Error-4" class="associatedtype trait-impl"><a href="#associatedtype.Error-4" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="struct" href="../error/struct.Error.html" title="struct actix_web::error::Error">Error</a></h4></section><section id="associatedtype.Transform-4" class="associatedtype trait-impl"><a href="#associatedtype.Transform-4" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Transform" class="associatedtype">Transform</a> = DefaultHeadersMiddleware<S></h4></section><section id="associatedtype.InitError-4" class="associatedtype trait-impl"><a href="#associatedtype.InitError-4" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.InitError" class="associatedtype">InitError</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h4></section><section id="associatedtype.Future-4" class="associatedtype trait-impl"><a href="#associatedtype.Future-4" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = Ready<<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<<a class="struct" href="../middleware/struct.DefaultHeaders.html" title="struct actix_web::middleware::DefaultHeaders">DefaultHeaders</a> as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, <a class="struct" href="struct.ServiceRequest.html" title="struct actix_web::dev::ServiceRequest">ServiceRequest</a>>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.Transform" title="type actix_web::dev::Transform::Transform">Transform</a>, <<a class="struct" href="../middleware/struct.DefaultHeaders.html" title="struct actix_web::middleware::DefaultHeaders">DefaultHeaders</a> as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, <a class="struct" href="struct.ServiceRequest.html" title="struct actix_web::dev::ServiceRequest">ServiceRequest</a>>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.InitError" title="type actix_web::dev::Transform::InitError">InitError</a>>></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Transform%3CS,+ServiceRequest%3E-for-ErrorHandlers%3CB%3E" class="impl"><a class="src rightside" href="../../src/actix_web/middleware/err_handlers.rs.html#278-303">source</a><a href="#impl-Transform%3CS,+ServiceRequest%3E-for-ErrorHandlers%3CB%3E" class="anchor">§</a><h3 class="code-header">impl<S, B> <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, <a class="struct" href="struct.ServiceRequest.html" title="struct actix_web::dev::ServiceRequest">ServiceRequest</a>> for <a class="struct" href="../middleware/struct.ErrorHandlers.html" title="struct actix_web::middleware::ErrorHandlers">ErrorHandlers</a><B><div class="where">where
|
||||
S: <a class="trait" href="trait.Service.html" title="trait actix_web::dev::Service">Service</a><<a class="struct" href="struct.ServiceRequest.html" title="struct actix_web::dev::ServiceRequest">ServiceRequest</a>, Response = <a class="struct" href="struct.ServiceResponse.html" title="struct actix_web::dev::ServiceResponse">ServiceResponse</a><B>, Error = <a class="struct" href="../error/struct.Error.html" title="struct actix_web::error::Error">Error</a>> + 'static,
|
||||
S::<a class="associatedtype" href="trait.Service.html#associatedtype.Future" title="type actix_web::dev::Service::Future">Future</a>: 'static,
|
||||
B: 'static,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Response-5" class="associatedtype trait-impl"><a href="#associatedtype.Response-5" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Response" class="associatedtype">Response</a> = <a class="struct" href="struct.ServiceResponse.html" title="struct actix_web::dev::ServiceResponse">ServiceResponse</a><<a class="enum" href="../body/enum.EitherBody.html" title="enum actix_web::body::EitherBody">EitherBody</a><B>></h4></section><section id="associatedtype.Error-5" class="associatedtype trait-impl"><a href="#associatedtype.Error-5" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="struct" href="../error/struct.Error.html" title="struct actix_web::error::Error">Error</a></h4></section><section id="associatedtype.Transform-5" class="associatedtype trait-impl"><a href="#associatedtype.Transform-5" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Transform" class="associatedtype">Transform</a> = ErrorHandlersMiddleware<S, B></h4></section><section id="associatedtype.InitError-5" class="associatedtype trait-impl"><a href="#associatedtype.InitError-5" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.InitError" class="associatedtype">InitError</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h4></section><section id="associatedtype.Future-5" class="associatedtype trait-impl"><a href="#associatedtype.Future-5" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<<a class="struct" href="../middleware/struct.ErrorHandlers.html" title="struct actix_web::middleware::ErrorHandlers">ErrorHandlers</a><B> as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, <a class="struct" href="struct.ServiceRequest.html" title="struct actix_web::dev::ServiceRequest">ServiceRequest</a>>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.Transform" title="type actix_web::dev::Transform::Transform">Transform</a>, <<a class="struct" href="../middleware/struct.ErrorHandlers.html" title="struct actix_web::middleware::ErrorHandlers">ErrorHandlers</a><B> as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, <a class="struct" href="struct.ServiceRequest.html" title="struct actix_web::dev::ServiceRequest">ServiceRequest</a>>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.InitError" title="type actix_web::dev::Transform::InitError">InitError</a>>>>></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Transform%3CS,+ServiceRequest%3E-for-Logger" class="impl"><a class="src rightside" href="../../src/actix_web/middleware/logger.rs.html#249-282">source</a><a href="#impl-Transform%3CS,+ServiceRequest%3E-for-Logger" class="anchor">§</a><h3 class="code-header">impl<S, B> <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, <a class="struct" href="struct.ServiceRequest.html" title="struct actix_web::dev::ServiceRequest">ServiceRequest</a>> for <a class="struct" href="../middleware/struct.Logger.html" title="struct actix_web::middleware::Logger">Logger</a><div class="where">where
|
||||
S: <a class="trait" href="trait.Service.html" title="trait actix_web::dev::Service">Service</a><<a class="struct" href="struct.ServiceRequest.html" title="struct actix_web::dev::ServiceRequest">ServiceRequest</a>, Response = <a class="struct" href="struct.ServiceResponse.html" title="struct actix_web::dev::ServiceResponse">ServiceResponse</a><B>, Error = <a class="struct" href="../error/struct.Error.html" title="struct actix_web::error::Error">Error</a>>,
|
||||
B: <a class="trait" href="../body/trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Response-6" class="associatedtype trait-impl"><a href="#associatedtype.Response-6" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Response" class="associatedtype">Response</a> = <a class="struct" href="struct.ServiceResponse.html" title="struct actix_web::dev::ServiceResponse">ServiceResponse</a><StreamLog<B>></h4></section><section id="associatedtype.Error-6" class="associatedtype trait-impl"><a href="#associatedtype.Error-6" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="struct" href="../error/struct.Error.html" title="struct actix_web::error::Error">Error</a></h4></section><section id="associatedtype.Transform-6" class="associatedtype trait-impl"><a href="#associatedtype.Transform-6" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Transform" class="associatedtype">Transform</a> = LoggerMiddleware<S></h4></section><section id="associatedtype.InitError-6" class="associatedtype trait-impl"><a href="#associatedtype.InitError-6" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.InitError" class="associatedtype">InitError</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h4></section><section id="associatedtype.Future-6" class="associatedtype trait-impl"><a href="#associatedtype.Future-6" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = Ready<<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<<a class="struct" href="../middleware/struct.Logger.html" title="struct actix_web::middleware::Logger">Logger</a> as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, <a class="struct" href="struct.ServiceRequest.html" title="struct actix_web::dev::ServiceRequest">ServiceRequest</a>>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.Transform" title="type actix_web::dev::Transform::Transform">Transform</a>, <<a class="struct" href="../middleware/struct.Logger.html" title="struct actix_web::middleware::Logger">Logger</a> as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, <a class="struct" href="struct.ServiceRequest.html" title="struct actix_web::dev::ServiceRequest">ServiceRequest</a>>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.InitError" title="type actix_web::dev::Transform::InitError">InitError</a>>></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Transform%3CS,+ServiceRequest%3E-for-NormalizePath" class="impl"><a class="src rightside" href="../../src/actix_web/middleware/normalize.rs.html#114-132">source</a><a href="#impl-Transform%3CS,+ServiceRequest%3E-for-NormalizePath" class="anchor">§</a><h3 class="code-header">impl<S, B> <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, <a class="struct" href="struct.ServiceRequest.html" title="struct actix_web::dev::ServiceRequest">ServiceRequest</a>> for <a class="struct" href="../middleware/struct.NormalizePath.html" title="struct actix_web::middleware::NormalizePath">NormalizePath</a><div class="where">where
|
||||
S: <a class="trait" href="trait.Service.html" title="trait actix_web::dev::Service">Service</a><<a class="struct" href="struct.ServiceRequest.html" title="struct actix_web::dev::ServiceRequest">ServiceRequest</a>, Response = <a class="struct" href="struct.ServiceResponse.html" title="struct actix_web::dev::ServiceResponse">ServiceResponse</a><B>, Error = <a class="struct" href="../error/struct.Error.html" title="struct actix_web::error::Error">Error</a>>,
|
||||
S::<a class="associatedtype" href="trait.Service.html#associatedtype.Future" title="type actix_web::dev::Service::Future">Future</a>: 'static,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Response-7" class="associatedtype trait-impl"><a href="#associatedtype.Response-7" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Response" class="associatedtype">Response</a> = <a class="struct" href="struct.ServiceResponse.html" title="struct actix_web::dev::ServiceResponse">ServiceResponse</a><B></h4></section><section id="associatedtype.Error-7" class="associatedtype trait-impl"><a href="#associatedtype.Error-7" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="struct" href="../error/struct.Error.html" title="struct actix_web::error::Error">Error</a></h4></section><section id="associatedtype.Transform-7" class="associatedtype trait-impl"><a href="#associatedtype.Transform-7" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Transform" class="associatedtype">Transform</a> = NormalizePathNormalization<S></h4></section><section id="associatedtype.InitError-7" class="associatedtype trait-impl"><a href="#associatedtype.InitError-7" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.InitError" class="associatedtype">InitError</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h4></section><section id="associatedtype.Future-7" class="associatedtype trait-impl"><a href="#associatedtype.Future-7" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = Ready<<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<<a class="struct" href="../middleware/struct.NormalizePath.html" title="struct actix_web::middleware::NormalizePath">NormalizePath</a> as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, <a class="struct" href="struct.ServiceRequest.html" title="struct actix_web::dev::ServiceRequest">ServiceRequest</a>>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.Transform" title="type actix_web::dev::Transform::Transform">Transform</a>, <<a class="struct" href="../middleware/struct.NormalizePath.html" title="struct actix_web::middleware::NormalizePath">NormalizePath</a> as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, <a class="struct" href="struct.ServiceRequest.html" title="struct actix_web::dev::ServiceRequest">ServiceRequest</a>>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.InitError" title="type actix_web::dev::Transform::InitError">InitError</a>>></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Transform%3CS,+Req%3E-for-Compat%3CT%3E" class="impl"><a class="src rightside" href="../../src/actix_web/middleware/compat.rs.html#59-80">source</a><a href="#impl-Transform%3CS,+Req%3E-for-Compat%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<S, T, Req> <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req> for <a class="struct" href="../middleware/struct.Compat.html" title="struct actix_web::middleware::Compat">Compat</a><T><div class="where">where
|
||||
S: <a class="trait" href="trait.Service.html" title="trait actix_web::dev::Service">Service</a><Req>,
|
||||
T: <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req>,
|
||||
T::<a class="associatedtype" href="trait.Transform.html#associatedtype.Future" title="type actix_web::dev::Transform::Future">Future</a>: 'static,
|
||||
T::<a class="associatedtype" href="trait.Transform.html#associatedtype.Response" title="type actix_web::dev::Transform::Response">Response</a>: MapServiceResponseBody,
|
||||
T::<a class="associatedtype" href="trait.Transform.html#associatedtype.Error" title="type actix_web::dev::Transform::Error">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="../error/struct.Error.html" title="struct actix_web::error::Error">Error</a>>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Response-8" class="associatedtype trait-impl"><a href="#associatedtype.Response-8" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Response" class="associatedtype">Response</a> = <a class="struct" href="struct.ServiceResponse.html" title="struct actix_web::dev::ServiceResponse">ServiceResponse</a></h4></section><section id="associatedtype.Error-8" class="associatedtype trait-impl"><a href="#associatedtype.Error-8" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="struct" href="../error/struct.Error.html" title="struct actix_web::error::Error">Error</a></h4></section><section id="associatedtype.Transform-8" class="associatedtype trait-impl"><a href="#associatedtype.Transform-8" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Transform" class="associatedtype">Transform</a> = CompatMiddleware<<T as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.Transform" title="type actix_web::dev::Transform::Transform">Transform</a>></h4></section><section id="associatedtype.InitError-8" class="associatedtype trait-impl"><a href="#associatedtype.InitError-8" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.InitError" class="associatedtype">InitError</a> = <T as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.InitError" title="type actix_web::dev::Transform::InitError">InitError</a></h4></section><section id="associatedtype.Future-8" class="associatedtype trait-impl"><a href="#associatedtype.Future-8" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<<a class="struct" href="../middleware/struct.Compat.html" title="struct actix_web::middleware::Compat">Compat</a><T> as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.Transform" title="type actix_web::dev::Transform::Transform">Transform</a>, <<a class="struct" href="../middleware/struct.Compat.html" title="struct actix_web::middleware::Compat">Compat</a><T> as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.InitError" title="type actix_web::dev::Transform::InitError">InitError</a>>>>></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Transform%3CS,+Req%3E-for-Condition%3CT%3E" class="impl"><a class="src rightside" href="../../src/actix_web/middleware/condition.rs.html#43-69">source</a><a href="#impl-Transform%3CS,+Req%3E-for-Condition%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<S, T, Req, BE, BD, Err> <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req> for <a class="struct" href="../middleware/struct.Condition.html" title="struct actix_web::middleware::Condition">Condition</a><T><div class="where">where
|
||||
S: <a class="trait" href="trait.Service.html" title="trait actix_web::dev::Service">Service</a><Req, Response = <a class="struct" href="struct.ServiceResponse.html" title="struct actix_web::dev::ServiceResponse">ServiceResponse</a><BD>, Error = Err> + 'static,
|
||||
T: <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req, Response = <a class="struct" href="struct.ServiceResponse.html" title="struct actix_web::dev::ServiceResponse">ServiceResponse</a><BE>, Error = Err>,
|
||||
T::<a class="associatedtype" href="trait.Transform.html#associatedtype.Future" title="type actix_web::dev::Transform::Future">Future</a>: 'static,
|
||||
T::<a class="associatedtype" href="trait.Transform.html#associatedtype.InitError" title="type actix_web::dev::Transform::InitError">InitError</a>: 'static,
|
||||
T::<a class="associatedtype" href="trait.Transform.html#associatedtype.Transform" title="type actix_web::dev::Transform::Transform">Transform</a>: 'static,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Response-9" class="associatedtype trait-impl"><a href="#associatedtype.Response-9" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Response" class="associatedtype">Response</a> = <a class="struct" href="struct.ServiceResponse.html" title="struct actix_web::dev::ServiceResponse">ServiceResponse</a><<a class="enum" href="../body/enum.EitherBody.html" title="enum actix_web::body::EitherBody">EitherBody</a><BE, BD>></h4></section><section id="associatedtype.Error-9" class="associatedtype trait-impl"><a href="#associatedtype.Error-9" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = Err</h4></section><section id="associatedtype.Transform-9" class="associatedtype trait-impl"><a href="#associatedtype.Transform-9" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Transform" class="associatedtype">Transform</a> = ConditionMiddleware<<T as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.Transform" title="type actix_web::dev::Transform::Transform">Transform</a>, S></h4></section><section id="associatedtype.InitError-9" class="associatedtype trait-impl"><a href="#associatedtype.InitError-9" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.InitError" class="associatedtype">InitError</a> = <T as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.InitError" title="type actix_web::dev::Transform::InitError">InitError</a></h4></section><section id="associatedtype.Future-9" class="associatedtype trait-impl"><a href="#associatedtype.Future-9" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Future" class="associatedtype">Future</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<<a class="struct" href="../middleware/struct.Condition.html" title="struct actix_web::middleware::Condition">Condition</a><T> as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.Transform" title="type actix_web::dev::Transform::Transform">Transform</a>, <<a class="struct" href="../middleware/struct.Condition.html" title="struct actix_web::middleware::Condition">Condition</a><T> as <a class="trait" href="trait.Transform.html" title="trait actix_web::dev::Transform">Transform</a><S, Req>>::<a class="associatedtype" href="trait.Transform.html#associatedtype.InitError" title="type actix_web::dev::Transform::InitError">InitError</a>>>>></h4></section></div></details></div><script src="../../trait.impl/actix_service/transform/trait.Transform.js" data-ignore-extern-crates="alloc" async></script></section></div></main></body></html>
|
Reference in New Issue
Block a user