Adding large folders

This commit is contained in:
2026-02-26 12:00:21 -05:00
parent 5400d82acd
commit 49701c85ad
47332 changed files with 1942573 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/struct.AndThen.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/struct.AndThen.html">../../../tower/util/struct.AndThen.html</a>...</p>
<script>location.replace("../../../tower/util/struct.AndThen.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/future/struct.AndThenFuture.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/future/struct.AndThenFuture.html">../../../tower/util/future/struct.AndThenFuture.html</a>...</p>
<script>location.replace("../../../tower/util/future/struct.AndThenFuture.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/struct.AndThenLayer.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/struct.AndThenLayer.html">../../../tower/util/struct.AndThenLayer.html</a>...</p>
<script>location.replace("../../../tower/util/struct.AndThenLayer.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../tower/util/struct.BoxLayer.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../tower/util/struct.BoxLayer.html">../../../../tower/util/struct.BoxLayer.html</a>...</p>
<script>location.replace("../../../../tower/util/struct.BoxLayer.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../tower/util/struct.BoxCloneServiceLayer.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../tower/util/struct.BoxCloneServiceLayer.html">../../../../tower/util/struct.BoxCloneServiceLayer.html</a>...</p>
<script>location.replace("../../../../tower/util/struct.BoxCloneServiceLayer.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../tower/util/struct.BoxCloneSyncServiceLayer.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../tower/util/struct.BoxCloneSyncServiceLayer.html">../../../../tower/util/struct.BoxCloneSyncServiceLayer.html</a>...</p>
<script>location.replace("../../../../tower/util/struct.BoxCloneSyncServiceLayer.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../tower/util/struct.BoxService.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../tower/util/struct.BoxService.html">../../../../tower/util/struct.BoxService.html</a>...</p>
<script>location.replace("../../../../tower/util/struct.BoxService.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../tower/util/struct.UnsyncBoxService.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../tower/util/struct.UnsyncBoxService.html">../../../../tower/util/struct.UnsyncBoxService.html</a>...</p>
<script>location.replace("../../../../tower/util/struct.UnsyncBoxService.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/struct.BoxCloneService.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/struct.BoxCloneService.html">../../../tower/util/struct.BoxCloneService.html</a>...</p>
<script>location.replace("../../../tower/util/struct.BoxCloneService.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/struct.BoxCloneSyncService.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/struct.BoxCloneSyncService.html">../../../tower/util/struct.BoxCloneSyncService.html</a>...</p>
<script>location.replace("../../../tower/util/struct.BoxCloneSyncService.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../tower/util/struct.CallAll.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../tower/util/struct.CallAll.html">../../../../tower/util/struct.CallAll.html</a>...</p>
<script>location.replace("../../../../tower/util/struct.CallAll.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../tower/util/struct.CallAllUnordered.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../tower/util/struct.CallAllUnordered.html">../../../../tower/util/struct.CallAllUnordered.html</a>...</p>
<script>location.replace("../../../../tower/util/struct.CallAllUnordered.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/enum.Either.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/enum.Either.html">../../../tower/util/enum.Either.html</a>...</p>
<script>location.replace("../../../tower/util/enum.Either.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/future/struct.EitherResponseFuture.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/future/struct.EitherResponseFuture.html">../../../tower/util/future/struct.EitherResponseFuture.html</a>...</p>
<script>location.replace("../../../tower/util/future/struct.EitherResponseFuture.html" + location.search + location.hash);</script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
<!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="Error types"><title>tower::util::error - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="tower" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module error</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../tower/index.html">tower</a><span class="version">0.5.3</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module error</a></h2><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In tower::<wbr>util</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">tower</a>::<wbr><a href="../index.html">util</a></div><h1>Module <span>error</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/tower/util/mod.rs.html#51">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Error types</p>
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="optional/index.html" title="mod tower::util::error::optional">optional</a></dt><dd>Error types for <a href="../struct.Optional.html" title="struct tower::util::Optional"><code>Optional</code></a>.</dd></dl></section></div></main></body></html>

View File

@@ -0,0 +1,2 @@
<!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="Error types for `Optional`."><title>tower::util::error::optional - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="tower" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module optional</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../tower/index.html">tower</a><span class="version">0.5.3</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module optional</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In tower::<wbr>util::<wbr>error</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">tower</a>::<wbr><a href="../../index.html">util</a>::<wbr><a href="../index.html">error</a></div><h1>Module <span>optional</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/tower/util/optional/error.rs.html#1-21">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Error types for <a href="../../struct.Optional.html" title="struct tower::util::Optional"><code>Optional</code></a>.</p>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.None.html" title="struct tower::util::error::optional::None">None</a></dt><dd>Error returned if the inner <a href="../../../trait.Service.html" title="trait tower::Service"><code>Service</code></a> has not been set.</dd></dl></section></div></main></body></html>

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"struct":["None"]};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"mod":["optional"]};

View File

@@ -0,0 +1,29 @@
<!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="Returns a new `FutureService` for the given future."><title>future_service in tower::util - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tower" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></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]--><rustdoc-topbar><h2><a href="#">future_service</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tower/index.html">tower</a><span class="version">0.5.3</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">future_<wbr>service</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#example" title="Example">Example</a></li><li><a href="#regarding-the-unpin-bound" title="Regarding the `Unpin` bound">Regarding the <code>Unpin</code> bound</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In tower::<wbr>util</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">tower</a>::<wbr><a href="index.html">util</a></div><h1>Function <span class="fn">future_<wbr>service</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/tower/util/future_service.rs.html#48-54">Source</a> </span></div><pre class="rust item-decl"><code>pub fn future_service&lt;F, S, R, E&gt;(future: F) -&gt; <a class="struct" href="struct.FutureService.html" title="struct tower::util::FutureService">FutureService</a>&lt;F, S&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>&lt;Output = <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;S, E&gt;&gt; + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,
S: <a class="trait" href="../trait.Service.html" title="trait tower::Service">Service</a>&lt;R, Error = E&gt;,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Returns a new <a href="struct.FutureService.html" title="struct tower::util::FutureService"><code>FutureService</code></a> for the given future.</p>
<p>A <a href="struct.FutureService.html" title="struct tower::util::FutureService"><code>FutureService</code></a> allows you to treat a future that resolves to a service as a service. This
can be useful for services that are created asynchronously.</p>
<h2 id="example"><a class="doc-anchor" href="#example">§</a>Example</h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tower::{service_fn, Service, ServiceExt};
<span class="kw">use </span>tower::util::future_service;
<span class="kw">use </span>std::convert::Infallible;
<span class="comment">// A future which outputs a type implementing `Service`.
</span><span class="kw">let </span>future_of_a_service = <span class="kw">async </span>{
<span class="kw">let </span>svc = service_fn(|_req: ()| <span class="kw">async </span>{ <span class="prelude-val">Ok</span>::&lt;<span class="kw">_</span>, Infallible&gt;(<span class="string">"ok"</span>) });
<span class="prelude-val">Ok</span>::&lt;<span class="kw">_</span>, Infallible&gt;(svc)
};
<span class="comment">// Wrap the future with a `FutureService`, allowing it to be used
// as a service without awaiting the future's completion:
</span><span class="kw">let </span><span class="kw-2">mut </span>svc = future_service(Box::pin(future_of_a_service));
<span class="comment">// Now, when we wait for the service to become ready, it will
// drive the future to completion internally.
</span><span class="kw">let </span>svc = svc.ready().<span class="kw">await</span>.unwrap();
<span class="kw">let </span>res = svc.call(()).<span class="kw">await</span>.unwrap();</code></pre></div><h2 id="regarding-the-unpin-bound"><a class="doc-anchor" href="#regarding-the-unpin-bound">§</a>Regarding the <a href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin"><code>Unpin</code></a> bound</h2>
<p>The <a href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin"><code>Unpin</code></a> bound on <code>F</code> is necessary because the future will be polled in
<a href="../trait.Service.html#tymethod.poll_ready" title="method tower::Service::poll_ready"><code>Service::poll_ready</code></a> which doesnt have a pinned receiver (it takes <code>&amp;mut self</code> and not <code>self: Pin&lt;&amp;mut Self&gt;</code>). So we cannot put the future into a <code>Pin</code> without requiring <code>Unpin</code>.</p>
<p>This will most likely come up if youre calling <code>future_service</code> with an async block. In that
case you can use <code>Box::pin(async { ... })</code> as shown in the example.</p>
</div></details></section></div></main></body></html>

View File

@@ -0,0 +1,9 @@
<!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="Convert an `Option&#60;Layer&#62;` into a `Layer`."><title>option_layer in tower::util - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tower" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></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]--><rustdoc-topbar><h2><a href="#">option_layer</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tower/index.html">tower</a><span class="version">0.5.3</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In tower::<wbr>util</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">tower</a>::<wbr><a href="index.html">util</a></div><h1>Function <span class="fn">option_<wbr>layer</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/tower/util/mod.rs.html#1067-1073">Source</a> </span></div><pre class="rust item-decl"><code>pub fn option_layer&lt;L&gt;(layer: <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;L&gt;) -&gt; <a class="enum" href="enum.Either.html" title="enum tower::util::Either">Either</a>&lt;L, <a class="struct" href="../layer/util/struct.Identity.html" title="struct tower::layer::util::Identity">Identity</a>&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Convert an <code>Option&lt;Layer&gt;</code> into a <a href="../trait.Layer.html" title="trait tower::Layer"><code>Layer</code></a>.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tower::util::option_layer;
<span class="comment">// Layer to apply a timeout if configured
</span><span class="kw">let </span>maybe_timeout = option_layer(timeout.map(TimeoutLayer::new));
ServiceBuilder::new()
.layer(maybe_timeout)
.service(svc);</code></pre></div></div></details></section></div></main></body></html>

View File

@@ -0,0 +1,19 @@
<!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="Returns a new `ServiceFn` with the given closure."><title>service_fn in tower::util - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tower" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></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]--><rustdoc-topbar><h2><a href="#">service_fn</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tower/index.html">tower</a><span class="version">0.5.3</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">service_<wbr>fn</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#example" title="Example">Example</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In tower::<wbr>util</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">tower</a>::<wbr><a href="index.html">util</a></div><h1>Function <span class="fn">service_<wbr>fn</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/tower/util/service_fn.rs.html#46-48">Source</a> </span></div><pre class="rust item-decl"><code>pub fn service_fn&lt;T&gt;(f: T) -&gt; <a class="struct" href="struct.ServiceFn.html" title="struct tower::util::ServiceFn">ServiceFn</a>&lt;T&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Returns a new <a href="struct.ServiceFn.html" title="struct tower::util::ServiceFn"><code>ServiceFn</code></a> with the given closure.</p>
<p>This lets you build a <a href="../trait.Service.html" title="trait tower::Service"><code>Service</code></a> from an async function that returns a <a href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result"><code>Result</code></a>.</p>
<h2 id="example"><a class="doc-anchor" href="#example">§</a>Example</h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tower::{service_fn, Service, ServiceExt, BoxError};
<span class="kw">async fn </span>handle(request: Request) -&gt; <span class="prelude-ty">Result</span>&lt;Response, BoxError&gt; {
<span class="kw">let </span>response = Response::new(<span class="string">"Hello, World!"</span>);
<span class="prelude-val">Ok</span>(response)
}
<span class="kw">let </span><span class="kw-2">mut </span>service = service_fn(handle);
<span class="kw">let </span>response = service
.ready()
.<span class="kw">await</span><span class="question-mark">?
</span>.call(Request::new())
.<span class="kw">await</span><span class="question-mark">?</span>;
<span class="macro">assert_eq!</span>(<span class="string">"Hello, World!"</span>, response.into_body());</code></pre></div></div></details></section></div></main></body></html>

View File

@@ -0,0 +1,2 @@
<!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="Future types"><title>tower::util::future - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="tower" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module future</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../tower/index.html">tower</a><span class="version">0.5.3</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module future</a></h2><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In tower::<wbr>util</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">tower</a>::<wbr><a href="../index.html">util</a></div><h1>Module <span>future</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/tower/util/mod.rs.html#57">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Future types</p>
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="optional/index.html" title="mod tower::util::future::optional">optional</a></dt><dd>Future types for <a href="../struct.Optional.html" title="struct tower::util::Optional"><code>Optional</code></a>.</dd></dl><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.AndThenFuture.html" title="struct tower::util::future::AndThenFuture">AndThen<wbr>Future</a></dt><dd>Response future from <a href="../struct.AndThen.html" title="struct tower::util::AndThen"><code>AndThen</code></a> services.</dd><dt><a class="struct" href="struct.EitherResponseFuture.html" title="struct tower::util::future::EitherResponseFuture">Either<wbr>Response<wbr>Future</a></dt><dd>Response future for <a href="../enum.Either.html" title="enum tower::util::Either"><code>Either</code></a>.</dd><dt><a class="struct" href="struct.MapErrFuture.html" title="struct tower::util::future::MapErrFuture">MapErr<wbr>Future</a></dt><dd>Response future from <a href="../struct.MapErr.html" title="struct tower::util::MapErr"><code>MapErr</code></a> services.</dd><dt><a class="struct" href="struct.MapResponseFuture.html" title="struct tower::util::future::MapResponseFuture">MapResponse<wbr>Future</a></dt><dd>Response future from <a href="../struct.MapResponse.html" title="struct tower::util::MapResponse"><code>MapResponse</code></a> services.</dd><dt><a class="struct" href="struct.MapResultFuture.html" title="struct tower::util::future::MapResultFuture">MapResult<wbr>Future</a></dt><dd>Response future from <a href="../struct.MapResult.html" title="struct tower::util::MapResult"><code>MapResult</code></a> services.</dd><dt><a class="struct" href="struct.ThenFuture.html" title="struct tower::util::future::ThenFuture">Then<wbr>Future</a></dt><dd>Response future from <a href="../struct.Then.html" title="struct tower::util::Then"><code>Then</code></a> services.</dd></dl></section></div></main></body></html>

View File

@@ -0,0 +1,2 @@
<!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="Future types for `Optional`."><title>tower::util::future::optional - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="tower" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module optional</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../tower/index.html">tower</a><span class="version">0.5.3</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module optional</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In tower::<wbr>util::<wbr>future</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">tower</a>::<wbr><a href="../../index.html">util</a>::<wbr><a href="../index.html">future</a></div><h1>Module <span>optional</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/tower/util/optional/future.rs.html#1-39">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Future types for <a href="../../struct.Optional.html" title="struct tower::util::Optional"><code>Optional</code></a>.</p>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.ResponseFuture.html" title="struct tower::util::future::optional::ResponseFuture">Response<wbr>Future</a></dt><dd>Response future returned by <a href="../../struct.Optional.html" title="struct tower::util::Optional"><code>Optional</code></a>.</dd></dl></section></div></main></body></html>

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"struct":["ResponseFuture"]};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"mod":["optional"],"struct":["AndThenFuture","EitherResponseFuture","MapErrFuture","MapResponseFuture","MapResultFuture","ThenFuture"]};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/fn.future_service.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/fn.future_service.html">../../../tower/util/fn.future_service.html</a>...</p>
<script>location.replace("../../../tower/util/fn.future_service.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/struct.FutureService.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/struct.FutureService.html">../../../tower/util/struct.FutureService.html</a>...</p>
<script>location.replace("../../../tower/util/struct.FutureService.html" + location.search + location.hash);</script>
</body>
</html>

View 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="Various utility types and functions that are generally used with Tower."><title>tower::util - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tower" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module util</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tower/index.html">tower</a><span class="version">0.5.3</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module util</a></h2><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#traits" title="Traits">Traits</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate tower</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">tower</a></div><h1>Module <span>util</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/tower/util/mod.rs.html#1-1073">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Various utility types and functions that are generally used with Tower.</p>
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="error/index.html" title="mod tower::util::error">error</a></dt><dd>Error types</dd><dt><a class="mod" href="future/index.html" title="mod tower::util::future">future</a></dt><dd>Future types</dd><dt><a class="mod" href="rng/index.html" title="mod tower::util::rng">rng</a></dt><dd><a href="https://en.wikipedia.org/wiki/Pseudorandom_number_generator">PRNG</a> utilities for tower middleware.</dd></dl><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.AndThen.html" title="struct tower::util::AndThen">AndThen</a></dt><dd>Service returned by the <a href="../trait.ServiceExt.html#method.and_then" title="method tower::ServiceExt::and_then"><code>and_then</code></a> combinator.</dd><dt><a class="struct" href="struct.AndThenLayer.html" title="struct tower::util::AndThenLayer">AndThen<wbr>Layer</a></dt><dd>A <a href="../trait.Layer.html" title="trait tower::Layer"><code>Layer</code></a> that produces a <a href="struct.AndThen.html" title="struct tower::util::AndThen"><code>AndThen</code></a> service.</dd><dt><a class="struct" href="struct.BoxCloneService.html" title="struct tower::util::BoxCloneService">BoxClone<wbr>Service</a></dt><dd>A <a href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone"><code>Clone</code></a> + <a href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send"><code>Send</code></a> boxed <a href="../trait.Service.html" title="trait tower::Service"><code>Service</code></a>.</dd><dt><a class="struct" href="struct.BoxCloneServiceLayer.html" title="struct tower::util::BoxCloneServiceLayer">BoxClone<wbr>Service<wbr>Layer</a></dt><dd>A <a href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone"><code>Clone</code></a> + <a href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send"><code>Send</code></a> boxed <a href="../trait.Layer.html" title="trait tower::Layer"><code>Layer</code></a>.</dd><dt><a class="struct" href="struct.BoxCloneSyncService.html" title="struct tower::util::BoxCloneSyncService">BoxClone<wbr>Sync<wbr>Service</a></dt><dd>A <a href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone"><code>Clone</code></a> + <a href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send"><code>Send</code></a> + <a href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html" title="trait core::marker::Sync"><code>Sync</code></a> boxed <a href="../trait.Service.html" title="trait tower::Service"><code>Service</code></a>.</dd><dt><a class="struct" href="struct.BoxCloneSyncServiceLayer.html" title="struct tower::util::BoxCloneSyncServiceLayer">BoxClone<wbr>Sync<wbr>Service<wbr>Layer</a></dt><dd>A <a href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone"><code>Clone</code></a> + <a href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send"><code>Send</code></a> + <a href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html" title="trait core::marker::Sync"><code>Sync</code></a> boxed <a href="../trait.Layer.html" title="trait tower::Layer"><code>Layer</code></a>.</dd><dt><a class="struct" href="struct.BoxLayer.html" title="struct tower::util::BoxLayer">BoxLayer</a></dt><dd>A boxed <a href="../trait.Layer.html" title="trait tower::Layer"><code>Layer</code></a> trait object.</dd><dt><a class="struct" href="struct.BoxService.html" title="struct tower::util::BoxService">BoxService</a></dt><dd>A boxed <code>Service + Send</code> trait object.</dd><dt><a class="struct" href="struct.CallAll.html" title="struct tower::util::CallAll">CallAll</a></dt><dd>This is a <a href="https://docs.rs/futures/latest/futures/stream/trait.Stream.html"><code>Stream</code></a> of responses resulting from calling the wrapped <a href="../trait.Service.html" title="trait tower::Service"><code>Service</code></a> for each
request received on the wrapped <a href="https://docs.rs/futures/latest/futures/stream/trait.Stream.html"><code>Stream</code></a>.</dd><dt><a class="struct" href="struct.CallAllUnordered.html" title="struct tower::util::CallAllUnordered">Call<wbr>AllUnordered</a></dt><dd>A stream of responses received from the inner service in received order.</dd><dt><a class="struct" href="struct.FutureService.html" title="struct tower::util::FutureService">Future<wbr>Service</a></dt><dd>A type that implements <a href="../trait.Service.html" title="trait tower::Service"><code>Service</code></a> for a <a href="https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html" title="trait core::future::future::Future"><code>Future</code></a> that produces a <a href="../trait.Service.html" title="trait tower::Service"><code>Service</code></a>.</dd><dt><a class="struct" href="struct.MapErr.html" title="struct tower::util::MapErr">MapErr</a></dt><dd>Service returned by the <a href="../trait.ServiceExt.html#method.map_err" title="method tower::ServiceExt::map_err"><code>map_err</code></a> combinator.</dd><dt><a class="struct" href="struct.MapErrLayer.html" title="struct tower::util::MapErrLayer">MapErr<wbr>Layer</a></dt><dd>A <a href="../trait.Layer.html" title="trait tower::Layer"><code>Layer</code></a> that produces <a href="struct.MapErr.html" title="struct tower::util::MapErr"><code>MapErr</code></a> services.</dd><dt><a class="struct" href="struct.MapFuture.html" title="struct tower::util::MapFuture">MapFuture</a></dt><dd><a href="../trait.Service.html" title="trait tower::Service"><code>Service</code></a> returned by the <a href="../trait.ServiceExt.html#method.map_future" title="method tower::ServiceExt::map_future"><code>map_future</code></a> combinator.</dd><dt><a class="struct" href="struct.MapFutureLayer.html" title="struct tower::util::MapFutureLayer">MapFuture<wbr>Layer</a></dt><dd>A <a href="../trait.Layer.html" title="trait tower::Layer"><code>Layer</code></a> that produces a <a href="struct.MapFuture.html" title="struct tower::util::MapFuture"><code>MapFuture</code></a> service.</dd><dt><a class="struct" href="struct.MapRequest.html" title="struct tower::util::MapRequest">MapRequest</a></dt><dd>Service returned by the <a href="../trait.ServiceExt.html#method.map_request" title="method tower::ServiceExt::map_request"><code>MapRequest</code></a> combinator.</dd><dt><a class="struct" href="struct.MapRequestLayer.html" title="struct tower::util::MapRequestLayer">MapRequest<wbr>Layer</a></dt><dd>A <a href="../trait.Layer.html" title="trait tower::Layer"><code>Layer</code></a> that produces <a href="struct.MapRequest.html" title="struct tower::util::MapRequest"><code>MapRequest</code></a> services.</dd><dt><a class="struct" href="struct.MapResponse.html" title="struct tower::util::MapResponse">MapResponse</a></dt><dd>Service returned by the <a href="../trait.ServiceExt.html#method.map_response" title="method tower::ServiceExt::map_response"><code>map_response</code></a> combinator.</dd><dt><a class="struct" href="struct.MapResponseLayer.html" title="struct tower::util::MapResponseLayer">MapResponse<wbr>Layer</a></dt><dd>A <a href="../trait.Layer.html" title="trait tower::Layer"><code>Layer</code></a> that produces a <a href="struct.MapResponse.html" title="struct tower::util::MapResponse"><code>MapResponse</code></a> service.</dd><dt><a class="struct" href="struct.MapResult.html" title="struct tower::util::MapResult">MapResult</a></dt><dd>Service returned by the <a href="../trait.ServiceExt.html#method.map_result" title="method tower::ServiceExt::map_result"><code>map_result</code></a> combinator.</dd><dt><a class="struct" href="struct.MapResultLayer.html" title="struct tower::util::MapResultLayer">MapResult<wbr>Layer</a></dt><dd>A <a href="../trait.Layer.html" title="trait tower::Layer"><code>Layer</code></a> that produces a <a href="struct.MapResult.html" title="struct tower::util::MapResult"><code>MapResult</code></a> service.</dd><dt><a class="struct" href="struct.Oneshot.html" title="struct tower::util::Oneshot">Oneshot</a></dt><dd>A <a href="https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html" title="trait core::future::future::Future"><code>Future</code></a> consuming a <a href="../trait.Service.html" title="trait tower::Service"><code>Service</code></a> and request, waiting until the <a href="../trait.Service.html" title="trait tower::Service"><code>Service</code></a>
is ready, and then calling <a href="../trait.Service.html#tymethod.call" title="method tower::Service::call"><code>Service::call</code></a> with the request, and
waiting for that <a href="https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html" title="trait core::future::future::Future"><code>Future</code></a>.</dd><dt><a class="struct" href="struct.Optional.html" title="struct tower::util::Optional">Optional</a></dt><dd>Optionally forwards requests to an inner service.</dd><dt><a class="struct" href="struct.Ready.html" title="struct tower::util::Ready">Ready</a></dt><dd>A future that yields a mutable reference to the service when it is ready to accept a request.</dd><dt><a class="struct" href="struct.ReadyOneshot.html" title="struct tower::util::ReadyOneshot">Ready<wbr>Oneshot</a></dt><dd>A <a href="https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html" title="trait core::future::future::Future"><code>Future</code></a> that yields the service when it is ready to accept a request.</dd><dt><a class="struct" href="struct.ServiceFn.html" title="struct tower::util::ServiceFn">Service<wbr>Fn</a></dt><dd>A <a href="../trait.Service.html" title="trait tower::Service"><code>Service</code></a> implemented by a closure.</dd><dt><a class="struct" href="struct.Then.html" title="struct tower::util::Then">Then</a></dt><dd><a href="../trait.Service.html" title="trait tower::Service"><code>Service</code></a> returned by the <a href="../trait.ServiceExt.html#method.then" title="method tower::ServiceExt::then"><code>then</code></a> combinator.</dd><dt><a class="struct" href="struct.ThenLayer.html" title="struct tower::util::ThenLayer">Then<wbr>Layer</a></dt><dd>A <a href="../trait.Layer.html" title="trait tower::Layer"><code>Layer</code></a> that produces a <a href="struct.Then.html" title="struct tower::util::Then"><code>Then</code></a> service.</dd><dt><a class="struct" href="struct.UnsyncBoxService.html" title="struct tower::util::UnsyncBoxService">Unsync<wbr>BoxService</a></dt><dd>A boxed <a href="../trait.Service.html" title="trait tower::Service"><code>Service</code></a> trait object.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.Either.html" title="enum tower::util::Either">Either</a></dt><dd>Combine two different service types into a single type.</dd></dl><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.ServiceExt.html" title="trait tower::util::ServiceExt">Service<wbr>Ext</a></dt><dd>An extension trait for <code>Service</code>s that provides a variety of convenient
adapters</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.future_service.html" title="fn tower::util::future_service">future_<wbr>service</a></dt><dd>Returns a new <a href="struct.FutureService.html" title="struct tower::util::FutureService"><code>FutureService</code></a> for the given future.</dd><dt><a class="fn" href="fn.option_layer.html" title="fn tower::util::option_layer">option_<wbr>layer</a></dt><dd>Convert an <code>Option&lt;Layer&gt;</code> into a <a href="../trait.Layer.html" title="trait tower::Layer"><code>Layer</code></a>.</dd><dt><a class="fn" href="fn.service_fn.html" title="fn tower::util::service_fn">service_<wbr>fn</a></dt><dd>Returns a new <a href="struct.ServiceFn.html" title="struct tower::util::ServiceFn"><code>ServiceFn</code></a> with the given closure.</dd></dl></section></div></main></body></html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/struct.MapErr.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/struct.MapErr.html">../../../tower/util/struct.MapErr.html</a>...</p>
<script>location.replace("../../../tower/util/struct.MapErr.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/future/struct.MapErrFuture.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/future/struct.MapErrFuture.html">../../../tower/util/future/struct.MapErrFuture.html</a>...</p>
<script>location.replace("../../../tower/util/future/struct.MapErrFuture.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/struct.MapErrLayer.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/struct.MapErrLayer.html">../../../tower/util/struct.MapErrLayer.html</a>...</p>
<script>location.replace("../../../tower/util/struct.MapErrLayer.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/struct.MapFuture.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/struct.MapFuture.html">../../../tower/util/struct.MapFuture.html</a>...</p>
<script>location.replace("../../../tower/util/struct.MapFuture.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/struct.MapFutureLayer.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/struct.MapFutureLayer.html">../../../tower/util/struct.MapFutureLayer.html</a>...</p>
<script>location.replace("../../../tower/util/struct.MapFutureLayer.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/struct.MapRequest.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/struct.MapRequest.html">../../../tower/util/struct.MapRequest.html</a>...</p>
<script>location.replace("../../../tower/util/struct.MapRequest.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/struct.MapRequestLayer.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/struct.MapRequestLayer.html">../../../tower/util/struct.MapRequestLayer.html</a>...</p>
<script>location.replace("../../../tower/util/struct.MapRequestLayer.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/struct.MapResponse.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/struct.MapResponse.html">../../../tower/util/struct.MapResponse.html</a>...</p>
<script>location.replace("../../../tower/util/struct.MapResponse.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/future/struct.MapResponseFuture.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/future/struct.MapResponseFuture.html">../../../tower/util/future/struct.MapResponseFuture.html</a>...</p>
<script>location.replace("../../../tower/util/future/struct.MapResponseFuture.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/struct.MapResponseLayer.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/struct.MapResponseLayer.html">../../../tower/util/struct.MapResponseLayer.html</a>...</p>
<script>location.replace("../../../tower/util/struct.MapResponseLayer.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/struct.MapResult.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/struct.MapResult.html">../../../tower/util/struct.MapResult.html</a>...</p>
<script>location.replace("../../../tower/util/struct.MapResult.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/future/struct.MapResultFuture.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/future/struct.MapResultFuture.html">../../../tower/util/future/struct.MapResultFuture.html</a>...</p>
<script>location.replace("../../../tower/util/future/struct.MapResultFuture.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/struct.MapResultLayer.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/struct.MapResultLayer.html">../../../tower/util/struct.MapResultLayer.html</a>...</p>
<script>location.replace("../../../tower/util/struct.MapResultLayer.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/struct.Oneshot.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/struct.Oneshot.html">../../../tower/util/struct.Oneshot.html</a>...</p>
<script>location.replace("../../../tower/util/struct.Oneshot.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../tower/util/error/optional/index.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../tower/util/error/optional/index.html">../../../../tower/util/error/optional/index.html</a>...</p>
<script>location.replace("../../../../tower/util/error/optional/index.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../tower/util/error/optional/struct.None.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../tower/util/error/optional/struct.None.html">../../../../tower/util/error/optional/struct.None.html</a>...</p>
<script>location.replace("../../../../tower/util/error/optional/struct.None.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../tower/util/future/optional/index.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../tower/util/future/optional/index.html">../../../../tower/util/future/optional/index.html</a>...</p>
<script>location.replace("../../../../tower/util/future/optional/index.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../tower/util/future/optional/struct.ResponseFuture.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../tower/util/future/optional/struct.ResponseFuture.html">../../../../tower/util/future/optional/struct.ResponseFuture.html</a>...</p>
<script>location.replace("../../../../tower/util/future/optional/struct.ResponseFuture.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/struct.Optional.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/struct.Optional.html">../../../tower/util/struct.Optional.html</a>...</p>
<script>location.replace("../../../tower/util/struct.Optional.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/struct.Ready.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/struct.Ready.html">../../../tower/util/struct.Ready.html</a>...</p>
<script>location.replace("../../../tower/util/struct.Ready.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/struct.ReadyOneshot.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/struct.ReadyOneshot.html">../../../tower/util/struct.ReadyOneshot.html</a>...</p>
<script>location.replace("../../../tower/util/struct.ReadyOneshot.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,9 @@
<!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="PRNG utilities for tower middleware."><title>tower::util::rng - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="tower" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module rng</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../tower/index.html">tower</a><span class="version">0.5.3</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module rng</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#traits" title="Traits">Traits</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In tower::<wbr>util</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">tower</a>::<wbr><a href="../index.html">util</a></div><h1>Module <span>rng</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/tower/util/rng.rs.html#1-187">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p><a href="https://en.wikipedia.org/wiki/Pseudorandom_number_generator">PRNG</a> utilities for tower middleware.</p>
<p>This module provides a generic <a href="trait.Rng.html" title="trait tower::util::rng::Rng"><code>Rng</code></a> trait and a <a href="struct.HasherRng.html" title="struct tower::util::rng::HasherRng"><code>HasherRng</code></a> that
implements the trait based on <a href="https://doc.rust-lang.org/1.93.1/std/hash/random/struct.RandomState.html" title="struct std::hash::random::RandomState"><code>RandomState</code></a> or any other <a href="https://doc.rust-lang.org/1.93.1/core/hash/trait.Hasher.html" title="trait core::hash::Hasher"><code>Hasher</code></a>.</p>
<p>These utilities replace towers internal usage of <code>rand</code> with these smaller,
more lightweight methods. Most of the implementations are extracted from
their corresponding <code>rand</code> implementations.</p>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.HasherRng.html" title="struct tower::util::rng::HasherRng">Hasher<wbr>Rng</a></dt><dd>A <a href="trait.Rng.html" title="trait tower::util::rng::Rng"><code>Rng</code></a> implementation that uses a <a href="https://doc.rust-lang.org/1.93.1/core/hash/trait.Hasher.html" title="trait core::hash::Hasher"><code>Hasher</code></a> to generate the random
values. The implementation uses an internal counter to pass to the hasher
for each iteration of <a href="trait.Rng.html#tymethod.next_u64" title="method tower::util::rng::Rng::next_u64"><code>Rng::next_u64</code></a>.</dd></dl><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.Rng.html" title="trait tower::util::rng::Rng">Rng</a></dt><dd>A simple <a href="https://en.wikipedia.org/wiki/Pseudorandom_number_generator">PRNG</a> trait for use within tower middleware.</dd></dl></section></div></main></body></html>

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"struct":["HasherRng"],"trait":["Rng"]};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,17 @@
<!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="A simple PRNG trait for use within tower middleware."><title>Rng in tower::util::rng - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="tower" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></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]--><rustdoc-topbar><h2><a href="#">Rng</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../tower/index.html">tower</a><span class="version">0.5.3</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Rng</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.next_u64" title="next_u64">next_u64</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.next_f64" title="next_f64">next_f64</a></li><li><a href="#method.next_range" title="next_range">next_range</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-Rng-for-Box%3CR%3E" title="Box&#60;R&#62;">Box&#60;R&#62;</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In tower::<wbr>util::<wbr>rng</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">tower</a>::<wbr><a href="../index.html">util</a>::<wbr><a href="index.html">rng</a></div><h1>Trait <span class="trait">Rng</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/tower/util/rng.rs.html#21-58">Source</a> </span></div><pre class="rust item-decl"><code>pub trait Rng {
// Required method
fn <a href="#tymethod.next_u64" class="fn">next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u64.html">u64</a>;
// Provided methods
fn <a href="#method.next_f64" class="fn">next_f64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.f64.html">f64</a> { ... }
<span class="item-spacer"></span> fn <a href="#method.next_range" class="fn">next_range</a>(&amp;mut self, range: <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u64.html">u64</a>&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u64.html">u64</a> { ... }
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A simple <a href="https://en.wikipedia.org/wiki/Pseudorandom_number_generator">PRNG</a> trait for use within tower middleware.</p>
</div></details><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.next_u64" class="method"><a class="src rightside" href="../../../src/tower/util/rng.rs.html#23">Source</a><h4 class="code-header">fn <a href="#tymethod.next_u64" class="fn">next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u64.html">u64</a></h4></section></summary><div class="docblock"><p>Generate a random <a href="https://doc.rust-lang.org/1.93.1/std/primitive.u64.html" title="primitive u64"><code>u64</code></a>.</p>
</div></details></div><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.next_f64" class="method"><a class="src rightside" href="../../../src/tower/util/rng.rs.html#26-37">Source</a><h4 class="code-header">fn <a href="#method.next_f64" class="fn">next_f64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.f64.html">f64</a></h4></section></summary><div class="docblock"><p>Generate a random <a href="https://doc.rust-lang.org/1.93.1/std/primitive.f64.html" title="primitive f64"><code>f64</code></a> between <code>[0, 1)</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.next_range" class="method"><a class="src rightside" href="../../../src/tower/util/rng.rs.html#44-57">Source</a><h4 class="code-header">fn <a href="#method.next_range" class="fn">next_range</a>(&amp;mut self, range: <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u64.html">u64</a>&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u64.html">u64</a></h4></section></summary><div class="docblock"><p>Randomly pick a value within the range.</p>
<h5 id="panic"><a class="doc-anchor" href="#panic">§</a>Panic</h5>
<ul>
<li>If <code>range.start &gt;= range.end</code> this will panic in debug mode.</li>
</ul>
</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-Rng-for-Box%3CR%3E" class="impl"><a class="src rightside" href="../../../src/tower/util/rng.rs.html#60-64">Source</a><a href="#impl-Rng-for-Box%3CR%3E" class="anchor">§</a><h3 class="code-header">impl&lt;R: <a class="trait" href="trait.Rng.html" title="trait tower::util::rng::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt; <a class="trait" href="trait.Rng.html" title="trait tower::util::rng::Rng">Rng</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;R&gt;</h3></section></summary><div class="impl-items"><section id="method.next_u64" class="method trait-impl"><a class="src rightside" href="../../../src/tower/util/rng.rs.html#61-63">Source</a><a href="#method.next_u64" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.next_u64" class="fn">next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u64.html">u64</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-Rng-for-HasherRng%3CH%3E" class="impl"><a class="src rightside" href="../../../src/tower/util/rng.rs.html#100-110">Source</a><a href="#impl-Rng-for-HasherRng%3CH%3E" class="anchor">§</a><h3 class="code-header">impl&lt;H&gt; <a class="trait" href="trait.Rng.html" title="trait tower::util::rng::Rng">Rng</a> for <a class="struct" href="struct.HasherRng.html" title="struct tower::util::rng::HasherRng">HasherRng</a>&lt;H&gt;<div class="where">where
H: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>,</div></h3></section></div><script src="../../../trait.impl/tower/util/rng/trait.Rng.js" data-ignore-extern-crates="alloc" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/fn.service_fn.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/fn.service_fn.html">../../../tower/fn.service_fn.html</a>...</p>
<script>location.replace("../../../tower/fn.service_fn.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/struct.ServiceFn.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/struct.ServiceFn.html">../../../tower/util/struct.ServiceFn.html</a>...</p>
<script>location.replace("../../../tower/util/struct.ServiceFn.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"enum":["Either"],"fn":["future_service","option_layer","service_fn"],"mod":["error","future","rng"],"struct":["AndThen","AndThenLayer","BoxCloneService","BoxCloneServiceLayer","BoxCloneSyncService","BoxCloneSyncServiceLayer","BoxLayer","BoxService","CallAll","CallAllUnordered","FutureService","MapErr","MapErrLayer","MapFuture","MapFutureLayer","MapRequest","MapRequestLayer","MapResponse","MapResponseLayer","MapResult","MapResultLayer","Oneshot","Optional","Ready","ReadyOneshot","ServiceFn","Then","ThenLayer","UnsyncBoxService"],"trait":["ServiceExt"]};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/struct.Then.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/struct.Then.html">../../../tower/util/struct.Then.html</a>...</p>
<script>location.replace("../../../tower/util/struct.Then.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/future/struct.ThenFuture.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/future/struct.ThenFuture.html">../../../tower/util/future/struct.ThenFuture.html</a>...</p>
<script>location.replace("../../../tower/util/future/struct.ThenFuture.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../tower/util/struct.ThenLayer.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../tower/util/struct.ThenLayer.html">../../../tower/util/struct.ThenLayer.html</a>...</p>
<script>location.replace("../../../tower/util/struct.ThenLayer.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,362 @@
<!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 extension trait for `Service`s that provides a variety of convenient adapters"><title>ServiceExt in tower::util - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tower" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></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]--><rustdoc-topbar><h2><a href="#">ServiceExt</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tower/index.html">tower</a><span class="version">0.5.3</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Service<wbr>Ext</a></h2><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.and_then" title="and_then">and_then</a></li><li><a href="#method.boxed" title="boxed">boxed</a></li><li><a href="#method.boxed_clone" title="boxed_clone">boxed_clone</a></li><li><a href="#method.call_all" title="call_all">call_all</a></li><li><a href="#method.map_err" title="map_err">map_err</a></li><li><a href="#method.map_future" title="map_future">map_future</a></li><li><a href="#method.map_request" title="map_request">map_request</a></li><li><a href="#method.map_response" title="map_response">map_response</a></li><li><a href="#method.map_result" title="map_result">map_result</a></li><li><a href="#method.oneshot" title="oneshot">oneshot</a></li><li><a href="#method.ready" title="ready">ready</a></li><li><a href="#method.ready_oneshot" title="ready_oneshot">ready_oneshot</a></li><li><a href="#method.then" title="then">then</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In tower::<wbr>util</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">tower</a>::<wbr><a href="index.html">util</a></div><h1>Trait <span class="trait">Service<wbr>Ext</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/tower/util/mod.rs.html#71-1043">Source</a> </span></div><pre class="rust item-decl"><code>pub trait ServiceExt&lt;Request&gt;: <a class="trait" href="../trait.Service.html" title="trait tower::Service">Service</a>&lt;Request&gt; {
<details class="toggle type-contents-toggle"><summary class="hideme"><span>Show 13 methods</span></summary> // Provided methods
fn <a href="#method.ready" class="fn">ready</a>(&amp;mut self) -&gt; <a class="struct" href="struct.Ready.html" title="struct tower::util::Ready">Ready</a>&lt;'_, Self, Request&gt; <a href="#" class="tooltip" data-notable-ty="Ready&lt;&#39;_, Self, Request&gt;"></a>
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... }
<span class="item-spacer"></span> fn <a href="#method.ready_oneshot" class="fn">ready_oneshot</a>(self) -&gt; <a class="struct" href="struct.ReadyOneshot.html" title="struct tower::util::ReadyOneshot">ReadyOneshot</a>&lt;Self, Request&gt; <a href="#" class="tooltip" data-notable-ty="ReadyOneshot&lt;Self, Request&gt;"></a>
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... }
<span class="item-spacer"></span> fn <a href="#method.oneshot" class="fn">oneshot</a>(self, req: Request) -&gt; <a class="struct" href="struct.Oneshot.html" title="struct tower::util::Oneshot">Oneshot</a>&lt;Self, Request&gt; <a href="#" class="tooltip" data-notable-ty="Oneshot&lt;Self, Request&gt;"></a>
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... }
<span class="item-spacer"></span> fn <a href="#method.call_all" class="fn">call_all</a>&lt;S&gt;(self, reqs: S) -&gt; <a class="struct" href="struct.CallAll.html" title="struct tower::util::CallAll">CallAll</a>&lt;Self, S&gt;
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
S: <a class="trait" href="../../futures_core/stream/trait.Stream.html" title="trait futures_core::stream::Stream">Stream</a>&lt;Item = Request&gt;</span> { ... }
<span class="item-spacer"></span> fn <a href="#method.and_then" class="fn">and_then</a>&lt;F&gt;(self, f: F) -&gt; <a class="struct" href="struct.AndThen.html" title="struct tower::util::AndThen">AndThen</a>&lt;Self, F&gt;
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a></span> { ... }
<span class="item-spacer"></span> fn <a href="#method.map_response" class="fn">map_response</a>&lt;F, Response&gt;(self, f: F) -&gt; <a class="struct" href="struct.MapResponse.html" title="struct tower::util::MapResponse">MapResponse</a>&lt;Self, F&gt;
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Response" title="type tower::Service::Response">Response</a>) -&gt; Response + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a></span> { ... }
<span class="item-spacer"></span> fn <a href="#method.map_err" class="fn">map_err</a>&lt;F, Error&gt;(self, f: F) -&gt; <a class="struct" href="struct.MapErr.html" title="struct tower::util::MapErr">MapErr</a>&lt;Self, F&gt;
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Error" title="type tower::Service::Error">Error</a>) -&gt; Error + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a></span> { ... }
<span class="item-spacer"></span> fn <a href="#method.map_result" class="fn">map_result</a>&lt;F, Response, Error&gt;(self, f: F) -&gt; <a class="struct" href="struct.MapResult.html" title="struct tower::util::MapResult">MapResult</a>&lt;Self, F&gt;
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
Error: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Error" title="type tower::Service::Error">Error</a>&gt;,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Response" title="type tower::Service::Response">Response</a>, Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Error" title="type tower::Service::Error">Error</a>&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Response, Error&gt; + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a></span> { ... }
<span class="item-spacer"></span> fn <a href="#method.map_request" class="fn">map_request</a>&lt;F, NewRequest&gt;(self, f: F) -&gt; <a class="struct" href="struct.MapRequest.html" title="struct tower::util::MapRequest">MapRequest</a>&lt;Self, F&gt;
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(NewRequest) -&gt; Request</span> { ... }
<span class="item-spacer"></span> fn <a href="#method.then" class="fn">then</a>&lt;F, Response, Error, Fut&gt;(self, f: F) -&gt; <a class="struct" href="struct.Then.html" title="struct tower::util::Then">Then</a>&lt;Self, F&gt;
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
Error: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Error" title="type tower::Service::Error">Error</a>&gt;,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Response" title="type tower::Service::Response">Response</a>, Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Error" title="type tower::Service::Error">Error</a>&gt;) -&gt; Fut + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,
Fut: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>&lt;Output = <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Response, Error&gt;&gt;</span> { ... }
<span class="item-spacer"></span> fn <a href="#method.map_future" class="fn">map_future</a>&lt;F, Fut, Response, Error&gt;(self, f: F) -&gt; <a class="struct" href="struct.MapFuture.html" title="struct tower::util::MapFuture">MapFuture</a>&lt;Self, F&gt;
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Future" title="type tower::Service::Future">Future</a>) -&gt; Fut,
Error: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Error" title="type tower::Service::Error">Error</a>&gt;,
Fut: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>&lt;Output = <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Response, Error&gt;&gt;</span> { ... }
<span class="item-spacer"></span> fn <a href="#method.boxed" class="fn">boxed</a>(self) -&gt; <a class="struct" href="struct.BoxService.html" title="struct tower::util::BoxService">BoxService</a>&lt;Request, Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Response" title="type tower::Service::Response">Response</a>, Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Error" title="type tower::Service::Error">Error</a>&gt;
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static,
Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Future" title="type tower::Service::Future">Future</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static</span> { ... }
<span class="item-spacer"></span> fn <a href="#method.boxed_clone" class="fn">boxed_clone</a>(
self,
) -&gt; <a class="struct" href="struct.BoxCloneService.html" title="struct tower::util::BoxCloneService">BoxCloneService</a>&lt;Request, Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Response" title="type tower::Service::Response">Response</a>, Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Error" title="type tower::Service::Error">Error</a>&gt;
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static,
Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Future" title="type tower::Service::Future">Future</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static</span> { ... }
</details>}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An extension trait for <code>Service</code>s that provides a variety of convenient
adapters</p>
</div></details><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.ready" class="method"><a class="src rightside" href="../../src/tower/util/mod.rs.html#73-78">Source</a><h4 class="code-header">fn <a href="#method.ready" class="fn">ready</a>(&amp;mut self) -&gt; <a class="struct" href="struct.Ready.html" title="struct tower::util::Ready">Ready</a>&lt;'_, Self, Request&gt; <a href="#" class="tooltip" data-notable-ty="Ready&lt;&#39;_, Self, Request&gt;"></a><div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Yields a mutable reference to the service when it is ready to accept a request.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.ready_oneshot" class="method"><a class="src rightside" href="../../src/tower/util/mod.rs.html#81-86">Source</a><h4 class="code-header">fn <a href="#method.ready_oneshot" class="fn">ready_oneshot</a>(self) -&gt; <a class="struct" href="struct.ReadyOneshot.html" title="struct tower::util::ReadyOneshot">ReadyOneshot</a>&lt;Self, Request&gt; <a href="#" class="tooltip" data-notable-ty="ReadyOneshot&lt;Self, Request&gt;"></a><div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Yields the service when it is ready to accept a request.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.oneshot" class="method"><a class="src rightside" href="../../src/tower/util/mod.rs.html#89-94">Source</a><h4 class="code-header">fn <a href="#method.oneshot" class="fn">oneshot</a>(self, req: Request) -&gt; <a class="struct" href="struct.Oneshot.html" title="struct tower::util::Oneshot">Oneshot</a>&lt;Self, Request&gt; <a href="#" class="tooltip" data-notable-ty="Oneshot&lt;Self, Request&gt;"></a><div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Consume this <code>Service</code>, calling it with the provided request once it is ready.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.call_all" class="method"><a class="src rightside" href="../../src/tower/util/mod.rs.html#104-110">Source</a><h4 class="code-header">fn <a href="#method.call_all" class="fn">call_all</a>&lt;S&gt;(self, reqs: S) -&gt; <a class="struct" href="struct.CallAll.html" title="struct tower::util::CallAll">CallAll</a>&lt;Self, S&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
S: <a class="trait" href="../../futures_core/stream/trait.Stream.html" title="trait futures_core::stream::Stream">Stream</a>&lt;Item = Request&gt;,</div></h4></section></summary><div class="docblock"><p>Process all requests from the given <a href="https://docs.rs/futures/latest/futures/stream/trait.Stream.html"><code>Stream</code></a>, and produce a <a href="https://docs.rs/futures/latest/futures/stream/trait.Stream.html"><code>Stream</code></a> of their responses.</p>
<p>This is essentially <a href="https://docs.rs/futures/latest/futures/stream/trait.Stream.html"><code>Stream&lt;Item = Request&gt;</code></a> + <code>Self</code> =&gt; <a href="https://docs.rs/futures/latest/futures/stream/trait.Stream.html"><code>Stream&lt;Item = Response&gt;</code></a>. See the documentation for <a href="struct.CallAll.html" title="struct tower::util::CallAll"><code>CallAll</code></a> for
details.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.and_then" class="method"><a class="src rightside" href="../../src/tower/util/mod.rs.html#172-178">Source</a><h4 class="code-header">fn <a href="#method.and_then" class="fn">and_then</a>&lt;F&gt;(self, f: F) -&gt; <a class="struct" href="struct.AndThen.html" title="struct tower::util::AndThen">AndThen</a>&lt;Self, F&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h4></section></summary><div class="docblock"><p>Executes a new future after this services future resolves. This does
not alter the behaviour of the <a href="../trait.Service.html#tymethod.poll_ready" title="method tower::Service::poll_ready"><code>poll_ready</code></a> method.</p>
<p>This method can be used to change the <a href="../trait.Service.html#associatedtype.Response" title="associated type tower::Service::Response"><code>Response</code></a> type of the service
into a different type. You can use this method to chain along a computation once the
services response has been resolved.</p>
<h5 id="example"><a class="doc-anchor" href="#example">§</a>Example</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// A service returning Result&lt;Record, _&gt;
</span><span class="kw">let </span>service = DatabaseService::new(<span class="string">"127.0.0.1:8080"</span>);
<span class="comment">// Map the response into a new response
</span><span class="kw">let </span><span class="kw-2">mut </span>new_service = service.and_then(|record: Record| <span class="kw">async move </span>{
<span class="kw">let </span>name = record.name;
avatar_lookup(name).<span class="kw">await
</span>});
<span class="comment">// Call the new service
</span><span class="kw">let </span>id = <span class="number">13</span>;
<span class="kw">let </span>avatar = new_service.call(id).<span class="kw">await</span>.unwrap();</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.map_response" class="method"><a class="src rightside" href="../../src/tower/util/mod.rs.html#241-247">Source</a><h4 class="code-header">fn <a href="#method.map_response" class="fn">map_response</a>&lt;F, Response&gt;(self, f: F) -&gt; <a class="struct" href="struct.MapResponse.html" title="struct tower::util::MapResponse">MapResponse</a>&lt;Self, F&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Response" title="type tower::Service::Response">Response</a>) -&gt; Response + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h4></section></summary><div class="docblock"><p>Maps this services response value to a different value. This does not
alter the behaviour of the <a href="../trait.Service.html#tymethod.poll_ready" title="method tower::Service::poll_ready"><code>poll_ready</code></a> method.</p>
<p>This method can be used to change the <a href="../trait.Service.html#associatedtype.Response" title="associated type tower::Service::Response"><code>Response</code></a> type of the service
into a different type. It is similar to the <a href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html#method.map" title="method core::result::Result::map"><code>Result::map</code></a>
method. You can use this method to chain along a computation once the
services response has been resolved.</p>
<h5 id="example-1"><a class="doc-anchor" href="#example-1">§</a>Example</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// A service returning Result&lt;Record, _&gt;
</span><span class="kw">let </span>service = DatabaseService::new(<span class="string">"127.0.0.1:8080"</span>);
<span class="comment">// Map the response into a new response
</span><span class="kw">let </span><span class="kw-2">mut </span>new_service = service.map_response(|record| record.name);
<span class="comment">// Call the new service
</span><span class="kw">let </span>id = <span class="number">13</span>;
<span class="kw">let </span>name = new_service
.ready()
.<span class="kw">await</span><span class="question-mark">?
</span>.call(id)
.<span class="kw">await</span><span class="question-mark">?</span>;</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.map_err" class="method"><a class="src rightside" href="../../src/tower/util/mod.rs.html#309-315">Source</a><h4 class="code-header">fn <a href="#method.map_err" class="fn">map_err</a>&lt;F, Error&gt;(self, f: F) -&gt; <a class="struct" href="struct.MapErr.html" title="struct tower::util::MapErr">MapErr</a>&lt;Self, F&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Error" title="type tower::Service::Error">Error</a>) -&gt; Error + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h4></section></summary><div class="docblock"><p>Maps this services error value to a different value. This does not
alter the behaviour of the <a href="../trait.Service.html#tymethod.poll_ready" title="method tower::Service::poll_ready"><code>poll_ready</code></a> method.</p>
<p>This method can be used to change the <a href="../trait.Service.html#associatedtype.Error" title="associated type tower::Service::Error"><code>Error</code></a> type of the service
into a different type. It is similar to the <a href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html#method.map_err" title="method core::result::Result::map_err"><code>Result::map_err</code></a> method.</p>
<h5 id="example-2"><a class="doc-anchor" href="#example-2">§</a>Example</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// A service returning Result&lt;_, Error&gt;
</span><span class="kw">let </span>service = DatabaseService::new(<span class="string">"127.0.0.1:8080"</span>);
<span class="comment">// Map the error to a new error
</span><span class="kw">let </span><span class="kw-2">mut </span>new_service = service.map_err(|err| err.code);
<span class="comment">// Call the new service
</span><span class="kw">let </span>id = <span class="number">13</span>;
<span class="kw">let </span>code = new_service
.ready()
.<span class="kw">await</span><span class="question-mark">?
</span>.call(id)
.<span class="kw">await
</span>.unwrap_err();</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.map_result" class="method"><a class="src rightside" href="../../src/tower/util/mod.rs.html#538-545">Source</a><h4 class="code-header">fn <a href="#method.map_result" class="fn">map_result</a>&lt;F, Response, Error&gt;(self, f: F) -&gt; <a class="struct" href="struct.MapResult.html" title="struct tower::util::MapResult">MapResult</a>&lt;Self, F&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
Error: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Error" title="type tower::Service::Error">Error</a>&gt;,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Response" title="type tower::Service::Response">Response</a>, Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Error" title="type tower::Service::Error">Error</a>&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Response, Error&gt; + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h4></section></summary><div class="docblock"><p>Maps this services result type (<code>Result&lt;Self::Response, Self::Error&gt;</code>)
to a different value, regardless of whether the future succeeds or
fails.</p>
<p>This is similar to the <a href="../trait.ServiceExt.html#method.map_response" title="method tower::ServiceExt::map_response"><code>map_response</code></a> and <a href="../trait.ServiceExt.html#method.map_err" title="method tower::ServiceExt::map_err"><code>map_err</code></a> combinators,
except that the <em>same</em> function is invoked when the services future
completes, whether it completes successfully or fails. This function
takes the <a href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result"><code>Result</code></a> returned by the services future, and returns a
<a href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result"><code>Result</code></a>.</p>
<p>Like the standard librarys <a href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html#method.and_then" title="method core::result::Result::and_then"><code>Result::and_then</code></a>, this method can be
used to implement control flow based on <code>Result</code> values. For example, it
may be used to implement error recovery, by turning some <a href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html#variant.Err" title="variant core::result::Result::Err"><code>Err</code></a>
responses from the service into <a href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html#variant.Ok" title="variant core::result::Result::Ok"><code>Ok</code></a> responses. Similarly, some
successful responses from the service could be rejected, by returning an
<a href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html#variant.Err" title="variant core::result::Result::Err"><code>Err</code></a> conditionally, depending on the value inside the <a href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html#variant.Ok" title="variant core::result::Result::Ok"><code>Ok</code></a>. Finally,
this method can also be used to implement behaviors that must run when a
services future completes, regardless of whether it succeeded or failed.</p>
<p>This method can be used to change the <a href="../trait.Service.html#associatedtype.Response" title="associated type tower::Service::Response"><code>Response</code></a> type of the service
into a different type. It can also be used to change the <a href="../trait.Service.html#associatedtype.Error" title="associated type tower::Service::Error"><code>Error</code></a> type
of the service. However, because the <a href="../trait.ServiceExt.html#method.map_result" title="method tower::ServiceExt::map_result"><code>map_result</code></a> function is not applied
to the errors returned by the services <a href="../trait.Service.html#tymethod.poll_ready" title="method tower::Service::poll_ready"><code>poll_ready</code></a> method, it must
be possible to convert the services <a href="../trait.Service.html#associatedtype.Error" title="associated type tower::Service::Error"><code>Error</code></a> type into the error type
returned by the <a href="../trait.ServiceExt.html#method.map_result" title="method tower::ServiceExt::map_result"><code>map_result</code></a> function. This is trivial when the function
returns the same error type as the service, but in other cases, it can
be useful to use <a href="../type.BoxError.html" title="type tower::BoxError"><code>BoxError</code></a> to erase differing error types.</p>
<h5 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h5>
<p>Recovering from certain errors:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// A service returning Result&lt;Vec&lt;Record&gt;, DbError&gt;
</span><span class="kw">let </span>service = DatabaseService::new(<span class="string">"127.0.0.1:8080"</span>);
<span class="comment">// If the database returns no records for the query, we just want an empty `Vec`.
</span><span class="kw">let </span><span class="kw-2">mut </span>new_service = service.map_result(|result| <span class="kw">match </span>result {
<span class="comment">// If the error indicates that no records matched the query, return an empty
// `Vec` instead.
</span><span class="prelude-val">Err</span>(DbError::NoRecordsFound) =&gt; <span class="prelude-val">Ok</span>(Vec::new()),
<span class="comment">// Propagate all other responses (`Ok` and `Err`) unchanged
</span>x =&gt; x,
});
<span class="comment">// Call the new service
</span><span class="kw">let </span>id = <span class="number">13</span>;
<span class="kw">let </span>name = new_service
.ready()
.<span class="kw">await</span><span class="question-mark">?
</span>.call(id)
.<span class="kw">await</span><span class="question-mark">?</span>;</code></pre></div>
<p>Rejecting some <code>Ok</code> responses:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tower::BoxError;
<span class="comment">// A service returning Result&lt;Record, DbError&gt;
</span><span class="kw">let </span>service = DatabaseService::new(<span class="string">"127.0.0.1:8080"</span>);
<span class="comment">// If the user is zero years old, return an error.
</span><span class="kw">let </span><span class="kw-2">mut </span>new_service = service.map_result(|result| {
<span class="kw">let </span>record = result<span class="question-mark">?</span>;
<span class="kw">if </span>record.age == <span class="number">0 </span>{
<span class="comment">// Users must have been born to use our app!
</span><span class="kw">let </span>app_error = AppError::from(<span class="string">"users cannot be 0 years old!"</span>);
<span class="comment">// Box the error to erase its type (as it can be an `AppError`
// *or* the inner service's `DbError`).
</span><span class="kw">return </span><span class="prelude-val">Err</span>(BoxError::from(app_error));
}
<span class="comment">// Otherwise, return the record.
</span><span class="prelude-val">Ok</span>(record)
});
<span class="comment">// Call the new service
</span><span class="kw">let </span>id = <span class="number">13</span>;
<span class="kw">let </span>record = new_service
.ready()
.<span class="kw">await</span><span class="question-mark">?
</span>.call(id)
.<span class="kw">await</span><span class="question-mark">?</span>;</code></pre></div>
<p>Performing an action that must be run for both successes and failures:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// A service returning Result&lt;Record, DbError&gt;
</span><span class="kw">let </span>service = DatabaseService::new(<span class="string">"127.0.0.1:8080"</span>);
<span class="comment">// Print a message whenever a query completes.
</span><span class="kw">let </span><span class="kw-2">mut </span>new_service = service.map_result(|result| {
<span class="macro">println!</span>(<span class="string">"query completed; success={}"</span>, result.is_ok());
result
});
<span class="comment">// Call the new service
</span><span class="kw">let </span>id = <span class="number">13</span>;
<span class="kw">let </span>response = new_service
.ready()
.<span class="kw">await</span><span class="question-mark">?
</span>.call(id)
.<span class="kw">await</span>;</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.map_request" class="method"><a class="src rightside" href="../../src/tower/util/mod.rs.html#598-604">Source</a><h4 class="code-header">fn <a href="#method.map_request" class="fn">map_request</a>&lt;F, NewRequest&gt;(self, f: F) -&gt; <a class="struct" href="struct.MapRequest.html" title="struct tower::util::MapRequest">MapRequest</a>&lt;Self, F&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(NewRequest) -&gt; Request,</div></h4></section></summary><div class="docblock"><p>Composes a function <em>in front of</em> the service.</p>
<p>This adapter produces a new service that passes each value through the
given function <code>f</code> before sending it to <code>self</code>.</p>
<h5 id="example-3"><a class="doc-anchor" href="#example-3">§</a>Example</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// A service taking a String as a request
</span><span class="kw">let </span>service = DatabaseService::new(<span class="string">"127.0.0.1:8080"</span>);
<span class="comment">// Map the request to a new request
</span><span class="kw">let </span><span class="kw-2">mut </span>new_service = service.map_request(|id: u32| id.to_string());
<span class="comment">// Call the new service
</span><span class="kw">let </span>id = <span class="number">13</span>;
<span class="kw">let </span>response = new_service
.ready()
.<span class="kw">await</span><span class="question-mark">?
</span>.call(id)
.<span class="kw">await</span>;</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.then" class="method"><a class="src rightside" href="../../src/tower/util/mod.rs.html#863-871">Source</a><h4 class="code-header">fn <a href="#method.then" class="fn">then</a>&lt;F, Response, Error, Fut&gt;(self, f: F) -&gt; <a class="struct" href="struct.Then.html" title="struct tower::util::Then">Then</a>&lt;Self, F&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
Error: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Error" title="type tower::Service::Error">Error</a>&gt;,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Response" title="type tower::Service::Response">Response</a>, Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Error" title="type tower::Service::Error">Error</a>&gt;) -&gt; Fut + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,
Fut: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>&lt;Output = <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Response, Error&gt;&gt;,</div></h4></section></summary><div class="docblock"><p>Composes an asynchronous function <em>after</em> this service.</p>
<p>This takes a function or closure returning a future, and returns a new
<code>Service</code> that chains that function after this services <a href="../trait.Service.html#associatedtype.Future" title="associated type tower::Service::Future"><code>Future</code></a>. The
new <code>Service</code>s future will consist of this services future, followed
by the future returned by calling the chained function with the futures
<a href="https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html#associatedtype.Output" title="associated type core::future::future::Future::Output"><code>Output</code></a> type. The chained function is called regardless of whether
this services future completes with a successful response or with an
error.</p>
<p>This method can be thought of as an equivalent to the <a href="https://docs.rs/futures"><code>futures</code>
crate</a>s <a href="https://docs.rs/futures/latest/futures/future/trait.FutureExt.html#method.then"><code>FutureExt::then</code></a> combinator, but acting on <code>Service</code>s that
<em>return</em> futures, rather than on an individual future. Similarly to that
combinator, <a href="../trait.ServiceExt.html#method.then" title="method tower::ServiceExt::then"><code>ServiceExt::then</code></a> can be used to implement asynchronous
error recovery, by calling some asynchronous function with errors
returned by this service. Alternatively, it may also be used to call a
fallible async function with the successful response of this service.</p>
<p>This method can be used to change the <a href="../trait.Service.html#associatedtype.Response" title="associated type tower::Service::Response"><code>Response</code></a> type of the service
into a different type. It can also be used to change the <a href="../trait.Service.html#associatedtype.Error" title="associated type tower::Service::Error"><code>Error</code></a> type
of the service. However, because the <code>then</code> function is not applied
to the errors returned by the services <a href="../trait.Service.html#tymethod.poll_ready" title="method tower::Service::poll_ready"><code>poll_ready</code></a> method, it must
be possible to convert the services <a href="../trait.Service.html#associatedtype.Error" title="associated type tower::Service::Error"><code>Error</code></a> type into the error type
returned by the <code>then</code> future. This is trivial when the function
returns the same error type as the service, but in other cases, it can
be useful to use <a href="../type.BoxError.html" title="type tower::BoxError"><code>BoxError</code></a> to erase differing error types.</p>
<h5 id="examples-1"><a class="doc-anchor" href="#examples-1">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// A service returning Result&lt;Record, DbError&gt;
</span><span class="kw">let </span>service = DatabaseService::new(<span class="string">"127.0.0.1:8080"</span>);
<span class="comment">// An async function that attempts to recover from errors returned by the
// database.
</span><span class="kw">async fn </span>recover_from_error(error: DbError) -&gt; <span class="prelude-ty">Result</span>&lt;Record, DbError&gt; {
<span class="comment">// ...
</span>}
<span class="comment">// If the database service returns an error, attempt to recover by
// calling `recover_from_error`. Otherwise, return the successful response.
</span><span class="kw">let </span><span class="kw-2">mut </span>new_service = service.then(|result| <span class="kw">async move </span>{
<span class="kw">match </span>result {
<span class="prelude-val">Ok</span>(record) =&gt; <span class="prelude-val">Ok</span>(record),
<span class="prelude-val">Err</span>(e) =&gt; recover_from_error(e).<span class="kw">await</span>,
}
});
<span class="comment">// Call the new service
</span><span class="kw">let </span>id = <span class="number">13</span>;
<span class="kw">let </span>record = new_service
.ready()
.<span class="kw">await</span><span class="question-mark">?
</span>.call(id)
.<span class="kw">await</span><span class="question-mark">?</span>;</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.map_future" class="method"><a class="src rightside" href="../../src/tower/util/mod.rs.html#937-945">Source</a><h4 class="code-header">fn <a href="#method.map_future" class="fn">map_future</a>&lt;F, Fut, Response, Error&gt;(self, f: F) -&gt; <a class="struct" href="struct.MapFuture.html" title="struct tower::util::MapFuture">MapFuture</a>&lt;Self, F&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Future" title="type tower::Service::Future">Future</a>) -&gt; Fut,
Error: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Error" title="type tower::Service::Error">Error</a>&gt;,
Fut: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>&lt;Output = <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Response, Error&gt;&gt;,</div></h4></section></summary><div class="docblock"><p>Composes a function that transforms futures produced by the service.</p>
<p>This takes a function or closure returning a future computed from the future returned by
the services <a href="../trait.Service.html#tymethod.call" title="method tower::Service::call"><code>call</code></a> method, as opposed to the responses produced by the future.</p>
<h5 id="examples-2"><a class="doc-anchor" href="#examples-2">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">use </span>tokio::time::timeout;
<span class="comment">// A service returning Result&lt;Record, DbError&gt;
</span><span class="kw">let </span>service = DatabaseService::new(<span class="string">"127.0.0.1:8080"</span>);
<span class="kw">let </span><span class="kw-2">mut </span>new_service = service.map_future(|future| <span class="kw">async move </span>{
<span class="kw">let </span>res = timeout(Duration::from_secs(<span class="number">1</span>), future).<span class="kw">await</span><span class="question-mark">?</span>;
<span class="prelude-val">Ok</span>::&lt;<span class="kw">_</span>, BoxError&gt;(res)
});
<span class="comment">// Call the new service
</span><span class="kw">let </span>id = <span class="number">13</span>;
<span class="kw">let </span>record = new_service
.ready()
.<span class="kw">await</span><span class="question-mark">?
</span>.call(id)
.<span class="kw">await</span><span class="question-mark">?</span>;</code></pre></div>
<p>Note that normally you wouldnt implement timeouts like this and instead use <a href="../timeout/struct.Timeout.html" title="struct tower::timeout::Timeout"><code>Timeout</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.boxed" class="method"><a class="src rightside" href="../../src/tower/util/mod.rs.html#987-993">Source</a><h4 class="code-header">fn <a href="#method.boxed" class="fn">boxed</a>(self) -&gt; <a class="struct" href="struct.BoxService.html" title="struct tower::util::BoxService">BoxService</a>&lt;Request, Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Response" title="type tower::Service::Response">Response</a>, Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Error" title="type tower::Service::Error">Error</a>&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static,
Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Future" title="type tower::Service::Future">Future</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static,</div></h4></section></summary><div class="docblock"><p>Convert the service into a <a href="../trait.Service.html" title="trait tower::Service"><code>Service</code></a> + <a href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send"><code>Send</code></a> trait object.</p>
<p>See <a href="struct.BoxService.html" title="struct tower::util::BoxService"><code>BoxService</code></a> for more details.</p>
<p>If <code>Self</code> implements the <a href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone"><code>Clone</code></a> trait, the <a href="../trait.ServiceExt.html#method.boxed_clone"><code>boxed_clone</code></a> method
can be used instead, to produce a boxed service which will also
implement <a href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone"><code>Clone</code></a>.</p>
<h5 id="example-4"><a class="doc-anchor" href="#example-4">§</a>Example</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tower::{Service, ServiceExt, BoxError, service_fn, util::BoxService};
<span class="kw">let </span>service = service_fn(|req: Request| <span class="kw">async </span>{
<span class="prelude-val">Ok</span>::&lt;<span class="kw">_</span>, BoxError&gt;(Response::new())
});
<span class="kw">let </span>service: BoxService&lt;Request, Response, BoxError&gt; = service
.map_request(|req| {
<span class="macro">println!</span>(<span class="string">"received request"</span>);
req
})
.map_response(|res| {
<span class="macro">println!</span>(<span class="string">"response produced"</span>);
res
})
.boxed();</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.boxed_clone" class="method"><a class="src rightside" href="../../src/tower/util/mod.rs.html#1036-1042">Source</a><h4 class="code-header">fn <a href="#method.boxed_clone" class="fn">boxed_clone</a>(self) -&gt; <a class="struct" href="struct.BoxCloneService.html" title="struct tower::util::BoxCloneService">BoxCloneService</a>&lt;Request, Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Response" title="type tower::Service::Response">Response</a>, Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Error" title="type tower::Service::Error">Error</a>&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static,
Self::<a class="associatedtype" href="../trait.Service.html#associatedtype.Future" title="type tower::Service::Future">Future</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static,</div></h4></section></summary><div class="docblock"><p>Convert the service into a <a href="../trait.Service.html" title="trait tower::Service"><code>Service</code></a> + <a href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone"><code>Clone</code></a> + <a href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send"><code>Send</code></a> trait object.</p>
<p>This is similar to the <a href="../trait.ServiceExt.html#method.boxed"><code>boxed</code></a> method, but it requires that <code>Self</code> implement
<a href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone"><code>Clone</code></a>, and the returned boxed service implements <a href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone"><code>Clone</code></a>.
See <a href="struct.BoxCloneService.html" title="struct tower::util::BoxCloneService"><code>BoxCloneService</code></a> for more details.</p>
<h5 id="example-5"><a class="doc-anchor" href="#example-5">§</a>Example</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tower::{Service, ServiceExt, BoxError, service_fn, util::BoxCloneService};
<span class="kw">let </span>service = service_fn(|req: Request| <span class="kw">async </span>{
<span class="prelude-val">Ok</span>::&lt;<span class="kw">_</span>, BoxError&gt;(Response::new())
});
<span class="kw">let </span>service: BoxCloneService&lt;Request, Response, BoxError&gt; = service
.map_request(|req| {
<span class="macro">println!</span>(<span class="string">"received request"</span>);
req
})
.map_response(|res| {
<span class="macro">println!</span>(<span class="string">"response produced"</span>);
res
})
.boxed_clone();
<span class="comment">// The boxed service can still be cloned.
</span>service.clone();</code></pre></div></div></details></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-ServiceExt%3CRequest%3E-for-T" class="impl"><a class="src rightside" href="../../src/tower/util/mod.rs.html#1045">Source</a><a href="#impl-ServiceExt%3CRequest%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, Request&gt; <a class="trait" href="../trait.ServiceExt.html" title="trait tower::ServiceExt">ServiceExt</a>&lt;Request&gt; for T<div class="where">where
T: <a class="trait" href="../trait.Service.html" title="trait tower::Service">Service</a>&lt;Request&gt; + ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></div><script src="../../trait.impl/tower/util/trait.ServiceExt.js" async></script><script type="text/json" id="notable-traits-data">{"Oneshot<Self, Request>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.Oneshot.html\" title=\"struct tower::util::Oneshot\">Oneshot</a>&lt;S, Req&gt;</code></h3><pre><code><div class=\"where\">impl&lt;S, Req&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html\" title=\"trait core::future::future::Future\">Future</a> for <a class=\"struct\" href=\"struct.Oneshot.html\" title=\"struct tower::util::Oneshot\">Oneshot</a>&lt;S, Req&gt;<div class=\"where\">where\n S: <a class=\"trait\" href=\"../trait.Service.html\" title=\"trait tower::Service\">Service</a>&lt;Req&gt;,</div></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"enum\" href=\"https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;S::<a class=\"associatedtype\" href=\"../trait.Service.html#associatedtype.Response\" title=\"type tower::Service::Response\">Response</a>, S::<a class=\"associatedtype\" href=\"../trait.Service.html#associatedtype.Error\" title=\"type tower::Service::Error\">Error</a>&gt;;</div>","Ready<'_, Self, Request>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.Ready.html\" title=\"struct tower::util::Ready\">Ready</a>&lt;'a, T, Request&gt;</code></h3><pre><code><div class=\"where\">impl&lt;'a, T, Request&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html\" title=\"trait core::future::future::Future\">Future</a> for <a class=\"struct\" href=\"struct.Ready.html\" title=\"struct tower::util::Ready\">Ready</a>&lt;'a, T, Request&gt;<div class=\"where\">where\n T: <a class=\"trait\" href=\"../trait.Service.html\" title=\"trait tower::Service\">Service</a>&lt;Request&gt;,</div></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"enum\" href=\"https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.93.1/std/primitive.reference.html\">&amp;'a mut T</a>, T::<a class=\"associatedtype\" href=\"../trait.Service.html#associatedtype.Error\" title=\"type tower::Service::Error\">Error</a>&gt;;</div>","ReadyOneshot<Self, Request>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.ReadyOneshot.html\" title=\"struct tower::util::ReadyOneshot\">ReadyOneshot</a>&lt;T, Request&gt;</code></h3><pre><code><div class=\"where\">impl&lt;T, Request&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html\" title=\"trait core::future::future::Future\">Future</a> for <a class=\"struct\" href=\"struct.ReadyOneshot.html\" title=\"struct tower::util::ReadyOneshot\">ReadyOneshot</a>&lt;T, Request&gt;<div class=\"where\">where\n T: <a class=\"trait\" href=\"../trait.Service.html\" title=\"trait tower::Service\">Service</a>&lt;Request&gt;,</div></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"enum\" href=\"https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;T, T::<a class=\"associatedtype\" href=\"../trait.Service.html#associatedtype.Error\" title=\"type tower::Service::Error\">Error</a>&gt;;</div>"}</script></section></div></main></body></html>