trait.Future.html 281 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta name="generator" content="rustdoc">
  7. <meta name="description" content="API documentation for the Rust `Future` trait in crate `futures`.">
  8. <meta name="keywords" content="rust, rustlang, rust-lang, Future">
  9. <title>futures::future::Future - Rust</title>
  10. <link rel="stylesheet" type="text/css" href="../../normalize.css">
  11. <link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle">
  12. <link rel="stylesheet" type="text/css" href="../../dark.css">
  13. <link rel="stylesheet" type="text/css" href="../../main.css" id="themeStyle">
  14. <script src="../../storage.js"></script>
  15. </head>
  16. <body class="rustdoc trait">
  17. <!--[if lte IE 8]>
  18. <div class="warning">
  19. This old browser is unsupported and will most likely display funky
  20. things.
  21. </div>
  22. <![endif]-->
  23. <nav class="sidebar">
  24. <div class="sidebar-menu">&#9776;</div>
  25. <p class='location'>Trait Future</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.Item">Item</a><a href="#associatedtype.Error">Error</a></div><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.poll">poll</a></div><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.wait">wait</a><a href="#method.map">map</a><a href="#method.map_err">map_err</a><a href="#method.from_err">from_err</a><a href="#method.then">then</a><a href="#method.and_then">and_then</a><a href="#method.or_else">or_else</a><a href="#method.select">select</a><a href="#method.select2">select2</a><a href="#method.join">join</a><a href="#method.join3">join3</a><a href="#method.join4">join4</a><a href="#method.join5">join5</a><a href="#method.into_stream">into_stream</a><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.catch_unwind">catch_unwind</a><a href="#method.shared">shared</a></div><a class="sidebar-title" href="#foreign-impls">Implementations on Foreign Types</a><div class="sidebar-links"><a href="#impl-Future">Option&lt;F&gt;</a><a href="#impl-Future">AssertUnwindSafe&lt;F&gt;</a><a href="#impl-Future">Box&lt;F&gt;</a><a href="#impl-Future">&amp;&#39;a mut F</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='../index.html'>futures</a>::<wbr><a href='index.html'>future</a></p><script>window.sidebarCurrent = {name: 'Future', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
  26. </nav>
  27. <div class="theme-picker">
  28. <button id="theme-picker" aria-label="Pick another theme!">
  29. <img src="../../brush.svg" width="18" alt="Pick another theme!">
  30. </button>
  31. <div id="theme-choices"></div>
  32. </div>
  33. <script src="../../theme.js"></script>
  34. <nav class="sub">
  35. <form class="search-form js-only">
  36. <div class="search-container">
  37. <input class="search-input" name="search"
  38. autocomplete="off"
  39. placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
  40. type="search">
  41. </div>
  42. </form>
  43. </nav>
  44. <section id='main' class="content">
  45. <h1 class='fqn'><span class='in-band'>Trait <a href='../index.html'>futures</a>::<wbr><a href='index.html'>future</a>::<wbr><a class="trait" href=''>Future</a></span><span class='out-of-band'><span id='render-detail'>
  46. <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
  47. [<span class='inner'>&#x2212;</span>]
  48. </a>
  49. </span><a class='srclink' href='../../src/futures/future/mod.rs.html#177-1015' title='goto source code'>[src]</a></span></h1>
  50. <pre class='rust trait'>pub trait Future {
  51. type <a href='#associatedtype.Item' class="type">Item</a>;
  52. type <a href='#associatedtype.Error' class="type">Error</a>;
  53. fn <a href='#tymethod.poll' class='fnname'>poll</a>(&amp;mut self) -&gt; <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;;
  54. fn <a href='#method.wait' class='fnname'>wait</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  55. { ... }
  56. <div class='item-spacer'></div> fn <a href='#method.map' class='fnname'>map</a>&lt;F, U&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.Map.html" title="struct futures::future::Map">Map</a>&lt;Self, F&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -&gt; U,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  57. { ... }
  58. <div class='item-spacer'></div> fn <a href='#method.map_err' class='fnname'>map_err</a>&lt;F, E&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.MapErr.html" title="struct futures::future::MapErr">MapErr</a>&lt;Self, F&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -&gt; E,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  59. { ... }
  60. <div class='item-spacer'></div> fn <a href='#method.from_err' class='fnname'>from_err</a>&lt;E:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;&gt;(self) -&gt; <a class="struct" href="../../futures/future/struct.FromErr.html" title="struct futures::future::FromErr">FromErr</a>&lt;Self, E&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  61. { ... }
  62. <div class='item-spacer'></div> fn <a href='#method.then' class='fnname'>then</a>&lt;F, B&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.Then.html" title="struct futures::future::Then">Then</a>&lt;Self, B, F&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>(<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;) -&gt; B,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  63. { ... }
  64. <div class='item-spacer'></div> fn <a href='#method.and_then' class='fnname'>and_then</a>&lt;F, B&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.AndThen.html" title="struct futures::future::AndThen">AndThen</a>&lt;Self, B, F&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -&gt; B,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  65. { ... }
  66. <div class='item-spacer'></div> fn <a href='#method.or_else' class='fnname'>or_else</a>&lt;F, B&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.OrElse.html" title="struct futures::future::OrElse">OrElse</a>&lt;Self, B, F&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -&gt; B,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  67. { ... }
  68. <div class='item-spacer'></div> fn <a href='#method.select' class='fnname'>select</a>&lt;B&gt;(self, other: B) -&gt; <a class="struct" href="../../futures/future/struct.Select.html" title="struct futures::future::Select">Select</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  69. { ... }
  70. <div class='item-spacer'></div> fn <a href='#method.select2' class='fnname'>select2</a>&lt;B&gt;(self, other: B) -&gt; <a class="struct" href="../../futures/future/struct.Select2.html" title="struct futures::future::Select2">Select2</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  71. { ... }
  72. <div class='item-spacer'></div> fn <a href='#method.join' class='fnname'>join</a>&lt;B&gt;(self, other: B) -&gt; <a class="struct" href="../../futures/future/struct.Join.html" title="struct futures::future::Join">Join</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  73. { ... }
  74. <div class='item-spacer'></div> fn <a href='#method.join3' class='fnname'>join3</a>&lt;B, C&gt;(self, b: B, c: C) -&gt; <a class="struct" href="../../futures/future/struct.Join3.html" title="struct futures::future::Join3">Join3</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, C::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  75. { ... }
  76. <div class='item-spacer'></div> fn <a href='#method.join4' class='fnname'>join4</a>&lt;B, C, D&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b: B, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c: C, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;d: D<br>&nbsp;&nbsp;&nbsp;&nbsp;) -&gt; <a class="struct" href="../../futures/future/struct.Join4.html" title="struct futures::future::Join4">Join4</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, C::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, D::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  77. { ... }
  78. <div class='item-spacer'></div> fn <a href='#method.join5' class='fnname'>join5</a>&lt;B, C, D, E&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b: B, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c: C, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;d: D, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e: E<br>&nbsp;&nbsp;&nbsp;&nbsp;) -&gt; <a class="struct" href="../../futures/future/struct.Join5.html" title="struct futures::future::Join5">Join5</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, C::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, D::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, E::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;E: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  79. { ... }
  80. <div class='item-spacer'></div> fn <a href='#method.into_stream' class='fnname'>into_stream</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.IntoStream.html" title="struct futures::future::IntoStream">IntoStream</a>&lt;Self&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  81. { ... }
  82. <div class='item-spacer'></div> fn <a href='#method.flatten' class='fnname'>flatten</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.Flatten.html" title="struct futures::future::Flatten">Flatten</a>&lt;Self&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a> as <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&gt;::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  83. { ... }
  84. <div class='item-spacer'></div> fn <a href='#method.flatten_stream' class='fnname'>flatten_stream</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.FlattenStream.html" title="struct futures::future::FlattenStream">FlattenStream</a>&lt;Self&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  85. { ... }
  86. <div class='item-spacer'></div> fn <a href='#method.fuse' class='fnname'>fuse</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.Fuse.html" title="struct futures::future::Fuse">Fuse</a>&lt;Self&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  87. { ... }
  88. <div class='item-spacer'></div> fn <a href='#method.inspect' class='fnname'>inspect</a>&lt;F&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.Inspect.html" title="struct futures::future::Inspect">Inspect</a>&lt;Self, F&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>(&amp;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  89. { ... }
  90. <div class='item-spacer'></div> fn <a href='#method.catch_unwind' class='fnname'>catch_unwind</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.CatchUnwind.html" title="struct futures::future::CatchUnwind">CatchUnwind</a>&lt;Self&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a></span>,
  91. { ... }
  92. <div class='item-spacer'></div> fn <a href='#method.shared' class='fnname'>shared</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.Shared.html" title="struct futures::future::Shared">Shared</a>&lt;Self&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  93. { ... }
  94. }</pre><div class='docblock'><p>Trait for types which are a placeholder of a value that may become
  95. available at some later point in time.</p>
  96. <p>In addition to the documentation here you can also find more information
  97. about futures <a href="https://tokio.rs/docs/getting-started/futures/">online</a> at <a href="https://tokio.rs">https://tokio.rs</a></p>
  98. <p>Futures are used to provide a sentinel through which a value can be
  99. referenced. They crucially allow chaining and composing operations through
  100. consumption which allows expressing entire trees of computation as one
  101. sentinel value.</p>
  102. <p>The ergonomics and implementation of the <code>Future</code> trait are very similar to
  103. the <code>Iterator</code> trait in that there is just one methods you need
  104. to implement, but you get a whole lot of others for free as a result.</p>
  105. <h1 id="the-poll-method" class="section-header"><a href="#the-poll-method">The <code>poll</code> method</a></h1>
  106. <p>The core method of future, <code>poll</code>, is used to attempt to generate the value
  107. of a <code>Future</code>. This method <em>does not block</em> but is allowed to inform the
  108. caller that the value is not ready yet. Implementations of <code>poll</code> may
  109. themselves do work to generate the value, but it's guaranteed that this will
  110. never block the calling thread.</p>
  111. <p>A key aspect of this method is that if the value is not yet available the
  112. current task is scheduled to receive a notification when it's later ready to
  113. be made available. This follows what's typically known as a &quot;readiness&quot; or
  114. &quot;pull&quot; model where values are pulled out of futures on demand, and
  115. otherwise a task is notified when a value might be ready to get pulled out.</p>
  116. <p>The <code>poll</code> method is not intended to be called in general, but rather is
  117. typically called in the context of a &quot;task&quot; which drives a future to
  118. completion. For more information on this see the <code>task</code> module.</p>
  119. <p>More information about the details of <code>poll</code> and the nitty-gritty of tasks
  120. can be <a href="https://tokio.rs/docs/going-deeper-futures/futures-model/">found online at tokio.rs</a>.</p>
  121. <h1 id="combinators" class="section-header"><a href="#combinators">Combinators</a></h1>
  122. <p>Like iterators, futures provide a large number of combinators to work with
  123. futures to express computations in a much more natural method than
  124. scheduling a number of callbacks. For example the <code>map</code> method can change
  125. a <code>Future&lt;Item=T&gt;</code> to a <code>Future&lt;Item=U&gt;</code> or an <code>and_then</code> combinator could
  126. create a future after the first one is done and only be resolved when the
  127. second is done.</p>
  128. <p>Combinators act very similarly to the methods on the <code>Iterator</code> trait itself
  129. or those on <code>Option</code> and <code>Result</code>. Like with iterators, the combinators are
  130. zero-cost and don't impose any extra layers of indirection you wouldn't
  131. otherwise have to write down.</p>
  132. <p>More information about combinators can be found <a href="https://tokio.rs/docs/going-deeper-futures/futures-mechanics/">on tokio.rs</a>.</p>
  133. </div>
  134. <h2 id='associated-types' class='small-section-header'>
  135. Associated Types<a href='#associated-types' class='anchor'></a>
  136. </h2>
  137. <div class='methods'>
  138. <h3 id='associatedtype.Item' class='method'><span id='Item.t' class='invisible'><code>type <a href='#associatedtype.Item' class="type">Item</a></code></span></h3><div class='docblock'><p>The type of value that this future will resolved with if it is
  139. successful.</p>
  140. </div><h3 id='associatedtype.Error' class='method'><span id='Error.t' class='invisible'><code>type <a href='#associatedtype.Error' class="type">Error</a></code></span></h3><div class='docblock'><p>The type of error that this future will resolve with if it fails in a
  141. normal fashion.</p>
  142. </div></div>
  143. <h2 id='required-methods' class='small-section-header'>
  144. Required Methods<a href='#required-methods' class='anchor'></a>
  145. </h2>
  146. <div class='methods'>
  147. <h3 id='tymethod.poll' class='method'><span id='poll.v' class='invisible'><code>fn <a href='#tymethod.poll' class='fnname'>poll</a>(&amp;mut self) -&gt; <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;</code></span></h3><div class='docblock'><p>Query this future to see if its value has become available, registering
  148. interest if it is not.</p>
  149. <p>This function will check the internal state of the future and assess
  150. whether the value is ready to be produced. Implementers of this function
  151. should ensure that a call to this <strong>never blocks</strong> as event loops may
  152. not work properly otherwise.</p>
  153. <p>When a future is not ready yet, the <code>Async::NotReady</code> value will be
  154. returned. In this situation the future will <em>also</em> register interest of
  155. the current task in the value being produced. This is done by calling
  156. <code>task::park</code> to retrieve a handle to the current <code>Task</code>. When the future
  157. is then ready to make progress (e.g. it should be <code>poll</code>ed again) the
  158. <code>unpark</code> method is called on the <code>Task</code>.</p>
  159. <p>More information about the details of <code>poll</code> and the nitty-gritty of
  160. tasks can be <a href="https://tokio.rs/docs/going-deeper-futures/futures-model/">found online at tokio.rs</a>.</p>
  161. <h1 id="runtime-characteristics" class="section-header"><a href="#runtime-characteristics">Runtime characteristics</a></h1>
  162. <p>This function, <code>poll</code>, is the primary method for 'making progress'
  163. within a tree of futures. For example this method will be called
  164. repeatedly as the internal state machine makes its various transitions.
  165. Executors are responsible for ensuring that this function is called in
  166. the right location (e.g. always on an I/O thread or not). Unless it is
  167. otherwise arranged to be so, it should be ensured that <strong>implementations
  168. of this function finish very quickly</strong>.</p>
  169. <p>Returning quickly prevents unnecessarily clogging up threads and/or
  170. event loops while a <code>poll</code> function call, for example, takes up compute
  171. resources to perform some expensive computation. If it is known ahead
  172. of time that a call to <code>poll</code> may end up taking awhile, the work should
  173. be offloaded to a thread pool (or something similar) to ensure that
  174. <code>poll</code> can return quickly.</p>
  175. <p>Note that the <code>poll</code> function is not called repeatedly in a loop for
  176. futures typically, but only whenever the future itself is ready. If
  177. you're familiar with the <code>poll(2)</code> or <code>select(2)</code> syscalls on Unix
  178. it's worth noting that futures typically do <em>not</em> suffer the same
  179. problems of &quot;all wakeups must poll all events&quot;. Futures have enough
  180. support for only polling futures which cause a wakeup.</p>
  181. <h1 id="return-value" class="section-header"><a href="#return-value">Return value</a></h1>
  182. <p>This function returns <code>Async::NotReady</code> if the future is not ready yet,
  183. <code>Err</code> if the future is finished but resolved to an error, or
  184. <code>Async::Ready</code> with the result of this future if it's finished
  185. successfully. Once a future has finished it is considered a contract
  186. error to continue polling the future.</p>
  187. <p>If <code>NotReady</code> is returned, then the future will internally register
  188. interest in the value being produced for the current task (through
  189. <code>task::park</code>). In other words, the current task will receive a
  190. notification (through the <code>unpark</code> method) once the value is ready to be
  191. produced or the future can make progress.</p>
  192. <p>Note that if <code>NotReady</code> is returned it only means that <em>this</em> task will
  193. receive a notification. Historical calls to <code>poll</code> with different tasks
  194. will not receive notifications. In other words, implementers of the
  195. <code>Future</code> trait need not store a queue of tasks to notify, but only the
  196. last task that called this method. Alternatively callers of this method
  197. can only rely on the most recent task which call <code>poll</code> being notified
  198. when a future is ready.</p>
  199. <h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
  200. <p>Once a future has completed (returned <code>Ready</code> or <code>Err</code> from <code>poll</code>),
  201. then any future calls to <code>poll</code> may panic, block forever, or otherwise
  202. cause wrong behavior. The <code>Future</code> trait itself provides no guarantees
  203. about the behavior of <code>poll</code> after a future has completed.</p>
  204. <p>Callers who may call <code>poll</code> too many times may want to consider using
  205. the <code>fuse</code> adaptor which defines the behavior of <code>poll</code>, but comes with
  206. a little bit of extra cost.</p>
  207. <p>Additionally, calls to <code>poll</code> must always be made from within the
  208. context of a task. If a current task is not set then this method will
  209. likely panic.</p>
  210. <h1 id="errors" class="section-header"><a href="#errors">Errors</a></h1>
  211. <p>This future may have failed to finish the computation, in which case
  212. the <code>Err</code> variant will be returned with an appropriate payload of an
  213. error.</p>
  214. </div></div>
  215. <h2 id='provided-methods' class='small-section-header'>
  216. Provided Methods<a href='#provided-methods' class='anchor'></a>
  217. </h2>
  218. <div class='methods'>
  219. <h3 id='method.wait' class='method'><span id='wait.v' class='invisible'><code>fn <a href='#method.wait' class='fnname'>wait</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Block the current thread until this future is resolved.</p>
  220. <p>This method will consume ownership of this future, driving it to
  221. completion via <code>poll</code> and blocking the current thread while it's waiting
  222. for the value to become available. Once the future is resolved the
  223. result of this future is returned.</p>
  224. <blockquote>
  225. <p><strong>Note:</strong> This method is not appropriate to call on event loops or
  226. similar I/O situations because it will prevent the event
  227. loop from making progress (this blocks the thread). This
  228. method should only be called when it's guaranteed that the
  229. blocking work associated with this future will be completed
  230. by another thread.</p>
  231. </blockquote>
  232. <p>This method is only available when the <code>use_std</code> feature of this
  233. library is activated, and it is activated by default.</p>
  234. <h1 id="panics-1" class="section-header"><a href="#panics-1">Panics</a></h1>
  235. <p>This function does not attempt to catch panics. If the <code>poll</code> function
  236. of this future panics, panics will be propagated to the caller.</p>
  237. </div><h3 id='method.map' class='method'><span id='map.v' class='invisible'><code>fn <a href='#method.map' class='fnname'>map</a>&lt;F, U&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.Map.html" title="struct futures::future::Map">Map</a>&lt;Self, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -&gt; U,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Map this future's result to a different type, returning a new future of
  238. the resulting type.</p>
  239. <p>This function is similar to the <code>Option::map</code> or <code>Iterator::map</code> where
  240. it will change the type of the underlying future. This is useful to
  241. chain along a computation once a future has been resolved.</p>
  242. <p>The closure provided will only be called if this future is resolved
  243. successfully. If this future returns an error, panics, or is dropped,
  244. then the closure provided will never be invoked.</p>
  245. <p>Note that this function consumes the receiving future and returns a
  246. wrapped version of it, similar to the existing <code>map</code> methods in the
  247. standard library.</p>
  248. <h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
  249. <pre class="rust rust-example-rendered">
  250. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  251. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  252. <span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op">&lt;</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="number">1</span>);
  253. <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>);
  254. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">new_future</span>.<span class="ident">wait</span>(), <span class="prelude-val">Ok</span>(<span class="number">4</span>));</pre>
  255. <p>Calling <code>map</code> on an errored <code>Future</code> has no effect:</p>
  256. <pre class="rust rust-example-rendered">
  257. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  258. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  259. <span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">err</span>::<span class="op">&lt;</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="number">1</span>);
  260. <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>);
  261. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">new_future</span>.<span class="ident">wait</span>(), <span class="prelude-val">Err</span>(<span class="number">1</span>));</pre>
  262. </div><h3 id='method.map_err' class='method'><span id='map_err.v' class='invisible'><code>fn <a href='#method.map_err' class='fnname'>map_err</a>&lt;F, E&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.MapErr.html" title="struct futures::future::MapErr">MapErr</a>&lt;Self, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -&gt; E,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Map this future's error to a different error, returning a new future.</p>
  263. <p>This function is similar to the <code>Result::map_err</code> where it will change
  264. the error type of the underlying future. This is useful for example to
  265. ensure that futures have the same error type when used with combinators
  266. like <code>select</code> and <code>join</code>.</p>
  267. <p>The closure provided will only be called if this future is resolved
  268. with an error. If this future returns a success, panics, or is
  269. dropped, then the closure provided will never be invoked.</p>
  270. <p>Note that this function consumes the receiving future and returns a
  271. wrapped version of it.</p>
  272. <h1 id="examples-1" class="section-header"><a href="#examples-1">Examples</a></h1>
  273. <pre class="rust rust-example-rendered">
  274. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>::<span class="kw-2">*</span>;
  275. <span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">err</span>::<span class="op">&lt;</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="number">1</span>);
  276. <span class="kw">let</span> <span class="ident">new_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>);
  277. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">new_future</span>.<span class="ident">wait</span>(), <span class="prelude-val">Err</span>(<span class="number">4</span>));</pre>
  278. <p>Calling <code>map_err</code> on a successful <code>Future</code> has no effect:</p>
  279. <pre class="rust rust-example-rendered">
  280. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>::<span class="kw-2">*</span>;
  281. <span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">ok</span>::<span class="op">&lt;</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="number">1</span>);
  282. <span class="kw">let</span> <span class="ident">new_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>);
  283. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">new_future</span>.<span class="ident">wait</span>(), <span class="prelude-val">Ok</span>(<span class="number">1</span>));</pre>
  284. </div><h3 id='method.from_err' class='method'><span id='from_err.v' class='invisible'><code>fn <a href='#method.from_err' class='fnname'>from_err</a>&lt;E:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;&gt;(self) -&gt; <a class="struct" href="../../futures/future/struct.FromErr.html" title="struct futures::future::FromErr">FromErr</a>&lt;Self, E&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Map this future's error to any error implementing <code>From</code> for
  285. this future's <code>Error</code>, returning a new future.</p>
  286. <p>This function does for futures what <code>try!</code> does for <code>Result</code>,
  287. by letting the compiler infer the type of the resulting error.
  288. Just as <code>map_err</code> above, this is useful for example to ensure
  289. that futures have the same error type when used with
  290. combinators like <code>select</code> and <code>join</code>.</p>
  291. <p>Note that this function consumes the receiving future and returns a
  292. wrapped version of it.</p>
  293. <h1 id="examples-2" class="section-header"><a href="#examples-2">Examples</a></h1>
  294. <pre class="rust rust-example-rendered">
  295. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  296. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  297. <span class="kw">let</span> <span class="ident">future_with_err_u8</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">err</span>::<span class="op">&lt;</span>(), <span class="ident">u8</span><span class="op">&gt;</span>(<span class="number">1</span>);
  298. <span class="kw">let</span> <span class="ident">future_with_err_u32</span> <span class="op">=</span> <span class="ident">future_with_err_u8</span>.<span class="ident">from_err</span>::<span class="op">&lt;</span><span class="ident">u32</span><span class="op">&gt;</span>();</pre>
  299. </div><h3 id='method.then' class='method'><span id='then.v' class='invisible'><code>fn <a href='#method.then' class='fnname'>then</a>&lt;F, B&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.Then.html" title="struct futures::future::Then">Then</a>&lt;Self, B, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>(<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;) -&gt; B,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Chain on a computation for when a future finished, passing the result of
  300. the future to the provided closure <code>f</code>.</p>
  301. <p>This function can be used to ensure a computation runs regardless of
  302. the conclusion of the future. The closure provided will be yielded a
  303. <code>Result</code> once the future is complete.</p>
  304. <p>The returned value of the closure must implement the <code>IntoFuture</code> trait
  305. and can represent some more work to be done before the composed future
  306. is finished. Note that the <code>Result</code> type implements the <code>IntoFuture</code>
  307. trait so it is possible to simply alter the <code>Result</code> yielded to the
  308. closure and return it.</p>
  309. <p>If this future is dropped or panics then the closure <code>f</code> will not be
  310. run.</p>
  311. <p>Note that this function consumes the receiving future and returns a
  312. wrapped version of it.</p>
  313. <h1 id="examples-3" class="section-header"><a href="#examples-3">Examples</a></h1>
  314. <pre class="rust rust-example-rendered">
  315. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  316. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  317. <span class="kw">let</span> <span class="ident">future_of_1</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op">&lt;</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="number">1</span>);
  318. <span class="kw">let</span> <span class="ident">future_of_4</span> <span class="op">=</span> <span class="ident">future_of_1</span>.<span class="ident">then</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> {
  319. <span class="ident">x</span>.<span class="ident">map</span>(<span class="op">|</span><span class="ident">y</span><span class="op">|</span> <span class="ident">y</span> <span class="op">+</span> <span class="number">3</span>)
  320. });
  321. <span class="kw">let</span> <span class="ident">future_of_err_1</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">err</span>::<span class="op">&lt;</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="number">1</span>);
  322. <span class="kw">let</span> <span class="ident">future_of_4</span> <span class="op">=</span> <span class="ident">future_of_err_1</span>.<span class="ident">then</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> {
  323. <span class="kw">match</span> <span class="ident">x</span> {
  324. <span class="prelude-val">Ok</span>(_) <span class="op">=&gt;</span> <span class="macro">panic</span><span class="macro">!</span>(<span class="string">&quot;expected an error&quot;</span>),
  325. <span class="prelude-val">Err</span>(<span class="ident">y</span>) <span class="op">=&gt;</span> <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op">&lt;</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="ident">y</span> <span class="op">+</span> <span class="number">3</span>),
  326. }
  327. });</pre>
  328. </div><h3 id='method.and_then' class='method'><span id='and_then.v' class='invisible'><code>fn <a href='#method.and_then' class='fnname'>and_then</a>&lt;F, B&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.AndThen.html" title="struct futures::future::AndThen">AndThen</a>&lt;Self, B, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -&gt; B,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Execute another future after this one has resolved successfully.</p>
  329. <p>This function can be used to chain two futures together and ensure that
  330. the final future isn't resolved until both have finished. The closure
  331. provided is yielded the successful result of this future and returns
  332. another value which can be converted into a future.</p>
  333. <p>Note that because <code>Result</code> implements the <code>IntoFuture</code> trait this method
  334. can also be useful for chaining fallible and serial computations onto
  335. the end of one future.</p>
  336. <p>If this future is dropped, panics, or completes with an error then the
  337. provided closure <code>f</code> is never called.</p>
  338. <p>Note that this function consumes the receiving future and returns a
  339. wrapped version of it.</p>
  340. <h1 id="examples-4" class="section-header"><a href="#examples-4">Examples</a></h1>
  341. <pre class="rust rust-example-rendered">
  342. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  343. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>::{<span class="self">self</span>, <span class="ident">FutureResult</span>};
  344. <span class="kw">let</span> <span class="ident">future_of_1</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op">&lt;</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="number">1</span>);
  345. <span class="kw">let</span> <span class="ident">future_of_4</span> <span class="op">=</span> <span class="ident">future_of_1</span>.<span class="ident">and_then</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> {
  346. <span class="prelude-val">Ok</span>(<span class="ident">x</span> <span class="op">+</span> <span class="number">3</span>)
  347. });
  348. <span class="kw">let</span> <span class="ident">future_of_err_1</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">err</span>::<span class="op">&lt;</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="number">1</span>);
  349. <span class="ident">future_of_err_1</span>.<span class="ident">and_then</span>(<span class="op">|</span>_<span class="op">|</span> <span class="op">-&gt;</span> <span class="ident">FutureResult</span><span class="op">&lt;</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">&gt;</span> {
  350. <span class="macro">panic</span><span class="macro">!</span>(<span class="string">&quot;should not be called in case of an error&quot;</span>);
  351. });</pre>
  352. </div><h3 id='method.or_else' class='method'><span id='or_else.v' class='invisible'><code>fn <a href='#method.or_else' class='fnname'>or_else</a>&lt;F, B&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.OrElse.html" title="struct futures::future::OrElse">OrElse</a>&lt;Self, B, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -&gt; B,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Execute another future if this one resolves with an error.</p>
  353. <p>Return a future that passes along this future's value if it succeeds,
  354. and otherwise passes the error to the closure <code>f</code> and waits for the
  355. future it returns. The closure may also simply return a value that can
  356. be converted into a future.</p>
  357. <p>Note that because <code>Result</code> implements the <code>IntoFuture</code> trait this method
  358. can also be useful for chaining together fallback computations, where
  359. when one fails, the next is attempted.</p>
  360. <p>If this future is dropped, panics, or completes successfully then the
  361. provided closure <code>f</code> is never called.</p>
  362. <p>Note that this function consumes the receiving future and returns a
  363. wrapped version of it.</p>
  364. <h1 id="examples-5" class="section-header"><a href="#examples-5">Examples</a></h1>
  365. <pre class="rust rust-example-rendered">
  366. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  367. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>::{<span class="self">self</span>, <span class="ident">FutureResult</span>};
  368. <span class="kw">let</span> <span class="ident">future_of_err_1</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">err</span>::<span class="op">&lt;</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="number">1</span>);
  369. <span class="kw">let</span> <span class="ident">future_of_4</span> <span class="op">=</span> <span class="ident">future_of_err_1</span>.<span class="ident">or_else</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> <span class="op">-&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">&gt;</span> {
  370. <span class="prelude-val">Ok</span>(<span class="ident">x</span> <span class="op">+</span> <span class="number">3</span>)
  371. });
  372. <span class="kw">let</span> <span class="ident">future_of_1</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op">&lt;</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="number">1</span>);
  373. <span class="ident">future_of_1</span>.<span class="ident">or_else</span>(<span class="op">|</span>_<span class="op">|</span> <span class="op">-&gt;</span> <span class="ident">FutureResult</span><span class="op">&lt;</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">&gt;</span> {
  374. <span class="macro">panic</span><span class="macro">!</span>(<span class="string">&quot;should not be called in case of success&quot;</span>);
  375. });</pre>
  376. </div><h3 id='method.select' class='method'><span id='select.v' class='invisible'><code>fn <a href='#method.select' class='fnname'>select</a>&lt;B&gt;(self, other: B) -&gt; <a class="struct" href="../../futures/future/struct.Select.html" title="struct futures::future::Select">Select</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Waits for either one of two futures to complete.</p>
  377. <p>This function will return a new future which awaits for either this or
  378. the <code>other</code> future to complete. The returned future will finish with
  379. both the value resolved and a future representing the completion of the
  380. other work. Both futures must have the same item and error type.</p>
  381. <p>Note that this function consumes the receiving futures and returns a
  382. wrapped version of them.</p>
  383. <h1 id="examples-6" class="section-header"><a href="#examples-6">Examples</a></h1>
  384. <pre class="rust rust-example-rendered">
  385. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  386. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  387. <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">thread</span>;
  388. <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">time</span>;
  389. <span class="kw">let</span> <span class="ident">future1</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">lazy</span>(<span class="op">||</span> {
  390. <span class="ident">thread</span>::<span class="ident">sleep</span>(<span class="ident">time</span>::<span class="ident">Duration</span>::<span class="ident">from_secs</span>(<span class="number">5</span>));
  391. <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op">&lt;</span><span class="ident">char</span>, ()<span class="op">&gt;</span>(<span class="string">&#39;a&#39;</span>)
  392. });
  393. <span class="kw">let</span> <span class="ident">future2</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">lazy</span>(<span class="op">||</span> {
  394. <span class="ident">thread</span>::<span class="ident">sleep</span>(<span class="ident">time</span>::<span class="ident">Duration</span>::<span class="ident">from_secs</span>(<span class="number">3</span>));
  395. <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op">&lt;</span><span class="ident">char</span>, ()<span class="op">&gt;</span>(<span class="string">&#39;b&#39;</span>)
  396. });
  397. <span class="kw">let</span> (<span class="ident">value</span>, <span class="ident">last_future</span>) <span class="op">=</span> <span class="ident">future1</span>.<span class="ident">select</span>(<span class="ident">future2</span>).<span class="ident">wait</span>().<span class="ident">ok</span>().<span class="ident">unwrap</span>();
  398. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">value</span>, <span class="string">&#39;a&#39;</span>);
  399. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">last_future</span>.<span class="ident">wait</span>().<span class="ident">unwrap</span>(), <span class="string">&#39;b&#39;</span>);</pre>
  400. <p>A poor-man's <code>join</code> implemented on top of <code>select</code>:</p>
  401. <pre class="rust rust-example-rendered">
  402. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  403. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  404. <span class="kw">fn</span> <span class="ident">join</span><span class="op">&lt;</span><span class="ident">A</span><span class="op">&gt;</span>(<span class="ident">a</span>: <span class="ident">A</span>, <span class="ident">b</span>: <span class="ident">A</span>) <span class="op">-&gt;</span> <span class="ident">Box</span><span class="op">&lt;</span><span class="ident">Future</span><span class="op">&lt;</span><span class="ident">Item</span><span class="op">=</span>(<span class="ident">u32</span>, <span class="ident">u32</span>), <span class="ident">Error</span><span class="op">=</span><span class="ident">u32</span><span class="op">&gt;&gt;</span>
  405. <span class="kw">where</span> <span class="ident">A</span>: <span class="ident">Future</span><span class="op">&lt;</span><span class="ident">Item</span> <span class="op">=</span> <span class="ident">u32</span>, <span class="ident">Error</span> <span class="op">=</span> <span class="ident">u32</span><span class="op">&gt;</span> <span class="op">+</span> <span class="lifetime">&#39;static</span>,
  406. {
  407. <span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">a</span>.<span class="ident">select</span>(<span class="ident">b</span>).<span class="ident">then</span>(<span class="op">|</span><span class="ident">res</span><span class="op">|</span> <span class="op">-&gt;</span> <span class="ident">Box</span><span class="op">&lt;</span><span class="ident">Future</span><span class="op">&lt;</span><span class="ident">Item</span><span class="op">=</span>_, <span class="ident">Error</span><span class="op">=</span>_<span class="op">&gt;&gt;</span> {
  408. <span class="kw">match</span> <span class="ident">res</span> {
  409. <span class="prelude-val">Ok</span>((<span class="ident">a</span>, <span class="ident">b</span>)) <span class="op">=&gt;</span> <span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">b</span>.<span class="ident">map</span>(<span class="kw">move</span> <span class="op">|</span><span class="ident">b</span><span class="op">|</span> (<span class="ident">a</span>, <span class="ident">b</span>))),
  410. <span class="prelude-val">Err</span>((<span class="ident">a</span>, _)) <span class="op">=&gt;</span> <span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">future</span>::<span class="ident">err</span>(<span class="ident">a</span>)),
  411. }
  412. }))
  413. }</pre>
  414. </div><h3 id='method.select2' class='method'><span id='select2.v' class='invisible'><code>fn <a href='#method.select2' class='fnname'>select2</a>&lt;B&gt;(self, other: B) -&gt; <a class="struct" href="../../futures/future/struct.Select2.html" title="struct futures::future::Select2">Select2</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Waits for either one of two differently-typed futures to complete.</p>
  415. <p>This function will return a new future which awaits for either this or
  416. the <code>other</code> future to complete. The returned future will finish with
  417. both the value resolved and a future representing the completion of the
  418. other work.</p>
  419. <p>Note that this function consumes the receiving futures and returns a
  420. wrapped version of them.</p>
  421. <p>Also note that if both this and the second future have the same
  422. success/error type you can use the <code>Either::split</code> method to
  423. conveniently extract out the value at the end.</p>
  424. <h1 id="examples-7" class="section-header"><a href="#examples-7">Examples</a></h1>
  425. <pre class="rust rust-example-rendered">
  426. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  427. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>::{<span class="self">self</span>, <span class="ident">Either</span>};
  428. <span class="comment">// A poor-man&#39;s join implemented on top of select2</span>
  429. <span class="kw">fn</span> <span class="ident">join</span><span class="op">&lt;</span><span class="ident">A</span>, <span class="ident">B</span>, <span class="ident">E</span><span class="op">&gt;</span>(<span class="ident">a</span>: <span class="ident">A</span>, <span class="ident">b</span>: <span class="ident">B</span>) <span class="op">-&gt;</span> <span class="ident">Box</span><span class="op">&lt;</span><span class="ident">Future</span><span class="op">&lt;</span><span class="ident">Item</span><span class="op">=</span>(<span class="ident">A</span>::<span class="ident">Item</span>, <span class="ident">B</span>::<span class="ident">Item</span>), <span class="ident">Error</span><span class="op">=</span><span class="ident">E</span><span class="op">&gt;&gt;</span>
  430. <span class="kw">where</span> <span class="ident">A</span>: <span class="ident">Future</span><span class="op">&lt;</span><span class="ident">Error</span> <span class="op">=</span> <span class="ident">E</span><span class="op">&gt;</span> <span class="op">+</span> <span class="lifetime">&#39;static</span>,
  431. <span class="ident">B</span>: <span class="ident">Future</span><span class="op">&lt;</span><span class="ident">Error</span> <span class="op">=</span> <span class="ident">E</span><span class="op">&gt;</span> <span class="op">+</span> <span class="lifetime">&#39;static</span>,
  432. <span class="ident">E</span>: <span class="lifetime">&#39;static</span>,
  433. {
  434. <span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">a</span>.<span class="ident">select2</span>(<span class="ident">b</span>).<span class="ident">then</span>(<span class="op">|</span><span class="ident">res</span><span class="op">|</span> <span class="op">-&gt;</span> <span class="ident">Box</span><span class="op">&lt;</span><span class="ident">Future</span><span class="op">&lt;</span><span class="ident">Item</span><span class="op">=</span>_, <span class="ident">Error</span><span class="op">=</span>_<span class="op">&gt;&gt;</span> {
  435. <span class="kw">match</span> <span class="ident">res</span> {
  436. <span class="prelude-val">Ok</span>(<span class="ident">Either</span>::<span class="ident">A</span>((<span class="ident">x</span>, <span class="ident">b</span>))) <span class="op">=&gt;</span> <span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">b</span>.<span class="ident">map</span>(<span class="kw">move</span> <span class="op">|</span><span class="ident">y</span><span class="op">|</span> (<span class="ident">x</span>, <span class="ident">y</span>))),
  437. <span class="prelude-val">Ok</span>(<span class="ident">Either</span>::<span class="ident">B</span>((<span class="ident">y</span>, <span class="ident">a</span>))) <span class="op">=&gt;</span> <span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">a</span>.<span class="ident">map</span>(<span class="kw">move</span> <span class="op">|</span><span class="ident">x</span><span class="op">|</span> (<span class="ident">x</span>, <span class="ident">y</span>))),
  438. <span class="prelude-val">Err</span>(<span class="ident">Either</span>::<span class="ident">A</span>((<span class="ident">e</span>, _))) <span class="op">=&gt;</span> <span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">future</span>::<span class="ident">err</span>(<span class="ident">e</span>)),
  439. <span class="prelude-val">Err</span>(<span class="ident">Either</span>::<span class="ident">B</span>((<span class="ident">e</span>, _))) <span class="op">=&gt;</span> <span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">future</span>::<span class="ident">err</span>(<span class="ident">e</span>)),
  440. }
  441. }))
  442. }</pre>
  443. </div><h3 id='method.join' class='method'><span id='join.v' class='invisible'><code>fn <a href='#method.join' class='fnname'>join</a>&lt;B&gt;(self, other: B) -&gt; <a class="struct" href="../../futures/future/struct.Join.html" title="struct futures::future::Join">Join</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Joins the result of two futures, waiting for them both to complete.</p>
  444. <p>This function will return a new future which awaits both this and the
  445. <code>other</code> future to complete. The returned future will finish with a tuple
  446. of both results.</p>
  447. <p>Both futures must have the same error type, and if either finishes with
  448. an error then the other will be dropped and that error will be
  449. returned.</p>
  450. <p>Note that this function consumes the receiving future and returns a
  451. wrapped version of it.</p>
  452. <h1 id="examples-8" class="section-header"><a href="#examples-8">Examples</a></h1>
  453. <pre class="rust rust-example-rendered">
  454. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  455. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  456. <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">&lt;</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="number">1</span>);
  457. <span class="kw">let</span> <span class="ident">b</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op">&lt;</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="number">2</span>);
  458. <span class="kw">let</span> <span class="ident">pair</span> <span class="op">=</span> <span class="ident">a</span>.<span class="ident">join</span>(<span class="ident">b</span>);
  459. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">pair</span>.<span class="ident">wait</span>(), <span class="prelude-val">Ok</span>((<span class="number">1</span>, <span class="number">2</span>)));</pre>
  460. <p>If one or both of the joined <code>Future</code>s is errored, the resulting
  461. <code>Future</code> will be errored:</p>
  462. <pre class="rust rust-example-rendered">
  463. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  464. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  465. <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">&lt;</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="number">1</span>);
  466. <span class="kw">let</span> <span class="ident">b</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">err</span>::<span class="op">&lt;</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="number">2</span>);
  467. <span class="kw">let</span> <span class="ident">pair</span> <span class="op">=</span> <span class="ident">a</span>.<span class="ident">join</span>(<span class="ident">b</span>);
  468. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">pair</span>.<span class="ident">wait</span>(), <span class="prelude-val">Err</span>(<span class="number">2</span>));</pre>
  469. </div><h3 id='method.join3' class='method'><span id='join3.v' class='invisible'><code>fn <a href='#method.join3' class='fnname'>join3</a>&lt;B, C&gt;(self, b: B, c: C) -&gt; <a class="struct" href="../../futures/future/struct.Join3.html" title="struct futures::future::Join3">Join3</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, C::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Same as <code>join</code>, but with more futures.</p>
  470. </div><h3 id='method.join4' class='method'><span id='join4.v' class='invisible'><code>fn <a href='#method.join4' class='fnname'>join4</a>&lt;B, C, D&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;b: B, <br>&nbsp;&nbsp;&nbsp;&nbsp;c: C, <br>&nbsp;&nbsp;&nbsp;&nbsp;d: D<br>) -&gt; <a class="struct" href="../../futures/future/struct.Join4.html" title="struct futures::future::Join4">Join4</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, C::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, D::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Same as <code>join</code>, but with more futures.</p>
  471. </div><h3 id='method.join5' class='method'><span id='join5.v' class='invisible'><code>fn <a href='#method.join5' class='fnname'>join5</a>&lt;B, C, D, E&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;b: B, <br>&nbsp;&nbsp;&nbsp;&nbsp;c: C, <br>&nbsp;&nbsp;&nbsp;&nbsp;d: D, <br>&nbsp;&nbsp;&nbsp;&nbsp;e: E<br>) -&gt; <a class="struct" href="../../futures/future/struct.Join5.html" title="struct futures::future::Join5">Join5</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, C::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, D::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, E::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;E: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Same as <code>join</code>, but with more futures.</p>
  472. </div><h3 id='method.into_stream' class='method'><span id='into_stream.v' class='invisible'><code>fn <a href='#method.into_stream' class='fnname'>into_stream</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.IntoStream.html" title="struct futures::future::IntoStream">IntoStream</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Convert this future into a single element stream.</p>
  473. <p>The returned stream contains single success if this future resolves to
  474. success or single error if this future resolves into error.</p>
  475. <h1 id="examples-9" class="section-header"><a href="#examples-9">Examples</a></h1>
  476. <pre class="rust rust-example-rendered">
  477. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  478. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  479. <span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op">&lt;</span>_, <span class="ident">bool</span><span class="op">&gt;</span>(<span class="number">17</span>);
  480. <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">stream</span> <span class="op">=</span> <span class="ident">future</span>.<span class="ident">into_stream</span>();
  481. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="prelude-val">Ok</span>(<span class="ident">Async</span>::<span class="ident">Ready</span>(<span class="prelude-val">Some</span>(<span class="number">17</span>))), <span class="ident">stream</span>.<span class="ident">poll</span>());
  482. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="prelude-val">Ok</span>(<span class="ident">Async</span>::<span class="ident">Ready</span>(<span class="prelude-val">None</span>)), <span class="ident">stream</span>.<span class="ident">poll</span>());
  483. <span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">err</span>::<span class="op">&lt;</span><span class="ident">bool</span>, _<span class="op">&gt;</span>(<span class="number">19</span>);
  484. <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">stream</span> <span class="op">=</span> <span class="ident">future</span>.<span class="ident">into_stream</span>();
  485. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="prelude-val">Err</span>(<span class="number">19</span>), <span class="ident">stream</span>.<span class="ident">poll</span>());
  486. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="prelude-val">Ok</span>(<span class="ident">Async</span>::<span class="ident">Ready</span>(<span class="prelude-val">None</span>)), <span class="ident">stream</span>.<span class="ident">poll</span>());</pre>
  487. </div><h3 id='method.flatten' class='method'><span id='flatten.v' class='invisible'><code>fn <a href='#method.flatten' class='fnname'>flatten</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.Flatten.html" title="struct futures::future::Flatten">Flatten</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a> as <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&gt;::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Flatten the execution of this future when the successful result of this
  488. future is itself another future.</p>
  489. <p>This can be useful when combining futures together to flatten the
  490. computation out the final result. This method can only be called
  491. when the successful result of this future itself implements the
  492. <code>IntoFuture</code> trait and the error can be created from this future's error
  493. type.</p>
  494. <p>This method is roughly equivalent to <code>self.and_then(|x| x)</code>.</p>
  495. <p>Note that this function consumes the receiving future and returns a
  496. wrapped version of it.</p>
  497. <h1 id="examples-10" class="section-header"><a href="#examples-10">Examples</a></h1>
  498. <pre class="rust rust-example-rendered">
  499. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  500. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  501. <span class="kw">let</span> <span class="ident">nested_future</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op">&lt;</span>_, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="ident">future</span>::<span class="ident">ok</span>::<span class="op">&lt;</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="number">1</span>));
  502. <span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">nested_future</span>.<span class="ident">flatten</span>();
  503. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">future</span>.<span class="ident">wait</span>(), <span class="prelude-val">Ok</span>(<span class="number">1</span>));</pre>
  504. <p>Calling <code>flatten</code> on an errored <code>Future</code>, or if the inner <code>Future</code> is
  505. errored, will result in an errored <code>Future</code>:</p>
  506. <pre class="rust rust-example-rendered">
  507. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  508. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  509. <span class="kw">let</span> <span class="ident">nested_future</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op">&lt;</span>_, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="ident">future</span>::<span class="ident">err</span>::<span class="op">&lt;</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="number">1</span>));
  510. <span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">nested_future</span>.<span class="ident">flatten</span>();
  511. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">future</span>.<span class="ident">wait</span>(), <span class="prelude-val">Err</span>(<span class="number">1</span>));</pre>
  512. </div><h3 id='method.flatten_stream' class='method'><span id='flatten_stream.v' class='invisible'><code>fn <a href='#method.flatten_stream' class='fnname'>flatten_stream</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.FlattenStream.html" title="struct futures::future::FlattenStream">FlattenStream</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Flatten the execution of this future when the successful result of this
  513. future is a stream.</p>
  514. <p>This can be useful when stream initialization is deferred, and it is
  515. convenient to work with that stream as if stream was available at the
  516. call site.</p>
  517. <p>Note that this function consumes this future and returns a wrapped
  518. version of it.</p>
  519. <h1 id="examples-11" class="section-header"><a href="#examples-11">Examples</a></h1>
  520. <pre class="rust rust-example-rendered">
  521. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  522. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  523. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">stream</span>;
  524. <span class="kw">let</span> <span class="ident">stream_items</span> <span class="op">=</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>];
  525. <span class="kw">let</span> <span class="ident">future_of_a_stream</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op">&lt;</span>_, <span class="ident">bool</span><span class="op">&gt;</span>(<span class="ident">stream</span>::<span class="ident">iter_ok</span>(<span class="ident">stream_items</span>));
  526. <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">flatten_stream</span>();
  527. <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">iter</span> <span class="op">=</span> <span class="ident">stream</span>.<span class="ident">wait</span>();
  528. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="prelude-val">Ok</span>(<span class="number">17</span>), <span class="ident">iter</span>.<span class="ident">next</span>().<span class="ident">unwrap</span>());
  529. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="prelude-val">Ok</span>(<span class="number">18</span>), <span class="ident">iter</span>.<span class="ident">next</span>().<span class="ident">unwrap</span>());
  530. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="prelude-val">Ok</span>(<span class="number">19</span>), <span class="ident">iter</span>.<span class="ident">next</span>().<span class="ident">unwrap</span>());
  531. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="prelude-val">None</span>, <span class="ident">iter</span>.<span class="ident">next</span>());</pre>
  532. </div><h3 id='method.fuse' class='method'><span id='fuse.v' class='invisible'><code>fn <a href='#method.fuse' class='fnname'>fuse</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.Fuse.html" title="struct futures::future::Fuse">Fuse</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Fuse a future such that <code>poll</code> will never again be called once it has
  533. completed.</p>
  534. <p>Currently once a future has returned <code>Ready</code> or <code>Err</code> from
  535. <code>poll</code> any further calls could exhibit bad behavior such as blocking
  536. forever, panicking, never returning, etc. If it is known that <code>poll</code>
  537. may be called too often then this method can be used to ensure that it
  538. has defined semantics.</p>
  539. <p>Once a future has been <code>fuse</code>d and it returns a completion from <code>poll</code>,
  540. then it will forever return <code>NotReady</code> from <code>poll</code> again (never
  541. resolve). This, unlike the trait's <code>poll</code> method, is guaranteed.</p>
  542. <p>This combinator will drop this future as soon as it's been completed to
  543. ensure resources are reclaimed as soon as possible.</p>
  544. <h1 id="examples-12" class="section-header"><a href="#examples-12">Examples</a></h1>
  545. <pre class="rust rust-example-rendered">
  546. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  547. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  548. <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op">&lt;</span><span class="ident">i32</span>, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="number">2</span>);
  549. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">future</span>.<span class="ident">poll</span>(), <span class="prelude-val">Ok</span>(<span class="ident">Async</span>::<span class="ident">Ready</span>(<span class="number">2</span>)));
  550. <span class="comment">// Normally, a call such as this would panic:</span>
  551. <span class="comment">//future.poll();</span>
  552. <span class="comment">// This, however, is guaranteed to not panic</span>
  553. <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op">&lt;</span><span class="ident">i32</span>, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="number">2</span>).<span class="ident">fuse</span>();
  554. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">future</span>.<span class="ident">poll</span>(), <span class="prelude-val">Ok</span>(<span class="ident">Async</span>::<span class="ident">Ready</span>(<span class="number">2</span>)));
  555. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">future</span>.<span class="ident">poll</span>(), <span class="prelude-val">Ok</span>(<span class="ident">Async</span>::<span class="ident">NotReady</span>));</pre>
  556. </div><h3 id='method.inspect' class='method'><span id='inspect.v' class='invisible'><code>fn <a href='#method.inspect' class='fnname'>inspect</a>&lt;F&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.Inspect.html" title="struct futures::future::Inspect">Inspect</a>&lt;Self, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>(&amp;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>),<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Do something with the item of a future, passing it on.</p>
  557. <p>When using futures, you'll often chain several of them together.
  558. While working on such code, you might want to check out what's happening at
  559. various parts in the pipeline. To do that, insert a call to inspect().</p>
  560. <h1 id="examples-13" class="section-header"><a href="#examples-13">Examples</a></h1>
  561. <pre class="rust rust-example-rendered">
  562. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  563. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  564. <span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op">&lt;</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="number">1</span>);
  565. <span class="kw">let</span> <span class="ident">new_future</span> <span class="op">=</span> <span class="ident">future</span>.<span class="ident">inspect</span>(<span class="op">|</span><span class="kw-2">&amp;</span><span class="ident">x</span><span class="op">|</span> <span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;about to resolve: {}&quot;</span>, <span class="ident">x</span>));
  566. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">new_future</span>.<span class="ident">wait</span>(), <span class="prelude-val">Ok</span>(<span class="number">1</span>));</pre>
  567. </div><h3 id='method.catch_unwind' class='method'><span id='catch_unwind.v' class='invisible'><code>fn <a href='#method.catch_unwind' class='fnname'>catch_unwind</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.CatchUnwind.html" title="struct futures::future::CatchUnwind">CatchUnwind</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Catches unwinding panics while polling the future.</p>
  568. <p>In general, panics within a future can propagate all the way out to the
  569. task level. This combinator makes it possible to halt unwinding within
  570. the future itself. It's most commonly used within task executors. It's
  571. not recommended to use this for error handling.</p>
  572. <p>Note that this method requires the <code>UnwindSafe</code> bound from the standard
  573. library. This isn't always applied automatically, and the standard
  574. library provides an <code>AssertUnwindSafe</code> wrapper type to apply it
  575. after-the fact. To assist using this method, the <code>Future</code> trait is also
  576. implemented for <code>AssertUnwindSafe&lt;F&gt;</code> where <code>F</code> implements <code>Future</code>.</p>
  577. <p>This method is only available when the <code>use_std</code> feature of this
  578. library is activated, and it is activated by default.</p>
  579. <h1 id="examples-14" class="section-header"><a href="#examples-14">Examples</a></h1>
  580. <pre class="rust rust-example-rendered">
  581. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  582. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>::{<span class="self">self</span>, <span class="ident">FutureResult</span>};
  583. <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op">&lt;</span><span class="ident">i32</span>, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="number">2</span>);
  584. <span class="macro">assert</span><span class="macro">!</span>(<span class="ident">future</span>.<span class="ident">catch_unwind</span>().<span class="ident">wait</span>().<span class="ident">is_ok</span>());
  585. <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">lazy</span>(<span class="op">||</span> <span class="op">-&gt;</span> <span class="ident">FutureResult</span><span class="op">&lt;</span><span class="ident">i32</span>, <span class="ident">u32</span><span class="op">&gt;</span> {
  586. <span class="macro">panic</span><span class="macro">!</span>();
  587. <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op">&lt;</span><span class="ident">i32</span>, <span class="ident">u32</span><span class="op">&gt;</span>(<span class="number">2</span>)
  588. });
  589. <span class="macro">assert</span><span class="macro">!</span>(<span class="ident">future</span>.<span class="ident">catch_unwind</span>().<span class="ident">wait</span>().<span class="ident">is_err</span>());</pre>
  590. </div><h3 id='method.shared' class='method'><span id='shared.v' class='invisible'><code>fn <a href='#method.shared' class='fnname'>shared</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.Shared.html" title="struct futures::future::Shared">Shared</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Create a cloneable handle to this future where all handles will resolve
  591. to the same result.</p>
  592. <p>The shared() method provides a method to convert any future into a
  593. cloneable future. It enables a future to be polled by multiple threads.</p>
  594. <p>The returned <code>Shared</code> future resolves successfully with
  595. <code>SharedItem&lt;Self::Item&gt;</code> or erroneously with <code>SharedError&lt;Self::Error&gt;</code>.
  596. Both <code>SharedItem</code> and <code>SharedError</code> implements <code>Deref</code> to allow shared
  597. access to the underlying result. Ownership of <code>Self::Item</code> and
  598. <code>Self::Error</code> cannot currently be reclaimed.</p>
  599. <p>This method is only available when the <code>use_std</code> feature of this
  600. library is activated, and it is activated by default.</p>
  601. <h1 id="examples-15" class="section-header"><a href="#examples-15">Examples</a></h1>
  602. <pre class="rust rust-example-rendered">
  603. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  604. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  605. <span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op">&lt;</span>_, <span class="ident">bool</span><span class="op">&gt;</span>(<span class="number">6</span>);
  606. <span class="kw">let</span> <span class="ident">shared1</span> <span class="op">=</span> <span class="ident">future</span>.<span class="ident">shared</span>();
  607. <span class="kw">let</span> <span class="ident">shared2</span> <span class="op">=</span> <span class="ident">shared1</span>.<span class="ident">clone</span>();
  608. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">6</span>, <span class="kw-2">*</span><span class="ident">shared1</span>.<span class="ident">wait</span>().<span class="ident">unwrap</span>());
  609. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">6</span>, <span class="kw-2">*</span><span class="ident">shared2</span>.<span class="ident">wait</span>().<span class="ident">unwrap</span>());</pre>
  610. <pre class="rust rust-example-rendered">
  611. <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">thread</span>;
  612. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  613. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  614. <span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op">&lt;</span>_, <span class="ident">bool</span><span class="op">&gt;</span>(<span class="number">6</span>);
  615. <span class="kw">let</span> <span class="ident">shared1</span> <span class="op">=</span> <span class="ident">future</span>.<span class="ident">shared</span>();
  616. <span class="kw">let</span> <span class="ident">shared2</span> <span class="op">=</span> <span class="ident">shared1</span>.<span class="ident">clone</span>();
  617. <span class="kw">let</span> <span class="ident">join_handle</span> <span class="op">=</span> <span class="ident">thread</span>::<span class="ident">spawn</span>(<span class="kw">move</span> <span class="op">||</span> {
  618. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">6</span>, <span class="kw-2">*</span><span class="ident">shared2</span>.<span class="ident">wait</span>().<span class="ident">unwrap</span>());
  619. });
  620. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">6</span>, <span class="kw-2">*</span><span class="ident">shared1</span>.<span class="ident">wait</span>().<span class="ident">unwrap</span>());
  621. <span class="ident">join_handle</span>.<span class="ident">join</span>().<span class="ident">unwrap</span>();</pre>
  622. </div></div>
  623. <h2 id='foreign-impls' class='small-section-header'>
  624. Implementations on Foreign Types<a href='#foreign-impls' class='anchor'></a>
  625. </h2>
  626. <h3 id='impl-Future' class='impl'><span class='in-band'><code>impl&lt;F, T, E&gt; <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a> for <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&lt;Item = T, Error = E&gt;,&nbsp;</span></code><a href='#impl-Future' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/option.rs.html#5-15' title='goto source code'>[src]</a></span></h3>
  627. <span class='docblock autohide'><div class='impl-items'><h4 id='associatedtype.Item-1' class="type"><span id='Item.t-1' class='invisible'><code>type <a href='#associatedtype.Item' class="type">Item</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;T&gt;</code></span></h4>
  628. <h4 id='associatedtype.Error-1' class="type"><span id='Error.t-1' class='invisible'><code>type <a href='#associatedtype.Error' class="type">Error</a> = E</code></span></h4>
  629. <h4 id='method.poll' class="method"><span id='poll.v-1' class='invisible'><code>fn <a href='#method.poll' class='fnname'>poll</a>(&amp;mut self) -&gt; <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;T&gt;, E&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/option.rs.html#9-14' title='goto source code'>[src]</a></span></h4>
  630. <h4 id='method.wait-1' class="method"><span id='wait.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.wait' class='fnname'>wait</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></span></h4>
  631. <h4 id='method.map-1' class="method"><span id='map.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.map' class='fnname'>map</a>&lt;F, U&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.Map.html" title="struct futures::future::Map">Map</a>&lt;Self, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -&gt; U,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></span></h4>
  632. <h4 id='method.map_err-1' class="method"><span id='map_err.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.map_err' class='fnname'>map_err</a>&lt;F, E&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.MapErr.html" title="struct futures::future::MapErr">MapErr</a>&lt;Self, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -&gt; E,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#410-415' title='goto source code'>[src]</a></span></h4>
  633. <h4 id='method.from_err-1' class="method"><span id='from_err.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.from_err' class='fnname'>from_err</a>&lt;E:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;&gt;(self) -&gt; <a class="struct" href="../../futures/future/struct.FromErr.html" title="struct futures::future::FromErr">FromErr</a>&lt;Self, E&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#440-444' title='goto source code'>[src]</a></span></h4>
  634. <h4 id='method.then-1' class="method"><span id='then.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.then' class='fnname'>then</a>&lt;F, B&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.Then.html" title="struct futures::future::Then">Then</a>&lt;Self, B, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>(<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;) -&gt; B,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#484-490' title='goto source code'>[src]</a></span></h4>
  635. <h4 id='method.and_then-1' class="method"><span id='and_then.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.and_then' class='fnname'>and_then</a>&lt;F, B&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.AndThen.html" title="struct futures::future::AndThen">AndThen</a>&lt;Self, B, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -&gt; B,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#525-531' title='goto source code'>[src]</a></span></h4>
  636. <h4 id='method.or_else-1' class="method"><span id='or_else.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.or_else' class='fnname'>or_else</a>&lt;F, B&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.OrElse.html" title="struct futures::future::OrElse">OrElse</a>&lt;Self, B, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -&gt; B,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#566-572' title='goto source code'>[src]</a></span></h4>
  637. <h4 id='method.select-1' class="method"><span id='select.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.select' class='fnname'>select</a>&lt;B&gt;(self, other: B) -&gt; <a class="struct" href="../../futures/future/struct.Select.html" title="struct futures::future::Select">Select</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#624-631' title='goto source code'>[src]</a></span></h4>
  638. <h4 id='method.select2-1' class="method"><span id='select2.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.select2' class='fnname'>select2</a>&lt;B&gt;(self, other: B) -&gt; <a class="struct" href="../../futures/future/struct.Select2.html" title="struct futures::future::Select2">Select2</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#670-674' title='goto source code'>[src]</a></span></h4>
  639. <h4 id='method.join-1' class="method"><span id='join.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join' class='fnname'>join</a>&lt;B&gt;(self, other: B) -&gt; <a class="struct" href="../../futures/future/struct.Join.html" title="struct futures::future::Join">Join</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#715-721' title='goto source code'>[src]</a></span></h4>
  640. <h4 id='method.join3-1' class="method"><span id='join3.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join3' class='fnname'>join3</a>&lt;B, C&gt;(self, b: B, c: C) -&gt; <a class="struct" href="../../futures/future/struct.Join3.html" title="struct futures::future::Join3">Join3</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, C::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#724-730' title='goto source code'>[src]</a></span></h4>
  641. <h4 id='method.join4-1' class="method"><span id='join4.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join4' class='fnname'>join4</a>&lt;B, C, D&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;b: B, <br>&nbsp;&nbsp;&nbsp;&nbsp;c: C, <br>&nbsp;&nbsp;&nbsp;&nbsp;d: D<br>) -&gt; <a class="struct" href="../../futures/future/struct.Join4.html" title="struct futures::future::Join4">Join4</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, C::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, D::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#733-741' title='goto source code'>[src]</a></span></h4>
  642. <h4 id='method.join5-1' class="method"><span id='join5.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join5' class='fnname'>join5</a>&lt;B, C, D, E&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;b: B, <br>&nbsp;&nbsp;&nbsp;&nbsp;c: C, <br>&nbsp;&nbsp;&nbsp;&nbsp;d: D, <br>&nbsp;&nbsp;&nbsp;&nbsp;e: E<br>) -&gt; <a class="struct" href="../../futures/future/struct.Join5.html" title="struct futures::future::Join5">Join5</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, C::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, D::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, E::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;E: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#744-754' title='goto source code'>[src]</a></span></h4>
  643. <h4 id='method.into_stream-1' class="method"><span id='into_stream.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.into_stream' class='fnname'>into_stream</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.IntoStream.html" title="struct futures::future::IntoStream">IntoStream</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#777-781' title='goto source code'>[src]</a></span></h4>
  644. <h4 id='method.flatten-1' class="method"><span id='flatten.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.flatten' class='fnname'>flatten</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.Flatten.html" title="struct futures::future::Flatten">Flatten</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a> as <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&gt;::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#819-829' title='goto source code'>[src]</a></span></h4>
  645. <h4 id='method.flatten_stream-1' class="method"><span id='flatten_stream.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.flatten_stream' class='fnname'>flatten_stream</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.FlattenStream.html" title="struct futures::future::FlattenStream">FlattenStream</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#859-864' title='goto source code'>[src]</a></span></h4>
  646. <h4 id='method.fuse-1' class="method"><span id='fuse.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.fuse' class='fnname'>fuse</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.Fuse.html" title="struct futures::future::Fuse">Fuse</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#899-904' title='goto source code'>[src]</a></span></h4>
  647. <h4 id='method.inspect-1' class="method"><span id='inspect.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.inspect' class='fnname'>inspect</a>&lt;F&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.Inspect.html" title="struct futures::future::Inspect">Inspect</a>&lt;Self, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>(&amp;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>),<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#922-927' title='goto source code'>[src]</a></span></h4>
  648. <h4 id='method.catch_unwind-1' class="method"><span id='catch_unwind.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.catch_unwind' class='fnname'>catch_unwind</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.CatchUnwind.html" title="struct futures::future::CatchUnwind">CatchUnwind</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#961-965' title='goto source code'>[src]</a></span></h4>
  649. <h4 id='method.shared-1' class="method"><span id='shared.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.shared' class='fnname'>shared</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.Shared.html" title="struct futures::future::Shared">Shared</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#1010-1014' title='goto source code'>[src]</a></span></h4>
  650. </div></span><h3 id='impl-Future-1' class='impl'><span class='in-band'><code>impl&lt;F:&nbsp;<a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&gt; <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/std/panic/struct.AssertUnwindSafe.html" title="struct std::panic::AssertUnwindSafe">AssertUnwindSafe</a>&lt;F&gt;</code><a href='#impl-Future-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/catch_unwind.rs.html#44-51' title='goto source code'>[src]</a></span></h3>
  651. <span class='docblock autohide'><div class='impl-items'><h4 id='associatedtype.Item-2' class="type"><span id='Item.t-2' class='invisible'><code>type <a href='#associatedtype.Item' class="type">Item</a> = F::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a></code></span></h4>
  652. <h4 id='associatedtype.Error-2' class="type"><span id='Error.t-2' class='invisible'><code>type <a href='#associatedtype.Error' class="type">Error</a> = F::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a></code></span></h4>
  653. <h4 id='method.poll-1' class="method"><span id='poll.v-2' class='invisible'><code>fn <a href='#method.poll' class='fnname'>poll</a>(&amp;mut self) -&gt; <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a>&lt;F::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, F::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/catch_unwind.rs.html#48-50' title='goto source code'>[src]</a></span></h4>
  654. <h4 id='method.wait-2' class="method"><span id='wait.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.wait' class='fnname'>wait</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></span></h4>
  655. <h4 id='method.map-2' class="method"><span id='map.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.map' class='fnname'>map</a>&lt;F, U&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.Map.html" title="struct futures::future::Map">Map</a>&lt;Self, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -&gt; U,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></span></h4>
  656. <h4 id='method.map_err-2' class="method"><span id='map_err.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.map_err' class='fnname'>map_err</a>&lt;F, E&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.MapErr.html" title="struct futures::future::MapErr">MapErr</a>&lt;Self, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -&gt; E,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#410-415' title='goto source code'>[src]</a></span></h4>
  657. <h4 id='method.from_err-2' class="method"><span id='from_err.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.from_err' class='fnname'>from_err</a>&lt;E:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;&gt;(self) -&gt; <a class="struct" href="../../futures/future/struct.FromErr.html" title="struct futures::future::FromErr">FromErr</a>&lt;Self, E&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#440-444' title='goto source code'>[src]</a></span></h4>
  658. <h4 id='method.then-2' class="method"><span id='then.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.then' class='fnname'>then</a>&lt;F, B&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.Then.html" title="struct futures::future::Then">Then</a>&lt;Self, B, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>(<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;) -&gt; B,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#484-490' title='goto source code'>[src]</a></span></h4>
  659. <h4 id='method.and_then-2' class="method"><span id='and_then.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.and_then' class='fnname'>and_then</a>&lt;F, B&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.AndThen.html" title="struct futures::future::AndThen">AndThen</a>&lt;Self, B, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -&gt; B,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#525-531' title='goto source code'>[src]</a></span></h4>
  660. <h4 id='method.or_else-2' class="method"><span id='or_else.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.or_else' class='fnname'>or_else</a>&lt;F, B&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.OrElse.html" title="struct futures::future::OrElse">OrElse</a>&lt;Self, B, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -&gt; B,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#566-572' title='goto source code'>[src]</a></span></h4>
  661. <h4 id='method.select-2' class="method"><span id='select.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.select' class='fnname'>select</a>&lt;B&gt;(self, other: B) -&gt; <a class="struct" href="../../futures/future/struct.Select.html" title="struct futures::future::Select">Select</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#624-631' title='goto source code'>[src]</a></span></h4>
  662. <h4 id='method.select2-2' class="method"><span id='select2.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.select2' class='fnname'>select2</a>&lt;B&gt;(self, other: B) -&gt; <a class="struct" href="../../futures/future/struct.Select2.html" title="struct futures::future::Select2">Select2</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#670-674' title='goto source code'>[src]</a></span></h4>
  663. <h4 id='method.join-2' class="method"><span id='join.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join' class='fnname'>join</a>&lt;B&gt;(self, other: B) -&gt; <a class="struct" href="../../futures/future/struct.Join.html" title="struct futures::future::Join">Join</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#715-721' title='goto source code'>[src]</a></span></h4>
  664. <h4 id='method.join3-2' class="method"><span id='join3.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join3' class='fnname'>join3</a>&lt;B, C&gt;(self, b: B, c: C) -&gt; <a class="struct" href="../../futures/future/struct.Join3.html" title="struct futures::future::Join3">Join3</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, C::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#724-730' title='goto source code'>[src]</a></span></h4>
  665. <h4 id='method.join4-2' class="method"><span id='join4.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join4' class='fnname'>join4</a>&lt;B, C, D&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;b: B, <br>&nbsp;&nbsp;&nbsp;&nbsp;c: C, <br>&nbsp;&nbsp;&nbsp;&nbsp;d: D<br>) -&gt; <a class="struct" href="../../futures/future/struct.Join4.html" title="struct futures::future::Join4">Join4</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, C::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, D::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#733-741' title='goto source code'>[src]</a></span></h4>
  666. <h4 id='method.join5-2' class="method"><span id='join5.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join5' class='fnname'>join5</a>&lt;B, C, D, E&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;b: B, <br>&nbsp;&nbsp;&nbsp;&nbsp;c: C, <br>&nbsp;&nbsp;&nbsp;&nbsp;d: D, <br>&nbsp;&nbsp;&nbsp;&nbsp;e: E<br>) -&gt; <a class="struct" href="../../futures/future/struct.Join5.html" title="struct futures::future::Join5">Join5</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, C::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, D::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, E::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;E: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#744-754' title='goto source code'>[src]</a></span></h4>
  667. <h4 id='method.into_stream-2' class="method"><span id='into_stream.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.into_stream' class='fnname'>into_stream</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.IntoStream.html" title="struct futures::future::IntoStream">IntoStream</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#777-781' title='goto source code'>[src]</a></span></h4>
  668. <h4 id='method.flatten-2' class="method"><span id='flatten.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.flatten' class='fnname'>flatten</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.Flatten.html" title="struct futures::future::Flatten">Flatten</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a> as <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&gt;::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#819-829' title='goto source code'>[src]</a></span></h4>
  669. <h4 id='method.flatten_stream-2' class="method"><span id='flatten_stream.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.flatten_stream' class='fnname'>flatten_stream</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.FlattenStream.html" title="struct futures::future::FlattenStream">FlattenStream</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#859-864' title='goto source code'>[src]</a></span></h4>
  670. <h4 id='method.fuse-2' class="method"><span id='fuse.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.fuse' class='fnname'>fuse</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.Fuse.html" title="struct futures::future::Fuse">Fuse</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#899-904' title='goto source code'>[src]</a></span></h4>
  671. <h4 id='method.inspect-2' class="method"><span id='inspect.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.inspect' class='fnname'>inspect</a>&lt;F&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.Inspect.html" title="struct futures::future::Inspect">Inspect</a>&lt;Self, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>(&amp;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>),<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#922-927' title='goto source code'>[src]</a></span></h4>
  672. <h4 id='method.catch_unwind-2' class="method"><span id='catch_unwind.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.catch_unwind' class='fnname'>catch_unwind</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.CatchUnwind.html" title="struct futures::future::CatchUnwind">CatchUnwind</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#961-965' title='goto source code'>[src]</a></span></h4>
  673. <h4 id='method.shared-2' class="method"><span id='shared.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.shared' class='fnname'>shared</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.Shared.html" title="struct futures::future::Shared">Shared</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#1010-1014' title='goto source code'>[src]</a></span></h4>
  674. </div></span><h3 id='impl-Future-2' class='impl'><span class='in-band'><code>impl&lt;F:&nbsp;?<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/future/trait.Future.html" title="trait futures::future::Future">Future</a>&gt; <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;F&gt;</code><a href='#impl-Future-2' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#108-115' title='goto source code'>[src]</a></span></h3>
  675. <span class='docblock autohide'><div class='impl-items'><h4 id='associatedtype.Item-3' class="type"><span id='Item.t-3' class='invisible'><code>type <a href='#associatedtype.Item' class="type">Item</a> = F::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a></code></span></h4>
  676. <h4 id='associatedtype.Error-3' class="type"><span id='Error.t-3' class='invisible'><code>type <a href='#associatedtype.Error' class="type">Error</a> = F::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a></code></span></h4>
  677. <h4 id='method.poll-2' class="method"><span id='poll.v-3' class='invisible'><code>fn <a href='#method.poll' class='fnname'>poll</a>(&amp;mut self) -&gt; <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#112-114' title='goto source code'>[src]</a></span></h4>
  678. <h4 id='method.wait-3' class="method"><span id='wait.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.wait' class='fnname'>wait</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></span></h4>
  679. <h4 id='method.map-3' class="method"><span id='map.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.map' class='fnname'>map</a>&lt;F, U&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.Map.html" title="struct futures::future::Map">Map</a>&lt;Self, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -&gt; U,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></span></h4>
  680. <h4 id='method.map_err-3' class="method"><span id='map_err.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.map_err' class='fnname'>map_err</a>&lt;F, E&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.MapErr.html" title="struct futures::future::MapErr">MapErr</a>&lt;Self, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -&gt; E,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#410-415' title='goto source code'>[src]</a></span></h4>
  681. <h4 id='method.from_err-3' class="method"><span id='from_err.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.from_err' class='fnname'>from_err</a>&lt;E:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;&gt;(self) -&gt; <a class="struct" href="../../futures/future/struct.FromErr.html" title="struct futures::future::FromErr">FromErr</a>&lt;Self, E&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#440-444' title='goto source code'>[src]</a></span></h4>
  682. <h4 id='method.then-3' class="method"><span id='then.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.then' class='fnname'>then</a>&lt;F, B&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.Then.html" title="struct futures::future::Then">Then</a>&lt;Self, B, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>(<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;) -&gt; B,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#484-490' title='goto source code'>[src]</a></span></h4>
  683. <h4 id='method.and_then-3' class="method"><span id='and_then.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.and_then' class='fnname'>and_then</a>&lt;F, B&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.AndThen.html" title="struct futures::future::AndThen">AndThen</a>&lt;Self, B, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -&gt; B,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#525-531' title='goto source code'>[src]</a></span></h4>
  684. <h4 id='method.or_else-3' class="method"><span id='or_else.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.or_else' class='fnname'>or_else</a>&lt;F, B&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.OrElse.html" title="struct futures::future::OrElse">OrElse</a>&lt;Self, B, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -&gt; B,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#566-572' title='goto source code'>[src]</a></span></h4>
  685. <h4 id='method.select-3' class="method"><span id='select.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.select' class='fnname'>select</a>&lt;B&gt;(self, other: B) -&gt; <a class="struct" href="../../futures/future/struct.Select.html" title="struct futures::future::Select">Select</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#624-631' title='goto source code'>[src]</a></span></h4>
  686. <h4 id='method.select2-3' class="method"><span id='select2.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.select2' class='fnname'>select2</a>&lt;B&gt;(self, other: B) -&gt; <a class="struct" href="../../futures/future/struct.Select2.html" title="struct futures::future::Select2">Select2</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#670-674' title='goto source code'>[src]</a></span></h4>
  687. <h4 id='method.join-3' class="method"><span id='join.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join' class='fnname'>join</a>&lt;B&gt;(self, other: B) -&gt; <a class="struct" href="../../futures/future/struct.Join.html" title="struct futures::future::Join">Join</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#715-721' title='goto source code'>[src]</a></span></h4>
  688. <h4 id='method.join3-3' class="method"><span id='join3.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join3' class='fnname'>join3</a>&lt;B, C&gt;(self, b: B, c: C) -&gt; <a class="struct" href="../../futures/future/struct.Join3.html" title="struct futures::future::Join3">Join3</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, C::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#724-730' title='goto source code'>[src]</a></span></h4>
  689. <h4 id='method.join4-3' class="method"><span id='join4.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join4' class='fnname'>join4</a>&lt;B, C, D&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;b: B, <br>&nbsp;&nbsp;&nbsp;&nbsp;c: C, <br>&nbsp;&nbsp;&nbsp;&nbsp;d: D<br>) -&gt; <a class="struct" href="../../futures/future/struct.Join4.html" title="struct futures::future::Join4">Join4</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, C::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, D::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#733-741' title='goto source code'>[src]</a></span></h4>
  690. <h4 id='method.join5-3' class="method"><span id='join5.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join5' class='fnname'>join5</a>&lt;B, C, D, E&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;b: B, <br>&nbsp;&nbsp;&nbsp;&nbsp;c: C, <br>&nbsp;&nbsp;&nbsp;&nbsp;d: D, <br>&nbsp;&nbsp;&nbsp;&nbsp;e: E<br>) -&gt; <a class="struct" href="../../futures/future/struct.Join5.html" title="struct futures::future::Join5">Join5</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, C::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, D::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, E::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;E: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#744-754' title='goto source code'>[src]</a></span></h4>
  691. <h4 id='method.into_stream-3' class="method"><span id='into_stream.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.into_stream' class='fnname'>into_stream</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.IntoStream.html" title="struct futures::future::IntoStream">IntoStream</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#777-781' title='goto source code'>[src]</a></span></h4>
  692. <h4 id='method.flatten-3' class="method"><span id='flatten.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.flatten' class='fnname'>flatten</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.Flatten.html" title="struct futures::future::Flatten">Flatten</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a> as <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&gt;::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#819-829' title='goto source code'>[src]</a></span></h4>
  693. <h4 id='method.flatten_stream-3' class="method"><span id='flatten_stream.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.flatten_stream' class='fnname'>flatten_stream</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.FlattenStream.html" title="struct futures::future::FlattenStream">FlattenStream</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#859-864' title='goto source code'>[src]</a></span></h4>
  694. <h4 id='method.fuse-3' class="method"><span id='fuse.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.fuse' class='fnname'>fuse</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.Fuse.html" title="struct futures::future::Fuse">Fuse</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#899-904' title='goto source code'>[src]</a></span></h4>
  695. <h4 id='method.inspect-3' class="method"><span id='inspect.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.inspect' class='fnname'>inspect</a>&lt;F&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.Inspect.html" title="struct futures::future::Inspect">Inspect</a>&lt;Self, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>(&amp;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>),<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#922-927' title='goto source code'>[src]</a></span></h4>
  696. <h4 id='method.catch_unwind-3' class="method"><span id='catch_unwind.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.catch_unwind' class='fnname'>catch_unwind</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.CatchUnwind.html" title="struct futures::future::CatchUnwind">CatchUnwind</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#961-965' title='goto source code'>[src]</a></span></h4>
  697. <h4 id='method.shared-3' class="method"><span id='shared.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.shared' class='fnname'>shared</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.Shared.html" title="struct futures::future::Shared">Shared</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#1010-1014' title='goto source code'>[src]</a></span></h4>
  698. </div></span><h3 id='impl-Future-3' class='impl'><span class='in-band'><code>impl&lt;'a, F:&nbsp;?<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/future/trait.Future.html" title="trait futures::future::Future">Future</a>&gt; <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>F</code><a href='#impl-Future-3' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#1017-1024' title='goto source code'>[src]</a></span></h3>
  699. <span class='docblock autohide'><div class='impl-items'><h4 id='associatedtype.Item-4' class="type"><span id='Item.t-4' class='invisible'><code>type <a href='#associatedtype.Item' class="type">Item</a> = F::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a></code></span></h4>
  700. <h4 id='associatedtype.Error-4' class="type"><span id='Error.t-4' class='invisible'><code>type <a href='#associatedtype.Error' class="type">Error</a> = F::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a></code></span></h4>
  701. <h4 id='method.poll-3' class="method"><span id='poll.v-4' class='invisible'><code>fn <a href='#method.poll' class='fnname'>poll</a>(&amp;mut self) -&gt; <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#1021-1023' title='goto source code'>[src]</a></span></h4>
  702. <h4 id='method.wait-4' class="method"><span id='wait.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.wait' class='fnname'>wait</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></span></h4>
  703. <h4 id='method.map-4' class="method"><span id='map.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.map' class='fnname'>map</a>&lt;F, U&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.Map.html" title="struct futures::future::Map">Map</a>&lt;Self, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -&gt; U,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></span></h4>
  704. <h4 id='method.map_err-4' class="method"><span id='map_err.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.map_err' class='fnname'>map_err</a>&lt;F, E&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.MapErr.html" title="struct futures::future::MapErr">MapErr</a>&lt;Self, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -&gt; E,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#410-415' title='goto source code'>[src]</a></span></h4>
  705. <h4 id='method.from_err-4' class="method"><span id='from_err.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.from_err' class='fnname'>from_err</a>&lt;E:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;&gt;(self) -&gt; <a class="struct" href="../../futures/future/struct.FromErr.html" title="struct futures::future::FromErr">FromErr</a>&lt;Self, E&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#440-444' title='goto source code'>[src]</a></span></h4>
  706. <h4 id='method.then-4' class="method"><span id='then.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.then' class='fnname'>then</a>&lt;F, B&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.Then.html" title="struct futures::future::Then">Then</a>&lt;Self, B, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>(<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;) -&gt; B,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#484-490' title='goto source code'>[src]</a></span></h4>
  707. <h4 id='method.and_then-4' class="method"><span id='and_then.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.and_then' class='fnname'>and_then</a>&lt;F, B&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.AndThen.html" title="struct futures::future::AndThen">AndThen</a>&lt;Self, B, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -&gt; B,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#525-531' title='goto source code'>[src]</a></span></h4>
  708. <h4 id='method.or_else-4' class="method"><span id='or_else.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.or_else' class='fnname'>or_else</a>&lt;F, B&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.OrElse.html" title="struct futures::future::OrElse">OrElse</a>&lt;Self, B, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -&gt; B,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#566-572' title='goto source code'>[src]</a></span></h4>
  709. <h4 id='method.select-4' class="method"><span id='select.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.select' class='fnname'>select</a>&lt;B&gt;(self, other: B) -&gt; <a class="struct" href="../../futures/future/struct.Select.html" title="struct futures::future::Select">Select</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#624-631' title='goto source code'>[src]</a></span></h4>
  710. <h4 id='method.select2-4' class="method"><span id='select2.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.select2' class='fnname'>select2</a>&lt;B&gt;(self, other: B) -&gt; <a class="struct" href="../../futures/future/struct.Select2.html" title="struct futures::future::Select2">Select2</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#670-674' title='goto source code'>[src]</a></span></h4>
  711. <h4 id='method.join-4' class="method"><span id='join.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join' class='fnname'>join</a>&lt;B&gt;(self, other: B) -&gt; <a class="struct" href="../../futures/future/struct.Join.html" title="struct futures::future::Join">Join</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#715-721' title='goto source code'>[src]</a></span></h4>
  712. <h4 id='method.join3-4' class="method"><span id='join3.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join3' class='fnname'>join3</a>&lt;B, C&gt;(self, b: B, c: C) -&gt; <a class="struct" href="../../futures/future/struct.Join3.html" title="struct futures::future::Join3">Join3</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, C::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#724-730' title='goto source code'>[src]</a></span></h4>
  713. <h4 id='method.join4-4' class="method"><span id='join4.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join4' class='fnname'>join4</a>&lt;B, C, D&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;b: B, <br>&nbsp;&nbsp;&nbsp;&nbsp;c: C, <br>&nbsp;&nbsp;&nbsp;&nbsp;d: D<br>) -&gt; <a class="struct" href="../../futures/future/struct.Join4.html" title="struct futures::future::Join4">Join4</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, C::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, D::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#733-741' title='goto source code'>[src]</a></span></h4>
  714. <h4 id='method.join5-4' class="method"><span id='join5.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join5' class='fnname'>join5</a>&lt;B, C, D, E&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;b: B, <br>&nbsp;&nbsp;&nbsp;&nbsp;c: C, <br>&nbsp;&nbsp;&nbsp;&nbsp;d: D, <br>&nbsp;&nbsp;&nbsp;&nbsp;e: E<br>) -&gt; <a class="struct" href="../../futures/future/struct.Join5.html" title="struct futures::future::Join5">Join5</a>&lt;Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, C::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, D::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>, E::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;E: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#744-754' title='goto source code'>[src]</a></span></h4>
  715. <h4 id='method.into_stream-4' class="method"><span id='into_stream.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.into_stream' class='fnname'>into_stream</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.IntoStream.html" title="struct futures::future::IntoStream">IntoStream</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#777-781' title='goto source code'>[src]</a></span></h4>
  716. <h4 id='method.flatten-4' class="method"><span id='flatten.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.flatten' class='fnname'>flatten</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.Flatten.html" title="struct futures::future::Flatten">Flatten</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a> as <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&gt;::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#819-829' title='goto source code'>[src]</a></span></h4>
  717. <h4 id='method.flatten_stream-4' class="method"><span id='flatten_stream.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.flatten_stream' class='fnname'>flatten_stream</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.FlattenStream.html" title="struct futures::future::FlattenStream">FlattenStream</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&lt;Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#859-864' title='goto source code'>[src]</a></span></h4>
  718. <h4 id='method.fuse-4' class="method"><span id='fuse.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.fuse' class='fnname'>fuse</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.Fuse.html" title="struct futures::future::Fuse">Fuse</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#899-904' title='goto source code'>[src]</a></span></h4>
  719. <h4 id='method.inspect-4' class="method"><span id='inspect.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.inspect' class='fnname'>inspect</a>&lt;F&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/future/struct.Inspect.html" title="struct futures::future::Inspect">Inspect</a>&lt;Self, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>(&amp;Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>),<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#922-927' title='goto source code'>[src]</a></span></h4>
  720. <h4 id='method.catch_unwind-4' class="method"><span id='catch_unwind.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.catch_unwind' class='fnname'>catch_unwind</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.CatchUnwind.html" title="struct futures::future::CatchUnwind">CatchUnwind</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#961-965' title='goto source code'>[src]</a></span></h4>
  721. <h4 id='method.shared-4' class="method"><span id='shared.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.shared' class='fnname'>shared</a>(self) -&gt; <a class="struct" href="../../futures/future/struct.Shared.html" title="struct futures::future::Shared">Shared</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#1010-1014' title='goto source code'>[src]</a></span></h4>
  722. </div></span>
  723. <h2 id='implementors' class='small-section-header'>
  724. Implementors<a href='#implementors' class='anchor'></a>
  725. </h2>
  726. <ul class='item-list' id='implementors-list'>
  727. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/empty.rs.html#24-31' title='goto source code'>[src]</a></div><code>impl&lt;T, E&gt; Future for <a class="struct" href="../../futures/future/struct.Empty.html" title="struct futures::future::Empty">Empty</a>&lt;T, E&gt;<span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = E;</span></code></li>
  728. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/lazy.rs.html#74-84' title='goto source code'>[src]</a></div><code>impl&lt;F, R&gt; Future for <a class="struct" href="../../futures/future/struct.Lazy.html" title="struct futures::future::Lazy">Lazy</a>&lt;F, R&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>() -&gt; R,<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = R::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Item" title="type futures::future::IntoFuture::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = R::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>;</span></code></li>
  729. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/poll_fn.rs.html#36-45' title='goto source code'>[src]</a></div><code>impl&lt;T, E, F&gt; Future for <a class="struct" href="../../futures/future/struct.PollFn.html" title="struct futures::future::PollFn">PollFn</a>&lt;F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>() -&gt; <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a>&lt;T, E&gt;,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = E;</span></code></li>
  730. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/result.rs.html#68-75' title='goto source code'>[src]</a></div><code>impl&lt;T, E&gt; Future for <a class="struct" href="../../futures/future/struct.FutureResult.html" title="struct futures::future::FutureResult">FutureResult</a>&lt;T, E&gt;<span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = E;</span></code></li>
  731. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/loop_fn.rs.html#84-99' title='goto source code'>[src]</a></div><code>impl&lt;S, T, A, F&gt; Future for <a class="struct" href="../../futures/future/struct.LoopFn.html" title="struct futures::future::LoopFn">LoopFn</a>&lt;A, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>(S) -&gt; A,<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = <a class="enum" href="../../futures/future/enum.Loop.html" title="enum futures::future::Loop">Loop</a>&lt;T, S&gt;&gt;,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = A::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>;</span></code></li>
  732. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/and_then.rs.html#23-38' title='goto source code'>[src]</a></div><code>impl&lt;A, B, F&gt; Future for <a class="struct" href="../../futures/future/struct.AndThen.html" title="struct futures::future::AndThen">AndThen</a>&lt;A, B, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;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>(A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -&gt; B,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Item" title="type futures::future::IntoFuture::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>;</span></code></li>
  733. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/flatten.rs.html#35-49' title='goto source code'>[src]</a></div><code>impl&lt;A&gt; Future for <a class="struct" href="../../futures/future/struct.Flatten.html" title="struct futures::future::Flatten">Flatten</a>&lt;A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;&lt;A as <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&gt;::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a> as <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&gt;::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;&lt;A as <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&gt;::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = &lt;&lt;A as <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&gt;::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a> as <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&gt;::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Item" title="type futures::future::IntoFuture::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = &lt;&lt;A as <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&gt;::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a> as <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&gt;::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>;</span></code></li>
  734. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/fuse.rs.html#34-49' title='goto source code'>[src]</a></div><code>impl&lt;A:&nbsp;<a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&gt; Future for <a class="struct" href="../../futures/future/struct.Fuse.html" title="struct futures::future::Fuse">Fuse</a>&lt;A&gt;<span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>;</span></code></li>
  735. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/join.rs.html#59-90' title='goto source code'>[src]</a></div><code>impl&lt;A, B&gt; Future for <a class="struct" href="../../futures/future/struct.Join.html" title="struct futures::future::Join">Join</a>&lt;A, B&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&lt;Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, B::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>;</span></code></li>
  736. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/join.rs.html#59-90' title='goto source code'>[src]</a></div><code>impl&lt;A, B, C&gt; Future for <a class="struct" href="../../futures/future/struct.Join3.html" title="struct futures::future::Join3">Join3</a>&lt;A, B, C&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&lt;Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;C: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&lt;Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, B::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, C::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>;</span></code></li>
  737. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/join.rs.html#59-90' title='goto source code'>[src]</a></div><code>impl&lt;A, B, C, D&gt; Future for <a class="struct" href="../../futures/future/struct.Join4.html" title="struct futures::future::Join4">Join4</a>&lt;A, B, C, D&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&lt;Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;C: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&lt;Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&lt;Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, B::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, C::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, D::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>;</span></code></li>
  738. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/join.rs.html#59-90' title='goto source code'>[src]</a></div><code>impl&lt;A, B, C, D, E&gt; Future for <a class="struct" href="../../futures/future/struct.Join5.html" title="struct futures::future::Join5">Join5</a>&lt;A, B, C, D, E&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&lt;Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;C: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&lt;Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&lt;Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;E: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&lt;Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, B::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, C::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, D::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, E::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>;</span></code></li>
  739. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/map.rs.html#22-38' title='goto source code'>[src]</a></div><code>impl&lt;U, A, F&gt; Future for <a class="struct" href="../../futures/future/struct.Map.html" title="struct futures::future::Map">Map</a>&lt;A, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;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>(A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -&gt; U,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = U;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>;</span></code></li>
  740. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/map_err.rs.html#22-36' title='goto source code'>[src]</a></div><code>impl&lt;U, A, F&gt; Future for <a class="struct" href="../../futures/future/struct.MapErr.html" title="struct futures::future::MapErr">MapErr</a>&lt;A, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;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>(A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -&gt; U,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = U;</span></code></li>
  741. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/from_err.rs.html#24-35' title='goto source code'>[src]</a></div><code>impl&lt;A:&nbsp;<a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>, E:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;&gt; Future for <a class="struct" href="../../futures/future/struct.FromErr.html" title="struct futures::future::FromErr">FromErr</a>&lt;A, E&gt;<span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = E;</span></code></li>
  742. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/or_else.rs.html#23-39' title='goto source code'>[src]</a></div><code>impl&lt;A, B, F&gt; Future for <a class="struct" href="../../futures/future/struct.OrElse.html" title="struct futures::future::OrElse">OrElse</a>&lt;A, B, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;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>(A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -&gt; B,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Item" title="type futures::future::IntoFuture::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>;</span></code></li>
  743. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/select.rs.html#38-71' title='goto source code'>[src]</a></div><code>impl&lt;A, B&gt; Future for <a class="struct" href="../../futures/future/struct.Select.html" title="struct futures::future::Select">Select</a>&lt;A, B&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&lt;Item = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, <a class="struct" href="../../futures/future/struct.SelectNext.html" title="struct futures::future::SelectNext">SelectNext</a>&lt;A, B&gt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>, <a class="struct" href="../../futures/future/struct.SelectNext.html" title="struct futures::future::SelectNext">SelectNext</a>&lt;A, B&gt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span></code></li>
  744. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/select.rs.html#73-86' title='goto source code'>[src]</a></div><code>impl&lt;A, B&gt; Future for <a class="struct" href="../../futures/future/struct.SelectNext.html" title="struct futures::future::SelectNext">SelectNext</a>&lt;A, B&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&lt;Item = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>;</span></code></li>
  745. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/select2.rs.html#20-39' title='goto source code'>[src]</a></div><code>impl&lt;A, B&gt; Future for <a class="struct" href="../../futures/future/struct.Select2.html" title="struct futures::future::Select2">Select2</a>&lt;A, B&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="enum" href="../../futures/future/enum.Either.html" title="enum futures::future::Either">Either</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</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/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, A<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="enum" href="../../futures/future/enum.Either.html" title="enum futures::future::Either">Either</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::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/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>, A<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;;</span></code></li>
  746. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/then.rs.html#23-36' title='goto source code'>[src]</a></div><code>impl&lt;A, B, F&gt; Future for <a class="struct" href="../../futures/future/struct.Then.html" title="struct futures::future::Then">Then</a>&lt;A, B, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;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>(<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;) -&gt; B,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Item" title="type futures::future::IntoFuture::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>;</span></code></li>
  747. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/either.rs.html#26-39' title='goto source code'>[src]</a></div><code>impl&lt;A, B&gt; Future for <a class="enum" href="../../futures/future/enum.Either.html" title="enum futures::future::Either">Either</a>&lt;A, B&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&lt;Item = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>;</span></code></li>
  748. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/inspect.rs.html#23-40' title='goto source code'>[src]</a></div><code>impl&lt;A, F&gt; Future for <a class="struct" href="../../futures/future/struct.Inspect.html" title="struct futures::future::Inspect">Inspect</a>&lt;A, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;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>(&amp;A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>),&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>;</span></code></li>
  749. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/catch_unwind.rs.html#24-42' title='goto source code'>[src]</a></div><code>impl&lt;F&gt; Future for <a class="struct" href="../../futures/future/struct.CatchUnwind.html" title="struct futures::future::CatchUnwind">CatchUnwind</a>&lt;F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;F::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, F::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;<a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>&gt;;</span></code></li>
  750. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/join_all.rs.html#86-136' title='goto source code'>[src]</a></div><code>impl&lt;I&gt; Future for <a class="struct" href="../../futures/future/struct.JoinAll.html" title="struct futures::future::JoinAll">JoinAll</a>&lt;I&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;I::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::IntoIterator::Item">Item</a>: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;&lt;I::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::IntoIterator::Item">Item</a> as <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&gt;::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Item" title="type futures::future::IntoFuture::Item">Item</a>&gt;;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = &lt;I::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::IntoIterator::Item">Item</a> as <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&gt;::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>;</span></code></li>
  751. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/select_all.rs.html#45-71' title='goto source code'>[src]</a></div><code>impl&lt;A&gt; Future for <a class="struct" href="../../futures/future/struct.SelectAll.html" title="struct futures::future::SelectAll">SelectAll</a>&lt;A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;A&gt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;A&gt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span></code></li>
  752. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/select_ok.rs.html#43-81' title='goto source code'>[src]</a></div><code>impl&lt;A&gt; Future for <a class="struct" href="../../futures/future/struct.SelectOk.html" title="struct futures::future::SelectOk">SelectOk</a>&lt;A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;A&gt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>;</span></code></li>
  753. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/shared.rs.html#123-206' title='goto source code'>[src]</a></div><code>impl&lt;F&gt; Future for <a class="struct" href="../../futures/future/struct.Shared.html" title="struct futures::future::Shared">Shared</a>&lt;F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../../futures/future/struct.SharedItem.html" title="struct futures::future::SharedItem">SharedItem</a>&lt;F::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>&gt;;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../../futures/future/struct.SharedError.html" title="struct futures::future::SharedError">SharedError</a>&lt;F::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>&gt;;</span></code></li>
  754. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/concat.rs.html#37-54' title='goto source code'>[src]</a></div><code>impl&lt;S&gt; Future for <a class="struct" href="../../futures/stream/struct.Concat2.html" title="struct futures::stream::Concat2">Concat2</a>&lt;S&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Item" title="type futures::stream::Stream::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html" title="trait core::iter::traits::Extend">Extend</a>&lt;&lt;&lt;S as <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&gt;::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Item" title="type futures::stream::Stream::Item">Item</a> as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a>&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::IntoIterator::Item">Item</a>&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Item" title="type futures::stream::Stream::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>;</span></code></li>
  755. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/concat.rs.html#89-106' title='goto source code'>[src]</a></div><code>impl&lt;S&gt; Future for <a class="struct" href="../../futures/stream/struct.Concat.html" title="struct futures::stream::Concat">Concat</a>&lt;S&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Item" title="type futures::stream::Stream::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html" title="trait core::iter::traits::Extend">Extend</a>&lt;&lt;&lt;S as <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&gt;::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Item" title="type futures::stream::Stream::Item">Item</a> as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a>&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::IntoIterator::Item">Item</a>&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Item" title="type futures::stream::Stream::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>;</span></code></li>
  756. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/fold.rs.html#42-81' title='goto source code'>[src]</a></div><code>impl&lt;S, F, Fut, T&gt; Future for <a class="struct" href="../../futures/stream/struct.Fold.html" title="struct futures::stream::Fold">Fold</a>&lt;S, F, Fut, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;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, S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Item" title="type futures::stream::Stream::Item">Item</a>) -&gt; Fut,<br>&nbsp;&nbsp;&nbsp;&nbsp;Fut: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = T&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Fut::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>&gt;,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>;</span></code></li>
  757. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/for_each.rs.html#28-51' title='goto source code'>[src]</a></div><code>impl&lt;S, F, U&gt; Future for <a class="struct" href="../../futures/stream/struct.ForEach.html" title="struct futures::stream::ForEach">ForEach</a>&lt;S, F, U&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;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>(S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Item" title="type futures::stream::Stream::Item">Item</a>) -&gt; U,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Error = S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>&gt;,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>;</span></code></li>
  758. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/future.rs.html#57-76' title='goto source code'>[src]</a></div><code>impl&lt;S:&nbsp;<a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&gt; Future for <a class="struct" href="../../futures/stream/struct.StreamFuture.html" title="struct futures::stream::StreamFuture">StreamFuture</a>&lt;S&gt;<span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Item" title="type futures::stream::Stream::Item">Item</a>&gt;, S<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>, S<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span></code></li>
  759. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/forward.rs.html#78-110' title='goto source code'>[src]</a></div><code>impl&lt;T, U&gt; Future for <a class="struct" href="../../futures/stream/struct.Forward.html" title="struct futures::stream::Forward">Forward</a>&lt;T, U&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>&lt;SinkItem = T::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Item" title="type futures::stream::Stream::Item">Item</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;U::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>T, U<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = T::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>;</span></code></li>
  760. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/collect.rs.html#33-52' title='goto source code'>[src]</a></div><code>impl&lt;S&gt; Future for <a class="struct" href="../../futures/stream/struct.Collect.html" title="struct futures::stream::Collect">Collect</a>&lt;S&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Item" title="type futures::stream::Stream::Item">Item</a>&gt;;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>;</span></code></li>
  761. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sink/flush.rs.html#33-46' title='goto source code'>[src]</a></div><code>impl&lt;S:&nbsp;<a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>&gt; Future for <a class="struct" href="../../futures/sink/struct.Flush.html" title="struct futures::sink::Flush">Flush</a>&lt;S&gt;<span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = S;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  762. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sink/send.rs.html#40-59' title='goto source code'>[src]</a></div><code>impl&lt;S:&nbsp;<a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>&gt; Future for <a class="struct" href="../../futures/sink/struct.Send.html" title="struct futures::sink::Send">Send</a>&lt;S&gt;<span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = S;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  763. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sink/send_all.rs.html#59-88' title='goto source code'>[src]</a></div><code>impl&lt;T, U&gt; Future for <a class="struct" href="../../futures/sink/struct.SendAll.html" title="struct futures::sink::SendAll">SendAll</a>&lt;T, U&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&lt;Item = T::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;T::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;U::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>&gt;,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>T, U<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = T::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  764. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sync/oneshot.rs.html#408-415' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Future for futures::sync::oneshot::<a class="struct" href="../../futures/sync/oneshot/struct.Receiver.html" title="struct futures::sync::oneshot::Receiver">Receiver</a>&lt;T&gt;<span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../../futures/sync/oneshot/struct.Canceled.html" title="struct futures::sync::oneshot::Canceled">Canceled</a>;</span></code></li>
  765. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sync/oneshot.rs.html#513-525' title='goto source code'>[src]</a></div><code>impl&lt;T, E&gt; Future for futures::sync::oneshot::<a class="struct" href="../../futures/sync/oneshot/struct.SpawnHandle.html" title="struct futures::sync::oneshot::SpawnHandle">SpawnHandle</a>&lt;T, E&gt;<span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = E;</span></code></li>
  766. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sync/oneshot.rs.html#540-562' title='goto source code'>[src]</a></div><code>impl&lt;F:&nbsp;<a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&gt; Future for futures::sync::oneshot::<a class="struct" href="../../futures/sync/oneshot/struct.Execute.html" title="struct futures::sync::oneshot::Execute">Execute</a>&lt;F&gt;<span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span></code></li>
  767. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sync/mpsc/mod.rs.html#1085-1099' title='goto source code'>[src]</a></div><code>impl&lt;S:&nbsp;<a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&gt; Future for futures::sync::mpsc::<a class="struct" href="../../futures/sync/mpsc/struct.Execute.html" title="struct futures::sync::mpsc::Execute">Execute</a>&lt;S&gt;<span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span></code></li>
  768. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sync/bilock.rs.html#242-255' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Future for <a class="struct" href="../../futures/sync/struct.BiLockAcquire.html" title="struct futures::sync::BiLockAcquire">BiLockAcquire</a>&lt;T&gt;<span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../../futures/sync/struct.BiLockAcquired.html" title="struct futures::sync::BiLockAcquired">BiLockAcquired</a>&lt;T&gt;;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span></code></li>
  769. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/unsync/mpsc.rs.html#453-467' title='goto source code'>[src]</a></div><code>impl&lt;S:&nbsp;<a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&gt; Future for futures::unsync::mpsc::<a class="struct" href="../../futures/unsync/mpsc/struct.Execute.html" title="struct futures::unsync::mpsc::Execute">Execute</a>&lt;S&gt;<span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span></code></li>
  770. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/unsync/oneshot.rs.html#178-208' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Future for futures::unsync::oneshot::<a class="struct" href="../../futures/unsync/oneshot/struct.Receiver.html" title="struct futures::unsync::oneshot::Receiver">Receiver</a>&lt;T&gt;<span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../../futures/sync/oneshot/struct.Canceled.html" title="struct futures::sync::oneshot::Canceled">Canceled</a>;</span></code></li>
  771. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/unsync/oneshot.rs.html#300-312' title='goto source code'>[src]</a></div><code>impl&lt;T, E&gt; Future for futures::unsync::oneshot::<a class="struct" href="../../futures/unsync/oneshot/struct.SpawnHandle.html" title="struct futures::unsync::oneshot::SpawnHandle">SpawnHandle</a>&lt;T, E&gt;<span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = E;</span></code></li>
  772. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/unsync/oneshot.rs.html#321-343' title='goto source code'>[src]</a></div><code>impl&lt;F:&nbsp;<a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>&gt; Future for futures::unsync::oneshot::<a class="struct" href="../../futures/unsync/oneshot/struct.Execute.html" title="struct futures::unsync::oneshot::Execute">Execute</a>&lt;F&gt;<span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span></code></li>
  773. </ul><script type="text/javascript" async
  774. src="../../implementors/futures/future/trait.Future.js">
  775. </script></section>
  776. <section id='search' class="content hidden"></section>
  777. <section class="footer"></section>
  778. <aside id="help" class="hidden">
  779. <div>
  780. <h1 class="hidden">Help</h1>
  781. <div class="shortcuts">
  782. <h2>Keyboard Shortcuts</h2>
  783. <dl>
  784. <dt><kbd>?</kbd></dt>
  785. <dd>Show this help dialog</dd>
  786. <dt><kbd>S</kbd></dt>
  787. <dd>Focus the search field</dd>
  788. <dt><kbd>↑</kbd></dt>
  789. <dd>Move up in search results</dd>
  790. <dt><kbd>↓</kbd></dt>
  791. <dd>Move down in search results</dd>
  792. <dt><kbd>↹</kbd></dt>
  793. <dd>Switch tab</dd>
  794. <dt><kbd>&#9166;</kbd></dt>
  795. <dd>Go to active search result</dd>
  796. <dt><kbd>+</kbd></dt>
  797. <dd>Expand all sections</dd>
  798. <dt><kbd>-</kbd></dt>
  799. <dd>Collapse all sections</dd>
  800. </dl>
  801. </div>
  802. <div class="infos">
  803. <h2>Search Tricks</h2>
  804. <p>
  805. Prefix searches with a type followed by a colon (e.g.
  806. <code>fn:</code>) to restrict the search to a given type.
  807. </p>
  808. <p>
  809. Accepted types are: <code>fn</code>, <code>mod</code>,
  810. <code>struct</code>, <code>enum</code>,
  811. <code>trait</code>, <code>type</code>, <code>macro</code>,
  812. and <code>const</code>.
  813. </p>
  814. <p>
  815. Search functions by type signature (e.g.
  816. <code>vec -> usize</code> or <code>* -> vec</code>)
  817. </p>
  818. </div>
  819. </div>
  820. </aside>
  821. <script>
  822. window.rootPath = "../../";
  823. window.currentCrate = "futures";
  824. </script>
  825. <script src="../../main.js"></script>
  826. <script defer src="../../search-index.js"></script>
  827. </body>
  828. </html>