trait.Future.html 291 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681
  1. <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Future` trait in crate `futures`."><meta name="keywords" content="rust, rustlang, rust-lang, Future"><title>futures::future::Future - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><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></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><input class="search-input" name="search" autocomplete="off" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='in-band'>Trait <a href='../index.html'>futures</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'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/futures/future/mod.rs.html#177-1015' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust trait'>pub trait Future {
  2. type <a href='#associatedtype.Item' class="type">Item</a>;
  3. type <a href='#associatedtype.Error' class="type">Error</a>;
  4. 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;;
  5. 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>,
  6. { ... }
  7. <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>,
  8. { ... }
  9. <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>,
  10. { ... }
  11. <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>,
  12. { ... }
  13. <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>,
  14. { ... }
  15. <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>,
  16. { ... }
  17. <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>,
  18. { ... }
  19. <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>,
  20. { ... }
  21. <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>,
  22. { ... }
  23. <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>,
  24. { ... }
  25. <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>,
  26. { ... }
  27. <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>,
  28. { ... }
  29. <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>,
  30. { ... }
  31. <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>,
  32. { ... }
  33. <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>,
  34. { ... }
  35. <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>,
  36. { ... }
  37. <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>,
  38. { ... }
  39. <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>,
  40. { ... }
  41. <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>,
  42. { ... }
  43. <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>,
  44. { ... }
  45. }</pre></div><div class='docblock'><p>Trait for types which are a placeholder of a value that may become
  46. available at some later point in time.</p>
  47. <p>In addition to the documentation here you can also find more information
  48. about futures <a href="https://tokio.rs/docs/getting-started/futures/">online</a> at <a href="https://tokio.rs">https://tokio.rs</a></p>
  49. <p>Futures are used to provide a sentinel through which a value can be
  50. referenced. They crucially allow chaining and composing operations through
  51. consumption which allows expressing entire trees of computation as one
  52. sentinel value.</p>
  53. <p>The ergonomics and implementation of the <code>Future</code> trait are very similar to
  54. the <code>Iterator</code> trait in that there is just one methods you need
  55. to implement, but you get a whole lot of others for free as a result.</p>
  56. <h1 id="the-poll-method" class="section-header"><a href="#the-poll-method">The <code>poll</code> method</a></h1>
  57. <p>The core method of future, <code>poll</code>, is used to attempt to generate the value
  58. of a <code>Future</code>. This method <em>does not block</em> but is allowed to inform the
  59. caller that the value is not ready yet. Implementations of <code>poll</code> may
  60. themselves do work to generate the value, but it's guaranteed that this will
  61. never block the calling thread.</p>
  62. <p>A key aspect of this method is that if the value is not yet available the
  63. current task is scheduled to receive a notification when it's later ready to
  64. be made available. This follows what's typically known as a &quot;readiness&quot; or
  65. &quot;pull&quot; model where values are pulled out of futures on demand, and
  66. otherwise a task is notified when a value might be ready to get pulled out.</p>
  67. <p>The <code>poll</code> method is not intended to be called in general, but rather is
  68. typically called in the context of a &quot;task&quot; which drives a future to
  69. completion. For more information on this see the <code>task</code> module.</p>
  70. <p>More information about the details of <code>poll</code> and the nitty-gritty of tasks
  71. can be <a href="https://tokio.rs/docs/going-deeper-futures/futures-model/">found online at tokio.rs</a>.</p>
  72. <h1 id="combinators" class="section-header"><a href="#combinators">Combinators</a></h1>
  73. <p>Like iterators, futures provide a large number of combinators to work with
  74. futures to express computations in a much more natural method than
  75. scheduling a number of callbacks. For example the <code>map</code> method can change
  76. 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
  77. create a future after the first one is done and only be resolved when the
  78. second is done.</p>
  79. <p>Combinators act very similarly to the methods on the <code>Iterator</code> trait itself
  80. or those on <code>Option</code> and <code>Result</code>. Like with iterators, the combinators are
  81. zero-cost and don't impose any extra layers of indirection you wouldn't
  82. otherwise have to write down.</p>
  83. <p>More information about combinators can be found <a href="https://tokio.rs/docs/going-deeper-futures/futures-mechanics/">on tokio.rs</a>.</p>
  84. </div>
  85. <h2 id='associated-types' class='small-section-header'>
  86. Associated Types<a href='#associated-types' class='anchor'></a>
  87. </h2>
  88. <div class='methods'>
  89. <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
  90. successful.</p>
  91. </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
  92. normal fashion.</p>
  93. </div></div>
  94. <h2 id='required-methods' class='small-section-header'>
  95. Required Methods<a href='#required-methods' class='anchor'></a>
  96. </h2>
  97. <div class='methods'>
  98. <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
  99. interest if it is not.</p>
  100. <p>This function will check the internal state of the future and assess
  101. whether the value is ready to be produced. Implementers of this function
  102. should ensure that a call to this <strong>never blocks</strong> as event loops may
  103. not work properly otherwise.</p>
  104. <p>When a future is not ready yet, the <code>Async::NotReady</code> value will be
  105. returned. In this situation the future will <em>also</em> register interest of
  106. the current task in the value being produced. This is done by calling
  107. <code>task::park</code> to retrieve a handle to the current <code>Task</code>. When the future
  108. is then ready to make progress (e.g. it should be <code>poll</code>ed again) the
  109. <code>unpark</code> method is called on the <code>Task</code>.</p>
  110. <p>More information about the details of <code>poll</code> and the nitty-gritty of
  111. tasks can be <a href="https://tokio.rs/docs/going-deeper-futures/futures-model/">found online at tokio.rs</a>.</p>
  112. <h1 id="runtime-characteristics" class="section-header"><a href="#runtime-characteristics">Runtime characteristics</a></h1>
  113. <p>This function, <code>poll</code>, is the primary method for 'making progress'
  114. within a tree of futures. For example this method will be called
  115. repeatedly as the internal state machine makes its various transitions.
  116. Executors are responsible for ensuring that this function is called in
  117. the right location (e.g. always on an I/O thread or not). Unless it is
  118. otherwise arranged to be so, it should be ensured that <strong>implementations
  119. of this function finish very quickly</strong>.</p>
  120. <p>Returning quickly prevents unnecessarily clogging up threads and/or
  121. event loops while a <code>poll</code> function call, for example, takes up compute
  122. resources to perform some expensive computation. If it is known ahead
  123. of time that a call to <code>poll</code> may end up taking awhile, the work should
  124. be offloaded to a thread pool (or something similar) to ensure that
  125. <code>poll</code> can return quickly.</p>
  126. <p>Note that the <code>poll</code> function is not called repeatedly in a loop for
  127. futures typically, but only whenever the future itself is ready. If
  128. you're familiar with the <code>poll(2)</code> or <code>select(2)</code> syscalls on Unix
  129. it's worth noting that futures typically do <em>not</em> suffer the same
  130. problems of &quot;all wakeups must poll all events&quot;. Futures have enough
  131. support for only polling futures which cause a wakeup.</p>
  132. <h1 id="return-value" class="section-header"><a href="#return-value">Return value</a></h1>
  133. <p>This function returns <code>Async::NotReady</code> if the future is not ready yet,
  134. <code>Err</code> if the future is finished but resolved to an error, or
  135. <code>Async::Ready</code> with the result of this future if it's finished
  136. successfully. Once a future has finished it is considered a contract
  137. error to continue polling the future.</p>
  138. <p>If <code>NotReady</code> is returned, then the future will internally register
  139. interest in the value being produced for the current task (through
  140. <code>task::park</code>). In other words, the current task will receive a
  141. notification (through the <code>unpark</code> method) once the value is ready to be
  142. produced or the future can make progress.</p>
  143. <p>Note that if <code>NotReady</code> is returned it only means that <em>this</em> task will
  144. receive a notification. Historical calls to <code>poll</code> with different tasks
  145. will not receive notifications. In other words, implementers of the
  146. <code>Future</code> trait need not store a queue of tasks to notify, but only the
  147. last task that called this method. Alternatively callers of this method
  148. can only rely on the most recent task which call <code>poll</code> being notified
  149. when a future is ready.</p>
  150. <h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
  151. <p>Once a future has completed (returned <code>Ready</code> or <code>Err</code> from <code>poll</code>),
  152. then any future calls to <code>poll</code> may panic, block forever, or otherwise
  153. cause wrong behavior. The <code>Future</code> trait itself provides no guarantees
  154. about the behavior of <code>poll</code> after a future has completed.</p>
  155. <p>Callers who may call <code>poll</code> too many times may want to consider using
  156. the <code>fuse</code> adaptor which defines the behavior of <code>poll</code>, but comes with
  157. a little bit of extra cost.</p>
  158. <p>Additionally, calls to <code>poll</code> must always be made from within the
  159. context of a task. If a current task is not set then this method will
  160. likely panic.</p>
  161. <h1 id="errors" class="section-header"><a href="#errors">Errors</a></h1>
  162. <p>This future may have failed to finish the computation, in which case
  163. the <code>Err</code> variant will be returned with an appropriate payload of an
  164. error.</p>
  165. </div></div>
  166. <h2 id='provided-methods' class='small-section-header'>
  167. Provided Methods<a href='#provided-methods' class='anchor'></a>
  168. </h2>
  169. <div class='methods'>
  170. <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>
  171. <p>This method will consume ownership of this future, driving it to
  172. completion via <code>poll</code> and blocking the current thread while it's waiting
  173. for the value to become available. Once the future is resolved the
  174. result of this future is returned.</p>
  175. <blockquote>
  176. <p><strong>Note:</strong> This method is not appropriate to call on event loops or
  177. similar I/O situations because it will prevent the event
  178. loop from making progress (this blocks the thread). This
  179. method should only be called when it's guaranteed that the
  180. blocking work associated with this future will be completed
  181. by another thread.</p>
  182. </blockquote>
  183. <p>This method is only available when the <code>use_std</code> feature of this
  184. library is activated, and it is activated by default.</p>
  185. <h1 id="panics-1" class="section-header"><a href="#panics-1">Panics</a></h1>
  186. <p>This function does not attempt to catch panics. If the <code>poll</code> function
  187. of this future panics, panics will be propagated to the caller.</p>
  188. </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
  189. the resulting type.</p>
  190. <p>This function is similar to the <code>Option::map</code> or <code>Iterator::map</code> where
  191. it will change the type of the underlying future. This is useful to
  192. chain along a computation once a future has been resolved.</p>
  193. <p>The closure provided will only be called if this future is resolved
  194. successfully. If this future returns an error, panics, or is dropped,
  195. then the closure provided will never be invoked.</p>
  196. <p>Note that this function consumes the receiving future and returns a
  197. wrapped version of it, similar to the existing <code>map</code> methods in the
  198. standard library.</p>
  199. <h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
  200. <pre class="rust rust-example-rendered">
  201. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  202. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  203. <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>);
  204. <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>);
  205. <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>
  206. <p>Calling <code>map</code> on an errored <code>Future</code> has no effect:</p>
  207. <pre class="rust rust-example-rendered">
  208. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  209. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  210. <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>);
  211. <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>);
  212. <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>
  213. </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>
  214. <p>This function is similar to the <code>Result::map_err</code> where it will change
  215. the error type of the underlying future. This is useful for example to
  216. ensure that futures have the same error type when used with combinators
  217. like <code>select</code> and <code>join</code>.</p>
  218. <p>The closure provided will only be called if this future is resolved
  219. with an error. If this future returns a success, panics, or is
  220. dropped, then the closure provided will never be invoked.</p>
  221. <p>Note that this function consumes the receiving future and returns a
  222. wrapped version of it.</p>
  223. <h1 id="examples-1" class="section-header"><a href="#examples-1">Examples</a></h1>
  224. <pre class="rust rust-example-rendered">
  225. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>::<span class="kw-2">*</span>;
  226. <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>);
  227. <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>);
  228. <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>
  229. <p>Calling <code>map_err</code> on a successful <code>Future</code> has no effect:</p>
  230. <pre class="rust rust-example-rendered">
  231. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>::<span class="kw-2">*</span>;
  232. <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>);
  233. <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>);
  234. <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>
  235. </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
  236. this future's <code>Error</code>, returning a new future.</p>
  237. <p>This function does for futures what <code>try!</code> does for <code>Result</code>,
  238. by letting the compiler infer the type of the resulting error.
  239. Just as <code>map_err</code> above, this is useful for example to ensure
  240. that futures have the same error type when used with
  241. combinators like <code>select</code> and <code>join</code>.</p>
  242. <p>Note that this function consumes the receiving future and returns a
  243. wrapped version of it.</p>
  244. <h1 id="examples-2" class="section-header"><a href="#examples-2">Examples</a></h1>
  245. <pre class="rust rust-example-rendered">
  246. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  247. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  248. <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>);
  249. <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>
  250. </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
  251. the future to the provided closure <code>f</code>.</p>
  252. <p>This function can be used to ensure a computation runs regardless of
  253. the conclusion of the future. The closure provided will be yielded a
  254. <code>Result</code> once the future is complete.</p>
  255. <p>The returned value of the closure must implement the <code>IntoFuture</code> trait
  256. and can represent some more work to be done before the composed future
  257. is finished. Note that the <code>Result</code> type implements the <code>IntoFuture</code>
  258. trait so it is possible to simply alter the <code>Result</code> yielded to the
  259. closure and return it.</p>
  260. <p>If this future is dropped or panics then the closure <code>f</code> will not be
  261. run.</p>
  262. <p>Note that this function consumes the receiving future and returns a
  263. wrapped version of it.</p>
  264. <h1 id="examples-3" class="section-header"><a href="#examples-3">Examples</a></h1>
  265. <pre class="rust rust-example-rendered">
  266. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  267. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  268. <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>);
  269. <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> {
  270. <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>)
  271. });
  272. <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>);
  273. <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> {
  274. <span class="kw">match</span> <span class="ident">x</span> {
  275. <span class="prelude-val">Ok</span>(<span class="kw">_</span>) <span class="op">=&gt;</span> <span class="macro">panic</span><span class="macro">!</span>(<span class="string">&quot;expected an error&quot;</span>),
  276. <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>),
  277. }
  278. });</pre>
  279. </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>
  280. <p>This function can be used to chain two futures together and ensure that
  281. the final future isn't resolved until both have finished. The closure
  282. provided is yielded the successful result of this future and returns
  283. another value which can be converted into a future.</p>
  284. <p>Note that because <code>Result</code> implements the <code>IntoFuture</code> trait this method
  285. can also be useful for chaining fallible and serial computations onto
  286. the end of one future.</p>
  287. <p>If this future is dropped, panics, or completes with an error then the
  288. provided closure <code>f</code> is never called.</p>
  289. <p>Note that this function consumes the receiving future and returns a
  290. wrapped version of it.</p>
  291. <h1 id="examples-4" class="section-header"><a href="#examples-4">Examples</a></h1>
  292. <pre class="rust rust-example-rendered">
  293. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  294. <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>};
  295. <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>);
  296. <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> {
  297. <span class="prelude-val">Ok</span>(<span class="ident">x</span> <span class="op">+</span> <span class="number">3</span>)
  298. });
  299. <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>);
  300. <span class="ident">future_of_err_1</span>.<span class="ident">and_then</span>(<span class="op">|</span><span class="kw">_</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> {
  301. <span class="macro">panic</span><span class="macro">!</span>(<span class="string">&quot;should not be called in case of an error&quot;</span>);
  302. });</pre>
  303. </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>
  304. <p>Return a future that passes along this future's value if it succeeds,
  305. and otherwise passes the error to the closure <code>f</code> and waits for the
  306. future it returns. The closure may also simply return a value that can
  307. be converted into a future.</p>
  308. <p>Note that because <code>Result</code> implements the <code>IntoFuture</code> trait this method
  309. can also be useful for chaining together fallback computations, where
  310. when one fails, the next is attempted.</p>
  311. <p>If this future is dropped, panics, or completes successfully then the
  312. provided closure <code>f</code> is never called.</p>
  313. <p>Note that this function consumes the receiving future and returns a
  314. wrapped version of it.</p>
  315. <h1 id="examples-5" class="section-header"><a href="#examples-5">Examples</a></h1>
  316. <pre class="rust rust-example-rendered">
  317. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  318. <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>};
  319. <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>);
  320. <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> {
  321. <span class="prelude-val">Ok</span>(<span class="ident">x</span> <span class="op">+</span> <span class="number">3</span>)
  322. });
  323. <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>);
  324. <span class="ident">future_of_1</span>.<span class="ident">or_else</span>(<span class="op">|</span><span class="kw">_</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> {
  325. <span class="macro">panic</span><span class="macro">!</span>(<span class="string">&quot;should not be called in case of success&quot;</span>);
  326. });</pre>
  327. </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>
  328. <p>This function will return a new future which awaits for either this or
  329. the <code>other</code> future to complete. The returned future will finish with
  330. both the value resolved and a future representing the completion of the
  331. other work. Both futures must have the same item and error type.</p>
  332. <p>Note that this function consumes the receiving futures and returns a
  333. wrapped version of them.</p>
  334. <h1 id="examples-6" class="section-header"><a href="#examples-6">Examples</a></h1>
  335. <pre class="rust rust-example-rendered">
  336. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  337. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  338. <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">thread</span>;
  339. <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">time</span>;
  340. <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> {
  341. <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>));
  342. <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>)
  343. });
  344. <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> {
  345. <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>));
  346. <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>)
  347. });
  348. <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>();
  349. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">value</span>, <span class="string">&#39;a&#39;</span>);
  350. <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>
  351. <p>A poor-man's <code>join</code> implemented on top of <code>select</code>:</p>
  352. <pre class="rust rust-example-rendered">
  353. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  354. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  355. <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>
  356. <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>,
  357. {
  358. <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="kw">_</span>, <span class="ident">Error</span><span class="op">=</span><span class="kw">_</span><span class="op">&gt;&gt;</span> {
  359. <span class="kw">match</span> <span class="ident">res</span> {
  360. <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>))),
  361. <span class="prelude-val">Err</span>((<span class="ident">a</span>, <span class="kw">_</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>)),
  362. }
  363. }))
  364. }</pre>
  365. </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>
  366. <p>This function will return a new future which awaits for either this or
  367. the <code>other</code> future to complete. The returned future will finish with
  368. both the value resolved and a future representing the completion of the
  369. other work.</p>
  370. <p>Note that this function consumes the receiving futures and returns a
  371. wrapped version of them.</p>
  372. <p>Also note that if both this and the second future have the same
  373. success/error type you can use the <code>Either::split</code> method to
  374. conveniently extract out the value at the end.</p>
  375. <h1 id="examples-7" class="section-header"><a href="#examples-7">Examples</a></h1>
  376. <pre class="rust rust-example-rendered">
  377. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  378. <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>};
  379. <span class="comment">// A poor-man&#39;s join implemented on top of select2</span>
  380. <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>
  381. <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>,
  382. <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>,
  383. <span class="ident">E</span>: <span class="lifetime">&#39;static</span>,
  384. {
  385. <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="kw">_</span>, <span class="ident">Error</span><span class="op">=</span><span class="kw">_</span><span class="op">&gt;&gt;</span> {
  386. <span class="kw">match</span> <span class="ident">res</span> {
  387. <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>))),
  388. <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>))),
  389. <span class="prelude-val">Err</span>(<span class="ident">Either</span>::<span class="ident">A</span>((<span class="ident">e</span>, <span class="kw">_</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>)),
  390. <span class="prelude-val">Err</span>(<span class="ident">Either</span>::<span class="ident">B</span>((<span class="ident">e</span>, <span class="kw">_</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>)),
  391. }
  392. }))
  393. }</pre>
  394. </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>
  395. <p>This function will return a new future which awaits both this and the
  396. <code>other</code> future to complete. The returned future will finish with a tuple
  397. of both results.</p>
  398. <p>Both futures must have the same error type, and if either finishes with
  399. an error then the other will be dropped and that error will be
  400. returned.</p>
  401. <p>Note that this function consumes the receiving future and returns a
  402. wrapped version of it.</p>
  403. <h1 id="examples-8" class="section-header"><a href="#examples-8">Examples</a></h1>
  404. <pre class="rust rust-example-rendered">
  405. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  406. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  407. <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>);
  408. <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>);
  409. <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>);
  410. <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>
  411. <p>If one or both of the joined <code>Future</code>s is errored, the resulting
  412. <code>Future</code> will be errored:</p>
  413. <pre class="rust rust-example-rendered">
  414. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  415. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  416. <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>);
  417. <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>);
  418. <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>);
  419. <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>
  420. </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>
  421. </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>
  422. </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>
  423. </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>
  424. <p>The returned stream contains single success if this future resolves to
  425. success or single error if this future resolves into error.</p>
  426. <h1 id="examples-9" class="section-header"><a href="#examples-9">Examples</a></h1>
  427. <pre class="rust rust-example-rendered">
  428. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  429. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  430. <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="kw">_</span>, <span class="ident">bool</span><span class="op">&gt;</span>(<span class="number">17</span>);
  431. <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>();
  432. <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>());
  433. <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>());
  434. <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="kw">_</span><span class="op">&gt;</span>(<span class="number">19</span>);
  435. <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>();
  436. <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>());
  437. <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>
  438. </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
  439. future is itself another future.</p>
  440. <p>This can be useful when combining futures together to flatten the
  441. computation out the final result. This method can only be called
  442. when the successful result of this future itself implements the
  443. <code>IntoFuture</code> trait and the error can be created from this future's error
  444. type.</p>
  445. <p>This method is roughly equivalent to <code>self.and_then(|x| x)</code>.</p>
  446. <p>Note that this function consumes the receiving future and returns a
  447. wrapped version of it.</p>
  448. <h1 id="examples-10" class="section-header"><a href="#examples-10">Examples</a></h1>
  449. <pre class="rust rust-example-rendered">
  450. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  451. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  452. <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="kw">_</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>));
  453. <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>();
  454. <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>
  455. <p>Calling <code>flatten</code> on an errored <code>Future</code>, or if the inner <code>Future</code> is
  456. errored, will result in an errored <code>Future</code>:</p>
  457. <pre class="rust rust-example-rendered">
  458. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  459. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  460. <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="kw">_</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>));
  461. <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>();
  462. <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>
  463. </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
  464. future is a stream.</p>
  465. <p>This can be useful when stream initialization is deferred, and it is
  466. convenient to work with that stream as if stream was available at the
  467. call site.</p>
  468. <p>Note that this function consumes this future and returns a wrapped
  469. version of it.</p>
  470. <h1 id="examples-11" class="section-header"><a href="#examples-11">Examples</a></h1>
  471. <pre class="rust rust-example-rendered">
  472. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  473. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  474. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">stream</span>;
  475. <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>];
  476. <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="kw">_</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>));
  477. <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>();
  478. <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>();
  479. <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>());
  480. <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>());
  481. <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>());
  482. <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>
  483. </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
  484. completed.</p>
  485. <p>Currently once a future has returned <code>Ready</code> or <code>Err</code> from
  486. <code>poll</code> any further calls could exhibit bad behavior such as blocking
  487. forever, panicking, never returning, etc. If it is known that <code>poll</code>
  488. may be called too often then this method can be used to ensure that it
  489. has defined semantics.</p>
  490. <p>Once a future has been <code>fuse</code>d and it returns a completion from <code>poll</code>,
  491. then it will forever return <code>NotReady</code> from <code>poll</code> again (never
  492. resolve). This, unlike the trait's <code>poll</code> method, is guaranteed.</p>
  493. <p>This combinator will drop this future as soon as it's been completed to
  494. ensure resources are reclaimed as soon as possible.</p>
  495. <h1 id="examples-12" class="section-header"><a href="#examples-12">Examples</a></h1>
  496. <pre class="rust rust-example-rendered">
  497. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  498. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  499. <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>);
  500. <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>)));
  501. <span class="comment">// Normally, a call such as this would panic:</span>
  502. <span class="comment">//future.poll();</span>
  503. <span class="comment">// This, however, is guaranteed to not panic</span>
  504. <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>();
  505. <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>)));
  506. <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>
  507. </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>
  508. <p>When using futures, you'll often chain several of them together.
  509. While working on such code, you might want to check out what's happening at
  510. various parts in the pipeline. To do that, insert a call to inspect().</p>
  511. <h1 id="examples-13" class="section-header"><a href="#examples-13">Examples</a></h1>
  512. <pre class="rust rust-example-rendered">
  513. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  514. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  515. <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>);
  516. <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>));
  517. <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>
  518. </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>
  519. <p>In general, panics within a future can propagate all the way out to the
  520. task level. This combinator makes it possible to halt unwinding within
  521. the future itself. It's most commonly used within task executors. It's
  522. not recommended to use this for error handling.</p>
  523. <p>Note that this method requires the <code>UnwindSafe</code> bound from the standard
  524. library. This isn't always applied automatically, and the standard
  525. library provides an <code>AssertUnwindSafe</code> wrapper type to apply it
  526. after-the fact. To assist using this method, the <code>Future</code> trait is also
  527. implemented for <code>AssertUnwindSafe&lt;F&gt;</code> where <code>F</code> implements <code>Future</code>.</p>
  528. <p>This method is only available when the <code>use_std</code> feature of this
  529. library is activated, and it is activated by default.</p>
  530. <h1 id="examples-14" class="section-header"><a href="#examples-14">Examples</a></h1>
  531. <pre class="rust rust-example-rendered">
  532. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  533. <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>};
  534. <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>);
  535. <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>());
  536. <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> {
  537. <span class="macro">panic</span><span class="macro">!</span>();
  538. <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>)
  539. });
  540. <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>
  541. </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
  542. to the same result.</p>
  543. <p>The shared() method provides a method to convert any future into a
  544. cloneable future. It enables a future to be polled by multiple threads.</p>
  545. <p>The returned <code>Shared</code> future resolves successfully with
  546. <code>SharedItem&lt;Self::Item&gt;</code> or erroneously with <code>SharedError&lt;Self::Error&gt;</code>.
  547. Both <code>SharedItem</code> and <code>SharedError</code> implements <code>Deref</code> to allow shared
  548. access to the underlying result. Ownership of <code>Self::Item</code> and
  549. <code>Self::Error</code> cannot currently be reclaimed.</p>
  550. <p>This method is only available when the <code>use_std</code> feature of this
  551. library is activated, and it is activated by default.</p>
  552. <h1 id="examples-15" class="section-header"><a href="#examples-15">Examples</a></h1>
  553. <pre class="rust rust-example-rendered">
  554. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  555. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  556. <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="kw">_</span>, <span class="ident">bool</span><span class="op">&gt;</span>(<span class="number">6</span>);
  557. <span class="kw">let</span> <span class="ident">shared1</span> <span class="op">=</span> <span class="ident">future</span>.<span class="ident">shared</span>();
  558. <span class="kw">let</span> <span class="ident">shared2</span> <span class="op">=</span> <span class="ident">shared1</span>.<span class="ident">clone</span>();
  559. <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>());
  560. <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>
  561. <pre class="rust rust-example-rendered">
  562. <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">thread</span>;
  563. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  564. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>;
  565. <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="kw">_</span>, <span class="ident">bool</span><span class="op">&gt;</span>(<span class="number">6</span>);
  566. <span class="kw">let</span> <span class="ident">shared1</span> <span class="op">=</span> <span class="ident">future</span>.<span class="ident">shared</span>();
  567. <span class="kw">let</span> <span class="ident">shared2</span> <span class="op">=</span> <span class="ident">shared1</span>.<span class="ident">clone</span>();
  568. <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> {
  569. <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>());
  570. });
  571. <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>());
  572. <span class="ident">join_handle</span>.<span class="ident">join</span>().<span class="ident">unwrap</span>();</pre>
  573. </div></div>
  574. <h2 id='foreign-impls' class='small-section-header'>
  575. Implementations on Foreign Types<a href='#foreign-impls' class='anchor'></a>
  576. </h2>
  577. <h3 id='impl-Future' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></h3><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>
  578. <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>
  579. <h4 id='method.poll' class="method"><span id='poll.v-1' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.wait-1' class="method"><span id='wait.v-1' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.map-1' class="method"><span id='map.v-1' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.map_err-1' class="method"><span id='map_err.v-1' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.from_err-1' class="method"><span id='from_err.v-1' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.then-1' class="method"><span id='then.v-1' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.and_then-1' class="method"><span id='and_then.v-1' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.or_else-1' class="method"><span id='or_else.v-1' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.select-1' class="method"><span id='select.v-1' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.select2-1' class="method"><span id='select2.v-1' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.join-1' class="method"><span id='join.v-1' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.join3-1' class="method"><span id='join3.v-1' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.join4-1' class="method"><span id='join4.v-1' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.join5-1' class="method"><span id='join5.v-1' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.into_stream-1' class="method"><span id='into_stream.v-1' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.flatten-1' class="method"><span id='flatten.v-1' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.flatten_stream-1' class="method"><span id='flatten_stream.v-1' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.fuse-1' class="method"><span id='fuse.v-1' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.inspect-1' class="method"><span id='inspect.v-1' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.catch_unwind-1' class="method"><span id='catch_unwind.v-1' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.shared-1' class="method"><span id='shared.v-1' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4></div></span><h3 id='impl-Future-1' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></h3><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>
  580. <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>
  581. <h4 id='method.poll-1' class="method"><span id='poll.v-2' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.wait-2' class="method"><span id='wait.v-2' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.map-2' class="method"><span id='map.v-2' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.map_err-2' class="method"><span id='map_err.v-2' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.from_err-2' class="method"><span id='from_err.v-2' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.then-2' class="method"><span id='then.v-2' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.and_then-2' class="method"><span id='and_then.v-2' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.or_else-2' class="method"><span id='or_else.v-2' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.select-2' class="method"><span id='select.v-2' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.select2-2' class="method"><span id='select2.v-2' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.join-2' class="method"><span id='join.v-2' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.join3-2' class="method"><span id='join3.v-2' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.join4-2' class="method"><span id='join4.v-2' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.join5-2' class="method"><span id='join5.v-2' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.into_stream-2' class="method"><span id='into_stream.v-2' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.flatten-2' class="method"><span id='flatten.v-2' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.flatten_stream-2' class="method"><span id='flatten_stream.v-2' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.fuse-2' class="method"><span id='fuse.v-2' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.inspect-2' class="method"><span id='inspect.v-2' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.catch_unwind-2' class="method"><span id='catch_unwind.v-2' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.shared-2' class="method"><span id='shared.v-2' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4></div></span><h3 id='impl-Future-2' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></h3><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>
  582. <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>
  583. <h4 id='method.poll-2' class="method"><span id='poll.v-3' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.wait-3' class="method"><span id='wait.v-3' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.map-3' class="method"><span id='map.v-3' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.map_err-3' class="method"><span id='map_err.v-3' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.from_err-3' class="method"><span id='from_err.v-3' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.then-3' class="method"><span id='then.v-3' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.and_then-3' class="method"><span id='and_then.v-3' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.or_else-3' class="method"><span id='or_else.v-3' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.select-3' class="method"><span id='select.v-3' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.select2-3' class="method"><span id='select2.v-3' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.join-3' class="method"><span id='join.v-3' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.join3-3' class="method"><span id='join3.v-3' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.join4-3' class="method"><span id='join4.v-3' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.join5-3' class="method"><span id='join5.v-3' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.into_stream-3' class="method"><span id='into_stream.v-3' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.flatten-3' class="method"><span id='flatten.v-3' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.flatten_stream-3' class="method"><span id='flatten_stream.v-3' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.fuse-3' class="method"><span id='fuse.v-3' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.inspect-3' class="method"><span id='inspect.v-3' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.catch_unwind-3' class="method"><span id='catch_unwind.v-3' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.shared-3' class="method"><span id='shared.v-3' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4></div></span><h3 id='impl-Future-3' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></h3><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>
  584. <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>
  585. <h4 id='method.poll-3' class="method"><span id='poll.v-4' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.wait-4' class="method"><span id='wait.v-4' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.map-4' class="method"><span id='map.v-4' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.map_err-4' class="method"><span id='map_err.v-4' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.from_err-4' class="method"><span id='from_err.v-4' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.then-4' class="method"><span id='then.v-4' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.and_then-4' class="method"><span id='and_then.v-4' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.or_else-4' class="method"><span id='or_else.v-4' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.select-4' class="method"><span id='select.v-4' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.select2-4' class="method"><span id='select2.v-4' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.join-4' class="method"><span id='join.v-4' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.join3-4' class="method"><span id='join3.v-4' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.join4-4' class="method"><span id='join4.v-4' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.join5-4' class="method"><span id='join5.v-4' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.into_stream-4' class="method"><span id='into_stream.v-4' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.flatten-4' class="method"><span id='flatten.v-4' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.flatten_stream-4' class="method"><span id='flatten_stream.v-4' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.fuse-4' class="method"><span id='fuse.v-4' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.inspect-4' class="method"><span id='inspect.v-4' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.catch_unwind-4' class="method"><span id='catch_unwind.v-4' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4><h4 id='method.shared-4' class="method"><span id='shared.v-4' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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></td></tr></tbody></table></span></h4></div></span>
  586. <h2 id='implementors' class='small-section-header'>
  587. Implementors<a href='#implementors' class='anchor'></a>
  588. </h2>
  589. <ul class='item-list' id='implementors-list'>
  590. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/future/empty.rs.html#24-31' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  591. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/future/lazy.rs.html#74-84' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  592. <li><table class='table-display'><tbody><tr><td><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><td><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></td></tr></tbody></table></li>
  593. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/future/result.rs.html#68-75' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  594. <li><table class='table-display'><tbody><tr><td><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><td><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></td></tr></tbody></table></li>
  595. <li><table class='table-display'><tbody><tr><td><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><td><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></td></tr></tbody></table></li>
  596. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/future/flatten.rs.html#35-49' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  597. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/future/fuse.rs.html#34-49' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  598. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/future/join.rs.html#59-90' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  599. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/future/join.rs.html#59-90' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  600. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/future/join.rs.html#59-90' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  601. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/future/join.rs.html#59-90' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  602. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/future/map.rs.html#22-38' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  603. <li><table class='table-display'><tbody><tr><td><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><td><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></td></tr></tbody></table></li>
  604. <li><table class='table-display'><tbody><tr><td><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><td><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></td></tr></tbody></table></li>
  605. <li><table class='table-display'><tbody><tr><td><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><td><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></td></tr></tbody></table></li>
  606. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/future/select.rs.html#38-71' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  607. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/future/select.rs.html#73-86' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  608. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/future/select2.rs.html#20-39' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  609. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/future/then.rs.html#23-36' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  610. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/future/either.rs.html#26-39' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  611. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/future/inspect.rs.html#23-40' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  612. <li><table class='table-display'><tbody><tr><td><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><td><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></td></tr></tbody></table></li>
  613. <li><table class='table-display'><tbody><tr><td><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><td><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></td></tr></tbody></table></li>
  614. <li><table class='table-display'><tbody><tr><td><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><td><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></td></tr></tbody></table></li>
  615. <li><table class='table-display'><tbody><tr><td><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><td><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></td></tr></tbody></table></li>
  616. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/future/shared.rs.html#123-206' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  617. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/concat.rs.html#37-54' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  618. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/concat.rs.html#89-106' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  619. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/fold.rs.html#42-81' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  620. <li><table class='table-display'><tbody><tr><td><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><td><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></td></tr></tbody></table></li>
  621. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/future.rs.html#57-76' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  622. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/forward.rs.html#78-110' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  623. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/collect.rs.html#33-52' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  624. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/sink/flush.rs.html#33-46' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  625. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/sink/send.rs.html#40-59' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  626. <li><table class='table-display'><tbody><tr><td><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><td><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></td></tr></tbody></table></li>
  627. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/sync/oneshot.rs.html#408-415' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  628. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/sync/oneshot.rs.html#513-525' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  629. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/sync/oneshot.rs.html#540-562' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  630. <li><table class='table-display'><tbody><tr><td><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><td><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></td></tr></tbody></table></li>
  631. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/sync/bilock.rs.html#242-255' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  632. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/unsync/mpsc.rs.html#453-467' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  633. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/unsync/oneshot.rs.html#178-208' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  634. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/unsync/oneshot.rs.html#300-312' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  635. <li><table class='table-display'><tbody><tr><td><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><td><div class='out-of-band'><a class='srclink' href='../../src/futures/unsync/oneshot.rs.html#321-343' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
  636. </ul><script type="text/javascript">window.inlined_types=new Set([]);</script><script type="text/javascript" async
  637. src="../../implementors/futures/future/trait.Future.js">
  638. </script></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>&#9166;</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g. <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g. <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g. <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "futures";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>