Auto Generated Documentation
This commit is contained in:
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
@@ -1,12 +1,11 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Create a future that is immediately ready with an error value."><meta name="keywords" content="rust, rustlang, rust-lang, err"><title>futures_util::future::err - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `err` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, err"><title>futures_util::future::err - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><div id="sidebar-vars" data-name="err" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">err</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/ready.rs.html#80-82" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn err<T, E>(err: E) -> <a class="struct" href="../../futures_util/future/struct.Ready.html" title="struct futures_util::future::Ready">Ready</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, E>><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.Ready.html" title="struct futures_util::future::Ready">Ready</a><T></h3><code class="content"><span class="where fmt-newline">impl<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> for <a class="struct" href="../../futures_util/future/struct.Ready.html" title="struct futures_util::future::Ready">Ready</a><T></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = T;</span></code></span></div></span></span></pre><div class="docblock"><p>Create a future that is immediately ready with an error value.</p>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><script>window.sidebarCurrent = {name: "err", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/ready.rs.html#80-82" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">err</a></span></h1><pre class="rust fn">pub fn err<T, E>(err: E) -> <a class="struct" href="../../futures_util/future/struct.Ready.html" title="struct futures_util::future::Ready">Ready</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, E>><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.Ready.html" title="struct futures_util::future::Ready">Ready</a><T></h3><code class="content"><span class="where fmt-newline">impl<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> for <a class="struct" href="../../futures_util/future/struct.Ready.html" title="struct futures_util::future::Ready">Ready</a><T></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = T;</span></code></span></div></span></span></pre><div class="docblock"><p>Create a future that is immediately ready with an error value.</p>
|
||||
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||||
<span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
|
||||
|
||||
<span class="kw">let</span> <span class="ident">a</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">err</span>::<span class="op"><</span><span class="ident">i32</span>, <span class="ident">i32</span><span class="op">></span>(<span class="number">1</span>);
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">a</span>.<span class="kw">await</span>, <span class="prelude-val">Err</span>(<span class="number">1</span>));</pre></div>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!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="Joins the result of two futures, waiting for them both to complete."><meta name="keywords" content="rust, rustlang, rust-lang, join"><title>futures_util::future::join - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `join` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, join"><title>futures_util::future::join - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><div id="sidebar-vars" data-name="join" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">join</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/join.rs.html#111-118" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn join<Fut1, Fut2>(future1: Fut1, future2: Fut2) -> <a class="struct" href="../../futures_util/future/struct.Join.html" title="struct futures_util::future::Join">Join</a><Fut1, Fut2><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.Join.html" title="struct futures_util::future::Join">Join</a><Fut1, Fut2></h3><code class="content"><span class="where fmt-newline">impl<Fut1: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, Fut2: <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/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a> for <a class="struct" href="../../futures_util/future/struct.Join.html" title="struct futures_util::future::Join">Join</a><Fut1, Fut2></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Fut1::<a class="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>, Fut2::<a class="type" 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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> Fut1: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,<br> Fut2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, </span></pre><div class="docblock"><p>Joins the result of two futures, waiting for them both to complete.</p>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><script>window.sidebarCurrent = {name: "join", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/join.rs.html#111-118" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">join</a></span></h1><pre class="rust fn">pub fn join<Fut1, Fut2>(future1: Fut1, future2: Fut2) -> <a class="struct" href="../../futures_util/future/struct.Join.html" title="struct futures_util::future::Join">Join</a><Fut1, Fut2><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.Join.html" title="struct futures_util::future::Join">Join</a><Fut1, Fut2></h3><code class="content"><span class="where fmt-newline">impl<Fut1: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, Fut2: <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/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a> for <a class="struct" href="../../futures_util/future/struct.Join.html" title="struct futures_util::future::Join">Join</a><Fut1, Fut2></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Fut1::<a class="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>, Fut2::<a class="type" 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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> Fut1: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,<br> Fut2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, </span></pre><div class="docblock"><p>Joins the result of two futures, waiting for them both to complete.</p>
|
||||
<p>This function will return a new future which awaits both futures to
|
||||
complete. The returned future will finish with a tuple of both results.</p>
|
||||
<p>Note that this function consumes the passed futures and returns a
|
||||
@@ -15,5 +15,4 @@ wrapped version of it.</p>
|
||||
<span class="kw">let</span> <span class="ident">pair</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">join</span>(<span class="ident">a</span>, <span class="ident">b</span>);
|
||||
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">pair</span>.<span class="kw">await</span>, (<span class="number">1</span>, <span class="number">2</span>));</pre></div>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!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="Same as `join`, but with more futures."><meta name="keywords" content="rust, rustlang, rust-lang, join3"><title>futures_util::future::join3 - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `join3` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, join3"><title>futures_util::future::join3 - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><div id="sidebar-vars" data-name="join3" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">join3</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/join.rs.html#136-148" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn join3<Fut1, Fut2, Fut3>(<br> future1: Fut1, <br> future2: Fut2, <br> future3: Fut3<br>) -> <a class="struct" href="../../futures_util/future/struct.Join3.html" title="struct futures_util::future::Join3">Join3</a><Fut1, Fut2, Fut3><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.Join3.html" title="struct futures_util::future::Join3">Join3</a><Fut1, Fut2, Fut3></h3><code class="content"><span class="where fmt-newline">impl<Fut1: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, Fut2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, Fut3: <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/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a> for <a class="struct" href="../../futures_util/future/struct.Join3.html" title="struct futures_util::future::Join3">Join3</a><Fut1, Fut2, Fut3></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Fut1::<a class="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>, Fut2::<a class="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>, Fut3::<a class="type" 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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> Fut1: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,<br> Fut2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,<br> Fut3: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, </span></pre><div class="docblock"><p>Same as <a href="../../futures_util/future/fn.join.html"><code>join</code></a>, but with more futures.</p>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><script>window.sidebarCurrent = {name: "join3", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/join.rs.html#136-148" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">join3</a></span></h1><pre class="rust fn">pub fn join3<Fut1, Fut2, Fut3>(<br> future1: Fut1, <br> future2: Fut2, <br> future3: Fut3<br>) -> <a class="struct" href="../../futures_util/future/struct.Join3.html" title="struct futures_util::future::Join3">Join3</a><Fut1, Fut2, Fut3><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.Join3.html" title="struct futures_util::future::Join3">Join3</a><Fut1, Fut2, Fut3></h3><code class="content"><span class="where fmt-newline">impl<Fut1: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, Fut2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, Fut3: <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/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a> for <a class="struct" href="../../futures_util/future/struct.Join3.html" title="struct futures_util::future::Join3">Join3</a><Fut1, Fut2, Fut3></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Fut1::<a class="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>, Fut2::<a class="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>, Fut3::<a class="type" 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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> Fut1: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,<br> Fut2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,<br> Fut3: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, </span></pre><div class="docblock"><p>Same as <a href="../../futures_util/future/fn.join.html"><code>join</code></a>, but with more futures.</p>
|
||||
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||||
<span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
|
||||
@@ -12,5 +12,4 @@
|
||||
<span class="kw">let</span> <span class="ident">tuple</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">join3</span>(<span class="ident">a</span>, <span class="ident">b</span>, <span class="ident">c</span>);
|
||||
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">tuple</span>.<span class="kw">await</span>, (<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>));</pre></div>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!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="Same as `join`, but with more futures."><meta name="keywords" content="rust, rustlang, rust-lang, join4"><title>futures_util::future::join4 - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `join4` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, join4"><title>futures_util::future::join4 - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><div id="sidebar-vars" data-name="join4" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">join4</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/join.rs.html#167-181" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn join4<Fut1, Fut2, Fut3, Fut4>(<br> future1: Fut1, <br> future2: Fut2, <br> future3: Fut3, <br> future4: Fut4<br>) -> <a class="struct" href="../../futures_util/future/struct.Join4.html" title="struct futures_util::future::Join4">Join4</a><Fut1, Fut2, Fut3, Fut4><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.Join4.html" title="struct futures_util::future::Join4">Join4</a><Fut1, Fut2, Fut3, Fut4></h3><code class="content"><span class="where fmt-newline">impl<Fut1: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, Fut2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, Fut3: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, Fut4: <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/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a> for <a class="struct" href="../../futures_util/future/struct.Join4.html" title="struct futures_util::future::Join4">Join4</a><Fut1, Fut2, Fut3, Fut4></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Fut1::<a class="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>, Fut2::<a class="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>, Fut3::<a class="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>, Fut4::<a class="type" 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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> Fut1: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,<br> Fut2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,<br> Fut3: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,<br> Fut4: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, </span></pre><div class="docblock"><p>Same as <a href="../../futures_util/future/fn.join.html"><code>join</code></a>, but with more futures.</p>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><script>window.sidebarCurrent = {name: "join4", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/join.rs.html#167-181" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">join4</a></span></h1><pre class="rust fn">pub fn join4<Fut1, Fut2, Fut3, Fut4>(<br> future1: Fut1, <br> future2: Fut2, <br> future3: Fut3, <br> future4: Fut4<br>) -> <a class="struct" href="../../futures_util/future/struct.Join4.html" title="struct futures_util::future::Join4">Join4</a><Fut1, Fut2, Fut3, Fut4><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.Join4.html" title="struct futures_util::future::Join4">Join4</a><Fut1, Fut2, Fut3, Fut4></h3><code class="content"><span class="where fmt-newline">impl<Fut1: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, Fut2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, Fut3: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, Fut4: <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/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a> for <a class="struct" href="../../futures_util/future/struct.Join4.html" title="struct futures_util::future::Join4">Join4</a><Fut1, Fut2, Fut3, Fut4></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Fut1::<a class="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>, Fut2::<a class="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>, Fut3::<a class="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>, Fut4::<a class="type" 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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> Fut1: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,<br> Fut2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,<br> Fut3: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>,<br> Fut4: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, </span></pre><div class="docblock"><p>Same as <a href="../../futures_util/future/fn.join.html"><code>join</code></a>, but with more futures.</p>
|
||||
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||||
<span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
|
||||
@@ -13,5 +13,4 @@
|
||||
<span class="kw">let</span> <span class="ident">tuple</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">join4</span>(<span class="ident">a</span>, <span class="ident">b</span>, <span class="ident">c</span>, <span class="ident">d</span>);
|
||||
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">tuple</span>.<span class="kw">await</span>, (<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>));</pre></div>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
||||
<!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="Creates a new future that allows delayed execution of a closure."><meta name="keywords" content="rust, rustlang, rust-lang, lazy"><title>futures_util::future::lazy - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `lazy` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, lazy"><title>futures_util::future::lazy - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><div id="sidebar-vars" data-name="lazy" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">lazy</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/lazy.rs.html#35-39" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn lazy<F, R>(f: F) -> <a class="struct" href="../../futures_util/future/struct.Lazy.html" title="struct futures_util::future::Lazy">Lazy</a><F><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.Lazy.html" title="struct futures_util::future::Lazy">Lazy</a><F></h3><code class="content"><span class="where fmt-newline">impl<F, R> <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="../../futures_util/future/struct.Lazy.html" title="struct futures_util::future::Lazy">Lazy</a><F> <span class="where fmt-newline">where<br> 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>(&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><'_>) -> R, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = R;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> 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>(&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><'_>) -> R, </span></pre><div class="docblock"><p>Creates a new future that allows delayed execution of a closure.</p>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><script>window.sidebarCurrent = {name: "lazy", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/lazy.rs.html#35-39" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">lazy</a></span></h1><pre class="rust fn">pub fn lazy<F, R>(f: F) -> <a class="struct" href="../../futures_util/future/struct.Lazy.html" title="struct futures_util::future::Lazy">Lazy</a><F><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.Lazy.html" title="struct futures_util::future::Lazy">Lazy</a><F></h3><code class="content"><span class="where fmt-newline">impl<F, R> <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="../../futures_util/future/struct.Lazy.html" title="struct futures_util::future::Lazy">Lazy</a><F> <span class="where fmt-newline">where<br> 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>(&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><'_>) -> R, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = R;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> 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>(&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><'_>) -> R, </span></pre><div class="docblock"><p>Creates a new future that allows delayed execution of a closure.</p>
|
||||
<p>The provided closure is only run once the future is polled.</p>
|
||||
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||||
@@ -14,5 +14,4 @@
|
||||
<span class="macro">panic</span><span class="macro">!</span>(<span class="string">"oh no!"</span>)
|
||||
});
|
||||
<span class="ident">drop</span>(<span class="ident">b</span>); <span class="comment">// closure is never run</span></pre></div>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!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="Wraps a future into a `MaybeDone`"><meta name="keywords" content="rust, rustlang, rust-lang, maybe_done"><title>futures_util::future::maybe_done - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `maybe_done` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, maybe_done"><title>futures_util::future::maybe_done - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><div id="sidebar-vars" data-name="maybe_done" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">maybe_done</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/maybe_done.rs.html#43-45" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn maybe_done<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>>(future: Fut) -> <a class="enum" href="../../futures_util/future/enum.MaybeDone.html" title="enum futures_util::future::MaybeDone">MaybeDone</a><Fut><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="enum" href="../../futures_util/future/enum.MaybeDone.html" title="enum futures_util::future::MaybeDone">MaybeDone</a><Fut></h3><code class="content"><span class="where fmt-newline">impl<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>> <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="enum" href="../../futures_util/future/enum.MaybeDone.html" title="enum futures_util::future::MaybeDone">MaybeDone</a><Fut></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span></code></span></div></span></span></pre><div class="docblock"><p>Wraps a future into a <code>MaybeDone</code></p>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><script>window.sidebarCurrent = {name: "maybe_done", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/maybe_done.rs.html#43-45" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">maybe_done</a></span></h1><pre class="rust fn">pub fn maybe_done<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>>(future: Fut) -> <a class="enum" href="../../futures_util/future/enum.MaybeDone.html" title="enum futures_util::future::MaybeDone">MaybeDone</a><Fut><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="enum" href="../../futures_util/future/enum.MaybeDone.html" title="enum futures_util::future::MaybeDone">MaybeDone</a><Fut></h3><code class="content"><span class="where fmt-newline">impl<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>> <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="enum" href="../../futures_util/future/enum.MaybeDone.html" title="enum futures_util::future::MaybeDone">MaybeDone</a><Fut></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span></code></span></div></span></span></pre><div class="docblock"><p>Wraps a future into a <code>MaybeDone</code></p>
|
||||
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||||
<span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
|
||||
@@ -13,5 +13,4 @@
|
||||
<span class="kw">let</span> () <span class="op">=</span> <span class="ident">future</span>.<span class="ident">as_mut</span>().<span class="kw">await</span>;
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">future</span>.<span class="ident">as_mut</span>().<span class="ident">take_output</span>(), <span class="prelude-val">Some</span>(<span class="number">5</span>));
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">future</span>.<span class="ident">as_mut</span>().<span class="ident">take_output</span>(), <span class="prelude-val">None</span>);</pre></div>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,12 +1,11 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Create a future that is immediately ready with a success value."><meta name="keywords" content="rust, rustlang, rust-lang, ok"><title>futures_util::future::ok - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `ok` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, ok"><title>futures_util::future::ok - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><div id="sidebar-vars" data-name="ok" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">ok</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/ready.rs.html#64-66" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn ok<T, E>(t: T) -> <a class="struct" href="../../futures_util/future/struct.Ready.html" title="struct futures_util::future::Ready">Ready</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, E>><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.Ready.html" title="struct futures_util::future::Ready">Ready</a><T></h3><code class="content"><span class="where fmt-newline">impl<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> for <a class="struct" href="../../futures_util/future/struct.Ready.html" title="struct futures_util::future::Ready">Ready</a><T></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = T;</span></code></span></div></span></span></pre><div class="docblock"><p>Create a future that is immediately ready with a success value.</p>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><script>window.sidebarCurrent = {name: "ok", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/ready.rs.html#64-66" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">ok</a></span></h1><pre class="rust fn">pub fn ok<T, E>(t: T) -> <a class="struct" href="../../futures_util/future/struct.Ready.html" title="struct futures_util::future::Ready">Ready</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, E>><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.Ready.html" title="struct futures_util::future::Ready">Ready</a><T></h3><code class="content"><span class="where fmt-newline">impl<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> for <a class="struct" href="../../futures_util/future/struct.Ready.html" title="struct futures_util::future::Ready">Ready</a><T></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = T;</span></code></span></div></span></span></pre><div class="docblock"><p>Create a future that is immediately ready with a success value.</p>
|
||||
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||||
<span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
|
||||
|
||||
<span class="kw">let</span> <span class="ident">a</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op"><</span><span class="ident">i32</span>, <span class="ident">i32</span><span class="op">></span>(<span class="number">1</span>);
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">a</span>.<span class="kw">await</span>, <span class="prelude-val">Ok</span>(<span class="number">1</span>));</pre></div>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!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="Creates a future which never resolves, representing a computation that never finishes."><meta name="keywords" content="rust, rustlang, rust-lang, pending"><title>futures_util::future::pending - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `pending` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, pending"><title>futures_util::future::pending - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><div id="sidebar-vars" data-name="pending" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">pending</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/pending.rs.html#36-40" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn pending<T>() -> <a class="struct" href="../../futures_util/future/struct.Pending.html" title="struct futures_util::future::Pending">Pending</a><T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.Pending.html" title="struct futures_util::future::Pending">Pending</a><T></h3><code class="content"><span class="where fmt-newline">impl<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> for <a class="struct" href="../../futures_util/future/struct.Pending.html" title="struct futures_util::future::Pending">Pending</a><T></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = T;</span></code></span></div></span></span></pre><div class="docblock"><p>Creates a future which never resolves, representing a computation that never
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><script>window.sidebarCurrent = {name: "pending", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/pending.rs.html#36-40" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">pending</a></span></h1><pre class="rust fn">pub fn pending<T>() -> <a class="struct" href="../../futures_util/future/struct.Pending.html" title="struct futures_util::future::Pending">Pending</a><T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.Pending.html" title="struct futures_util::future::Pending">Pending</a><T></h3><code class="content"><span class="where fmt-newline">impl<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> for <a class="struct" href="../../futures_util/future/struct.Pending.html" title="struct futures_util::future::Pending">Pending</a><T></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = T;</span></code></span></div></span></span></pre><div class="docblock"><p>Creates a future which never resolves, representing a computation that never
|
||||
finishes.</p>
|
||||
<p>The returned future will forever return <a href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html#variant.Pending" title="Poll::Pending"><code>Poll::Pending</code></a>.</p>
|
||||
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
|
||||
@@ -11,5 +11,4 @@ finishes.</p>
|
||||
<span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">pending</span>();
|
||||
<span class="kw">let</span> () <span class="op">=</span> <span class="ident">future</span>.<span class="kw">await</span>;
|
||||
<span class="macro">unreachable</span><span class="macro">!</span>();</pre></div>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!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="Creates a new future wrapping around a function returning [`Poll`]."><meta name="keywords" content="rust, rustlang, rust-lang, poll_fn"><title>futures_util::future::poll_fn - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `poll_fn` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, poll_fn"><title>futures_util::future::poll_fn - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><div id="sidebar-vars" data-name="poll_fn" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">poll_fn</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/poll_fn.rs.html#36-41" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn poll_fn<T, F>(f: F) -> <a class="struct" href="../../futures_util/future/struct.PollFn.html" title="struct futures_util::future::PollFn">PollFn</a><F><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.PollFn.html" title="struct futures_util::future::PollFn">PollFn</a><F></h3><code class="content"><span class="where fmt-newline">impl<T, 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> for <a class="struct" href="../../futures_util/future/struct.PollFn.html" title="struct futures_util::future::PollFn">PollFn</a><F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&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><T>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = T;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&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><T>, </span></pre><div class="docblock"><p>Creates a new future wrapping around a function returning <a href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="Poll"><code>Poll</code></a>.</p>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><script>window.sidebarCurrent = {name: "poll_fn", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/poll_fn.rs.html#36-41" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">poll_fn</a></span></h1><pre class="rust fn">pub fn poll_fn<T, F>(f: F) -> <a class="struct" href="../../futures_util/future/struct.PollFn.html" title="struct futures_util::future::PollFn">PollFn</a><F><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.PollFn.html" title="struct futures_util::future::PollFn">PollFn</a><F></h3><code class="content"><span class="where fmt-newline">impl<T, 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> for <a class="struct" href="../../futures_util/future/struct.PollFn.html" title="struct futures_util::future::PollFn">PollFn</a><F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&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><T>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = T;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&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><T>, </span></pre><div class="docblock"><p>Creates a new future wrapping around a function returning <a href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="Poll"><code>Poll</code></a>.</p>
|
||||
<p>Polling the returned future delegates to the wrapped function.</p>
|
||||
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||||
@@ -14,5 +14,4 @@
|
||||
|
||||
<span class="kw">let</span> <span class="ident">read_future</span> <span class="op">=</span> <span class="ident">poll_fn</span>(<span class="ident">read_line</span>);
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">read_future</span>.<span class="kw">await</span>, <span class="string">"Hello, World!"</span>.<span class="ident">to_owned</span>());</pre></div>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,12 +1,11 @@
|
||||
<!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="Creates a future that is immediately ready with a value."><meta name="keywords" content="rust, rustlang, rust-lang, ready"><title>futures_util::future::ready - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `ready` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, ready"><title>futures_util::future::ready - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><div id="sidebar-vars" data-name="ready" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">ready</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/ready.rs.html#48-50" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn ready<T>(t: T) -> <a class="struct" href="../../futures_util/future/struct.Ready.html" title="struct futures_util::future::Ready">Ready</a><T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.Ready.html" title="struct futures_util::future::Ready">Ready</a><T></h3><code class="content"><span class="where fmt-newline">impl<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> for <a class="struct" href="../../futures_util/future/struct.Ready.html" title="struct futures_util::future::Ready">Ready</a><T></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = T;</span></code></span></div></span></span></pre><div class="docblock"><p>Creates a future that is immediately ready with a value.</p>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><script>window.sidebarCurrent = {name: "ready", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/ready.rs.html#48-50" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">ready</a></span></h1><pre class="rust fn">pub fn ready<T>(t: T) -> <a class="struct" href="../../futures_util/future/struct.Ready.html" title="struct futures_util::future::Ready">Ready</a><T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.Ready.html" title="struct futures_util::future::Ready">Ready</a><T></h3><code class="content"><span class="where fmt-newline">impl<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> for <a class="struct" href="../../futures_util/future/struct.Ready.html" title="struct futures_util::future::Ready">Ready</a><T></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = T;</span></code></span></div></span></span></pre><div class="docblock"><p>Creates a future that is immediately ready with a value.</p>
|
||||
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||||
<span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
|
||||
|
||||
<span class="kw">let</span> <span class="ident">a</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">ready</span>(<span class="number">1</span>);
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">a</span>.<span class="kw">await</span>, <span class="number">1</span>);</pre></div>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!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="Waits for either one of two differently-typed futures to complete."><meta name="keywords" content="rust, rustlang, rust-lang, select"><title>futures_util::future::select - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `select` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, select"><title>futures_util::future::select - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><div id="sidebar-vars" data-name="select" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">select</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/select.rs.html#84-88" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn select<A, B>(future1: A, future2: B) -> <a class="struct" href="../../futures_util/future/struct.Select.html" title="struct futures_util::future::Select">Select</a><A, B><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.Select.html" title="struct futures_util::future::Select">Select</a><A, B></h3><code class="content"><span class="where fmt-newline">impl<A, 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> for <a class="struct" href="../../futures_util/future/struct.Select.html" title="struct futures_util::future::Select">Select</a><A, B> <span class="where fmt-newline">where<br> 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> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,<br> 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> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <a class="enum" href="../../futures_util/future/enum.Either.html" title="enum futures_util::future::Either">Either</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A::<a class="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>, B<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>B::<a class="type" 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<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> 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> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,<br> 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> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>, </span></pre><div class="docblock"><p>Waits for either one of two differently-typed futures to complete.</p>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><script>window.sidebarCurrent = {name: "select", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/select.rs.html#84-88" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">select</a></span></h1><pre class="rust fn">pub fn select<A, B>(future1: A, future2: B) -> <a class="struct" href="../../futures_util/future/struct.Select.html" title="struct futures_util::future::Select">Select</a><A, B><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.Select.html" title="struct futures_util::future::Select">Select</a><A, B></h3><code class="content"><span class="where fmt-newline">impl<A, 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> for <a class="struct" href="../../futures_util/future/struct.Select.html" title="struct futures_util::future::Select">Select</a><A, B> <span class="where fmt-newline">where<br> 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> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,<br> 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> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <a class="enum" href="../../futures_util/future/enum.Either.html" title="enum futures_util::future::Either">Either</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A::<a class="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>, B<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>B::<a class="type" 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<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> 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> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,<br> 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> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>, </span></pre><div class="docblock"><p>Waits for either one of two differently-typed futures to complete.</p>
|
||||
<p>This function will return a new future which awaits for either one of both
|
||||
futures to complete. The returned future will finish with both the value
|
||||
resolved and a future representing the completion of the other work.</p>
|
||||
@@ -59,5 +59,4 @@ conveniently extract out the value at the end.</p>
|
||||
}
|
||||
})
|
||||
}</pre></div>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!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="Joins the result of two futures, waiting for them both to complete or for one to produce an error."><meta name="keywords" content="rust, rustlang, rust-lang, try_join"><title>futures_util::future::try_join - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `try_join` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, try_join"><title>futures_util::future::try_join - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><div id="sidebar-vars" data-name="try_join" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">try_join</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/try_join.rs.html#148-154" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn try_join<Fut1, Fut2>(future1: Fut1, future2: Fut2) -> <a class="struct" href="../../futures_util/future/struct.TryJoin.html" title="struct futures_util::future::TryJoin">TryJoin</a><Fut1, Fut2><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.TryJoin.html" title="struct futures_util::future::TryJoin">TryJoin</a><Fut1, Fut2></h3><code class="content"><span class="where fmt-newline">impl<Fut1, Fut2> <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="../../futures_util/future/struct.TryJoin.html" title="struct futures_util::future::TryJoin">TryJoin</a><Fut1, Fut2> <span class="where fmt-newline">where<br> Fut1: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a>,<br> Fut2: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a><Error = Fut1::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Fut1::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>, Fut2::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, Fut1::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> Fut1: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a>,<br> Fut2: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a><Error = Fut1::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>>, </span></pre><div class="docblock"><p>Joins the result of two futures, waiting for them both to complete or
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><script>window.sidebarCurrent = {name: "try_join", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/try_join.rs.html#148-154" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">try_join</a></span></h1><pre class="rust fn">pub fn try_join<Fut1, Fut2>(future1: Fut1, future2: Fut2) -> <a class="struct" href="../../futures_util/future/struct.TryJoin.html" title="struct futures_util::future::TryJoin">TryJoin</a><Fut1, Fut2><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.TryJoin.html" title="struct futures_util::future::TryJoin">TryJoin</a><Fut1, Fut2></h3><code class="content"><span class="where fmt-newline">impl<Fut1, Fut2> <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="../../futures_util/future/struct.TryJoin.html" title="struct futures_util::future::TryJoin">TryJoin</a><Fut1, Fut2> <span class="where fmt-newline">where<br> Fut1: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a>,<br> Fut2: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a><Error = Fut1::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Fut1::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>, Fut2::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, Fut1::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> Fut1: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a>,<br> Fut2: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a><Error = Fut1::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>>, </span></pre><div class="docblock"><p>Joins the result of two futures, waiting for them both to complete or
|
||||
for one to produce an error.</p>
|
||||
<p>This function will return a new future which awaits both futures to
|
||||
complete. If successful, the returned future will finish with a tuple of
|
||||
@@ -32,5 +32,4 @@ that error:</p>
|
||||
<span class="kw">let</span> <span class="ident">pair</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">try_join</span>(<span class="ident">a</span>, <span class="ident">b</span>);
|
||||
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">pair</span>.<span class="kw">await</span>, <span class="prelude-val">Err</span>(<span class="number">2</span>));</pre></div>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!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="Same as `try_join`, but with more futures."><meta name="keywords" content="rust, rustlang, rust-lang, try_join3"><title>futures_util::future::try_join3 - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `try_join3` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, try_join3"><title>futures_util::future::try_join3 - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><div id="sidebar-vars" data-name="try_join3" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">try_join3</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/try_join.rs.html#172-185" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn try_join3<Fut1, Fut2, Fut3>(<br> future1: Fut1, <br> future2: Fut2, <br> future3: Fut3<br>) -> <a class="struct" href="../../futures_util/future/struct.TryJoin3.html" title="struct futures_util::future::TryJoin3">TryJoin3</a><Fut1, Fut2, Fut3><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.TryJoin3.html" title="struct futures_util::future::TryJoin3">TryJoin3</a><Fut1, Fut2, Fut3></h3><code class="content"><span class="where fmt-newline">impl<Fut1, Fut2, Fut3> <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="../../futures_util/future/struct.TryJoin3.html" title="struct futures_util::future::TryJoin3">TryJoin3</a><Fut1, Fut2, Fut3> <span class="where fmt-newline">where<br> Fut1: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a>,<br> Fut2: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a><Error = Fut1::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>>,<br> Fut3: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a><Error = Fut1::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Fut1::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>, Fut2::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>, Fut3::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, Fut1::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> Fut1: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a>,<br> Fut2: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a><Error = Fut1::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>>,<br> Fut3: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a><Error = Fut1::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>>, </span></pre><div class="docblock"><p>Same as <a href="../../futures_util/future/fn.try_join.html"><code>try_join</code></a>, but with more futures.</p>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><script>window.sidebarCurrent = {name: "try_join3", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/try_join.rs.html#172-185" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">try_join3</a></span></h1><pre class="rust fn">pub fn try_join3<Fut1, Fut2, Fut3>(<br> future1: Fut1, <br> future2: Fut2, <br> future3: Fut3<br>) -> <a class="struct" href="../../futures_util/future/struct.TryJoin3.html" title="struct futures_util::future::TryJoin3">TryJoin3</a><Fut1, Fut2, Fut3><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.TryJoin3.html" title="struct futures_util::future::TryJoin3">TryJoin3</a><Fut1, Fut2, Fut3></h3><code class="content"><span class="where fmt-newline">impl<Fut1, Fut2, Fut3> <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="../../futures_util/future/struct.TryJoin3.html" title="struct futures_util::future::TryJoin3">TryJoin3</a><Fut1, Fut2, Fut3> <span class="where fmt-newline">where<br> Fut1: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a>,<br> Fut2: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a><Error = Fut1::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>>,<br> Fut3: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a><Error = Fut1::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Fut1::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>, Fut2::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>, Fut3::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, Fut1::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> Fut1: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a>,<br> Fut2: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a><Error = Fut1::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>>,<br> Fut3: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a><Error = Fut1::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>>, </span></pre><div class="docblock"><p>Same as <a href="../../futures_util/future/fn.try_join.html"><code>try_join</code></a>, but with more futures.</p>
|
||||
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||||
<span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
|
||||
@@ -12,5 +12,4 @@
|
||||
<span class="kw">let</span> <span class="ident">tuple</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">try_join3</span>(<span class="ident">a</span>, <span class="ident">b</span>, <span class="ident">c</span>);
|
||||
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">tuple</span>.<span class="kw">await</span>, <span class="prelude-val">Ok</span>((<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>)));</pre></div>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,6 +1,5 @@
|
||||
<!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="Wraps a future into a `TryMaybeDone`"><meta name="keywords" content="rust, rustlang, rust-lang, try_maybe_done"><title>futures_util::future::try_maybe_done - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `try_maybe_done` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, try_maybe_done"><title>futures_util::future::try_maybe_done - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><div id="sidebar-vars" data-name="try_maybe_done" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">try_maybe_done</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/try_maybe_done.rs.html#28-30" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn try_maybe_done<Fut: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a>>(future: Fut) -> <a class="enum" href="../../futures_util/future/enum.TryMaybeDone.html" title="enum futures_util::future::TryMaybeDone">TryMaybeDone</a><Fut><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="enum" href="../../futures_util/future/enum.TryMaybeDone.html" title="enum futures_util::future::TryMaybeDone">TryMaybeDone</a><Fut></h3><code class="content"><span class="where fmt-newline">impl<Fut: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</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> for <a class="enum" href="../../futures_util/future/enum.TryMaybeDone.html" title="enum futures_util::future::TryMaybeDone">TryMaybeDone</a><Fut></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Fut::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>>;</span></code></span></div></span></span></pre><div class="docblock"><p>Wraps a future into a <code>TryMaybeDone</code></p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><script>window.sidebarCurrent = {name: "try_maybe_done", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/try_maybe_done.rs.html#28-30" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">try_maybe_done</a></span></h1><pre class="rust fn">pub fn try_maybe_done<Fut: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a>>(future: Fut) -> <a class="enum" href="../../futures_util/future/enum.TryMaybeDone.html" title="enum futures_util::future::TryMaybeDone">TryMaybeDone</a><Fut><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="enum" href="../../futures_util/future/enum.TryMaybeDone.html" title="enum futures_util::future::TryMaybeDone">TryMaybeDone</a><Fut></h3><code class="content"><span class="where fmt-newline">impl<Fut: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</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> for <a class="enum" href="../../futures_util/future/enum.TryMaybeDone.html" title="enum futures_util::future::TryMaybeDone">TryMaybeDone</a><Fut></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Fut::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>>;</span></code></span></div></span></span></pre><div class="docblock"><p>Wraps a future into a <code>TryMaybeDone</code></p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!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="Waits for either one of two differently-typed futures to complete."><meta name="keywords" content="rust, rustlang, rust-lang, try_select"><title>futures_util::future::try_select - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `try_select` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, try_select"><title>futures_util::future::try_select - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><div id="sidebar-vars" data-name="try_select" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">try_select</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/try_select.rs.html#50-57" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn try_select<A, B>(future1: A, future2: B) -> <a class="struct" href="../../futures_util/future/struct.TrySelect.html" title="struct futures_util::future::TrySelect">TrySelect</a><A, B><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.TrySelect.html" title="struct futures_util::future::TrySelect">TrySelect</a><A, B></h3><code class="content"><span class="where fmt-newline">impl<A: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>, B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</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> for <a class="struct" href="../../futures_util/future/struct.TrySelect.html" title="struct futures_util::future::TrySelect">TrySelect</a><A, B> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a>,<br> B: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../futures_util/future/enum.Either.html" title="enum futures_util::future::Either">Either</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>, B<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>B::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>, A<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>, <a class="enum" href="../../futures_util/future/enum.Either.html" title="enum futures_util::future::Either">Either</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>, B<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>B::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>, A<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,<br> B: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>, </span></pre><div class="docblock"><p>Waits for either one of two differently-typed futures to complete.</p>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><script>window.sidebarCurrent = {name: "try_select", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/try_select.rs.html#50-57" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="fn" href="">try_select</a></span></h1><pre class="rust fn">pub fn try_select<A, B>(future1: A, future2: B) -> <a class="struct" href="../../futures_util/future/struct.TrySelect.html" title="struct futures_util::future::TrySelect">TrySelect</a><A, B><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.TrySelect.html" title="struct futures_util::future::TrySelect">TrySelect</a><A, B></h3><code class="content"><span class="where fmt-newline">impl<A: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>, B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</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> for <a class="struct" href="../../futures_util/future/struct.TrySelect.html" title="struct futures_util::future::TrySelect">TrySelect</a><A, B> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a>,<br> B: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../futures_util/future/enum.Either.html" title="enum futures_util::future::Either">Either</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>, B<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>B::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>, A<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>, <a class="enum" href="../../futures_util/future/enum.Either.html" title="enum futures_util::future::Either">Either</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>, B<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>B::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>, A<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,<br> B: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>, </span></pre><div class="docblock"><p>Waits for either one of two differently-typed futures to complete.</p>
|
||||
<p>This function will return a new future which awaits for either one of both
|
||||
futures to complete. The returned future will finish with both the value
|
||||
resolved and a future representing the completion of the other work.</p>
|
||||
@@ -30,5 +30,4 @@ conveniently extract out the value at the end.</p>
|
||||
}
|
||||
})
|
||||
}</pre></div>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!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="Asynchronous values."><meta name="keywords" content="rust, rustlang, rust-lang, future"><title>futures_util::future - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `future` mod in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, future"><title>futures_util::future - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module future</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../index.html">futures_util</a></p><div id="sidebar-vars" data-name="future" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">futures_util</a>::<wbr><a class="mod" href="">future</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/mod.rs.html#1-125" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Asynchronous values.</p>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module future</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../index.html">futures_util</a></p><script>window.sidebarCurrent = {name: "future", ty: "mod", relpath: "../"};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/mod.rs.html#1-125" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../index.html">futures_util</a>::<wbr><a class="mod" href="">future</a></span></h1><div class="docblock"><p>Asynchronous values.</p>
|
||||
<p>This module contains:</p>
|
||||
<ul>
|
||||
<li>The <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="Future"><code>Future</code></a> trait.</li>
|
||||
@@ -91,5 +91,4 @@ for one to produce an error.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.try_join5.html" title="futures_util::future::try_join5 fn">try_join5</a></td><td class="docblock-short"><p>Same as <a href="../../futures_util/future/fn.try_join.html"><code>try_join</code></a>, but with more futures.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.try_maybe_done.html" title="futures_util::future::try_maybe_done fn">try_maybe_done</a></td><td class="docblock-short"><p>Wraps a future into a <code>TryMaybeDone</code></p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.try_select.html" title="futures_util::future::try_select fn">try_select</a></td><td class="docblock-short"><p>Waits for either one of two differently-typed futures to complete.</p>
|
||||
</td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
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
@@ -1,33 +1,32 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A custom trait object for polling futures, roughly akin to `Box<dyn Future<Output = T> + Send + 'a>`."><meta name="keywords" content="rust, rustlang, rust-lang, FutureObj"><title>futures_util::future::FutureObj - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `FutureObj` struct in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, FutureObj"><title>futures_util::future::FutureObj - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct FutureObj</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.new">new</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-From%3CFutureObj%3C%27a%2C%20T%3E%3E">From<FutureObj<'a, T>></a><a href="#impl-Future">Future</a><a href="#impl-Send">Send</a><a href="#impl-Unpin">Unpin</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Sync">!Sync</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-IntoFuture">IntoFuture</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryFuture">TryFuture</a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><div id="sidebar-vars" data-name="FutureObj" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="struct" href="">FutureObj</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_task/future_obj.rs.html#108" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct FutureObj<'a, T>(_);</pre></div><div class="docblock"><p>A custom trait object for polling futures, roughly akin to
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct FutureObj</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.new">new</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-From%3CFutureObj%3C%27a%2C%20T%3E%3E">From<FutureObj<'a, T>></a><a href="#impl-Future">Future</a><a href="#impl-Send">Send</a><a href="#impl-Unpin">Unpin</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Sync">!Sync</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-IntoFuture">IntoFuture</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryFuture">TryFuture</a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><script>window.sidebarCurrent = {name: "FutureObj", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_task/future_obj.rs.html#108" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="struct" href="">FutureObj</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct FutureObj<'a, T>(_);</pre></div><div class="docblock"><p>A custom trait object for polling futures, roughly akin to
|
||||
<code>Box<dyn Future<Output = T> + Send + 'a></code>.</p>
|
||||
<p>This custom trait object was introduced as currently it is not possible to
|
||||
take <code>dyn Trait</code> by value and <code>Box<dyn Trait></code> is not available in no_std
|
||||
contexts.</p>
|
||||
<p>You should generally not need to use this type outside of <code>no_std</code> or when
|
||||
implementing <code>Spawn</code>, consider using <code>BoxFuture</code> instead.</p>
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl<'a, T> <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'a, T></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/futures_task/future_obj.rs.html#113-119" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a><F>(f: F) -> <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'a, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'_, T></h3><code class="content"><span class="where fmt-newline">impl<'_, 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> for <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'_, T></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = T;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> F: <a class="trait" href="../../futures_util/task/trait.UnsafeFutureObj.html" title="trait futures_util::task::UnsafeFutureObj">UnsafeFutureObj</a><'a, T> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>, </span></code><a class="srclink" href="../../src/futures_task/future_obj.rs.html#116" title="goto source code">[src]</a></h4><div class="docblock"><p>Create a <code>FutureObj</code> from a custom trait object representation.</p>
|
||||
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Debug" class="impl"><code class="in-band">impl<'_, T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'_, T></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/futures_task/future_obj.rs.html#121-126" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></code><a class="srclink" href="../../src/futures_task/future_obj.rs.html#122" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CFutureObj%3C%27a%2C%20T%3E%3E" class="impl"><code class="in-band">impl<'a, T> <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="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'a, T>> for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'a, T></code><a href="#impl-From%3CFutureObj%3C%27a%2C%20T%3E%3E" class="anchor"></a><a class="srclink" href="../../src/futures_task/future_obj.rs.html#73-78" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(f: <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'a, T>) -> <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'a, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'_, T></h3><code class="content"><span class="where fmt-newline">impl<'_, 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> for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'_, T></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = T;</span></code></span></div></span></span></code><a class="srclink" href="../../src/futures_task/future_obj.rs.html#75" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl<'a, T> <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'a, T></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/futures_task/future_obj.rs.html#113-119" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a><F>(f: F) -> <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'a, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'_, T></h3><code class="content"><span class="where fmt-newline">impl<'_, 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> for <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'_, T></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = T;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> F: <a class="trait" href="../../futures_util/task/trait.UnsafeFutureObj.html" title="trait futures_util::task::UnsafeFutureObj">UnsafeFutureObj</a><'a, T> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>, </span></code><a class="srclink" href="../../src/futures_task/future_obj.rs.html#116-118" title="goto source code">[src]</a></h4><div class="docblock"><p>Create a <code>FutureObj</code> from a custom trait object representation.</p>
|
||||
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Debug" class="impl"><code class="in-band">impl<'_, T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'_, T></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/futures_task/future_obj.rs.html#121-126" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></code><a class="srclink" href="../../src/futures_task/future_obj.rs.html#122-125" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CFutureObj%3C%27a%2C%20T%3E%3E" class="impl"><code class="in-band">impl<'a, T> <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="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'a, T>> for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'a, T></code><a href="#impl-From%3CFutureObj%3C%27a%2C%20T%3E%3E" class="anchor"></a><a class="srclink" href="../../src/futures_task/future_obj.rs.html#73-78" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(f: <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'a, T>) -> <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'a, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'_, T></h3><code class="content"><span class="where fmt-newline">impl<'_, 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> for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'_, T></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = T;</span></code></span></div></span></span></code><a class="srclink" href="../../src/futures_task/future_obj.rs.html#75-77" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-Future" class="impl"><code class="in-band">impl<'_, 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> for <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'_, T></code><a href="#impl-Future" class="anchor"></a><a class="srclink" href="../../src/futures_task/future_obj.rs.html#128-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Output" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = T</code></h4><div class='docblock'><p>The type of value produced on completion.</p>
|
||||
</div><h4 id="method.poll" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#tymethod.poll" class="fnname">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><&mut <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'_, T>>, 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><T></code><a class="srclink" href="../../src/futures_task/future_obj.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Attempt to resolve the future to a final value, registering
|
||||
</div><h4 id="method.poll" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#tymethod.poll" class="fnname">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><&mut <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'_, T>>, 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><T></code><a class="srclink" href="../../src/futures_task/future_obj.rs.html#132-134" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Attempt to resolve the future to a final value, registering
|
||||
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></p>
|
||||
</div></div><h3 id="impl-Send" class="impl"><code class="in-band">impl<'_, T> <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="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'_, T></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../src/futures_task/future_obj.rs.html#111" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl<'_, T> <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="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'_, T></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../src/futures_task/future_obj.rs.html#110" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl<'a, T> !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'a, T></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl<'a, T> !<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="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'a, T></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl<'a, T> !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'a, T></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">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 <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">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></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>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></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">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 <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#207-211" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">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 <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214-218" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#215" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>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></p>
|
||||
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">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</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-549" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-1" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#546" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#534-541" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#538" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-Send" class="impl"><code class="in-band">impl<'_, T> <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="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'_, T></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../src/futures_task/future_obj.rs.html#111" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl<'_, T> <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="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'_, T></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../src/futures_task/future_obj.rs.html#110" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl<'a, T> !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'a, T></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../src/futures_util/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl<'a, T> !<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="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'a, T></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../src/futures_util/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl<'a, T> !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'a, T></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../src/futures_util/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">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 <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">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></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>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></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">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 <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">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 <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>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></p>
|
||||
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">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</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-1" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-IntoFuture" class="impl"><code class="in-band">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 <span class="where fmt-newline">where<br> 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>, </span></code><a href="#impl-IntoFuture" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/future/into_future.rs.html#20-27" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Output-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/future/into_future/trait.IntoFuture.html#associatedtype.Output" class="type">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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a></code></h4><div class="item-info"><div class="stab unstable"><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>into_future</code>)</div></div><div class='docblock'><p>The output that the future will produce on completion.</p>
|
||||
</div><h4 id="associatedtype.Future" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/future/into_future/trait.IntoFuture.html#associatedtype.Future" class="type">Future</a> = F</code></h4><div class="item-info"><div class="stab unstable"><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>into_future</code>)</div></div><div class='docblock'><p>Which kind of future are we turning this into?</p>
|
||||
</div><h4 id="method.into_future" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/future/into_future/trait.IntoFuture.html#tymethod.into_future" class="fnname">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="type" href="https://doc.rust-lang.org/nightly/core/future/into_future/trait.IntoFuture.html#associatedtype.Future" title="type core::future::into_future::IntoFuture::Future">Future</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/future/into_future.rs.html#24" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>into_future</code>)</div></div><div class='docblock hidden'><p>Creates a future from a value.</p>
|
||||
</div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">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 <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#582-591" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">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="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#588" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div><h4 id="method.into_future" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/future/into_future/trait.IntoFuture.html#tymethod.into_future" class="fnname">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="type" href="https://doc.rust-lang.org/nightly/core/future/into_future/trait.IntoFuture.html#associatedtype.Future" title="type core::future::into_future::IntoFuture::Future">Future</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/future/into_future.rs.html#24-26" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>into_future</code>)</div></div><div class='docblock hidden'><p>Creates a future from a value.</p>
|
||||
</div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">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 <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#589-598" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">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="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#595-597" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-TryFuture" class="impl"><code class="in-band">impl<F, T, E> <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a> for F <span class="where fmt-newline">where<br> 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>, </span></code><a href="#impl-TryFuture" class="anchor"></a><a class="srclink" href="../../src/futures_core/future.rs.html#76-86" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Ok" class="type"><code>type <a href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" class="type">Ok</a> = T</code></h4><div class='docblock'><p>The type of successful values yielded by this future</p>
|
||||
</div><h4 id="associatedtype.Error-2" class="type"><code>type <a href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" class="type">Error</a> = E</code></h4><div class='docblock'><p>The type of failures yielded by this future</p>
|
||||
</div><h4 id="method.try_poll" class="method hidden"><code>pub fn <a href="../../futures_util/future/trait.TryFuture.html#tymethod.try_poll" class="fnname">try_poll</a>(<br> 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 </a>F>, <br> 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><'_><br>) -> <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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>></code><a class="srclink" href="../../src/futures_core/future.rs.html#83" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Poll this <code>TryFuture</code> as if it were a <code>Future</code>. <a href="../../futures_util/future/trait.TryFuture.html#tymethod.try_poll">Read more</a></p>
|
||||
</div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">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 <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#568-577" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">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="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id="method.try_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">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="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#574" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div><h4 id="method.try_poll" class="method hidden"><code>pub fn <a href="../../futures_util/future/trait.TryFuture.html#tymethod.try_poll" class="fnname">try_poll</a>(<br> 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 </a>F>, <br> 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><'_><br>) -> <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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>></code><a class="srclink" href="../../src/futures_core/future.rs.html#83-85" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Poll this <code>TryFuture</code> as if it were a <code>Future</code>. <a href="../../futures_util/future/trait.TryFuture.html#tymethod.try_poll">Read more</a></p>
|
||||
</div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">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 <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#575-584" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">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="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id="method.try_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">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="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#581-583" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
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
@@ -1,37 +1,36 @@
|
||||
<!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 custom trait object for polling futures, roughly akin to `Box<dyn Future<Output = T> + 'a>`."><meta name="keywords" content="rust, rustlang, rust-lang, LocalFutureObj"><title>futures_util::future::LocalFutureObj - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `LocalFutureObj` struct in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, LocalFutureObj"><title>futures_util::future::LocalFutureObj - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct LocalFutureObj</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.into_future_obj">into_future_obj</a><a href="#method.new">new</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Drop">Drop</a><a href="#impl-From%3CFutureObj%3C%27a%2C%20T%3E%3E">From<FutureObj<'a, T>></a><a href="#impl-Future">Future</a><a href="#impl-Unpin">Unpin</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-IntoFuture">IntoFuture</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryFuture">TryFuture</a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><div id="sidebar-vars" data-name="LocalFutureObj" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="struct" href="">LocalFutureObj</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_task/future_obj.rs.html#16-20" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct LocalFutureObj<'a, T> { /* fields omitted */ }</pre></div><div class="docblock"><p>A custom trait object for polling futures, roughly akin to
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct LocalFutureObj</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.into_future_obj">into_future_obj</a><a href="#method.new">new</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Drop">Drop</a><a href="#impl-From%3CFutureObj%3C%27a%2C%20T%3E%3E">From<FutureObj<'a, T>></a><a href="#impl-Future">Future</a><a href="#impl-Unpin">Unpin</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-IntoFuture">IntoFuture</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryFuture">TryFuture</a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><script>window.sidebarCurrent = {name: "LocalFutureObj", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_task/future_obj.rs.html#16-20" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="struct" href="">LocalFutureObj</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct LocalFutureObj<'a, T> { /* fields omitted */ }</pre></div><div class="docblock"><p>A custom trait object for polling futures, roughly akin to
|
||||
<code>Box<dyn Future<Output = T> + 'a></code>.</p>
|
||||
<p>This custom trait object was introduced as currently it is not possible to
|
||||
take <code>dyn Trait</code> by value and <code>Box<dyn Trait></code> is not available in no_std
|
||||
contexts.</p>
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl<'a, T> <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'a, T></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/futures_task/future_obj.rs.html#42-64" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a><F>(f: F) -> <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'a, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'_, T></h3><code class="content"><span class="where fmt-newline">impl<'_, 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> for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'_, T></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = T;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> F: 'a + <a class="trait" href="../../futures_util/task/trait.UnsafeFutureObj.html" title="trait futures_util::task::UnsafeFutureObj">UnsafeFutureObj</a><'a, T>, </span></code><a class="srclink" href="../../src/futures_task/future_obj.rs.html#45" title="goto source code">[src]</a></h4><div class="docblock"><p>Create a <code>LocalFutureObj</code> from a custom trait object representation.</p>
|
||||
</div><h4 id="method.into_future_obj" class="method"><code>pub unsafe fn <a href="#method.into_future_obj" class="fnname">into_future_obj</a>(self) -> <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'a, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'_, T></h3><code class="content"><span class="where fmt-newline">impl<'_, 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> for <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'_, T></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = T;</span></code></span></div></span></span></code><a class="srclink" href="../../src/futures_task/future_obj.rs.html#61" title="goto source code">[src]</a></h4><div class="docblock"><p>Converts the <code>LocalFutureObj</code> into a <code>FutureObj</code>.</p>
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl<'a, T> <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'a, T></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/futures_task/future_obj.rs.html#42-64" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a><F>(f: F) -> <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'a, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'_, T></h3><code class="content"><span class="where fmt-newline">impl<'_, 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> for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'_, T></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = T;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> F: 'a + <a class="trait" href="../../futures_util/task/trait.UnsafeFutureObj.html" title="trait futures_util::task::UnsafeFutureObj">UnsafeFutureObj</a><'a, T>, </span></code><a class="srclink" href="../../src/futures_task/future_obj.rs.html#45-51" title="goto source code">[src]</a></h4><div class="docblock"><p>Create a <code>LocalFutureObj</code> from a custom trait object representation.</p>
|
||||
</div><h4 id="method.into_future_obj" class="method"><code>pub unsafe fn <a href="#method.into_future_obj" class="fnname">into_future_obj</a>(self) -> <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'a, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'_, T></h3><code class="content"><span class="where fmt-newline">impl<'_, 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> for <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'_, T></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = T;</span></code></span></div></span></span></code><a class="srclink" href="../../src/futures_task/future_obj.rs.html#61-63" title="goto source code">[src]</a></h4><div class="docblock"><p>Converts the <code>LocalFutureObj</code> into a <code>FutureObj</code>.</p>
|
||||
<h1 id="safety" class="section-header"><a href="#safety">Safety</a></h1>
|
||||
<p>To make this operation safe one has to ensure that the <code>UnsafeFutureObj</code>
|
||||
instance from which this <code>LocalFutureObj</code> was created actually
|
||||
implements <code>Send</code>.</p>
|
||||
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Debug" class="impl"><code class="in-band">impl<'_, T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'_, T></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/futures_task/future_obj.rs.html#66-71" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></code><a class="srclink" href="../../src/futures_task/future_obj.rs.html#67" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-Drop" class="impl"><code class="in-band">impl<'_, T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html" title="trait core::ops::drop::Drop">Drop</a> for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'_, T></code><a href="#impl-Drop" class="anchor"></a><a class="srclink" href="../../src/futures_task/future_obj.rs.html#91-97" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.drop" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop" class="fnname">drop</a>(&mut self)</code><a class="srclink" href="../../src/futures_task/future_obj.rs.html#92" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Executes the destructor for this type. <a href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CFutureObj%3C%27a%2C%20T%3E%3E" class="impl"><code class="in-band">impl<'a, T> <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="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'a, T>> for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'a, T></code><a href="#impl-From%3CFutureObj%3C%27a%2C%20T%3E%3E" class="anchor"></a><a class="srclink" href="../../src/futures_task/future_obj.rs.html#73-78" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(f: <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'a, T>) -> <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'a, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'_, T></h3><code class="content"><span class="where fmt-newline">impl<'_, 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> for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'_, T></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = T;</span></code></span></div></span></span></code><a class="srclink" href="../../src/futures_task/future_obj.rs.html#75" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Debug" class="impl"><code class="in-band">impl<'_, T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'_, T></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/futures_task/future_obj.rs.html#66-71" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></code><a class="srclink" href="../../src/futures_task/future_obj.rs.html#67-70" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-Drop" class="impl"><code class="in-band">impl<'_, T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html" title="trait core::ops::drop::Drop">Drop</a> for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'_, T></code><a href="#impl-Drop" class="anchor"></a><a class="srclink" href="../../src/futures_task/future_obj.rs.html#91-97" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.drop" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop" class="fnname">drop</a>(&mut self)</code><a class="srclink" href="../../src/futures_task/future_obj.rs.html#92-96" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Executes the destructor for this type. <a href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CFutureObj%3C%27a%2C%20T%3E%3E" class="impl"><code class="in-band">impl<'a, T> <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="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'a, T>> for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'a, T></code><a href="#impl-From%3CFutureObj%3C%27a%2C%20T%3E%3E" class="anchor"></a><a class="srclink" href="../../src/futures_task/future_obj.rs.html#73-78" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(f: <a class="struct" href="../../futures_util/task/struct.FutureObj.html" title="struct futures_util::task::FutureObj">FutureObj</a><'a, T>) -> <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'a, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'_, T></h3><code class="content"><span class="where fmt-newline">impl<'_, 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> for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'_, T></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = T;</span></code></span></div></span></span></code><a class="srclink" href="../../src/futures_task/future_obj.rs.html#75-77" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-Future" class="impl"><code class="in-band">impl<'_, 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> for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'_, T></code><a href="#impl-Future" class="anchor"></a><a class="srclink" href="../../src/futures_task/future_obj.rs.html#80-89" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Output" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = T</code></h4><div class='docblock'><p>The type of value produced on completion.</p>
|
||||
</div><h4 id="method.poll" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#tymethod.poll" class="fnname">poll</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'_, T>>, <br> 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><'_><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><T></code><a class="srclink" href="../../src/futures_task/future_obj.rs.html#84" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Attempt to resolve the future to a final value, registering
|
||||
</div><h4 id="method.poll" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#tymethod.poll" class="fnname">poll</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'_, T>>, <br> 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><'_><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><T></code><a class="srclink" href="../../src/futures_task/future_obj.rs.html#84-88" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Attempt to resolve the future to a final value, registering
|
||||
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></p>
|
||||
</div></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl<'_, T> <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="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'_, T></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../src/futures_task/future_obj.rs.html#25" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl<'a, T> !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'a, T></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl<'a, T> !<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="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'a, T></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl<'a, T> !<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="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'a, T></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl<'a, T> !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'a, T></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">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 <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">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></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>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></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">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 <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#207-211" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">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 <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214-218" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#215" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>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></p>
|
||||
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">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</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-549" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-1" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#546" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#534-541" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#538" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl<'_, T> <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="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'_, T></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../src/futures_task/future_obj.rs.html#25" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl<'a, T> !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'a, T></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../src/futures_util/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl<'a, T> !<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="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'a, T></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../src/futures_util/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl<'a, T> !<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="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'a, T></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../src/futures_util/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl<'a, T> !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../futures_util/task/struct.LocalFutureObj.html" title="struct futures_util::task::LocalFutureObj">LocalFutureObj</a><'a, T></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../src/futures_util/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">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 <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">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></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>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></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">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 <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">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 <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>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></p>
|
||||
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">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</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-1" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-IntoFuture" class="impl"><code class="in-band">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 <span class="where fmt-newline">where<br> 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>, </span></code><a href="#impl-IntoFuture" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/future/into_future.rs.html#20-27" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Output-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/future/into_future/trait.IntoFuture.html#associatedtype.Output" class="type">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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a></code></h4><div class="item-info"><div class="stab unstable"><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>into_future</code>)</div></div><div class='docblock'><p>The output that the future will produce on completion.</p>
|
||||
</div><h4 id="associatedtype.Future" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/future/into_future/trait.IntoFuture.html#associatedtype.Future" class="type">Future</a> = F</code></h4><div class="item-info"><div class="stab unstable"><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>into_future</code>)</div></div><div class='docblock'><p>Which kind of future are we turning this into?</p>
|
||||
</div><h4 id="method.into_future" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/future/into_future/trait.IntoFuture.html#tymethod.into_future" class="fnname">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="type" href="https://doc.rust-lang.org/nightly/core/future/into_future/trait.IntoFuture.html#associatedtype.Future" title="type core::future::into_future::IntoFuture::Future">Future</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/future/into_future.rs.html#24" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>into_future</code>)</div></div><div class='docblock hidden'><p>Creates a future from a value.</p>
|
||||
</div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">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 <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#582-591" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">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="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#588" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div><h4 id="method.into_future" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/future/into_future/trait.IntoFuture.html#tymethod.into_future" class="fnname">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="type" href="https://doc.rust-lang.org/nightly/core/future/into_future/trait.IntoFuture.html#associatedtype.Future" title="type core::future::into_future::IntoFuture::Future">Future</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/future/into_future.rs.html#24-26" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>into_future</code>)</div></div><div class='docblock hidden'><p>Creates a future from a value.</p>
|
||||
</div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">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 <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#589-598" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">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="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#595-597" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-TryFuture" class="impl"><code class="in-band">impl<F, T, E> <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a> for F <span class="where fmt-newline">where<br> 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>, </span></code><a href="#impl-TryFuture" class="anchor"></a><a class="srclink" href="../../src/futures_core/future.rs.html#76-86" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Ok" class="type"><code>type <a href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" class="type">Ok</a> = T</code></h4><div class='docblock'><p>The type of successful values yielded by this future</p>
|
||||
</div><h4 id="associatedtype.Error-2" class="type"><code>type <a href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" class="type">Error</a> = E</code></h4><div class='docblock'><p>The type of failures yielded by this future</p>
|
||||
</div><h4 id="method.try_poll" class="method hidden"><code>pub fn <a href="../../futures_util/future/trait.TryFuture.html#tymethod.try_poll" class="fnname">try_poll</a>(<br> 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 </a>F>, <br> 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><'_><br>) -> <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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>></code><a class="srclink" href="../../src/futures_core/future.rs.html#83" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Poll this <code>TryFuture</code> as if it were a <code>Future</code>. <a href="../../futures_util/future/trait.TryFuture.html#tymethod.try_poll">Read more</a></p>
|
||||
</div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">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 <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#568-577" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">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="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id="method.try_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">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="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#574" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div><h4 id="method.try_poll" class="method hidden"><code>pub fn <a href="../../futures_util/future/trait.TryFuture.html#tymethod.try_poll" class="fnname">try_poll</a>(<br> 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 </a>F>, <br> 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><'_><br>) -> <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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>></code><a class="srclink" href="../../src/futures_core/future.rs.html#83-85" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Poll this <code>TryFuture</code> as if it were a <code>Future</code>. <a href="../../futures_util/future/trait.TryFuture.html#tymethod.try_poll">Read more</a></p>
|
||||
</div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">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 <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#575-584" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">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="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id="method.try_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">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="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#581-583" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
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
@@ -1,7 +1,7 @@
|
||||
<!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 `Future`s that provides a variety of convenient adapters."><meta name="keywords" content="rust, rustlang, rust-lang, FutureExt"><title>futures_util::future::FutureExt - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `FutureExt` trait in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, FutureExt"><title>futures_util::future::FutureExt - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Trait FutureExt</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.map">map</a><a href="#method.flatten">flatten</a><a href="#method.fuse">fuse</a><a href="#method.map_into">map_into</a><a href="#method.then">then</a><a href="#method.left_future">left_future</a><a href="#method.right_future">right_future</a><a href="#method.into_stream">into_stream</a><a href="#method.flatten_stream">flatten_stream</a><a href="#method.inspect">inspect</a><a href="#method.unit_error">unit_error</a><a href="#method.never_error">never_error</a><a href="#method.poll_unpin">poll_unpin</a><a href="#method.now_or_never">now_or_never</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><div id="sidebar-vars" data-name="FutureExt" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="trait" href="">FutureExt</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/future/mod.rs.html#123-610" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait FutureExt: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a> {
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Trait FutureExt</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.flatten">flatten</a><a href="#method.flatten_stream">flatten_stream</a><a href="#method.fuse">fuse</a><a href="#method.inspect">inspect</a><a href="#method.into_stream">into_stream</a><a href="#method.left_future">left_future</a><a href="#method.map">map</a><a href="#method.map_into">map_into</a><a href="#method.never_error">never_error</a><a href="#method.now_or_never">now_or_never</a><a href="#method.poll_unpin">poll_unpin</a><a href="#method.right_future">right_future</a><a href="#method.then">then</a><a href="#method.unit_error">unit_error</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><script>window.sidebarCurrent = {name: "FutureExt", ty: "trait", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/future/mod.rs.html#123-610" title="goto source code">[src]</a></span><span class="in-band">Trait <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="trait" href="">FutureExt</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait FutureExt: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a> {
|
||||
fn <a href="#method.map" class="fnname">map</a><U, F>(self, f: F) -> <a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><Self, F><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><Fut, F></h3><code class="content"><span class="where fmt-newline">impl<Fut, 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> for <a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><Fut, F> <span class="where fmt-newline">where<br> Map<Fut, 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>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <Map<Fut, 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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span><br> <span class="where">where<br> 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="type" 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,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
|
||||
{ ... }
|
||||
<div class="item-spacer"></div> fn <a href="#method.map_into" class="fnname">map_into</a><U>(self) -> <a class="struct" href="../../futures_util/future/struct.MapInto.html" title="struct futures_util::future::MapInto">MapInto</a><Self, U><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.MapInto.html" title="struct futures_util::future::MapInto">MapInto</a><Fut, T></h3><code class="content"><span class="where fmt-newline">impl<Fut, 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> for <a class="struct" href="../../futures_util/future/struct.MapInto.html" title="struct futures_util::future::MapInto">MapInto</a><Fut, T> <span class="where fmt-newline">where<br> <a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><Fut, IntoFn<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>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <<a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><Fut, IntoFn<T>> 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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span><br> <span class="where">where<br> Self::<a class="type" 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>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
|
||||
@@ -32,7 +32,7 @@
|
||||
{ ... }
|
||||
}</pre></div><div class="docblock"><p>An extension trait for <code>Future</code>s that provides a variety of convenient
|
||||
adapters.</p>
|
||||
</div><h2 id="provided-methods" class="small-section-header">Provided methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><h3 id="method.map" class="method"><code>fn <a href="#method.map" class="fnname">map</a><U, F>(self, f: F) -> <a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><Self, F><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><Fut, F></h3><code class="content"><span class="where fmt-newline">impl<Fut, 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> for <a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><Fut, F> <span class="where fmt-newline">where<br> Map<Fut, 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>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <Map<Fut, 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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> 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="type" 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,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a class="srclink" href="../../src/futures_util/future/future/mod.rs.html#146-152" title="goto source code">[src]</a></h3><div class="docblock"><p>Map this future’s output to a different type, returning a new future of
|
||||
</div><h2 id="provided-methods" class="small-section-header">Provided methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><h3 id="method.map" class="method"><code>fn <a href="#method.map" class="fnname">map</a><U, F>(self, f: F) -> <a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><Self, F><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><Fut, F></h3><code class="content"><span class="where fmt-newline">impl<Fut, 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> for <a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><Fut, F> <span class="where fmt-newline">where<br> Map<Fut, 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>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <Map<Fut, 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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> 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="type" 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,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a class="srclink" href="../../src/futures_util/future/future/mod.rs.html#146-152" title="goto source code">[src]</a></h3><div class="docblock"><p>Map this future's output to a different type, returning a new future of
|
||||
the resulting type.</p>
|
||||
<p>This function is similar to the <code>Option::map</code> or <code>Iterator::map</code> where
|
||||
it will change the type of the underlying future. This is useful to
|
||||
@@ -47,7 +47,7 @@ standard library.</p>
|
||||
<span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="kw">async</span> { <span class="number">1</span> };
|
||||
<span class="kw">let</span> <span class="ident">new_future</span> <span class="op">=</span> <span class="ident">future</span>.<span class="ident">map</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> <span class="ident">x</span> <span class="op">+</span> <span class="number">3</span>);
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">new_future</span>.<span class="kw">await</span>, <span class="number">4</span>);</pre></div>
|
||||
</div><h3 id="method.map_into" class="method"><code>fn <a href="#method.map_into" class="fnname">map_into</a><U>(self) -> <a class="struct" href="../../futures_util/future/struct.MapInto.html" title="struct futures_util::future::MapInto">MapInto</a><Self, U><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.MapInto.html" title="struct futures_util::future::MapInto">MapInto</a><Fut, T></h3><code class="content"><span class="where fmt-newline">impl<Fut, 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> for <a class="struct" href="../../futures_util/future/struct.MapInto.html" title="struct futures_util::future::MapInto">MapInto</a><Fut, T> <span class="where fmt-newline">where<br> <a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><Fut, IntoFn<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>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <<a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><Fut, IntoFn<T>> 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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> Self::<a class="type" 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>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a class="srclink" href="../../src/futures_util/future/future/mod.rs.html#159-165" title="goto source code">[src]</a></h3><div class="docblock"><p>Map this future’s output to a different type, returning a new future of
|
||||
</div><h3 id="method.map_into" class="method"><code>fn <a href="#method.map_into" class="fnname">map_into</a><U>(self) -> <a class="struct" href="../../futures_util/future/struct.MapInto.html" title="struct futures_util::future::MapInto">MapInto</a><Self, U><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.MapInto.html" title="struct futures_util::future::MapInto">MapInto</a><Fut, T></h3><code class="content"><span class="where fmt-newline">impl<Fut, 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> for <a class="struct" href="../../futures_util/future/struct.MapInto.html" title="struct futures_util::future::MapInto">MapInto</a><Fut, T> <span class="where fmt-newline">where<br> <a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><Fut, IntoFn<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>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <<a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><Fut, IntoFn<T>> 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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> Self::<a class="type" 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>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a class="srclink" href="../../src/futures_util/future/future/mod.rs.html#159-165" title="goto source code">[src]</a></h3><div class="docblock"><p>Map this future's output to a different type, returning a new future of
|
||||
the resulting type.</p>
|
||||
<p>This function is equivalent to calling <code>map(Into::into)</code> but allows naming
|
||||
the return type.</p>
|
||||
@@ -157,8 +157,8 @@ continue to do so for all future calls to <code>poll</code>).</p>
|
||||
<p>This combinator will drop the underlying future as soon as it has been
|
||||
completed to ensure resources are reclaimed as soon as possible.</p>
|
||||
</div><h3 id="method.inspect" class="method"><code>fn <a href="#method.inspect" class="fnname">inspect</a><F>(self, f: F) -> <a class="struct" href="../../futures_util/future/struct.Inspect.html" title="struct futures_util::future::Inspect">Inspect</a><Self, F><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.Inspect.html" title="struct futures_util::future::Inspect">Inspect</a><Fut, F></h3><code class="content"><span class="where fmt-newline">impl<Fut, 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> for <a class="struct" href="../../futures_util/future/struct.Inspect.html" title="struct futures_util::future::Inspect">Inspect</a><Fut, F> <span class="where fmt-newline">where<br> Map<Fut, InspectFn<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>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <Map<Fut, InspectFn<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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> 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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>),<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a class="srclink" href="../../src/futures_util/future/future/mod.rs.html#391-397" title="goto source code">[src]</a></h3><div class="docblock"><p>Do something with the output of a future before passing it on.</p>
|
||||
<p>When using futures, you’ll often chain several of them together. While
|
||||
working on such code, you might want to check out what’s happening at
|
||||
<p>When using futures, you'll often chain several of them together. While
|
||||
working on such code, you might want to check out what's happening at
|
||||
various parts in the pipeline, without consuming the intermediate
|
||||
value. To do that, insert a call to <code>inspect</code>.</p>
|
||||
<h1 id="examples-7" class="section-header"><a href="#examples-7">Examples</a></h1>
|
||||
@@ -195,5 +195,4 @@ be combined with <code>expect()</code>:</p>
|
||||
<span class="kw">let</span> <span class="ident">future_ready</span> <span class="op">=</span> <span class="ident">ready</span>(<span class="string">"foobar"</span>);
|
||||
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">future_ready</span>.<span class="ident">now_or_never</span>().<span class="ident">expect</span>(<span class="string">"Future not ready"</span>), <span class="string">"foobar"</span>);</pre></div>
|
||||
</div></div><span class="loading-content">Loading content...</span><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><h3 id="impl-FutureExt" class="impl"><code class="in-band">impl<T: ?<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="../../futures_util/future/trait.FutureExt.html" title="trait futures_util::future::FutureExt">FutureExt</a> for T <span class="where fmt-newline">where<br> 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>, </span></code><a href="#impl-FutureExt" class="anchor"></a><a class="srclink" href="../../src/futures_util/future/future/mod.rs.html#119" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><span class="loading-content">Loading content...</span><script type="text/javascript" src="../../implementors/futures_util/future/trait.FutureExt.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></div><span class="loading-content">Loading content...</span><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><h3 id="impl-FutureExt" class="impl"><code class="in-band">impl<T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>> FutureExt for T <span class="where fmt-newline">where<br> 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>, </span></code><a href="#impl-FutureExt" class="anchor"></a><a class="srclink" href="../../src/futures_util/future/future/mod.rs.html#119" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><span class="loading-content">Loading content...</span><script type="text/javascript" src="../../implementors/futures_util/future/trait.FutureExt.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!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 convenience for futures that return `Result` values that includes a variety of adapters tailored to such futures."><meta name="keywords" content="rust, rustlang, rust-lang, TryFuture"><title>futures_util::future::TryFuture - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `TryFuture` trait in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, TryFuture"><title>futures_util::future::TryFuture - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Trait TryFuture</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#associated-types">Associated Types</a><div class="sidebar-links"><a href="#associatedtype.Error">Error</a><a href="#associatedtype.Ok">Ok</a></div><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.try_poll">try_poll</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><div id="sidebar-vars" data-name="TryFuture" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="trait" href="">TryFuture</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_core/future.rs.html#58-74" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait TryFuture: Sealed + <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a> {
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Trait TryFuture</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#associated-types">Associated Types</a><div class="sidebar-links"><a href="#associatedtype.Error">Error</a><a href="#associatedtype.Ok">Ok</a></div><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.try_poll">try_poll</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><script>window.sidebarCurrent = {name: "TryFuture", ty: "trait", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_core/future.rs.html#58-74" title="goto source code">[src]</a></span><span class="in-band">Trait <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="trait" href="">TryFuture</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait TryFuture: Sealed + <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a> {
|
||||
type <a href="#associatedtype.Ok" class="type">Ok</a>;
|
||||
type <a href="#associatedtype.Error" class="type">Error</a>;
|
||||
pub fn <a href="#tymethod.try_poll" class="fnname">try_poll</a>(<br> 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 </a>Self>, <br> 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><'_><br> ) -> <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::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>, Self::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>>>;
|
||||
@@ -11,7 +11,6 @@ a variety of adapters tailored to such futures.</p>
|
||||
</div><h3 id="associatedtype.Error" class="method"><code>type <a href="#associatedtype.Error" class="type">Error</a></code><a class="srclink" href="../../src/futures_core/future.rs.html#63" title="goto source code">[src]</a></h3><div class="docblock"><p>The type of failures yielded by this future</p>
|
||||
</div></div><span class="loading-content">Loading content...</span><h2 id="required-methods" class="small-section-header">Required methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><h3 id="tymethod.try_poll" class="method"><code>pub fn <a href="#tymethod.try_poll" class="fnname">try_poll</a>(<br> 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 </a>Self>, <br> 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><'_><br>) -> <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::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>, Self::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>>></code><a class="srclink" href="../../src/futures_core/future.rs.html#70-73" title="goto source code">[src]</a></h3><div class="docblock"><p>Poll this <code>TryFuture</code> as if it were a <code>Future</code>.</p>
|
||||
<p>This method is a stopgap for a compiler limitation that prevents us from
|
||||
directly inheriting from the <code>Future</code> trait; in the future it won’t be
|
||||
directly inheriting from the <code>Future</code> trait; in the future it won't be
|
||||
needed.</p>
|
||||
</div></div><span class="loading-content">Loading content...</span><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><h3 id="impl-TryFuture" class="impl"><code class="in-band">impl<F, T, E> <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a> for F <span class="where fmt-newline">where<br> 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>, </span></code><a href="#impl-TryFuture" class="anchor"></a><a class="srclink" href="../../src/futures_core/future.rs.html#76-86" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Ok-1" class="type"><code>type <a href="#associatedtype.Ok-1" class="type">Ok</a> = T</code></h4><h4 id="associatedtype.Error-1" class="type"><code>type <a href="#associatedtype.Error-1" class="type">Error</a> = E</code></h4><h4 id="method.try_poll" class="method hidden"><code>pub fn <a href="#method.try_poll" class="fnname">try_poll</a>(<br> 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 </a>F>, <br> 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><'_><br>) -> <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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>></code><a class="srclink" href="../../src/futures_core/future.rs.html#83" title="goto source code">[src]</a></h4></div></div><span class="loading-content">Loading content...</span><script type="text/javascript" src="../../implementors/futures_core/future/trait.TryFuture.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></div><span class="loading-content">Loading content...</span><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><h3 id="impl-TryFuture" class="impl"><code class="in-band">impl<F, T, E> TryFuture for F <span class="where fmt-newline">where<br> 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>, </span></code><a href="#impl-TryFuture" class="anchor"></a><a class="srclink" href="../../src/futures_core/future.rs.html#76-86" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Ok-1" class="type"><code>type <a href="#associatedtype.Ok-1" class="type">Ok</a> = T</code></h4><h4 id="associatedtype.Error-1" class="type"><code>type <a href="#associatedtype.Error-1" class="type">Error</a> = E</code></h4><h4 id="method.try_poll" class="method hidden"><code>pub fn <a href="#method.try_poll" class="fnname">try_poll</a>(<br> 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 </a>F>, <br> 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><'_><br>) -> <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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>></code><a class="srclink" href="../../src/futures_core/future.rs.html#83-85" title="goto source code">[src]</a></h4></div></div><span class="loading-content">Loading content...</span><script type="text/javascript" src="../../implementors/futures_core/future/trait.TryFuture.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!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="Adapters specific to [`Result`]-returning futures"><meta name="keywords" content="rust, rustlang, rust-lang, TryFutureExt"><title>futures_util::future::TryFutureExt - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `TryFutureExt` trait in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, TryFutureExt"><title>futures_util::future::TryFutureExt - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Trait TryFutureExt</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.and_then">and_then</a><a href="#method.into_future">into_future</a><a href="#method.try_flatten">try_flatten</a><a href="#method.map_ok">map_ok</a><a href="#method.map_ok_or_else">map_ok_or_else</a><a href="#method.map_err">map_err</a><a href="#method.err_into">err_into</a><a href="#method.ok_into">ok_into</a><a href="#method.or_else">or_else</a><a href="#method.inspect_ok">inspect_ok</a><a href="#method.inspect_err">inspect_err</a><a href="#method.try_flatten_stream">try_flatten_stream</a><a href="#method.unwrap_or_else">unwrap_or_else</a><a href="#method.try_poll_unpin">try_poll_unpin</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><div id="sidebar-vars" data-name="TryFutureExt" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="trait" href="">TryFutureExt</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/try_future/mod.rs.html#137-619" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait TryFutureExt: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a> {
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Trait TryFutureExt</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.and_then">and_then</a><a href="#method.err_into">err_into</a><a href="#method.inspect_err">inspect_err</a><a href="#method.inspect_ok">inspect_ok</a><a href="#method.into_future">into_future</a><a href="#method.map_err">map_err</a><a href="#method.map_ok">map_ok</a><a href="#method.map_ok_or_else">map_ok_or_else</a><a href="#method.ok_into">ok_into</a><a href="#method.or_else">or_else</a><a href="#method.try_flatten">try_flatten</a><a href="#method.try_flatten_stream">try_flatten_stream</a><a href="#method.try_poll_unpin">try_poll_unpin</a><a href="#method.unwrap_or_else">unwrap_or_else</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a></p><script>window.sidebarCurrent = {name: "TryFutureExt", ty: "trait", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/future/try_future/mod.rs.html#137-619" title="goto source code">[src]</a></span><span class="in-band">Trait <a href="../index.html">futures_util</a>::<wbr><a href="index.html">future</a>::<wbr><a class="trait" href="">TryFutureExt</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait TryFutureExt: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a> {
|
||||
fn <a href="#method.map_ok" class="fnname">map_ok</a><T, F>(self, f: F) -> <a class="struct" href="../../futures_util/future/struct.MapOk.html" title="struct futures_util::future::MapOk">MapOk</a><Self, F><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.MapOk.html" title="struct futures_util::future::MapOk">MapOk</a><Fut, F></h3><code class="content"><span class="where fmt-newline">impl<Fut, 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> for <a class="struct" href="../../futures_util/future/struct.MapOk.html" title="struct futures_util::future::MapOk">MapOk</a><Fut, F> <span class="where fmt-newline">where<br> <a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, MapOkFn<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>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <<a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, MapOkFn<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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span><br> <span class="where">where<br> 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="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>) -> T,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
|
||||
{ ... }
|
||||
<div class="item-spacer"></div> fn <a href="#method.map_ok_or_else" class="fnname">map_ok_or_else</a><T, E, F>(self, e: E, f: F) -> <a class="struct" href="../../futures_util/future/struct.MapOkOrElse.html" title="struct futures_util::future::MapOkOrElse">MapOkOrElse</a><Self, F, E><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.MapOkOrElse.html" title="struct futures_util::future::MapOkOrElse">MapOkOrElse</a><Fut, F, G></h3><code class="content"><span class="where fmt-newline">impl<Fut, F, G> <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="../../futures_util/future/struct.MapOkOrElse.html" title="struct futures_util::future::MapOkOrElse">MapOkOrElse</a><Fut, F, G> <span class="where fmt-newline">where<br> <a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, ChainFn<MapOkFn<F>, ChainFn<MapErrFn<G>, MergeResultFn>>>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <<a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, ChainFn<MapOkFn<F>, ChainFn<MapErrFn<G>, MergeResultFn>>> 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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span><br> <span class="where">where<br> 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="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>) -> T,<br> 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::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>) -> T,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
|
||||
@@ -31,7 +31,7 @@
|
||||
<div class="item-spacer"></div> fn <a href="#method.try_poll_unpin" class="fnname">try_poll_unpin</a>(<br> &mut self, <br> 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><'_><br> ) -> <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::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>, Self::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>>><br> <span class="where">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a></span>,
|
||||
{ ... }
|
||||
}</pre></div><div class="docblock"><p>Adapters specific to <a href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="Result"><code>Result</code></a>-returning futures</p>
|
||||
</div><h2 id="provided-methods" class="small-section-header">Provided methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><h3 id="method.map_ok" class="method"><code>fn <a href="#method.map_ok" class="fnname">map_ok</a><T, F>(self, f: F) -> <a class="struct" href="../../futures_util/future/struct.MapOk.html" title="struct futures_util::future::MapOk">MapOk</a><Self, F><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.MapOk.html" title="struct futures_util::future::MapOk">MapOk</a><Fut, F></h3><code class="content"><span class="where fmt-newline">impl<Fut, 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> for <a class="struct" href="../../futures_util/future/struct.MapOk.html" title="struct futures_util::future::MapOk">MapOk</a><Fut, F> <span class="where fmt-newline">where<br> <a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, MapOkFn<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>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <<a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, MapOkFn<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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> 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="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>) -> T,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a class="srclink" href="../../src/futures_util/future/try_future/mod.rs.html#217-223" title="goto source code">[src]</a></h3><div class="docblock"><p>Maps this future’s success value to a different value.</p>
|
||||
</div><h2 id="provided-methods" class="small-section-header">Provided methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><h3 id="method.map_ok" class="method"><code>fn <a href="#method.map_ok" class="fnname">map_ok</a><T, F>(self, f: F) -> <a class="struct" href="../../futures_util/future/struct.MapOk.html" title="struct futures_util::future::MapOk">MapOk</a><Self, F><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.MapOk.html" title="struct futures_util::future::MapOk">MapOk</a><Fut, F></h3><code class="content"><span class="where fmt-newline">impl<Fut, 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> for <a class="struct" href="../../futures_util/future/struct.MapOk.html" title="struct futures_util::future::MapOk">MapOk</a><Fut, F> <span class="where fmt-newline">where<br> <a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, MapOkFn<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>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <<a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, MapOkFn<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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> 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="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>) -> T,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a class="srclink" href="../../src/futures_util/future/try_future/mod.rs.html#217-223" title="goto source code">[src]</a></h3><div class="docblock"><p>Maps this future's success value to a different value.</p>
|
||||
<p>This method can be used to change the <a href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok"><code>Ok</code></a> type of the
|
||||
future into a different type. It is similar to the <a href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html#method.map" title="Result::map"><code>Result::map</code></a>
|
||||
method. You can use this method to chain along a computation once the
|
||||
@@ -57,7 +57,7 @@ effect:</p>
|
||||
<span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="kw">async</span> { <span class="prelude-val">Err</span>::<span class="op"><</span><span class="ident">i32</span>, <span class="ident">i32</span><span class="op">></span>(<span class="number">1</span>) };
|
||||
<span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">future</span>.<span class="ident">map_ok</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> <span class="ident">x</span> <span class="op">+</span> <span class="number">3</span>);
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">future</span>.<span class="kw">await</span>, <span class="prelude-val">Err</span>(<span class="number">1</span>));</pre></div>
|
||||
</div><h3 id="method.map_ok_or_else" class="method"><code>fn <a href="#method.map_ok_or_else" class="fnname">map_ok_or_else</a><T, E, F>(self, e: E, f: F) -> <a class="struct" href="../../futures_util/future/struct.MapOkOrElse.html" title="struct futures_util::future::MapOkOrElse">MapOkOrElse</a><Self, F, E><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.MapOkOrElse.html" title="struct futures_util::future::MapOkOrElse">MapOkOrElse</a><Fut, F, G></h3><code class="content"><span class="where fmt-newline">impl<Fut, F, G> <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="../../futures_util/future/struct.MapOkOrElse.html" title="struct futures_util::future::MapOkOrElse">MapOkOrElse</a><Fut, F, G> <span class="where fmt-newline">where<br> <a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, ChainFn<MapOkFn<F>, ChainFn<MapErrFn<G>, MergeResultFn>>>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <<a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, ChainFn<MapOkFn<F>, ChainFn<MapErrFn<G>, MergeResultFn>>> 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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> 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="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>) -> T,<br> 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::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>) -> T,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a class="srclink" href="../../src/futures_util/future/try_future/mod.rs.html#257-264" title="goto source code">[src]</a></h3><div class="docblock"><p>Maps this future’s success value to a different value, and permits for error handling resulting in the same type.</p>
|
||||
</div><h3 id="method.map_ok_or_else" class="method"><code>fn <a href="#method.map_ok_or_else" class="fnname">map_ok_or_else</a><T, E, F>(self, e: E, f: F) -> <a class="struct" href="../../futures_util/future/struct.MapOkOrElse.html" title="struct futures_util::future::MapOkOrElse">MapOkOrElse</a><Self, F, E><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.MapOkOrElse.html" title="struct futures_util::future::MapOkOrElse">MapOkOrElse</a><Fut, F, G></h3><code class="content"><span class="where fmt-newline">impl<Fut, F, G> <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="../../futures_util/future/struct.MapOkOrElse.html" title="struct futures_util::future::MapOkOrElse">MapOkOrElse</a><Fut, F, G> <span class="where fmt-newline">where<br> <a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, ChainFn<MapOkFn<F>, ChainFn<MapErrFn<G>, MergeResultFn>>>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <<a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, ChainFn<MapOkFn<F>, ChainFn<MapErrFn<G>, MergeResultFn>>> 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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> 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="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>) -> T,<br> 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::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>) -> T,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a class="srclink" href="../../src/futures_util/future/try_future/mod.rs.html#257-264" title="goto source code">[src]</a></h3><div class="docblock"><p>Maps this future's success value to a different value, and permits for error handling resulting in the same type.</p>
|
||||
<p>This method can be used to coalesce your <a href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok"><code>Ok</code></a> type and <a href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error"><code>Error</code></a> into another type,
|
||||
where that type is the same for both outcomes.</p>
|
||||
<p>The provided closure <code>f</code> will only be called if this future is resolved
|
||||
@@ -79,7 +79,7 @@ wrapped version of it.</p>
|
||||
<span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="kw">async</span> { <span class="prelude-val">Err</span>::<span class="op"><</span><span class="ident">i32</span>, <span class="ident">i32</span><span class="op">></span>(<span class="number">5</span>) };
|
||||
<span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">future</span>.<span class="ident">map_ok_or_else</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> <span class="ident">x</span> <span class="op">*</span> <span class="number">2</span>, <span class="op">|</span><span class="ident">x</span><span class="op">|</span> <span class="ident">x</span> <span class="op">+</span> <span class="number">3</span>);
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">future</span>.<span class="kw">await</span>, <span class="number">10</span>);</pre></div>
|
||||
</div><h3 id="method.map_err" class="method"><code>fn <a href="#method.map_err" class="fnname">map_err</a><E, F>(self, f: F) -> <a class="struct" href="../../futures_util/future/struct.MapErr.html" title="struct futures_util::future::MapErr">MapErr</a><Self, F><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.MapErr.html" title="struct futures_util::future::MapErr">MapErr</a><Fut, F></h3><code class="content"><span class="where fmt-newline">impl<Fut, 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> for <a class="struct" href="../../futures_util/future/struct.MapErr.html" title="struct futures_util::future::MapErr">MapErr</a><Fut, F> <span class="where fmt-newline">where<br> <a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, MapErrFn<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>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <<a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, MapErrFn<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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> 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="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>) -> E,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a class="srclink" href="../../src/futures_util/future/try_future/mod.rs.html#305-311" title="goto source code">[src]</a></h3><div class="docblock"><p>Maps this future’s error value to a different value.</p>
|
||||
</div><h3 id="method.map_err" class="method"><code>fn <a href="#method.map_err" class="fnname">map_err</a><E, F>(self, f: F) -> <a class="struct" href="../../futures_util/future/struct.MapErr.html" title="struct futures_util::future::MapErr">MapErr</a><Self, F><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.MapErr.html" title="struct futures_util::future::MapErr">MapErr</a><Fut, F></h3><code class="content"><span class="where fmt-newline">impl<Fut, 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> for <a class="struct" href="../../futures_util/future/struct.MapErr.html" title="struct futures_util::future::MapErr">MapErr</a><Fut, F> <span class="where fmt-newline">where<br> <a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, MapErrFn<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>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <<a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, MapErrFn<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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> 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="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>) -> E,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a class="srclink" href="../../src/futures_util/future/try_future/mod.rs.html#305-311" title="goto source code">[src]</a></h3><div class="docblock"><p>Maps this future's error value to a different value.</p>
|
||||
<p>This method can be used to change the <a href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error"><code>Error</code></a> type
|
||||
of the future into a different type. It is similar to the
|
||||
<a href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html#method.map_err" title="Result::map_err"><code>Result::map_err</code></a> method. You can use this method for example to
|
||||
@@ -106,7 +106,7 @@ no effect:</p>
|
||||
<span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="kw">async</span> { <span class="prelude-val">Ok</span>::<span class="op"><</span><span class="ident">i32</span>, <span class="ident">i32</span><span class="op">></span>(<span class="number">1</span>) };
|
||||
<span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">future</span>.<span class="ident">map_err</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> <span class="ident">x</span> <span class="op">+</span> <span class="number">3</span>);
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">future</span>.<span class="kw">await</span>, <span class="prelude-val">Ok</span>(<span class="number">1</span>));</pre></div>
|
||||
</div><h3 id="method.err_into" class="method"><code>fn <a href="#method.err_into" class="fnname">err_into</a><E>(self) -> <a class="struct" href="../../futures_util/future/struct.ErrInto.html" title="struct futures_util::future::ErrInto">ErrInto</a><Self, E><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.ErrInto.html" title="struct futures_util::future::ErrInto">ErrInto</a><Fut, E></h3><code class="content"><span class="where fmt-newline">impl<Fut, E> <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="../../futures_util/future/struct.ErrInto.html" title="struct futures_util::future::ErrInto">ErrInto</a><Fut, E> <span class="where fmt-newline">where<br> <a class="struct" href="../../futures_util/future/struct.MapErr.html" title="struct futures_util::future::MapErr">MapErr</a><Fut, IntoFn<E>>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <<a class="struct" href="../../futures_util/future/struct.MapErr.html" title="struct futures_util::future::MapErr">MapErr</a><Fut, IntoFn<E>> 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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> Self::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><E>, </span></code><a class="srclink" href="../../src/futures_util/future/try_future/mod.rs.html#335-341" title="goto source code">[src]</a></h3><div class="docblock"><p>Maps this future’s <a href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error"><code>Error</code></a> to a new error type
|
||||
</div><h3 id="method.err_into" class="method"><code>fn <a href="#method.err_into" class="fnname">err_into</a><E>(self) -> <a class="struct" href="../../futures_util/future/struct.ErrInto.html" title="struct futures_util::future::ErrInto">ErrInto</a><Self, E><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.ErrInto.html" title="struct futures_util::future::ErrInto">ErrInto</a><Fut, E></h3><code class="content"><span class="where fmt-newline">impl<Fut, E> <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="../../futures_util/future/struct.ErrInto.html" title="struct futures_util::future::ErrInto">ErrInto</a><Fut, E> <span class="where fmt-newline">where<br> <a class="struct" href="../../futures_util/future/struct.MapErr.html" title="struct futures_util::future::MapErr">MapErr</a><Fut, IntoFn<E>>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <<a class="struct" href="../../futures_util/future/struct.MapErr.html" title="struct futures_util::future::MapErr">MapErr</a><Fut, IntoFn<E>> 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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> Self::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><E>, </span></code><a class="srclink" href="../../src/futures_util/future/try_future/mod.rs.html#335-341" title="goto source code">[src]</a></h3><div class="docblock"><p>Maps this future's <a href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error"><code>Error</code></a> to a new error type
|
||||
using the <a href="std::convert::Into"><code>Into</code></a> trait.</p>
|
||||
<p>This method does for futures what the <code>?</code>-operator does for
|
||||
<a href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="Result"><code>Result</code></a>: It lets the compiler infer the type of the resulting
|
||||
@@ -121,7 +121,7 @@ wrapped version of it.</p>
|
||||
|
||||
<span class="kw">let</span> <span class="ident">future_err_u8</span> <span class="op">=</span> <span class="kw">async</span> { <span class="prelude-val">Err</span>::<span class="op"><</span>(), <span class="ident">u8</span><span class="op">></span>(<span class="number">1</span>) };
|
||||
<span class="kw">let</span> <span class="ident">future_err_i32</span> <span class="op">=</span> <span class="ident">future_err_u8</span>.<span class="ident">err_into</span>::<span class="op"><</span><span class="ident">i32</span><span class="op">></span>();</pre></div>
|
||||
</div><h3 id="method.ok_into" class="method"><code>fn <a href="#method.ok_into" class="fnname">ok_into</a><U>(self) -> <a class="struct" href="../../futures_util/future/struct.OkInto.html" title="struct futures_util::future::OkInto">OkInto</a><Self, U><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.OkInto.html" title="struct futures_util::future::OkInto">OkInto</a><Fut, E></h3><code class="content"><span class="where fmt-newline">impl<Fut, E> <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="../../futures_util/future/struct.OkInto.html" title="struct futures_util::future::OkInto">OkInto</a><Fut, E> <span class="where fmt-newline">where<br> <a class="struct" href="../../futures_util/future/struct.MapOk.html" title="struct futures_util::future::MapOk">MapOk</a><Fut, IntoFn<E>>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <<a class="struct" href="../../futures_util/future/struct.MapOk.html" title="struct futures_util::future::MapOk">MapOk</a><Fut, IntoFn<E>> 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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> Self::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U>, </span></code><a class="srclink" href="../../src/futures_util/future/try_future/mod.rs.html#345-351" title="goto source code">[src]</a></h3><div class="docblock"><p>Maps this future’s <a href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok"><code>Ok</code></a> to a new type
|
||||
</div><h3 id="method.ok_into" class="method"><code>fn <a href="#method.ok_into" class="fnname">ok_into</a><U>(self) -> <a class="struct" href="../../futures_util/future/struct.OkInto.html" title="struct futures_util::future::OkInto">OkInto</a><Self, U><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.OkInto.html" title="struct futures_util::future::OkInto">OkInto</a><Fut, E></h3><code class="content"><span class="where fmt-newline">impl<Fut, E> <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="../../futures_util/future/struct.OkInto.html" title="struct futures_util::future::OkInto">OkInto</a><Fut, E> <span class="where fmt-newline">where<br> <a class="struct" href="../../futures_util/future/struct.MapOk.html" title="struct futures_util::future::MapOk">MapOk</a><Fut, IntoFn<E>>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <<a class="struct" href="../../futures_util/future/struct.MapOk.html" title="struct futures_util::future::MapOk">MapOk</a><Fut, IntoFn<E>> 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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> Self::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U>, </span></code><a class="srclink" href="../../src/futures_util/future/try_future/mod.rs.html#345-351" title="goto source code">[src]</a></h3><div class="docblock"><p>Maps this future's <a href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok"><code>Ok</code></a> to a new type
|
||||
using the <a href="std::convert::Into"><code>Into</code></a> trait.</p>
|
||||
</div><h3 id="method.and_then" class="method"><code>fn <a href="#method.and_then" class="fnname">and_then</a><Fut, F>(self, f: F) -> <a class="struct" href="../../futures_util/future/struct.AndThen.html" title="struct futures_util::future::AndThen">AndThen</a><Self, Fut, F><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.AndThen.html" title="struct futures_util::future::AndThen">AndThen</a><Fut1, Fut2, F></h3><code class="content"><span class="where fmt-newline">impl<Fut1, Fut2, 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> for <a class="struct" href="../../futures_util/future/struct.AndThen.html" title="struct futures_util::future::AndThen">AndThen</a><Fut1, Fut2, F> <span class="where fmt-newline">where<br> <a class="struct" href="../../futures_util/future/struct.TryFlatten.html" title="struct futures_util::future::TryFlatten">TryFlatten</a><<a class="struct" href="../../futures_util/future/struct.MapOk.html" title="struct futures_util::future::MapOk">MapOk</a><Fut1, F>, Fut2>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <<a class="struct" href="../../futures_util/future/struct.TryFlatten.html" title="struct futures_util::future::TryFlatten">TryFlatten</a><<a class="struct" href="../../futures_util/future/struct.MapOk.html" title="struct futures_util::future::MapOk">MapOk</a><Fut1, F>, Fut2> 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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> 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="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>) -> Fut,<br> Fut: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a><Error = Self::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a class="srclink" href="../../src/futures_util/future/try_future/mod.rs.html#389-396" title="goto source code">[src]</a></h3><div class="docblock"><p>Executes another future after this one resolves successfully. The
|
||||
success value is passed to a closure to create this subsequent future.</p>
|
||||
@@ -174,8 +174,8 @@ no effect:</p>
|
||||
<span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">future</span>.<span class="ident">or_else</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> <span class="kw">async</span> <span class="kw">move</span> { <span class="prelude-val">Ok</span>::<span class="op"><</span><span class="ident">i32</span>, <span class="ident">i32</span><span class="op">></span>(<span class="ident">x</span> <span class="op">+</span> <span class="number">3</span>) });
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">future</span>.<span class="kw">await</span>, <span class="prelude-val">Ok</span>(<span class="number">1</span>));</pre></div>
|
||||
</div><h3 id="method.inspect_ok" class="method"><code>fn <a href="#method.inspect_ok" class="fnname">inspect_ok</a><F>(self, f: F) -> <a class="struct" href="../../futures_util/future/struct.InspectOk.html" title="struct futures_util::future::InspectOk">InspectOk</a><Self, F><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.InspectOk.html" title="struct futures_util::future::InspectOk">InspectOk</a><Fut, F></h3><code class="content"><span class="where fmt-newline">impl<Fut, 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> for <a class="struct" href="../../futures_util/future/struct.InspectOk.html" title="struct futures_util::future::InspectOk">InspectOk</a><Fut, F> <span class="where fmt-newline">where<br> <a class="struct" href="../../futures_util/future/struct.Inspect.html" title="struct futures_util::future::Inspect">Inspect</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, InspectOkFn<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>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <<a class="struct" href="../../futures_util/future/struct.Inspect.html" title="struct futures_util::future::Inspect">Inspect</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, InspectOkFn<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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> 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="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>),<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a class="srclink" href="../../src/futures_util/future/try_future/mod.rs.html#461-467" title="goto source code">[src]</a></h3><div class="docblock"><p>Do something with the success value of a future before passing it on.</p>
|
||||
<p>When using futures, you’ll often chain several of them together. While
|
||||
working on such code, you might want to check out what’s happening at
|
||||
<p>When using futures, you'll often chain several of them together. While
|
||||
working on such code, you might want to check out what's happening at
|
||||
various parts in the pipeline, without consuming the intermediate
|
||||
value. To do that, insert a call to <code>inspect_ok</code>.</p>
|
||||
<h1 id="examples-6" class="section-header"><a href="#examples-6">Examples</a></h1>
|
||||
@@ -186,8 +186,8 @@ value. To do that, insert a call to <code>inspect_ok</code>.</p>
|
||||
<span class="kw">let</span> <span class="ident">new_future</span> <span class="op">=</span> <span class="ident">future</span>.<span class="ident">inspect_ok</span>(<span class="op">|</span><span class="kw-2">&</span><span class="ident">x</span><span class="op">|</span> <span class="macro">println</span><span class="macro">!</span>(<span class="string">"about to resolve: {}"</span>, <span class="ident">x</span>));
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">new_future</span>.<span class="kw">await</span>, <span class="prelude-val">Ok</span>(<span class="number">1</span>));</pre></div>
|
||||
</div><h3 id="method.inspect_err" class="method"><code>fn <a href="#method.inspect_err" class="fnname">inspect_err</a><F>(self, f: F) -> <a class="struct" href="../../futures_util/future/struct.InspectErr.html" title="struct futures_util::future::InspectErr">InspectErr</a><Self, F><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.InspectErr.html" title="struct futures_util::future::InspectErr">InspectErr</a><Fut, F></h3><code class="content"><span class="where fmt-newline">impl<Fut, 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> for <a class="struct" href="../../futures_util/future/struct.InspectErr.html" title="struct futures_util::future::InspectErr">InspectErr</a><Fut, F> <span class="where fmt-newline">where<br> <a class="struct" href="../../futures_util/future/struct.Inspect.html" title="struct futures_util::future::Inspect">Inspect</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, InspectErrFn<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>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <<a class="struct" href="../../futures_util/future/struct.Inspect.html" title="struct futures_util::future::Inspect">Inspect</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, InspectErrFn<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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> 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="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>),<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a class="srclink" href="../../src/futures_util/future/try_future/mod.rs.html#487-493" title="goto source code">[src]</a></h3><div class="docblock"><p>Do something with the error value of a future before passing it on.</p>
|
||||
<p>When using futures, you’ll often chain several of them together. While
|
||||
working on such code, you might want to check out what’s happening at
|
||||
<p>When using futures, you'll often chain several of them together. While
|
||||
working on such code, you might want to check out what's happening at
|
||||
various parts in the pipeline, without consuming the intermediate
|
||||
value. To do that, insert a call to <code>inspect_err</code>.</p>
|
||||
<h1 id="examples-7" class="section-header"><a href="#examples-7">Examples</a></h1>
|
||||
@@ -218,11 +218,11 @@ version of it.</p>
|
||||
<span class="kw">let</span> <span class="ident">stream</span> <span class="op">=</span> <span class="ident">future_of_a_stream</span>.<span class="ident">try_flatten_stream</span>();
|
||||
<span class="kw">let</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">stream</span>.<span class="ident">try_collect</span>::<span class="op"><</span><span class="ident">Vec</span><span class="op"><</span><span class="kw">_</span><span class="op">></span><span class="op">></span>().<span class="kw">await</span>;
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">list</span>, <span class="prelude-val">Ok</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="number">17</span>, <span class="number">18</span>, <span class="number">19</span>]));</pre></div>
|
||||
</div><h3 id="method.unwrap_or_else" class="method"><code>fn <a href="#method.unwrap_or_else" class="fnname">unwrap_or_else</a><F>(self, f: F) -> <a class="struct" href="../../futures_util/future/struct.UnwrapOrElse.html" title="struct futures_util::future::UnwrapOrElse">UnwrapOrElse</a><Self, F><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.UnwrapOrElse.html" title="struct futures_util::future::UnwrapOrElse">UnwrapOrElse</a><Fut, F></h3><code class="content"><span class="where fmt-newline">impl<Fut, 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> for <a class="struct" href="../../futures_util/future/struct.UnwrapOrElse.html" title="struct futures_util::future::UnwrapOrElse">UnwrapOrElse</a><Fut, F> <span class="where fmt-newline">where<br> <a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, UnwrapOrElseFn<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>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <<a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, UnwrapOrElseFn<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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> 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="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>) -> Self::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>, </span></code><a class="srclink" href="../../src/futures_util/future/try_future/mod.rs.html#564-570" title="goto source code">[src]</a></h3><div class="docblock"><p>Unwraps this future’s output, producing a future with this future’s
|
||||
</div><h3 id="method.unwrap_or_else" class="method"><code>fn <a href="#method.unwrap_or_else" class="fnname">unwrap_or_else</a><F>(self, f: F) -> <a class="struct" href="../../futures_util/future/struct.UnwrapOrElse.html" title="struct futures_util::future::UnwrapOrElse">UnwrapOrElse</a><Self, F><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../../futures_util/future/struct.UnwrapOrElse.html" title="struct futures_util::future::UnwrapOrElse">UnwrapOrElse</a><Fut, F></h3><code class="content"><span class="where fmt-newline">impl<Fut, 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> for <a class="struct" href="../../futures_util/future/struct.UnwrapOrElse.html" title="struct futures_util::future::UnwrapOrElse">UnwrapOrElse</a><Fut, F> <span class="where fmt-newline">where<br> <a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, UnwrapOrElseFn<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>, </span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <<a class="struct" href="../../futures_util/future/struct.Map.html" title="struct futures_util::future::Map">Map</a><<a class="struct" href="../../futures_util/future/struct.IntoFuture.html" title="struct futures_util::future::IntoFuture">IntoFuture</a><Fut>, UnwrapOrElseFn<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="type" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" title="type core::future::future::Future::Output">Output</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> 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="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>) -> Self::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>, </span></code><a class="srclink" href="../../src/futures_util/future/try_future/mod.rs.html#564-570" title="goto source code">[src]</a></h3><div class="docblock"><p>Unwraps this future's output, producing a future with this future's
|
||||
<a href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok"><code>Ok</code></a> type as its
|
||||
<a href="std::future::Future::Output"><code>Output</code></a> type.</p>
|
||||
<p>If this future is resolved successfully, the returned future will
|
||||
contain the original future’s success value as output. Otherwise, the
|
||||
contain the original future's success value as output. Otherwise, the
|
||||
closure <code>f</code> is called with the error value to produce an alternate
|
||||
success value.</p>
|
||||
<p>This method is similar to the <a href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html#method.unwrap_or_else" title="Result::unwrap_or_else"><code>Result::unwrap_or_else</code></a> method.</p>
|
||||
@@ -248,5 +248,4 @@ compiler.</p>
|
||||
<span class="ident">take_future</span>(<span class="ident">make_try_future</span>().<span class="ident">into_future</span>());</pre></div>
|
||||
</div><h3 id="method.try_poll_unpin" class="method"><code>fn <a href="#method.try_poll_unpin" class="fnname">try_poll_unpin</a>(<br> &mut self, <br> 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><'_><br>) -> <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::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Ok" title="type futures_util::future::TryFuture::Ok">Ok</a>, Self::<a class="type" href="../../futures_util/future/trait.TryFuture.html#associatedtype.Error" title="type futures_util::future::TryFuture::Error">Error</a>>> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>, </span></code><a class="srclink" href="../../src/futures_util/future/try_future/mod.rs.html#613-618" title="goto source code">[src]</a></h3><div class="docblock"><p>A convenience method for calling <a href="../../futures_util/future/trait.TryFuture.html#tymethod.try_poll" title="TryFuture::try_poll"><code>TryFuture::try_poll</code></a> on <a href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="Unpin"><code>Unpin</code></a>
|
||||
future types.</p>
|
||||
</div></div><span class="loading-content">Loading content...</span><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><h3 id="impl-TryFutureExt" class="impl"><code class="in-band">impl<Fut: ?<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="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a>> <a class="trait" href="../../futures_util/future/trait.TryFutureExt.html" title="trait futures_util::future::TryFutureExt">TryFutureExt</a> for Fut</code><a href="#impl-TryFutureExt" class="anchor"></a><a class="srclink" href="../../src/futures_util/future/try_future/mod.rs.html#134" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><span class="loading-content">Loading content...</span><script type="text/javascript" src="../../implementors/futures_util/future/trait.TryFutureExt.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></div><span class="loading-content">Loading content...</span><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><h3 id="impl-TryFutureExt" class="impl"><code class="in-band">impl<Fut: ?<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="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a>> TryFutureExt for Fut</code><a href="#impl-TryFutureExt" class="anchor"></a><a class="srclink" href="../../src/futures_util/future/try_future/mod.rs.html#134" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><span class="loading-content">Loading content...</span><script type="text/javascript" src="../../implementors/futures_util/future/trait.TryFutureExt.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
||||
<!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="Combinators and utilities for working with `Future`s, `Stream`s, `Sink`s, and the `AsyncRead` and `AsyncWrite` traits."><meta name="keywords" content="rust, rustlang, rust-lang, futures_util"><title>futures_util - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `futures_util` crate."><meta name="keywords" content="rust, rustlang, rust-lang, futures_util"><title>futures_util - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../futures_util/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate futures_util</p><div class="block version"><p>Version 0.3.13</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all futures_util's items</p></a><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#macros">Macros</a></li></ul></div><p class="location"></p><div id="sidebar-vars" data-name="futures_util" data-ty="mod" data-relpath="../"></div></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Crate <a class="mod" href="">futures_util</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/futures_util/lib.rs.html#1-346" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Combinators and utilities for working with <code>Future</code>s, <code>Stream</code>s, <code>Sink</code>s,
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../futures_util/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate futures_util</p><div class="block version"><p>Version 0.3.13</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all futures_util's items</p></a><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#macros">Macros</a></li></ul></div><p class="location"></p><script>window.sidebarCurrent = {name: "futures_util", ty: "mod", relpath: "../"};</script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/futures_util/lib.rs.html#1-346" title="goto source code">[src]</a></span><span class="in-band">Crate <a class="mod" href="">futures_util</a></span></h1><div class="docblock"><p>Combinators and utilities for working with <code>Future</code>s, <code>Stream</code>s, <code>Sink</code>s,
|
||||
and the <code>AsyncRead</code> and <code>AsyncWrite</code> traits.</p>
|
||||
</div><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
|
||||
<table><tr class="module-item"><td><a class="mod" href="future/index.html" title="futures_util::future mod">future</a></td><td class="docblock-short"><p>Asynchronous values.</p>
|
||||
@@ -11,5 +11,4 @@ and the <code>AsyncRead</code> and <code>AsyncWrite</code> traits.</p>
|
||||
</td></tr></table><h2 id="macros" class="section-header"><a href="#macros">Macros</a></h2>
|
||||
<table><tr class="module-item"><td><a class="macro" href="macro.pin_mut.html" title="futures_util::pin_mut macro">pin_mut</a></td><td class="docblock-short"><p>Pins a value on the stack.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="macro" href="macro.ready.html" title="futures_util::ready macro">ready</a></td><td class="docblock-short"><p>Extracts the successful type of a <code>Poll<T></code>.</p>
|
||||
</td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="futures_util"></div>
|
||||
<script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
||||
</td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "futures_util";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!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="Pins a value on the stack."><meta name="keywords" content="rust, rustlang, rust-lang, pin_mut"><title>futures_util::pin_mut - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `pin_mut` macro in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, pin_mut"><title>futures_util::pin_mut - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc macro"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../futures_util/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="index.html">futures_util</a></p><div id="sidebar-vars" data-name="pin_mut" data-ty="macro" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Macro <a href="index.html">futures_util</a>::<wbr><a class="macro" href="">pin_mut</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/pin_utils/stack_pin.rs.html#14-25" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><div class="example-wrap"><pre class="rust macro">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc macro"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../futures_util/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="index.html">futures_util</a></p><script>window.sidebarCurrent = {name: "pin_mut", ty: "macro", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/pin_utils/stack_pin.rs.html#14-25" title="goto source code">[src]</a></span><span class="in-band">Macro <a href="index.html">futures_util</a>::<wbr><a class="macro" href="">pin_mut</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><div class="example-wrap"><pre class="rust macro">
|
||||
<span class="macro">macro_rules</span><span class="macro">!</span> <span class="ident">pin_mut</span> {
|
||||
($(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">x</span>:<span class="ident">ident</span>),<span class="op">*</span> $(,)<span class="question-mark">?</span>) <span class="op">=</span><span class="op">></span> { ... };
|
||||
}</pre></div>
|
||||
@@ -11,5 +11,4 @@
|
||||
<span class="kw">let</span> <span class="ident">foo</span> <span class="op">=</span> <span class="ident">Foo</span> { <span class="comment">/* ... */</span> };
|
||||
<span class="macro">pin_mut</span><span class="macro">!</span>(<span class="ident">foo</span>);
|
||||
<span class="kw">let</span> <span class="kw">_</span>: <span class="ident">Pin</span><span class="op"><</span><span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">Foo</span><span class="op">></span> <span class="op">=</span> <span class="ident">foo</span>;</pre></div>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="futures_util"></div>
|
||||
<script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "futures_util";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
||||
@@ -1,11 +1,10 @@
|
||||
<!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="Extracts the successful type of a `Poll<T>`."><meta name="keywords" content="rust, rustlang, rust-lang, ready"><title>futures_util::ready - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `ready` macro in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, ready"><title>futures_util::ready - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc macro"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../futures_util/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="index.html">futures_util</a></p><div id="sidebar-vars" data-name="ready" data-ty="macro" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Macro <a href="index.html">futures_util</a>::<wbr><a class="macro" href="">ready</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/futures_core/task/poll.rs.html#5-11" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><div class="example-wrap"><pre class="rust macro">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc macro"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../futures_util/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="index.html">futures_util</a></p><script>window.sidebarCurrent = {name: "ready", ty: "macro", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/futures_core/task/poll.rs.html#5-11" title="goto source code">[src]</a></span><span class="in-band">Macro <a href="index.html">futures_util</a>::<wbr><a class="macro" href="">ready</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><div class="example-wrap"><pre class="rust macro">
|
||||
<span class="macro">macro_rules</span><span class="macro">!</span> <span class="ident">ready</span> {
|
||||
(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">e</span>:<span class="ident">expr</span> $(,)<span class="question-mark">?</span>) <span class="op">=</span><span class="op">></span> { ... };
|
||||
}</pre></div>
|
||||
</div><div class="docblock"><p>Extracts the successful type of a <code>Poll<T></code>.</p>
|
||||
<p>This macro bakes in propagation of <code>Pending</code> signals by returning early.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="futures_util"></div>
|
||||
<script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "futures_util";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
||||
@@ -1,9 +1,8 @@
|
||||
<!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="This module contains the `Never` type."><meta name="keywords" content="rust, rustlang, rust-lang, never"><title>futures_util::never - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `never` mod in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, never"><title>futures_util::never - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module never</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#types">Type Definitions</a></li></ul></div><p class="location"><a href="../index.html">futures_util</a></p><div id="sidebar-vars" data-name="never" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">futures_util</a>::<wbr><a class="mod" href="">never</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/never.rs.html#1-18" title="goto source code">[src]</a></span></h1><div class="docblock"><p>This module contains the <code>Never</code> type.</p>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module never</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#types">Type Definitions</a></li></ul></div><p class="location"><a href="../index.html">futures_util</a></p><script>window.sidebarCurrent = {name: "never", ty: "mod", relpath: "../"};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/never.rs.html#1-18" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../index.html">futures_util</a>::<wbr><a class="mod" href="">never</a></span></h1><div class="docblock"><p>This module contains the <code>Never</code> type.</p>
|
||||
<p>Values of this type can never be created and will never exist.</p>
|
||||
</div><h2 id="types" class="section-header"><a href="#types">Type Definitions</a></h2>
|
||||
<table><tr class="module-item"><td><a class="type" href="type.Never.html" title="futures_util::never::Never type">Never</a></td><td class="docblock-short"><p>A type with no possible values.</p>
|
||||
</td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,12 +1,11 @@
|
||||
<!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 type with no possible values."><meta name="keywords" content="rust, rustlang, rust-lang, Never"><title>futures_util::never::Never - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Never` type in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, Never"><title>futures_util::never::Never - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc type"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Type Definition Never</p><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">never</a></p><div id="sidebar-vars" data-name="Never" data-ty="type" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Type Definition <a href="../index.html">futures_util</a>::<wbr><a href="index.html">never</a>::<wbr><a class="type" href="">Never</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/never.rs.html#18" title="goto source code">[src]</a></span></h1><pre class="rust typedef">type Never = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a>;</pre><div class="docblock"><p>A type with no possible values.</p>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc type"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Type Definition Never</p><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">never</a></p><script>window.sidebarCurrent = {name: "Never", ty: "type", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/never.rs.html#18" title="goto source code">[src]</a></span><span class="in-band">Type Definition <a href="../index.html">futures_util</a>::<wbr><a href="index.html">never</a>::<wbr><a class="type" href="">Never</a></span></h1><pre class="rust typedef">type Never = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a>;</pre><div class="docblock"><p>A type with no possible values.</p>
|
||||
<p>This is used to indicate values which can never be created, such as the
|
||||
error type of infallible futures.</p>
|
||||
<p>This type is a stable equivalent to the <code>!</code> type from <code>std</code>.</p>
|
||||
<p>This is currently an alias for [<code>std::convert::Infallible</code>], but in
|
||||
the future it may be an alias for <a href="https://doc.rust-lang.org/nightly/std/primitive.never.html"><code>!</code></a>.
|
||||
See <a href="https://doc.rust-lang.org/nightly/std/convert/enum.Infallible.html#future-compatibility">“Future compatibility” section of <code>std::convert::Infallible</code></a> for more.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
See <a href="https://doc.rust-lang.org/nightly/std/convert/enum.Infallible.html#future-compatibility">"Future compatibility" section of <code>std::convert::Infallible</code></a> for more.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,7 +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="Creates a stream which contains no elements."><meta name="keywords" content="rust, rustlang, rust-lang, empty"><title>futures_util::stream::empty - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `empty` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, empty"><title>futures_util::stream::empty - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a></p><div id="sidebar-vars" data-name="empty" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a>::<wbr><a class="fn" href="">empty</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/stream/empty.rs.html#17-21" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn empty<T>() -> <a class="struct" href="../../futures_util/stream/struct.Empty.html" title="struct futures_util::stream::Empty">Empty</a><T></pre><div class="docblock"><p>Creates a stream which contains no elements.</p>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a></p><script>window.sidebarCurrent = {name: "empty", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/stream/empty.rs.html#17-21" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a>::<wbr><a class="fn" href="">empty</a></span></h1><pre class="rust fn">pub fn empty<T>() -> <a class="struct" href="../../futures_util/stream/struct.Empty.html" title="struct futures_util::stream::Empty">Empty</a><T></pre><div class="docblock"><p>Creates a stream which contains no elements.</p>
|
||||
<p>The returned stream will always return <code>Ready(None)</code> when polled.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,9 +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="Converts an `Iterator` into a `Stream` which is always ready to yield the next value."><meta name="keywords" content="rust, rustlang, rust-lang, iter"><title>futures_util::stream::iter - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `iter` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, iter"><title>futures_util::stream::iter - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a></p><div id="sidebar-vars" data-name="iter" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a>::<wbr><a class="fn" href="">iter</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/stream/iter.rs.html#29-35" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn iter<I>(i: I) -> <a class="struct" href="../../futures_util/stream/struct.Iter.html" title="struct futures_util::stream::Iter">Iter</a><I::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a>> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>, </span></pre><div class="docblock"><p>Converts an <code>Iterator</code> into a <code>Stream</code> which is always ready
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a></p><script>window.sidebarCurrent = {name: "iter", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/stream/iter.rs.html#29-35" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a>::<wbr><a class="fn" href="">iter</a></span></h1><pre class="rust fn">pub fn iter<I>(i: I) -> <a class="struct" href="../../futures_util/stream/struct.Iter.html" title="struct futures_util::stream::Iter">Iter</a><I::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a>> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>, </span></pre><div class="docblock"><p>Converts an <code>Iterator</code> into a <code>Stream</code> which is always ready
|
||||
to yield the next value.</p>
|
||||
<p>Iterators in Rust don’t express the ability to block, so this adapter
|
||||
<p>Iterators in Rust don't express the ability to block, so this adapter
|
||||
simply always calls <code>iter.next()</code> and returns that.</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||||
@@ -11,5 +11,4 @@ simply always calls <code>iter.next()</code> and returns that.</p>
|
||||
|
||||
<span class="kw">let</span> <span class="ident">stream</span> <span class="op">=</span> <span class="ident">stream</span>::<span class="ident">iter</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="number">17</span>, <span class="number">19</span>]);
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="number">17</span>, <span class="number">19</span>], <span class="ident">stream</span>.<span class="ident">collect</span>::<span class="op"><</span><span class="ident">Vec</span><span class="op"><</span><span class="ident">i32</span><span class="op">></span><span class="op">></span>().<span class="kw">await</span>);</pre></div>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!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="Creates a stream of a single element."><meta name="keywords" content="rust, rustlang, rust-lang, once"><title>futures_util::stream::once - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `once` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, once"><title>futures_util::stream::once - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a></p><div id="sidebar-vars" data-name="once" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a>::<wbr><a class="fn" href="">once</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/stream/once.rs.html#20-22" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn once<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>>(future: Fut) -> <a class="struct" href="../../futures_util/stream/struct.Once.html" title="struct futures_util::stream::Once">Once</a><Fut></pre><div class="docblock"><p>Creates a stream of a single element.</p>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a></p><script>window.sidebarCurrent = {name: "once", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/stream/once.rs.html#20-22" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a>::<wbr><a class="fn" href="">once</a></span></h1><pre class="rust fn">pub fn once<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>>(future: Fut) -> <a class="struct" href="../../futures_util/stream/struct.Once.html" title="struct futures_util::stream::Once">Once</a><Fut></pre><div class="docblock"><p>Creates a stream of a single element.</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||||
<span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">stream</span>::{<span class="self">self</span>, <span class="ident">StreamExt</span>};
|
||||
@@ -9,5 +9,4 @@
|
||||
<span class="kw">let</span> <span class="ident">stream</span> <span class="op">=</span> <span class="ident">stream</span>::<span class="ident">once</span>(<span class="kw">async</span> { <span class="number">17</span> });
|
||||
<span class="kw">let</span> <span class="ident">collected</span> <span class="op">=</span> <span class="ident">stream</span>.<span class="ident">collect</span>::<span class="op"><</span><span class="ident">Vec</span><span class="op"><</span><span class="ident">i32</span><span class="op">></span><span class="op">></span>().<span class="kw">await</span>;
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">collected</span>, <span class="macro">vec</span><span class="macro">!</span>[<span class="number">17</span>]);</pre></div>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,7 +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="Creates a stream which never returns any elements."><meta name="keywords" content="rust, rustlang, rust-lang, pending"><title>futures_util::stream::pending - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `pending` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, pending"><title>futures_util::stream::pending - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a></p><div id="sidebar-vars" data-name="pending" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a>::<wbr><a class="fn" href="">pending</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/stream/pending.rs.html#17-19" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn pending<T>() -> <a class="struct" href="../../futures_util/stream/struct.Pending.html" title="struct futures_util::stream::Pending">Pending</a><T></pre><div class="docblock"><p>Creates a stream which never returns any elements.</p>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a></p><script>window.sidebarCurrent = {name: "pending", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/stream/pending.rs.html#17-19" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a>::<wbr><a class="fn" href="">pending</a></span></h1><pre class="rust fn">pub fn pending<T>() -> <a class="struct" href="../../futures_util/stream/struct.Pending.html" title="struct futures_util::stream::Pending">Pending</a><T></pre><div class="docblock"><p>Creates a stream which never returns any elements.</p>
|
||||
<p>The returned stream will always return <code>Pending</code> when polled.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!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="Creates a new stream wrapping a function returning `Poll<Option<T>>`."><meta name="keywords" content="rust, rustlang, rust-lang, poll_fn"><title>futures_util::stream::poll_fn - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `poll_fn` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, poll_fn"><title>futures_util::stream::poll_fn - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a></p><div id="sidebar-vars" data-name="poll_fn" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a>::<wbr><a class="fn" href="">poll_fn</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/stream/poll_fn.rs.html#41-46" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn poll_fn<T, F>(f: F) -> <a class="struct" href="../../futures_util/stream/struct.PollFn.html" title="struct futures_util::stream::PollFn">PollFn</a><F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&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/option/enum.Option.html" title="enum core::option::Option">Option</a><T>>, </span></pre><div class="docblock"><p>Creates a new stream wrapping a function returning <code>Poll<Option<T>></code>.</p>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a></p><script>window.sidebarCurrent = {name: "poll_fn", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/stream/poll_fn.rs.html#41-46" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a>::<wbr><a class="fn" href="">poll_fn</a></span></h1><pre class="rust fn">pub fn poll_fn<T, F>(f: F) -> <a class="struct" href="../../futures_util/stream/struct.PollFn.html" title="struct futures_util::stream::PollFn">PollFn</a><F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&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/option/enum.Option.html" title="enum core::option::Option">Option</a><T>>, </span></pre><div class="docblock"><p>Creates a new stream wrapping a function returning <code>Poll<Option<T>></code>.</p>
|
||||
<p>Polling the returned stream calls the wrapped function.</p>
|
||||
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||||
@@ -15,5 +15,4 @@
|
||||
<span class="ident">counter</span> <span class="op">-</span><span class="op">=</span> <span class="number">1</span>;
|
||||
<span class="ident">Poll</span>::<span class="ident">Ready</span>(<span class="prelude-val">Some</span>(<span class="string">"Hello, World!"</span>.<span class="ident">to_owned</span>()))
|
||||
});</pre></div>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Create a stream which produces the same item repeatedly."><meta name="keywords" content="rust, rustlang, rust-lang, repeat"><title>futures_util::stream::repeat - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `repeat` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, repeat"><title>futures_util::stream::repeat - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a></p><div id="sidebar-vars" data-name="repeat" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a>::<wbr><a class="fn" href="">repeat</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/stream/repeat.rs.html#27-31" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn repeat<T>(item: T) -> <a class="struct" href="../../futures_util/stream/struct.Repeat.html" title="struct futures_util::stream::Repeat">Repeat</a><T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></pre><div class="docblock"><p>Create a stream which produces the same item repeatedly.</p>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a></p><script>window.sidebarCurrent = {name: "repeat", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/stream/repeat.rs.html#27-31" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a>::<wbr><a class="fn" href="">repeat</a></span></h1><pre class="rust fn">pub fn repeat<T>(item: T) -> <a class="struct" href="../../futures_util/stream/struct.Repeat.html" title="struct futures_util::stream::Repeat">Repeat</a><T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></pre><div class="docblock"><p>Create a stream which produces the same item repeatedly.</p>
|
||||
<p>The stream never terminates. Note that you likely want to avoid
|
||||
usage of <code>collect</code> or such on the returned stream as it will exhaust
|
||||
available memory as it tries to just fill up all RAM.</p>
|
||||
@@ -11,5 +11,4 @@ available memory as it tries to just fill up all RAM.</p>
|
||||
|
||||
<span class="kw">let</span> <span class="ident">stream</span> <span class="op">=</span> <span class="ident">stream</span>::<span class="ident">repeat</span>(<span class="number">9</span>);
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="number">9</span>, <span class="number">9</span>, <span class="number">9</span>], <span class="ident">stream</span>.<span class="ident">take</span>(<span class="number">3</span>).<span class="ident">collect</span>::<span class="op"><</span><span class="ident">Vec</span><span class="op"><</span><span class="ident">i32</span><span class="op">></span><span class="op">></span>().<span class="kw">await</span>);</pre></div>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!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="Creates a new stream that repeats elements of type `A` endlessly by applying the provided closure, the repeater, `F: FnMut() -> A`."><meta name="keywords" content="rust, rustlang, rust-lang, repeat_with"><title>futures_util::stream::repeat_with - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `repeat_with` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, repeat_with"><title>futures_util::stream::repeat_with - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a></p><div id="sidebar-vars" data-name="repeat_with" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a>::<wbr><a class="fn" href="">repeat_with</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/stream/repeat_with.rs.html#92-94" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn repeat_with<A, F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>() -> A>(repeater: F) -> <a class="struct" href="../../futures_util/stream/struct.RepeatWith.html" title="struct futures_util::stream::RepeatWith">RepeatWith</a><F></pre><div class="docblock"><p>Creates a new stream that repeats elements of type <code>A</code> endlessly by
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a></p><script>window.sidebarCurrent = {name: "repeat_with", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/stream/repeat_with.rs.html#92-94" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a>::<wbr><a class="fn" href="">repeat_with</a></span></h1><pre class="rust fn">pub fn repeat_with<A, F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>() -> A>(repeater: F) -> <a class="struct" href="../../futures_util/stream/struct.RepeatWith.html" title="struct futures_util::stream::RepeatWith">RepeatWith</a><F></pre><div class="docblock"><p>Creates a new stream that repeats elements of type <code>A</code> endlessly by
|
||||
applying the provided closure, the repeater, <code>F: FnMut() -> A</code>.</p>
|
||||
<p>The <code>repeat_with()</code> function calls the repeater over and over again.</p>
|
||||
<p>Infinite stream like <code>repeat_with()</code> are often used with adapters like
|
||||
@@ -43,5 +43,4 @@ the [<code>stream.repeat()</code>] function.</p>
|
||||
|
||||
<span class="comment">// ... and now we're done</span>
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="prelude-val">None</span>, <span class="ident">pow2</span>.<span class="ident">next</span>().<span class="kw">await</span>);</pre></div>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!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="This function will attempt to pull items from both streams. Each stream will be polled in a round-robin fashion, and whenever a stream is ready to yield an item that item is yielded."><meta name="keywords" content="rust, rustlang, rust-lang, select"><title>futures_util::stream::select - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `select` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, select"><title>futures_util::stream::select - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a></p><div id="sidebar-vars" data-name="select" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a>::<wbr><a class="fn" href="">select</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/stream/select.rs.html#31-40" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn select<St1, St2>(stream1: St1, stream2: St2) -> <a class="struct" href="../../futures_util/stream/struct.Select.html" title="struct futures_util::stream::Select">Select</a><St1, St2> <span class="where fmt-newline">where<br> St1: <a class="trait" href="../../futures_util/stream/trait.Stream.html" title="trait futures_util::stream::Stream">Stream</a>,<br> St2: <a class="trait" href="../../futures_util/stream/trait.Stream.html" title="trait futures_util::stream::Stream">Stream</a><Item = St1::<a class="type" href="../../futures_util/stream/trait.Stream.html#associatedtype.Item" title="type futures_util::stream::Stream::Item">Item</a>>, </span></pre><div class="docblock"><p>This function will attempt to pull items from both streams. Each
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a></p><script>window.sidebarCurrent = {name: "select", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/stream/select.rs.html#31-40" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a>::<wbr><a class="fn" href="">select</a></span></h1><pre class="rust fn">pub fn select<St1, St2>(stream1: St1, stream2: St2) -> <a class="struct" href="../../futures_util/stream/struct.Select.html" title="struct futures_util::stream::Select">Select</a><St1, St2> <span class="where fmt-newline">where<br> St1: <a class="trait" href="../../futures_util/stream/trait.Stream.html" title="trait futures_util::stream::Stream">Stream</a>,<br> St2: <a class="trait" href="../../futures_util/stream/trait.Stream.html" title="trait futures_util::stream::Stream">Stream</a><Item = St1::<a class="type" href="../../futures_util/stream/trait.Stream.html#associatedtype.Item" title="type futures_util::stream::Stream::Item">Item</a>>, </span></pre><div class="docblock"><p>This function will attempt to pull items from both streams. Each
|
||||
stream will be polled in a round-robin fashion, and whenever a stream is
|
||||
ready to yield an item that item is yielded.</p>
|
||||
<p>After one of the two input stream completes, the remaining one will be
|
||||
@@ -9,5 +9,4 @@ polled exclusively. The returned stream completes when both input
|
||||
streams have completed.</p>
|
||||
<p>Note that this function consumes both streams and returns a wrapped
|
||||
version of them.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!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="Creates a `TryStream` from a seed and a closure returning a `TryFuture`."><meta name="keywords" content="rust, rustlang, rust-lang, try_unfold"><title>futures_util::stream::try_unfold - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `try_unfold` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, try_unfold"><title>futures_util::stream::try_unfold - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a></p><div id="sidebar-vars" data-name="try_unfold" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a>::<wbr><a class="fn" href="">try_unfold</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/stream/try_stream/try_unfold.rs.html#59-69" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn try_unfold<T, F, Fut, Item>(init: T, f: F) -> <a class="struct" href="../../futures_util/stream/struct.TryUnfold.html" title="struct futures_util::stream::TryUnfold">TryUnfold</a><T, F, Fut> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(T) -> Fut,<br> Fut: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a><Ok = <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Item, T<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>>, </span></pre><div class="docblock"><p>Creates a <code>TryStream</code> from a seed and a closure returning a <code>TryFuture</code>.</p>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a></p><script>window.sidebarCurrent = {name: "try_unfold", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/stream/try_stream/try_unfold.rs.html#59-69" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a>::<wbr><a class="fn" href="">try_unfold</a></span></h1><pre class="rust fn">pub fn try_unfold<T, F, Fut, Item>(init: T, f: F) -> <a class="struct" href="../../futures_util/stream/struct.TryUnfold.html" title="struct futures_util::stream::TryUnfold">TryUnfold</a><T, F, Fut> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(T) -> Fut,<br> Fut: <a class="trait" href="../../futures_util/future/trait.TryFuture.html" title="trait futures_util::future::TryFuture">TryFuture</a><Ok = <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Item, T<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>>, </span></pre><div class="docblock"><p>Creates a <code>TryStream</code> from a seed and a closure returning a <code>TryFuture</code>.</p>
|
||||
<p>This function is the dual for the <code>TryStream::try_fold()</code> adapter: while
|
||||
<code>TryStream::try_fold()</code> reduces a <code>TryStream</code> to one single value,
|
||||
<code>try_unfold()</code> creates a <code>TryStream</code> from a seed value.</p>
|
||||
@@ -14,8 +14,8 @@ future calls to <code>poll()</code>.</p>
|
||||
<p>In case of error generated by the returned <code>TryFuture</code>, the error will be
|
||||
returned by the <code>TryStream</code>. The <code>TryStream</code> will then yield
|
||||
<code>Poll::Ready(None)</code> in future calls to <code>poll()</code>.</p>
|
||||
<p>This function can typically be used when wanting to go from the “world of
|
||||
futures” to the “world of streams”: the provided closure can build a
|
||||
<p>This function can typically be used when wanting to go from the "world of
|
||||
futures" to the "world of streams": the provided closure can build a
|
||||
<code>TryFuture</code> using other library functions working on futures, and
|
||||
<code>try_unfold()</code> will turn it into a <code>TryStream</code> by repeating the operation.</p>
|
||||
<h1 id="example" class="section-header"><a href="#example">Example</a></h1>
|
||||
@@ -38,5 +38,4 @@ futures” to the “world of streams”: the provided closure can build a
|
||||
|
||||
<span class="kw">let</span> <span class="ident">result</span>: <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">Vec</span><span class="op"><</span><span class="ident">i32</span><span class="op">></span>, <span class="kw">_</span><span class="op">></span> <span class="op">=</span> <span class="ident">stream</span>.<span class="ident">try_collect</span>().<span class="kw">await</span>;
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">result</span>, <span class="prelude-val">Ok</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="number">0</span>, <span class="number">2</span>, <span class="number">4</span>]));</pre></div>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!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="Creates a `Stream` from a seed and a closure returning a `Future`."><meta name="keywords" content="rust, rustlang, rust-lang, unfold"><title>futures_util::stream::unfold - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `unfold` fn in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, unfold"><title>futures_util::stream::unfold - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a></p><div id="sidebar-vars" data-name="unfold" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a>::<wbr><a class="fn" href="">unfold</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/stream/unfold.rs.html#50-59" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn unfold<T, F, Fut, Item>(init: T, f: F) -> <a class="struct" href="../../futures_util/stream/struct.Unfold.html" title="struct futures_util::stream::Unfold">Unfold</a><T, F, Fut> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(T) -> Fut,<br> Fut: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Item, T<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>>, </span></pre><div class="docblock"><p>Creates a <code>Stream</code> from a seed and a closure returning a <code>Future</code>.</p>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a></p><script>window.sidebarCurrent = {name: "unfold", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/stream/unfold.rs.html#50-59" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">futures_util</a>::<wbr><a href="index.html">stream</a>::<wbr><a class="fn" href="">unfold</a></span></h1><pre class="rust fn">pub fn unfold<T, F, Fut, Item>(init: T, f: F) -> <a class="struct" href="../../futures_util/stream/struct.Unfold.html" title="struct futures_util::stream::Unfold">Unfold</a><T, F, Fut> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(T) -> Fut,<br> Fut: <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Item, T<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>>, </span></pre><div class="docblock"><p>Creates a <code>Stream</code> from a seed and a closure returning a <code>Future</code>.</p>
|
||||
<p>This function is the dual for the <code>Stream::fold()</code> adapter: while
|
||||
<code>Stream::fold()</code> reduces a <code>Stream</code> to one single value, <code>unfold()</code> creates a
|
||||
<code>Stream</code> from a seed value.</p>
|
||||
@@ -11,8 +11,8 @@ value <code>a</code>, and use <code>b</code> as the next internal state.</p>
|
||||
<p>If the closure returns <code>None</code> instead of <code>Some(Future)</code>, then the <code>unfold()</code>
|
||||
will stop producing items and return <code>Poll::Ready(None)</code> in future
|
||||
calls to <code>poll()</code>.</p>
|
||||
<p>This function can typically be used when wanting to go from the “world of
|
||||
futures” to the “world of streams”: the provided closure can build a
|
||||
<p>This function can typically be used when wanting to go from the "world of
|
||||
futures" to the "world of streams": the provided closure can build a
|
||||
<code>Future</code> using other library functions working on futures, and <code>unfold()</code>
|
||||
will turn it into a <code>Stream</code> by repeating the operation.</p>
|
||||
<h1 id="example" class="section-header"><a href="#example">Example</a></h1>
|
||||
@@ -31,5 +31,4 @@ will turn it into a <code>Stream</code> by repeating the operation.</p>
|
||||
|
||||
<span class="kw">let</span> <span class="ident">result</span> <span class="op">=</span> <span class="ident">stream</span>.<span class="ident">collect</span>::<span class="op"><</span><span class="ident">Vec</span><span class="op"><</span><span class="ident">i32</span><span class="op">></span><span class="op">></span>().<span class="kw">await</span>;
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">result</span>, <span class="macro">vec</span><span class="macro">!</span>[<span class="number">0</span>, <span class="number">2</span>, <span class="number">4</span>]);</pre></div>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!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="Asynchronous streams."><meta name="keywords" content="rust, rustlang, rust-lang, stream"><title>futures_util::stream - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `stream` mod in crate `futures_util`."><meta name="keywords" content="rust, rustlang, rust-lang, stream"><title>futures_util::stream - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module stream</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../index.html">futures_util</a></p><div id="sidebar-vars" data-name="stream" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">futures_util</a>::<wbr><a class="mod" href="">stream</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/stream/mod.rs.html#1-119" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Asynchronous streams.</p>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module stream</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../index.html">futures_util</a></p><script>window.sidebarCurrent = {name: "stream", ty: "mod", relpath: "../"};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_util/stream/mod.rs.html#1-119" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../index.html">futures_util</a>::<wbr><a class="mod" href="">stream</a></span></h1><div class="docblock"><p>Asynchronous streams.</p>
|
||||
<p>This module contains:</p>
|
||||
<ul>
|
||||
<li>The <a href="../../futures_util/stream/trait.Stream.html" title="Stream"><code>Stream</code></a> trait, for objects that can asynchronously produce a
|
||||
@@ -98,5 +98,4 @@ stream will be polled in a round-robin fashion, and whenever a stream is
|
||||
ready to yield an item that item is yielded.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.try_unfold.html" title="futures_util::stream::try_unfold fn">try_unfold</a></td><td class="docblock-short"><p>Creates a <code>TryStream</code> from a seed and a closure returning a <code>TryFuture</code>.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.unfold.html" title="futures_util::stream::unfold fn">unfold</a></td><td class="docblock-short"><p>Creates a <code>Stream</code> from a seed and a closure returning a <code>Future</code>.</p>
|
||||
</td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "futures_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
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
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user