mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-24 00:21:08 +01:00
191 lines
85 KiB
HTML
191 lines
85 KiB
HTML
|
<!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 HTTP response builder."><title>HttpResponseBuilder in actix_web - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt="logo"></a><h2><a href="../actix_web/index.html">actix_web</a><span class="version">4.6.0</span></h2></div><h2 class="location"><a href="#">HttpResponseBuilder</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.append_header">append_header</a></li><li><a href="#method.body">body</a></li><li><a href="#method.content_type">content_type</a></li><li><a href="#method.cookie">cookie</a></li><li><a href="#method.extensions">extensions</a></li><li><a href="#method.extensions_mut">extensions_mut</a></li><li><a href="#method.finish">finish</a></li><li><a href="#method.force_close">force_close</a></li><li><a href="#method.insert_header">insert_header</a></li><li><a href="#method.json">json</a></li><li><a href="#method.keep_alive">keep_alive</a></li><li><a href="#method.message_body">message_body</a></li><li><a href="#method.new">new</a></li><li><a href="#method.no_chunking">no_chunking</a></li><li><a href="#method.reason">reason</a></li><li><a href="#method.status">status</a></li><li><a href="#method.streaming">streaming</a></li><li><a href="#method.take">take</a></li><li><a href="#method.upgrade">upgrade</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-From%3CHttpResponseBuilder%3E-for-HttpResponse">From<HttpResponseBuilder></a></li><li><a href="#impl-From%3CHttpResponseBuilder%3E-for-Response%3CBoxBody%3E">From<HttpResponseBuilder></a></li><li><a href="#impl-Future-for-HttpResponseBuilder">Future</a></li><li><a href="#impl-Responder-for-HttpResponseBuilder">Responder</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-HttpResponseBuilder">!Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-HttpResponseBuilder">!RefUnwindSafe</a></li><li><a href="#impl-Send-for-HttpResponseBuilder">!Send</a></li><li>
|
|||
|
<p>This type can be used to construct an instance of <code>Response</code> through a builder-like pattern.</p>
|
|||
|
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-HttpResponseBuilder" class="impl"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#32-375">source</a><a href="#impl-HttpResponseBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#35-40">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>(status: <a class="struct" href="http/struct.StatusCode.html" title="struct actix_web::http::StatusCode">StatusCode</a>) -> Self</h4></section></summary><div class="docblock"><p>Create response builder</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.status" class="method"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#44-49">source</a><h4 class="code-header">pub fn <a href="#method.status" class="fn">status</a>(&mut self, status: <a class="struct" href="http/struct.StatusCode.html" title="struct actix_web::http::StatusCode">StatusCode</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut Self</a></h4></section></summary><div class="docblock"><p>Set HTTP status code of this response.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.insert_header" class="method"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#61-72">source</a><h4 class="code-header">pub fn <a href="#method.insert_header" class="fn">insert_header</a>(&mut self, header: impl <a class="trait" href="http/header/trait.TryIntoHeaderPair.html" title="trait actix_web::http::header::TryIntoHeaderPair">TryIntoHeaderPair</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut Self</a></h4></section></summary><div class="docblock"><p>Insert a header, replacing any that were set with an equivalent field name.</p>
|
|||
|
|
|||
|
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>actix_web::{HttpResponse, http::header};
|
|||
|
|
|||
|
HttpResponse::Ok()
|
|||
|
.insert_header(header::ContentType(mime::APPLICATION_JSON))
|
|||
|
.insert_header((<span class="string">"X-TEST"</span>, <span class="string">"value"</span>))
|
|||
|
.finish();</code></pre></div>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.append_header" class="method"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#85-94">source</a><h4 class="code-header">pub fn <a href="#method.append_header" class="fn">append_header</a>(&mut self, header: impl <a class="trait" href="http/header/trait.TryIntoHeaderPair.html" title="trait actix_web::http::header::TryIntoHeaderPair">TryIntoHeaderPair</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut Self</a></h4></section></summary><div class="docblock"><p>Append a header, keeping any that were set with an equivalent field name.</p>
|
|||
|
|
|||
|
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>actix_web::{HttpResponse, http::header};
|
|||
|
|
|||
|
HttpResponse::Ok()
|
|||
|
.append_header(header::ContentType(mime::APPLICATION_JSON))
|
|||
|
.append_header((<span class="string">"X-TEST"</span>, <span class="string">"value1"</span>))
|
|||
|
.append_header((<span class="string">"X-TEST"</span>, <span class="string">"value2"</span>))
|
|||
|
.finish();</code></pre></div>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.reason" class="method"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#148-153">source</a><h4 class="code-header">pub fn <a href="#method.reason" class="fn">reason</a>(&mut self, reason: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut Self</a></h4></section></summary><div class="docblock"><p>Set the custom reason for the response.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.keep_alive" class="method"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#157-162">source</a><h4 class="code-header">pub fn <a href="#method.keep_alive" class="fn">keep_alive</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut Self</a></h4></section></summary><div class="docblock"><p>Set connection type to KeepAlive</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.upgrade" class="method"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#166-179">source</a><h4 class="code-header">pub fn <a href="#method.upgrade" class="fn">upgrade</a><V>(&mut self, value: V) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut Self</a><div class="where">where
|
|||
|
V: <a class="trait" href="http/header/trait.TryIntoHeaderValue.html" title="trait actix_web::http::header::TryIntoHeaderValue">TryIntoHeaderValue</a>,</div></h4></section></summary><div class="docblock"><p>Set connection type to Upgrade</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.force_close" class="method"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#183-188">source</a><h4 class="code-header">pub fn <a href="#method.force_close" class="fn">force_close</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut Self</a></h4></section></summary><div class="docblock"><p>Force close connection, even if it is marked as keep-alive</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.no_chunking" class="method"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#192-200">source</a><h4 class="code-header">pub fn <a href="#method.no_chunking" class="fn">no_chunking</a>(&mut self, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut Self</a></h4></section></summary><div class="docblock"><p>Disable chunked transfer encoding for HTTP/1.1 streaming responses.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.content_type" class="method"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#204-217">source</a><h4 class="code-header">pub fn <a href="#method.content_type" class="fn">content_type</a><V>(&mut self, value: V) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut Self</a><div class="where">where
|
|||
|
V: <a class="trait" href="http/header/trait.TryIntoHeaderValue.html" title="trait actix_web::http::header::TryIntoHeaderValue">TryIntoHeaderValue</a>,</div></h4></section></summary><div class="docblock"><p>Set response content type.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.cookie" class="method"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#257-265">source</a><h4 class="code-header">pub fn <a href="#method.cookie" class="fn">cookie</a>(&mut self, cookie: <a class="struct" href="cookie/struct.Cookie.html" title="struct actix_web::cookie::Cookie">Cookie</a><'_>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut Self</a></h4></section><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>cookies</code></strong> only.</div></span></summary><div class="docblock"><p>Add a cookie to the response.</p>
|
|||
|
<p>To send a “removal” cookie, call <a href="cookie/struct.Cookie.html#method.make_removal" title="method actix_web::cookie::Cookie::make_removal"><code>.make_removal()</code></a> on the
|
|||
|
given cookie. See <a href="struct.HttpResponse.html#method.add_removal_cookie" title="method actix_web::HttpResponse::add_removal_cookie"><code>HttpResponse::add_removal_cookie()</code></a> to learn more.</p>
|
|||
|
<h5 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h5>
|
|||
|
<p>Send a new cookie:</p>
|
|||
|
|
|||
|
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>actix_web::{HttpResponse, cookie::Cookie};
|
|||
|
|
|||
|
<span class="kw">let </span>res = HttpResponse::Ok()
|
|||
|
.cookie(
|
|||
|
Cookie::build(<span class="string">"name"</span>, <span class="string">"value"</span>)
|
|||
|
.domain(<span class="string">"www.rust-lang.org"</span>)
|
|||
|
.path(<span class="string">"/"</span>)
|
|||
|
.secure(<span class="bool-val">true</span>)
|
|||
|
.http_only(<span class="bool-val">true</span>)
|
|||
|
.finish(),
|
|||
|
)
|
|||
|
.finish();</code></pre></div>
|
|||
|
<p>Send a removal cookie:</p>
|
|||
|
|
|||
|
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>actix_web::{HttpResponse, cookie::Cookie};
|
|||
|
|
|||
|
<span class="comment">// the name, domain and path match the cookie created in the previous example
|
|||
|
</span><span class="kw">let </span><span class="kw-2">mut </span>cookie = Cookie::build(<span class="string">"name"</span>, <span class="string">"value-does-not-matter"</span>)
|
|||
|
.domain(<span class="string">"www.rust-lang.org"</span>)
|
|||
|
.path(<span class="string">"/"</span>)
|
|||
|
.finish();
|
|||
|
cookie.make_removal();
|
|||
|
|
|||
|
<span class="kw">let </span>res = HttpResponse::Ok()
|
|||
|
.cookie(cookie)
|
|||
|
.finish();</code></pre></div>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.extensions" class="method"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#269-274">source</a><h4 class="code-header">pub fn <a href="#method.extensions" class="fn">extensions</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/cell/struct.Ref.html" title="struct core::cell::Ref">Ref</a><'_, <a class="struct" href="dev/struct.Extensions.html" title="struct actix_web::dev::Extensions">Extensions</a>></h4></section></summary><div class="docblock"><p>Returns a reference to the response-local data/extensions container.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.extensions_mut" class="method"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#278-283">source</a><h4 class="code-header">pub fn <a href="#method.extensions_mut" class="fn">extensions_mut</a>(&mut self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/cell/struct.RefMut.html" title="struct core::cell::RefMut">RefMut</a><'_, <a class="struct" href="dev/struct.Extensions.html" title="struct actix_web::dev::Extensions">Extensions</a>></h4></section></summary><div class="docblock"><p>Returns a mutable reference to the response-local data/extensions container.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.body" class="method"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#291-299">source</a><h4 class="code-header">pub fn <a href="#method.body" class="fn">body</a><B>(&mut self, body: B) -> <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a><<a class="struct" href="body/struct.BoxBody.html" title="struct actix_web::body::BoxBody">BoxBody</a>><div class="where">where
|
|||
|
B: <a class="trait" href="body/trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> + 'static,</div></h4></section></summary><div class="docblock"><p>Set a body and build the <code>HttpResponse</code>.</p>
|
|||
|
<p>Unlike <a href="struct.HttpResponseBuilder.html#method.message_body" title="method actix_web::HttpResponseBuilder::message_body"><code>message_body</code></a>, errors are converted into error
|
|||
|
responses immediately.</p>
|
|||
|
<p><code>HttpResponseBuilder</code> can not be used after this call.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.message_body" class="method"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#304-316">source</a><h4 class="code-header">pub fn <a href="#method.message_body" class="fn">message_body</a><B>(&mut self, body: B) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a><B>, <a class="struct" href="error/struct.Error.html" title="struct actix_web::error::Error">Error</a>></h4></section></summary><div class="docblock"><p>Set a body and build the <code>HttpResponse</code>.</p>
|
|||
|
<p><code>HttpResponseBuilder</code> can not be used after this call.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.streaming" class="method"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#322-328">source</a><h4 class="code-header">pub fn <a href="#method.streaming" class="fn">streaming</a><S, E>(&mut self, stream: S) -> <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a><div class="where">where
|
|||
|
S: Stream<Item = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, E>> + 'static,
|
|||
|
E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/error/trait.Error.html" title="trait core::error::Error">Error</a>>> + 'static,</div></h4></section></summary><div class="docblock"><p>Set a streaming body and build the <code>HttpResponse</code>.</p>
|
|||
|
<p><code>HttpResponseBuilder</code> can not be used after this call.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.json" class="method"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#333-350">source</a><h4 class="code-header">pub fn <a href="#method.json" class="fn">json</a>(&mut self, value: impl <a class="trait" href="https://docs.rs/serde/1.0.203/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a>) -> <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a></h4></section></summary><div class="docblock"><p>Set a JSON body and build the <code>HttpResponse</code>.</p>
|
|||
|
<p><code>HttpResponseBuilder</code> can not be used after this call.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.finish" class="method"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#356-358">source</a><h4 class="code-header">pub fn <a href="#method.finish" class="fn">finish</a>(&mut self) -> <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a></h4></section></summary><div class="docblock"><p>Set an empty body and build the <code>HttpResponse</code>.</p>
|
|||
|
<p><code>HttpResponseBuilder</code> can not be used after this call.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.take" class="method"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#361-366">source</a><h4 class="code-header">pub fn <a href="#method.take" class="fn">take</a>(&mut self) -> Self</h4></section></summary><div class="docblock"><p>This method construct new <code>HttpResponseBuilder</code></p>
|
|||
|
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CHttpResponseBuilder%3E-for-HttpResponse" class="impl"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#377-381">source</a><a href="#impl-From%3CHttpResponseBuilder%3E-for-HttpResponse" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</a>> for <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#378-380">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(builder: <a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CHttpResponseBuilder%3E-for-Response%3CBoxBody%3E" class="impl"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#383-387">source</a><a href="#impl-From%3CHttpResponseBuilder%3E-for-Response%3CBoxBody%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</a>> for <a class="struct" href="dev/struct.Response.html" title="struct actix_web::dev::Response">Response</a><<a class="struct" href="body/struct.BoxBody.html" title="struct actix_web::body::BoxBody">BoxBody</a>></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#384-386">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(builder: <a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Future-for-HttpResponseBuilder" class="impl"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#389-395">source</a><a href="#impl-Future-for-HttpResponseBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a> for <a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl"><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="associa
|
|||
|
the current task for wakeup if the value is not yet available. <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#tymethod.poll">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Responder-for-HttpResponseBuilder" class="impl"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#397-404">source</a><a href="#impl-Responder-for-HttpResponseBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Responder.html" title="trait actix_web::Responder">Responder</a> for <a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Body" class="associatedtype trait-impl"><a href="#associatedtype.Body" class="anchor">§</a><h4 class="code-header">type <a href="trait.Responder.html#associatedtype.Body" class="associatedtype">Body</a> = <a class="struct" href="body/struct.BoxBody.html" title="struct actix_web::body::BoxBody">BoxBody</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.respond_to" class="method trait-impl"><a class="src rightside" href="../src/actix_web/response/builder.rs.html#401-403">source</a><a href="#method.respond_to" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Responder.html#tymethod.respond_to" class="fn">respond_to</a>(self, _: &<a class="struct" href="struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>) -> <a class="struct" href="struct.HttpResponse.html" title="struct actix_web::HttpResponse">HttpResponse</a><Self::<a class="associatedtype" href="trait.Responder.html#associatedtype.Body" title="type actix_web::Responder::Body">Body</a>></h4></section></summary><div class='docblock'>Convert self to <code>HttpResponse</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.customize" class="method trait-impl"><a class="src rightside" href="../src/actix_web/response/responder.rs.html#64-69">source</a><a href="#method.customize" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Responder.html#method.customize" class="fn">customize</a>(self) -> <a class="struct" href="struct.CustomizeResponder.html" title="struct actix_web::CustomizeResponder">CustomizeResponder</a><Self><div class="where">where
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Wraps responder to allow alteration of its response. <a href="trait.Responder.html#method.customize">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-HttpResponseBuilder" class="impl"><a href="#impl-Freeze-for-HttpResponseBuilder" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</a></h3></section><section id="impl-RefUnwindSafe-for-HttpResponseBuilder" class="impl"><a href="#impl-RefUnwindSafe-for-HttpResponseBuilder" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</a></h3></section><section id="impl-Send-for-HttpResponseBuilder" class="impl"><a href="#impl-Send-for-HttpResponseBuilder" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</a></h3></section><section id="impl-Sync-for-HttpResponseBuilder" class="impl"><a href="#impl-Sync-for-HttpResponseBuilder" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</a></h3></section><section id="impl-Unpin-for-HttpResponseBuilder" class="impl"><a href="#impl-Unpin-for-HttpResponseBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</a></h3></section><section id="impl-UnwindSafe-for-HttpResponseBuilder" class="impl"><a href="#impl-UnwindSafe-for-HttpResponseBuilder" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.HttpResponseBuilder.html" title="struct actix_web::HttpResponseBuilder">HttpResponseBuilder</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
|
|||
|
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where
|
|||
|
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where
|
|||
|
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#765">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#768">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
|
|||
|
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-FutureExt-for-T" class="impl"><a href="#impl-FutureExt-for-T" class="anchor">§</a><h3 class="code-header">impl<T> FutureExt for T<div class="where">where
|
|||
|
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.map" class="method trait-impl"><a href="#method.map" class="anchor">§</a><h4 class="code-header">fn <a class="fn">map</a><U, F>(self, f: F) -> Map<Self, F><div class="where">where
|
|||
|
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>) -> U,
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Map this future’s output to a different type, returning a new future of
|
|||
|
the resulting type. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.map_into" class="method trait-impl"><a href="#method.map_into" class="anchor">§</a><h4 class="code-header">fn <a class="fn">map_into</a><U>(self) -> MapInto<Self, U><div class="where">where
|
|||
|
Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U>,
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Map this future’s output to a different type, returning a new future of
|
|||
|
the resulting type. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.then" class="method trait-impl"><a href="#method.then" class="anchor">§</a><h4 class="code-header">fn <a class="fn">then</a><Fut, F>(self, f: F) -> Then<Self, Fut, F><div class="where">where
|
|||
|
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>) -> Fut,
|
|||
|
Fut: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Chain on a computation for when a future finished, passing the result of
|
|||
|
the future to the provided closure <code>f</code>. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.left_future" class="method trait-impl"><a href="#method.left_future" class="anchor">§</a><h4 class="code-header">fn <a class="fn">left_future</a><B>(self) -> Either<Self, B><div class="where">where
|
|||
|
B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>>,
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Wrap this future in an <code>Either</code> future, making it the left-hand variant
|
|||
|
of that <code>Either</code>. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.right_future" class="method trait-impl"><a href="#method.right_future" class="anchor">§</a><h4 class="code-header">fn <a class="fn">right_future</a><A>(self) -> Either<A, Self><div class="where">where
|
|||
|
A: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>>,
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Wrap this future in an <code>Either</code> future, making it the right-hand variant
|
|||
|
of that <code>Either</code>. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.into_stream" class="method trait-impl"><a href="#method.into_stream" class="anchor">§</a><h4 class="code-header">fn <a class="fn">into_stream</a>(self) -> IntoStream<Self><div class="where">where
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Convert this future into a single element stream. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.flatten" class="method trait-impl"><a href="#method.flatten" class="anchor">§</a><h4 class="code-header">fn <a class="fn">flatten</a>(self) -> Flatten<Self><div class="where">where
|
|||
|
Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Flatten the execution of this future when the output of this
|
|||
|
future is itself another future. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.flatten_stream" class="method trait-impl"><a href="#method.flatten_stream" class="anchor">§</a><h4 class="code-header">fn <a class="fn">flatten_stream</a>(self) -> FlattenStream<Self><div class="where">where
|
|||
|
Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>: Stream,
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Flatten the execution of this future when the successful result of this
|
|||
|
future is a stream. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.fuse" class="method trait-impl"><a href="#method.fuse" class="anchor">§</a><h4 class="code-header">fn <a class="fn">fuse</a>(self) -> Fuse<Self><div class="where">where
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Fuse a future such that <code>poll</code> will never again be called once it has
|
|||
|
completed. This method can be used to turn any <code>Future</code> into a
|
|||
|
<code>FusedFuture</code>. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.inspect" class="method trait-impl"><a href="#method.inspect" class="anchor">§</a><h4 class="code-header">fn <a class="fn">inspect</a><F>(self, f: F) -> Inspect<Self, F><div class="where">where
|
|||
|
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>),
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Do something with the output of a future before passing it on. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.catch_unwind" class="method trait-impl"><a href="#method.catch_unwind" class="anchor">§</a><h4 class="code-header">fn <a class="fn">catch_unwind</a>(self) -> CatchUnwind<Self><div class="where">where
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</div></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>std</code></strong> only.</div></span><div class='docblock'>Catches unwinding panics while polling the future. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.shared" class="method trait-impl"><a href="#method.shared" class="anchor">§</a><h4 class="code-header">fn <a class="fn">shared</a>(self) -> Shared<Self><div class="where">where
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
|
|||
|
Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>std</code></strong> only.</div></span><div class='docblock'>Create a cloneable handle to this future where all handles will resolve
|
|||
|
to the same result. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.boxed" class="method trait-impl"><a href="#method.boxed" class="anchor">§</a><h4 class="code-header">fn <a class="fn">boxed</a><'a>(self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'a>><div class="where">where
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'a,</div></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>alloc</code></strong> only.</div></span><div class='docblock'>Wrap the future in a Box, pinning it. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.boxed_local" class="method trait-impl"><a href="#method.boxed_local" class="anchor">§</a><h4 class="code-header">fn <a class="fn">boxed_local</a><'a>(self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>> + 'a>><div class="where">where
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a,</div></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>alloc</code></strong> only.</div></span><div class='docblock'>Wrap the future in a Box, pinning it. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.unit_error" class="method trait-impl"><a href="#method.unit_error" class="anchor">§</a><h4 class="code-header">fn <a class="fn">unit_error</a>(self) -> UnitError<Self><div class="where">where
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Turns a <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future"><code>Future<Output = T></code></a> into a
|
|||
|
<a href="futures_core::future::TryFuture"><code>TryFuture<Ok = T, Error = ()</code>></a>.</div></details><details class="toggle method-toggle" open><summary><section id="method.never_error" class="method trait-impl"><a href="#method.never_error" class="anchor">§</a><h4 class="code-header">fn <a class="fn">never_error</a>(self) -> NeverError<Self><div class="where">where
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Turns a <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future"><code>Future<Output = T></code></a> into a
|
|||
|
<a href="futures_core::future::TryFuture"><code>TryFuture<Ok = T, Error = Never</code>></a>.</div></details><details class="toggle method-toggle" open><summary><section id="method.poll_unpin" class="method trait-impl"><a href="#method.poll_unpin" class="anchor">§</a><h4 class="code-header">fn <a class="fn">poll_unpin</a>(&mut self, cx: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>><div class="where">where
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>A convenience for calling <code>Future::poll</code> on <code>Unpin</code> future types.</div></details><details class="toggle method-toggle" open><summary><section id="method.now_or_never" class="method trait-impl"><a href="#method.now_or_never" class="anchor">§</a><h4 class="code-header">fn <a class="fn">now_or_never</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>><div class="where">where
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Evaluates and consumes the future, returning the resulting output if
|
|||
|
the future is ready after the first call to <code>Future::poll</code>. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Instrument-for-T" class="impl"><a href="#impl-Instrument-for-T" class="anchor">§</a><h3 class="code-header">impl<T> Instrument for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.instrument" class="method trait-impl"><a href="#method.instrument" class="anchor">§</a><h4 class="code-header">fn <a class="fn">instrument</a>(self, span: Span) -> Instrumented<Self></h4></section></summary><div class='docblock'>Instruments this type with the provided [<code>Span</code>], returning an
|
|||
|
<code>Instrumented</code> wrapper. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.in_current_span" class="method trait-impl"><a href="#method.in_current_span" class="anchor">§</a><h4 class="code-header">fn <a class="fn">in_current_span</a>(self) -> Instrumented<Self></h4></section></summary><div class='docblock'>Instruments this type with the <a href="super::Span::current()">current</a> <a href="crate::Span"><code>Span</code></a>, returning an
|
|||
|
<code>Instrumented</code> wrapper. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#748-750">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where
|
|||
|
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#758">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
|
|||
|
<p>That is, this conversion is whatever the implementation of
|
|||
|
<code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
|
|||
|
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-IntoFuture-for-F" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/future/into_future.rs.html#138">source</a><a href="#impl-IntoFuture-for-F" class="anchor">§</a><h3 class="code-header">impl<F> <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/into_future/trait.IntoFuture.html" title="trait core::future::into_future::IntoFuture">IntoFuture</a> for F<div class="where">where
|
|||
|
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-1" class="associatedtype trait-impl"><a href="#associatedtype.Output-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/future/into_future/trait.IntoFuture.html#associatedtype.Output" class="associatedtype">Output</a> = <F as <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a></h4></section></summary><div class='docblock'>The output that the future will produce on completion.</div></details><details class="toggle" open><summary><section id="associatedtype.IntoFuture" class="associatedtype trait-impl"><a href="#associatedtype.IntoFuture" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/future/into_future/trait.IntoFuture.html#associatedtype.IntoFuture" class="associatedtype">IntoFuture</a> = F</h4></section></summary><div class='docblock'>Which kind of future are we turning this into?</div></details><details class="toggle method-toggle" open><summary><section id="method.into_future" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/future/into_future.rs.html#142">source</a><a href="#method.into_future" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/future/into_future/trait.IntoFuture.html#tymethod.into_future" class="fn">into_future</a>(self) -> <F as <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/into_future/trait.IntoFuture.html" title="trait core::future::into_future::IntoFuture">IntoFuture</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/into_future/trait.IntoFuture.html#associatedtype.IntoFuture" title="type core::future::into_future::IntoFuture::IntoFuture">IntoFuture</a></h4></section></summary><div class='docblock'>Creates a future from a value. <a href="https://doc.rust-lang.org/nightly/core/future/into_future/trait.IntoFuture.html#tymethod.into_future">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Same-for-T" class="impl"><a class="src rightside" href="https://docs.rs/typenum/1.17.0/src/typenum/type_operators.rs.html#34">source</a><a href="#impl-Same-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://docs.rs/typenum/1.17.0/typenum/type_operators/trait.Same.html" title="trait typenum::type_operators::Same">Same</a> for T</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-2" class="associatedtype trait-impl"><a href="#associatedtype.Output-2" class="anchor">§</a><h4 class="code-header">type <a href="https://docs.rs/typenum/1.17.0/typenum/type_operators/trait.Same.html#associatedtype.Output" class="associatedtype">Output</a> = T</h4></section></summary><div class='docblock'>Should always be <code>Self</code></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#805-807">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where
|
|||
|
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#812">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFuture-for-F" class="impl"><a href="#impl-TryFuture-for-F" class="anchor">§</a><h3 class="code-header">impl<F, T, E> TryFuture for F<div class="where">where
|
|||
|
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, E>> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Ok" class="associatedtype trait-impl"><a href="#associatedtype.Ok" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Ok</a> = T</h4></section></summary><div class='docblock'>The type of successful values yielded by this future</div></details><details class="toggle" open><summary><section id="associatedtype.Error-2" class="associatedtype trait-impl"><a href="#associatedtype.Error-2" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Error</a> = E</h4></section></summary><div class='docblock'>The type of failures yielded by this future</div></details><details class="toggle method-toggle" open><summary><section id="method.try_poll" class="method trait-impl"><a href="#method.try_poll" class="anchor">§</a><h4 class="code-header">fn <a class="fn">try_poll</a>(
|
|||
|
self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut F</a>>,
|
|||
|
cx: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<F as <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>></h4></section></summary><div class='docblock'>Poll this <code>TryFuture</code> as if it were a <code>Future</code>. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFutureExt-for-Fut" class="impl"><a href="#impl-TryFutureExt-for-Fut" class="anchor">§</a><h3 class="code-header">impl<Fut> TryFutureExt for Fut<div class="where">where
|
|||
|
Fut: TryFuture + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.flatten_sink" class="method trait-impl"><a href="#method.flatten_sink" class="anchor">§</a><h4 class="code-header">fn <a class="fn">flatten_sink</a><Item>(self) -> FlattenSink<Self, Self::Ok><div class="where">where
|
|||
|
Self::Ok: Sink<Item, Error = Self::Error>,
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>sink</code></strong> only.</div></span><div class='docblock'>Flattens the execution of this future when the successful result of this
|
|||
|
future is a [<code>Sink</code>]. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.map_ok" class="method trait-impl"><a href="#method.map_ok" class="anchor">§</a><h4 class="code-header">fn <a class="fn">map_ok</a><T, F>(self, f: F) -> MapOk<Self, F><div class="where">where
|
|||
|
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::Ok) -> T,
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Maps this future’s success value to a different value. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.map_ok_or_else" class="method trait-impl"><a href="#method.map_ok_or_else" class="anchor">§</a><h4 class="code-header">fn <a class="fn">map_ok_or_else</a><T, E, F>(self, e: E, f: F) -> MapOkOrElse<Self, F, E><div class="where">where
|
|||
|
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::Ok) -> T,
|
|||
|
E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::Error) -> T,
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Maps this future’s success value to a different value, and permits for error handling resulting in the same type. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.map_err" class="method trait-impl"><a href="#method.map_err" class="anchor">§</a><h4 class="code-header">fn <a class="fn">map_err</a><E, F>(self, f: F) -> MapErr<Self, F><div class="where">where
|
|||
|
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::Error) -> E,
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Maps this future’s error value to a different value. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.err_into" class="method trait-impl"><a href="#method.err_into" class="anchor">§</a><h4 class="code-header">fn <a class="fn">err_into</a><E>(self) -> ErrInto<Self, E><div class="where">where
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
|
|||
|
Self::Error: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><E>,</div></h4></section></summary><div class='docblock'>Maps this future’s <a href="TryFuture::Error"><code>Error</code></a> to a new error type
|
|||
|
using the <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into"><code>Into</code></a> trait. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ok_into" class="method trait-impl"><a href="#method.ok_into" class="anchor">§</a><h4 class="code-header">fn <a class="fn">ok_into</a><U>(self) -> OkInto<Self, U><div class="where">where
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
|
|||
|
Self::Ok: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U>,</div></h4></section></summary><div class='docblock'>Maps this future’s <a href="TryFuture::Ok"><code>Ok</code></a> to a new type
|
|||
|
using the <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into"><code>Into</code></a> trait.</div></details><details class="toggle method-toggle" open><summary><section id="method.and_then" class="method trait-impl"><a href="#method.and_then" class="anchor">§</a><h4 class="code-header">fn <a class="fn">and_then</a><Fut, F>(self, f: F) -> AndThen<Self, Fut, F><div class="where">where
|
|||
|
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::Ok) -> Fut,
|
|||
|
Fut: TryFuture<Error = Self::Error>,
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Executes another future after this one resolves successfully. The
|
|||
|
success value is passed to a closure to create this subsequent future. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.or_else" class="method trait-impl"><a href="#method.or_else" class="anchor">§</a><h4 class="code-header">fn <a class="fn">or_else</a><Fut, F>(self, f: F) -> OrElse<Self, Fut, F><div class="where">where
|
|||
|
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::Error) -> Fut,
|
|||
|
Fut: TryFuture<Ok = Self::Ok>,
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Executes another future if this one resolves to an error. The
|
|||
|
error value is passed to a closure to create this subsequent future. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.inspect_ok" class="method trait-impl"><a href="#method.inspect_ok" class="anchor">§</a><h4 class="code-header">fn <a class="fn">inspect_ok</a><F>(self, f: F) -> InspectOk<Self, F><div class="where">where
|
|||
|
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&Self::Ok),
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Do something with the success value of a future before passing it on. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.inspect_err" class="method trait-impl"><a href="#method.inspect_err" class="anchor">§</a><h4 class="code-header">fn <a class="fn">inspect_err</a><F>(self, f: F) -> InspectErr<Self, F><div class="where">where
|
|||
|
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&Self::Error),
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Do something with the error value of a future before passing it on. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.try_flatten" class="method trait-impl"><a href="#method.try_flatten" class="anchor">§</a><h4 class="code-header">fn <a class="fn">try_flatten</a>(self) -> TryFlatten<Self, Self::Ok><div class="where">where
|
|||
|
Self::Ok: TryFuture<Error = Self::Error>,
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Flatten the execution of this future when the successful result of this
|
|||
|
future is another future. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.try_flatten_stream" class="method trait-impl"><a href="#method.try_flatten_stream" class="anchor">§</a><h4 class="code-header">fn <a class="fn">try_flatten_stream</a>(self) -> TryFlattenStream<Self><div class="where">where
|
|||
|
Self::Ok: TryStream<Error = Self::Error>,
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Flatten the execution of this future when the successful result of this
|
|||
|
future is a stream. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.unwrap_or_else" class="method trait-impl"><a href="#method.unwrap_or_else" class="anchor">§</a><h4 class="code-header">fn <a class="fn">unwrap_or_else</a><F>(self, f: F) -> UnwrapOrElse<Self, F><div class="where">where
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
|
|||
|
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::Error) -> Self::Ok,</div></h4></section></summary><div class='docblock'>Unwraps this future’s output, producing a future with this future’s
|
|||
|
<a href="TryFuture::Ok"><code>Ok</code></a> type as its
|
|||
|
<a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="associated type core::future::future::Future::Output"><code>Output</code></a> type. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.into_future-1" class="method trait-impl"><a href="#method.into_future-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">into_future</a>(self) -> IntoFuture<Self><div class="where">where
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Wraps a [<code>TryFuture</code>] into a type that implements
|
|||
|
<a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future"><code>Future</code></a>. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.try_poll_unpin" class="method trait-impl"><a href="#method.try_poll_unpin" class="anchor">§</a><h4 class="code-header">fn <a class="fn">try_poll_unpin</a>(
|
|||
|
&mut self,
|
|||
|
cx: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::Ok, Self::Error>><div class="where">where
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>A convenience method for calling [<code>TryFuture::try_poll</code>] on <a href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin"><code>Unpin</code></a>
|
|||
|
future types.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#790-792">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where
|
|||
|
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#797">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-T" class="impl"><a href="#impl-VZip%3CV%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<V, T> VZip<V> for T<div class="where">where
|
|||
|
V: MultiLane<T>,</div></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl"><a href="#method.vzip" class="anchor">§</a><h4 class="code-header">fn <a class="fn">vzip</a>(self) -> V</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-WithSubscriber-for-T" class="impl"><a href="#impl-WithSubscriber-for-T" class="anchor">§</a><h3 class="code-header">impl<T> WithSubscriber for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.with_subscriber" class="method trait-impl"><a href="#method.with_subscriber" class="anchor">§</a><h4 class="code-header">fn <a class="fn">with_subscriber</a><S>(self, subscriber: S) -> WithDispatch<Self><div class="where">where
|
|||
|
S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><Dispatch>,</div></h4></section></summary><div class='docblock'>Attaches the provided <a href="super::Subscriber"><code>Subscriber</code></a> to this type, returning a
|
|||
|
[<code>WithDispatch</code>] wrapper. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.with_current_subscriber" class="method trait-impl"><a href="#method.with_current_subscriber" class="anchor">§</a><h4 class="code-header">fn <a class="fn">with_current_subscriber</a>(self) -> WithDispatch<Self></h4></section></summary><div class='docblock'>Attaches the current <a href="crate::dispatcher#setting-the-default-subscriber">default</a> <a href="super::Subscriber"><code>Subscriber</code></a> to this type, returning a
|
|||
|
[<code>WithDispatch</code>] wrapper. <a>Read more</a></div></details></div></details></div></section></div></main></body></html>
|