<!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="../../main.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">☰</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<F></a><a href="#impl-Future">AssertUnwindSafe<F></a><a href="#impl-Future">Box<F></a><a href="#impl-Future">&'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"> </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'>−</span>] </a> </span><a class='srclink' href='../../src/futures/future/mod.rs.html#177-1015' title='goto source code'>[src]</a></span></h1> <pre class='rust trait'>pub trait Future { type <a href='#associatedtype.Item' class="type">Item</a>; type <a href='#associatedtype.Error' class="type">Error</a>; fn <a href='#tymethod.poll' class='fnname'>poll</a>(&mut self) -> <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a><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>>; fn <a href='#method.wait' class='fnname'>wait</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../futures/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>><br> <span class="where">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, { ... } <div class='item-spacer'></div> fn <a href='#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../futures/future/struct.Map.html" title="struct futures::future::Map">Map</a><Self, F><br> <span class="where">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -> U,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, { ... } <div class='item-spacer'></div> fn <a href='#method.map_err' class='fnname'>map_err</a><F, E>(self, f: F) -> <a class="struct" href="../../futures/future/struct.MapErr.html" title="struct futures::future::MapErr">MapErr</a><Self, F><br> <span class="where">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -> E,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, { ... } <div class='item-spacer'></div> fn <a href='#method.from_err' class='fnname'>from_err</a><E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>>(self) -> <a class="struct" href="../../futures/future/struct.FromErr.html" title="struct futures::future::FromErr">FromErr</a><Self, E><br> <span class="where">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, { ... } <div class='item-spacer'></div> fn <a href='#method.then' class='fnname'>then</a><F, B>(self, f: F) -> <a class="struct" href="../../futures/future/struct.Then.html" title="struct futures::future::Then">Then</a><Self, B, F><br> <span class="where">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../futures/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>>) -> B,<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, { ... } <div class='item-spacer'></div> fn <a href='#method.and_then' class='fnname'>and_then</a><F, B>(self, f: F) -> <a class="struct" href="../../futures/future/struct.AndThen.html" title="struct futures::future::AndThen">AndThen</a><Self, B, F><br> <span class="where">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -> B,<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, { ... } <div class='item-spacer'></div> fn <a href='#method.or_else' class='fnname'>or_else</a><F, B>(self, f: F) -> <a class="struct" href="../../futures/future/struct.OrElse.html" title="struct futures::future::OrElse">OrElse</a><Self, B, F><br> <span class="where">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -> B,<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Item = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, { ... } <div class='item-spacer'></div> fn <a href='#method.select' class='fnname'>select</a><B>(self, other: B) -> <a class="struct" href="../../futures/future/struct.Select.html" title="struct futures::future::Select">Select</a><Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>><br> <span class="where">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><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>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, { ... } <div class='item-spacer'></div> fn <a href='#method.select2' class='fnname'>select2</a><B>(self, other: B) -> <a class="struct" href="../../futures/future/struct.Select2.html" title="struct futures::future::Select2">Select2</a><Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>><br> <span class="where">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, { ... } <div class='item-spacer'></div> fn <a href='#method.join' class='fnname'>join</a><B>(self, other: B) -> <a class="struct" href="../../futures/future/struct.Join.html" title="struct futures::future::Join">Join</a><Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>><br> <span class="where">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, { ... } <div class='item-spacer'></div> fn <a href='#method.join3' class='fnname'>join3</a><B, C>(self, b: B, c: C) -> <a class="struct" href="../../futures/future/struct.Join3.html" title="struct futures::future::Join3">Join3</a><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>><br> <span class="where">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, { ... } <div class='item-spacer'></div> fn <a href='#method.join4' class='fnname'>join4</a><B, C, D>(<br> self, <br> b: B, <br> c: C, <br> d: D<br> ) -> <a class="struct" href="../../futures/future/struct.Join4.html" title="struct futures::future::Join4">Join4</a><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>><br> <span class="where">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, { ... } <div class='item-spacer'></div> fn <a href='#method.join5' class='fnname'>join5</a><B, C, D, E>(<br> self, <br> b: B, <br> c: C, <br> d: D, <br> e: E<br> ) -> <a class="struct" href="../../futures/future/struct.Join5.html" title="struct futures::future::Join5">Join5</a><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>><br> <span class="where">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> E: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, { ... } <div class='item-spacer'></div> fn <a href='#method.into_stream' class='fnname'>into_stream</a>(self) -> <a class="struct" href="../../futures/future/struct.IntoStream.html" title="struct futures::future::IntoStream">IntoStream</a><Self><br> <span class="where">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, { ... } <div class='item-spacer'></div> fn <a href='#method.flatten' class='fnname'>flatten</a>(self) -> <a class="struct" href="../../futures/future/struct.Flatten.html" title="struct futures::future::Flatten">Flatten</a><Self><br> <span class="where">where<br> 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> <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>>::<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><Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, { ... } <div class='item-spacer'></div> fn <a href='#method.flatten_stream' class='fnname'>flatten_stream</a>(self) -> <a class="struct" href="../../futures/future/struct.FlattenStream.html" title="struct futures::future::FlattenStream">FlattenStream</a><Self><br> <span class="where">where<br> 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><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, { ... } <div class='item-spacer'></div> fn <a href='#method.fuse' class='fnname'>fuse</a>(self) -> <a class="struct" href="../../futures/future/struct.Fuse.html" title="struct futures::future::Fuse">Fuse</a><Self><br> <span class="where">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, { ... } <div class='item-spacer'></div> fn <a href='#method.inspect' class='fnname'>inspect</a><F>(self, f: F) -> <a class="struct" href="../../futures/future/struct.Inspect.html" title="struct futures::future::Inspect">Inspect</a><Self, F><br> <span class="where">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>),<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, { ... } <div class='item-spacer'></div> fn <a href='#method.catch_unwind' class='fnname'>catch_unwind</a>(self) -> <a class="struct" href="../../futures/future/struct.CatchUnwind.html" title="struct futures::future::CatchUnwind">CatchUnwind</a><Self><br> <span class="where">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a></span>, { ... } <div class='item-spacer'></div> fn <a href='#method.shared' class='fnname'>shared</a>(self) -> <a class="struct" href="../../futures/future/struct.Shared.html" title="struct futures::future::Shared">Shared</a><Self><br> <span class="where">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, { ... } }</pre><div class='docblock'><p>Trait for types which are a placeholder of a value that may become available at some later point in time.</p> <p>In addition to the documentation here you can also find more information about futures <a href="https://tokio.rs/docs/getting-started/futures/">online</a> at <a href="https://tokio.rs">https://tokio.rs</a></p> <p>Futures are used to provide a sentinel through which a value can be referenced. They crucially allow chaining and composing operations through consumption which allows expressing entire trees of computation as one sentinel value.</p> <p>The ergonomics and implementation of the <code>Future</code> trait are very similar to the <code>Iterator</code> trait in that there is just one methods you need to implement, but you get a whole lot of others for free as a result.</p> <h1 id="the-poll-method" class="section-header"><a href="#the-poll-method">The <code>poll</code> method</a></h1> <p>The core method of future, <code>poll</code>, is used to attempt to generate the value of a <code>Future</code>. This method <em>does not block</em> but is allowed to inform the caller that the value is not ready yet. Implementations of <code>poll</code> may themselves do work to generate the value, but it's guaranteed that this will never block the calling thread.</p> <p>A key aspect of this method is that if the value is not yet available the current task is scheduled to receive a notification when it's later ready to be made available. This follows what's typically known as a "readiness" or "pull" model where values are pulled out of futures on demand, and otherwise a task is notified when a value might be ready to get pulled out.</p> <p>The <code>poll</code> method is not intended to be called in general, but rather is typically called in the context of a "task" which drives a future to completion. For more information on this see the <code>task</code> module.</p> <p>More information about the details of <code>poll</code> and the nitty-gritty of tasks can be <a href="https://tokio.rs/docs/going-deeper-futures/futures-model/">found online at tokio.rs</a>.</p> <h1 id="combinators" class="section-header"><a href="#combinators">Combinators</a></h1> <p>Like iterators, futures provide a large number of combinators to work with futures to express computations in a much more natural method than scheduling a number of callbacks. For example the <code>map</code> method can change a <code>Future<Item=T></code> to a <code>Future<Item=U></code> or an <code>and_then</code> combinator could create a future after the first one is done and only be resolved when the second is done.</p> <p>Combinators act very similarly to the methods on the <code>Iterator</code> trait itself or those on <code>Option</code> and <code>Result</code>. Like with iterators, the combinators are zero-cost and don't impose any extra layers of indirection you wouldn't otherwise have to write down.</p> <p>More information about combinators can be found <a href="https://tokio.rs/docs/going-deeper-futures/futures-mechanics/">on tokio.rs</a>.</p> </div> <h2 id='associated-types' class='small-section-header'> Associated Types<a href='#associated-types' class='anchor'></a> </h2> <div class='methods'> <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 successful.</p> </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 normal fashion.</p> </div></div> <h2 id='required-methods' class='small-section-header'> Required Methods<a href='#required-methods' class='anchor'></a> </h2> <div class='methods'> <h3 id='tymethod.poll' class='method'><span id='poll.v' class='invisible'><code>fn <a href='#tymethod.poll' class='fnname'>poll</a>(&mut self) -> <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a><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>></code></span></h3><div class='docblock'><p>Query this future to see if its value has become available, registering interest if it is not.</p> <p>This function will check the internal state of the future and assess whether the value is ready to be produced. Implementers of this function should ensure that a call to this <strong>never blocks</strong> as event loops may not work properly otherwise.</p> <p>When a future is not ready yet, the <code>Async::NotReady</code> value will be returned. In this situation the future will <em>also</em> register interest of the current task in the value being produced. This is done by calling <code>task::park</code> to retrieve a handle to the current <code>Task</code>. When the future is then ready to make progress (e.g. it should be <code>poll</code>ed again) the <code>unpark</code> method is called on the <code>Task</code>.</p> <p>More information about the details of <code>poll</code> and the nitty-gritty of tasks can be <a href="https://tokio.rs/docs/going-deeper-futures/futures-model/">found online at tokio.rs</a>.</p> <h1 id="runtime-characteristics" class="section-header"><a href="#runtime-characteristics">Runtime characteristics</a></h1> <p>This function, <code>poll</code>, is the primary method for 'making progress' within a tree of futures. For example this method will be called repeatedly as the internal state machine makes its various transitions. Executors are responsible for ensuring that this function is called in the right location (e.g. always on an I/O thread or not). Unless it is otherwise arranged to be so, it should be ensured that <strong>implementations of this function finish very quickly</strong>.</p> <p>Returning quickly prevents unnecessarily clogging up threads and/or event loops while a <code>poll</code> function call, for example, takes up compute resources to perform some expensive computation. If it is known ahead of time that a call to <code>poll</code> may end up taking awhile, the work should be offloaded to a thread pool (or something similar) to ensure that <code>poll</code> can return quickly.</p> <p>Note that the <code>poll</code> function is not called repeatedly in a loop for futures typically, but only whenever the future itself is ready. If you're familiar with the <code>poll(2)</code> or <code>select(2)</code> syscalls on Unix it's worth noting that futures typically do <em>not</em> suffer the same problems of "all wakeups must poll all events". Futures have enough support for only polling futures which cause a wakeup.</p> <h1 id="return-value" class="section-header"><a href="#return-value">Return value</a></h1> <p>This function returns <code>Async::NotReady</code> if the future is not ready yet, <code>Err</code> if the future is finished but resolved to an error, or <code>Async::Ready</code> with the result of this future if it's finished successfully. Once a future has finished it is considered a contract error to continue polling the future.</p> <p>If <code>NotReady</code> is returned, then the future will internally register interest in the value being produced for the current task (through <code>task::park</code>). In other words, the current task will receive a notification (through the <code>unpark</code> method) once the value is ready to be produced or the future can make progress.</p> <p>Note that if <code>NotReady</code> is returned it only means that <em>this</em> task will receive a notification. Historical calls to <code>poll</code> with different tasks will not receive notifications. In other words, implementers of the <code>Future</code> trait need not store a queue of tasks to notify, but only the last task that called this method. Alternatively callers of this method can only rely on the most recent task which call <code>poll</code> being notified when a future is ready.</p> <h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1> <p>Once a future has completed (returned <code>Ready</code> or <code>Err</code> from <code>poll</code>), then any future calls to <code>poll</code> may panic, block forever, or otherwise cause wrong behavior. The <code>Future</code> trait itself provides no guarantees about the behavior of <code>poll</code> after a future has completed.</p> <p>Callers who may call <code>poll</code> too many times may want to consider using the <code>fuse</code> adaptor which defines the behavior of <code>poll</code>, but comes with a little bit of extra cost.</p> <p>Additionally, calls to <code>poll</code> must always be made from within the context of a task. If a current task is not set then this method will likely panic.</p> <h1 id="errors" class="section-header"><a href="#errors">Errors</a></h1> <p>This future may have failed to finish the computation, in which case the <code>Err</code> variant will be returned with an appropriate payload of an error.</p> </div></div> <h2 id='provided-methods' class='small-section-header'> Provided Methods<a href='#provided-methods' class='anchor'></a> </h2> <div class='methods'> <h3 id='method.wait' class='method'><span id='wait.v' class='invisible'><code>fn <a href='#method.wait' class='fnname'>wait</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../futures/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>> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span></h3><div class='docblock'><p>Block the current thread until this future is resolved.</p> <p>This method will consume ownership of this future, driving it to completion via <code>poll</code> and blocking the current thread while it's waiting for the value to become available. Once the future is resolved the result of this future is returned.</p> <blockquote> <p><strong>Note:</strong> This method is not appropriate to call on event loops or similar I/O situations because it will prevent the event loop from making progress (this blocks the thread). This method should only be called when it's guaranteed that the blocking work associated with this future will be completed by another thread.</p> </blockquote> <p>This method is only available when the <code>use_std</code> feature of this library is activated, and it is activated by default.</p> <h1 id="panics-1" class="section-header"><a href="#panics-1">Panics</a></h1> <p>This function does not attempt to catch panics. If the <code>poll</code> function of this future panics, panics will be propagated to the caller.</p> </div><h3 id='method.map' class='method'><span id='map.v' class='invisible'><code>fn <a href='#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../futures/future/struct.Map.html" title="struct futures::future::Map">Map</a><Self, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -> U,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span></h3><div class='docblock'><p>Map this future's result to a different type, returning a new future of the resulting type.</p> <p>This function is similar to the <code>Option::map</code> or <code>Iterator::map</code> where it will change the type of the underlying future. This is useful to chain along a computation once a future has been resolved.</p> <p>The closure provided will only be called if this future is resolved successfully. If this future returns an error, panics, or is dropped, then the closure provided will never be invoked.</p> <p>Note that this function consumes the receiving future and returns a wrapped version of it, similar to the existing <code>map</code> methods in the standard library.</p> <h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1> <pre class="rust rust-example-rendered"> <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>; <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>; <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"><</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">></span>(<span class="number">1</span>); <span class="kw">let</span> <span class="ident">new_future</span> <span class="op">=</span> <span class="ident">future</span>.<span class="ident">map</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> <span class="ident">x</span> <span class="op">+</span> <span class="number">3</span>); <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">new_future</span>.<span class="ident">wait</span>(), <span class="prelude-val">Ok</span>(<span class="number">4</span>));</pre> <p>Calling <code>map</code> on an errored <code>Future</code> has no effect:</p> <pre class="rust rust-example-rendered"> <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>; <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>; <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"><</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">></span>(<span class="number">1</span>); <span class="kw">let</span> <span class="ident">new_future</span> <span class="op">=</span> <span class="ident">future</span>.<span class="ident">map</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> <span class="ident">x</span> <span class="op">+</span> <span class="number">3</span>); <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">new_future</span>.<span class="ident">wait</span>(), <span class="prelude-val">Err</span>(<span class="number">1</span>));</pre> </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><F, E>(self, f: F) -> <a class="struct" href="../../futures/future/struct.MapErr.html" title="struct futures::future::MapErr">MapErr</a><Self, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -> E,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span></h3><div class='docblock'><p>Map this future's error to a different error, returning a new future.</p> <p>This function is similar to the <code>Result::map_err</code> where it will change the error type of the underlying future. This is useful for example to ensure that futures have the same error type when used with combinators like <code>select</code> and <code>join</code>.</p> <p>The closure provided will only be called if this future is resolved with an error. If this future returns a success, panics, or is dropped, then the closure provided will never be invoked.</p> <p>Note that this function consumes the receiving future and returns a wrapped version of it.</p> <h1 id="examples-1" class="section-header"><a href="#examples-1">Examples</a></h1> <pre class="rust rust-example-rendered"> <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>::<span class="kw-2">*</span>; <span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">err</span>::<span class="op"><</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">></span>(<span class="number">1</span>); <span class="kw">let</span> <span class="ident">new_future</span> <span class="op">=</span> <span class="ident">future</span>.<span class="ident">map_err</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> <span class="ident">x</span> <span class="op">+</span> <span class="number">3</span>); <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">new_future</span>.<span class="ident">wait</span>(), <span class="prelude-val">Err</span>(<span class="number">4</span>));</pre> <p>Calling <code>map_err</code> on a successful <code>Future</code> has no effect:</p> <pre class="rust rust-example-rendered"> <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>::<span class="kw-2">*</span>; <span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">ok</span>::<span class="op"><</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">></span>(<span class="number">1</span>); <span class="kw">let</span> <span class="ident">new_future</span> <span class="op">=</span> <span class="ident">future</span>.<span class="ident">map_err</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> <span class="ident">x</span> <span class="op">+</span> <span class="number">3</span>); <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">new_future</span>.<span class="ident">wait</span>(), <span class="prelude-val">Ok</span>(<span class="number">1</span>));</pre> </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><E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>>(self) -> <a class="struct" href="../../futures/future/struct.FromErr.html" title="struct futures::future::FromErr">FromErr</a><Self, E> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span></h3><div class='docblock'><p>Map this future's error to any error implementing <code>From</code> for this future's <code>Error</code>, returning a new future.</p> <p>This function does for futures what <code>try!</code> does for <code>Result</code>, by letting the compiler infer the type of the resulting error. Just as <code>map_err</code> above, this is useful for example to ensure that futures have the same error type when used with combinators like <code>select</code> and <code>join</code>.</p> <p>Note that this function consumes the receiving future and returns a wrapped version of it.</p> <h1 id="examples-2" class="section-header"><a href="#examples-2">Examples</a></h1> <pre class="rust rust-example-rendered"> <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>; <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>; <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"><</span>(), <span class="ident">u8</span><span class="op">></span>(<span class="number">1</span>); <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"><</span><span class="ident">u32</span><span class="op">></span>();</pre> </div><h3 id='method.then' class='method'><span id='then.v' class='invisible'><code>fn <a href='#method.then' class='fnname'>then</a><F, B>(self, f: F) -> <a class="struct" href="../../futures/future/struct.Then.html" title="struct futures::future::Then">Then</a><Self, B, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../futures/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>>) -> B,<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span></h3><div class='docblock'><p>Chain on a computation for when a future finished, passing the result of the future to the provided closure <code>f</code>.</p> <p>This function can be used to ensure a computation runs regardless of the conclusion of the future. The closure provided will be yielded a <code>Result</code> once the future is complete.</p> <p>The returned value of the closure must implement the <code>IntoFuture</code> trait and can represent some more work to be done before the composed future is finished. Note that the <code>Result</code> type implements the <code>IntoFuture</code> trait so it is possible to simply alter the <code>Result</code> yielded to the closure and return it.</p> <p>If this future is dropped or panics then the closure <code>f</code> will not be run.</p> <p>Note that this function consumes the receiving future and returns a wrapped version of it.</p> <h1 id="examples-3" class="section-header"><a href="#examples-3">Examples</a></h1> <pre class="rust rust-example-rendered"> <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>; <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>; <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"><</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">></span>(<span class="number">1</span>); <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> { <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>) }); <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"><</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">></span>(<span class="number">1</span>); <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> { <span class="kw">match</span> <span class="ident">x</span> { <span class="prelude-val">Ok</span>(_) <span class="op">=></span> <span class="macro">panic</span><span class="macro">!</span>(<span class="string">"expected an error"</span>), <span class="prelude-val">Err</span>(<span class="ident">y</span>) <span class="op">=></span> <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op"><</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">></span>(<span class="ident">y</span> <span class="op">+</span> <span class="number">3</span>), } });</pre> </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><F, B>(self, f: F) -> <a class="struct" href="../../futures/future/struct.AndThen.html" title="struct futures::future::AndThen">AndThen</a><Self, B, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -> B,<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span></h3><div class='docblock'><p>Execute another future after this one has resolved successfully.</p> <p>This function can be used to chain two futures together and ensure that the final future isn't resolved until both have finished. The closure provided is yielded the successful result of this future and returns another value which can be converted into a future.</p> <p>Note that because <code>Result</code> implements the <code>IntoFuture</code> trait this method can also be useful for chaining fallible and serial computations onto the end of one future.</p> <p>If this future is dropped, panics, or completes with an error then the provided closure <code>f</code> is never called.</p> <p>Note that this function consumes the receiving future and returns a wrapped version of it.</p> <h1 id="examples-4" class="section-header"><a href="#examples-4">Examples</a></h1> <pre class="rust rust-example-rendered"> <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>; <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>}; <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"><</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">></span>(<span class="number">1</span>); <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> { <span class="prelude-val">Ok</span>(<span class="ident">x</span> <span class="op">+</span> <span class="number">3</span>) }); <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"><</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">></span>(<span class="number">1</span>); <span class="ident">future_of_err_1</span>.<span class="ident">and_then</span>(<span class="op">|</span>_<span class="op">|</span> <span class="op">-></span> <span class="ident">FutureResult</span><span class="op"><</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">></span> { <span class="macro">panic</span><span class="macro">!</span>(<span class="string">"should not be called in case of an error"</span>); });</pre> </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><F, B>(self, f: F) -> <a class="struct" href="../../futures/future/struct.OrElse.html" title="struct futures::future::OrElse">OrElse</a><Self, B, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -> B,<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Item = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span></h3><div class='docblock'><p>Execute another future if this one resolves with an error.</p> <p>Return a future that passes along this future's value if it succeeds, and otherwise passes the error to the closure <code>f</code> and waits for the future it returns. The closure may also simply return a value that can be converted into a future.</p> <p>Note that because <code>Result</code> implements the <code>IntoFuture</code> trait this method can also be useful for chaining together fallback computations, where when one fails, the next is attempted.</p> <p>If this future is dropped, panics, or completes successfully then the provided closure <code>f</code> is never called.</p> <p>Note that this function consumes the receiving future and returns a wrapped version of it.</p> <h1 id="examples-5" class="section-header"><a href="#examples-5">Examples</a></h1> <pre class="rust rust-example-rendered"> <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>; <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>}; <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"><</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">></span>(<span class="number">1</span>); <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">-></span> <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">></span> { <span class="prelude-val">Ok</span>(<span class="ident">x</span> <span class="op">+</span> <span class="number">3</span>) }); <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"><</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">></span>(<span class="number">1</span>); <span class="ident">future_of_1</span>.<span class="ident">or_else</span>(<span class="op">|</span>_<span class="op">|</span> <span class="op">-></span> <span class="ident">FutureResult</span><span class="op"><</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">></span> { <span class="macro">panic</span><span class="macro">!</span>(<span class="string">"should not be called in case of success"</span>); });</pre> </div><h3 id='method.select' class='method'><span id='select.v' class='invisible'><code>fn <a href='#method.select' class='fnname'>select</a><B>(self, other: B) -> <a class="struct" href="../../futures/future/struct.Select.html" title="struct futures::future::Select">Select</a><Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><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>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span></h3><div class='docblock'><p>Waits for either one of two futures to complete.</p> <p>This function will return a new future which awaits for either this or the <code>other</code> future to complete. The returned future will finish with both the value resolved and a future representing the completion of the other work. Both futures must have the same item and error type.</p> <p>Note that this function consumes the receiving futures and returns a wrapped version of them.</p> <h1 id="examples-6" class="section-header"><a href="#examples-6">Examples</a></h1> <pre class="rust rust-example-rendered"> <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>; <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>; <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">thread</span>; <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">time</span>; <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> { <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>)); <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op"><</span><span class="ident">char</span>, ()<span class="op">></span>(<span class="string">'a'</span>) }); <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> { <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>)); <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op"><</span><span class="ident">char</span>, ()<span class="op">></span>(<span class="string">'b'</span>) }); <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>(); <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">value</span>, <span class="string">'a'</span>); <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">'b'</span>);</pre> <p>A poor-man's <code>join</code> implemented on top of <code>select</code>:</p> <pre class="rust rust-example-rendered"> <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>; <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>; <span class="kw">fn</span> <span class="ident">join</span><span class="op"><</span><span class="ident">A</span><span class="op">></span>(<span class="ident">a</span>: <span class="ident">A</span>, <span class="ident">b</span>: <span class="ident">A</span>) <span class="op">-></span> <span class="ident">Box</span><span class="op"><</span><span class="ident">Future</span><span class="op"><</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">>></span> <span class="kw">where</span> <span class="ident">A</span>: <span class="ident">Future</span><span class="op"><</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">></span> <span class="op">+</span> <span class="lifetime">'static</span>, { <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">-></span> <span class="ident">Box</span><span class="op"><</span><span class="ident">Future</span><span class="op"><</span><span class="ident">Item</span><span class="op">=</span>_, <span class="ident">Error</span><span class="op">=</span>_<span class="op">>></span> { <span class="kw">match</span> <span class="ident">res</span> { <span class="prelude-val">Ok</span>((<span class="ident">a</span>, <span class="ident">b</span>)) <span class="op">=></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>))), <span class="prelude-val">Err</span>((<span class="ident">a</span>, _)) <span class="op">=></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>)), } })) }</pre> </div><h3 id='method.select2' class='method'><span id='select2.v' class='invisible'><code>fn <a href='#method.select2' class='fnname'>select2</a><B>(self, other: B) -> <a class="struct" href="../../futures/future/struct.Select2.html" title="struct futures::future::Select2">Select2</a><Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span></h3><div class='docblock'><p>Waits for either one of two differently-typed futures to complete.</p> <p>This function will return a new future which awaits for either this or the <code>other</code> future to complete. The returned future will finish with both the value resolved and a future representing the completion of the other work.</p> <p>Note that this function consumes the receiving futures and returns a wrapped version of them.</p> <p>Also note that if both this and the second future have the same success/error type you can use the <code>Either::split</code> method to conveniently extract out the value at the end.</p> <h1 id="examples-7" class="section-header"><a href="#examples-7">Examples</a></h1> <pre class="rust rust-example-rendered"> <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>; <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>}; <span class="comment">// A poor-man's join implemented on top of select2</span> <span class="kw">fn</span> <span class="ident">join</span><span class="op"><</span><span class="ident">A</span>, <span class="ident">B</span>, <span class="ident">E</span><span class="op">></span>(<span class="ident">a</span>: <span class="ident">A</span>, <span class="ident">b</span>: <span class="ident">B</span>) <span class="op">-></span> <span class="ident">Box</span><span class="op"><</span><span class="ident">Future</span><span class="op"><</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">>></span> <span class="kw">where</span> <span class="ident">A</span>: <span class="ident">Future</span><span class="op"><</span><span class="ident">Error</span> <span class="op">=</span> <span class="ident">E</span><span class="op">></span> <span class="op">+</span> <span class="lifetime">'static</span>, <span class="ident">B</span>: <span class="ident">Future</span><span class="op"><</span><span class="ident">Error</span> <span class="op">=</span> <span class="ident">E</span><span class="op">></span> <span class="op">+</span> <span class="lifetime">'static</span>, <span class="ident">E</span>: <span class="lifetime">'static</span>, { <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">-></span> <span class="ident">Box</span><span class="op"><</span><span class="ident">Future</span><span class="op"><</span><span class="ident">Item</span><span class="op">=</span>_, <span class="ident">Error</span><span class="op">=</span>_<span class="op">>></span> { <span class="kw">match</span> <span class="ident">res</span> { <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">=></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>))), <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">=></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>))), <span class="prelude-val">Err</span>(<span class="ident">Either</span>::<span class="ident">A</span>((<span class="ident">e</span>, _))) <span class="op">=></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>)), <span class="prelude-val">Err</span>(<span class="ident">Either</span>::<span class="ident">B</span>((<span class="ident">e</span>, _))) <span class="op">=></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>)), } })) }</pre> </div><h3 id='method.join' class='method'><span id='join.v' class='invisible'><code>fn <a href='#method.join' class='fnname'>join</a><B>(self, other: B) -> <a class="struct" href="../../futures/future/struct.Join.html" title="struct futures::future::Join">Join</a><Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span></h3><div class='docblock'><p>Joins the result of two futures, waiting for them both to complete.</p> <p>This function will return a new future which awaits both this and the <code>other</code> future to complete. The returned future will finish with a tuple of both results.</p> <p>Both futures must have the same error type, and if either finishes with an error then the other will be dropped and that error will be returned.</p> <p>Note that this function consumes the receiving future and returns a wrapped version of it.</p> <h1 id="examples-8" class="section-header"><a href="#examples-8">Examples</a></h1> <pre class="rust rust-example-rendered"> <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>; <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>; <span class="kw">let</span> <span class="ident">a</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op"><</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">></span>(<span class="number">1</span>); <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"><</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">></span>(<span class="number">2</span>); <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>); <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> <p>If one or both of the joined <code>Future</code>s is errored, the resulting <code>Future</code> will be errored:</p> <pre class="rust rust-example-rendered"> <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>; <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>; <span class="kw">let</span> <span class="ident">a</span> <span class="op">=</span> <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op"><</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">></span>(<span class="number">1</span>); <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"><</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">></span>(<span class="number">2</span>); <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>); <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> </div><h3 id='method.join3' class='method'><span id='join3.v' class='invisible'><code>fn <a href='#method.join3' class='fnname'>join3</a><B, C>(self, b: B, c: C) -> <a class="struct" href="../../futures/future/struct.Join3.html" title="struct futures::future::Join3">Join3</a><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>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span></h3><div class='docblock'><p>Same as <code>join</code>, but with more futures.</p> </div><h3 id='method.join4' class='method'><span id='join4.v' class='invisible'><code>fn <a href='#method.join4' class='fnname'>join4</a><B, C, D>(<br> self, <br> b: B, <br> c: C, <br> d: D<br>) -> <a class="struct" href="../../futures/future/struct.Join4.html" title="struct futures::future::Join4">Join4</a><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>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span></h3><div class='docblock'><p>Same as <code>join</code>, but with more futures.</p> </div><h3 id='method.join5' class='method'><span id='join5.v' class='invisible'><code>fn <a href='#method.join5' class='fnname'>join5</a><B, C, D, E>(<br> self, <br> b: B, <br> c: C, <br> d: D, <br> e: E<br>) -> <a class="struct" href="../../futures/future/struct.Join5.html" title="struct futures::future::Join5">Join5</a><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>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> E: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span></h3><div class='docblock'><p>Same as <code>join</code>, but with more futures.</p> </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) -> <a class="struct" href="../../futures/future/struct.IntoStream.html" title="struct futures::future::IntoStream">IntoStream</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span></h3><div class='docblock'><p>Convert this future into a single element stream.</p> <p>The returned stream contains single success if this future resolves to success or single error if this future resolves into error.</p> <h1 id="examples-9" class="section-header"><a href="#examples-9">Examples</a></h1> <pre class="rust rust-example-rendered"> <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>; <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>; <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"><</span>_, <span class="ident">bool</span><span class="op">></span>(<span class="number">17</span>); <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>(); <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>()); <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>()); <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"><</span><span class="ident">bool</span>, _<span class="op">></span>(<span class="number">19</span>); <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>(); <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>()); <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> </div><h3 id='method.flatten' class='method'><span id='flatten.v' class='invisible'><code>fn <a href='#method.flatten' class='fnname'>flatten</a>(self) -> <a class="struct" href="../../futures/future/struct.Flatten.html" title="struct futures::future::Flatten">Flatten</a><Self> <span class="where fmt-newline">where<br> 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> <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>>::<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><Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span></h3><div class='docblock'><p>Flatten the execution of this future when the successful result of this future is itself another future.</p> <p>This can be useful when combining futures together to flatten the computation out the final result. This method can only be called when the successful result of this future itself implements the <code>IntoFuture</code> trait and the error can be created from this future's error type.</p> <p>This method is roughly equivalent to <code>self.and_then(|x| x)</code>.</p> <p>Note that this function consumes the receiving future and returns a wrapped version of it.</p> <h1 id="examples-10" class="section-header"><a href="#examples-10">Examples</a></h1> <pre class="rust rust-example-rendered"> <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>; <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>; <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"><</span>_, <span class="ident">u32</span><span class="op">></span>(<span class="ident">future</span>::<span class="ident">ok</span>::<span class="op"><</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">></span>(<span class="number">1</span>)); <span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">nested_future</span>.<span class="ident">flatten</span>(); <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> <p>Calling <code>flatten</code> on an errored <code>Future</code>, or if the inner <code>Future</code> is errored, will result in an errored <code>Future</code>:</p> <pre class="rust rust-example-rendered"> <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>; <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>; <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"><</span>_, <span class="ident">u32</span><span class="op">></span>(<span class="ident">future</span>::<span class="ident">err</span>::<span class="op"><</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">></span>(<span class="number">1</span>)); <span class="kw">let</span> <span class="ident">future</span> <span class="op">=</span> <span class="ident">nested_future</span>.<span class="ident">flatten</span>(); <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> </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) -> <a class="struct" href="../../futures/future/struct.FlattenStream.html" title="struct futures::future::FlattenStream">FlattenStream</a><Self> <span class="where fmt-newline">where<br> 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><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span></h3><div class='docblock'><p>Flatten the execution of this future when the successful result of this future is a stream.</p> <p>This can be useful when stream initialization is deferred, and it is convenient to work with that stream as if stream was available at the call site.</p> <p>Note that this function consumes this future and returns a wrapped version of it.</p> <h1 id="examples-11" class="section-header"><a href="#examples-11">Examples</a></h1> <pre class="rust rust-example-rendered"> <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>; <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>; <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">stream</span>; <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>]; <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"><</span>_, <span class="ident">bool</span><span class="op">></span>(<span class="ident">stream</span>::<span class="ident">iter_ok</span>(<span class="ident">stream_items</span>)); <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>(); <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>(); <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>()); <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>()); <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>()); <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> </div><h3 id='method.fuse' class='method'><span id='fuse.v' class='invisible'><code>fn <a href='#method.fuse' class='fnname'>fuse</a>(self) -> <a class="struct" href="../../futures/future/struct.Fuse.html" title="struct futures::future::Fuse">Fuse</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span></h3><div class='docblock'><p>Fuse a future such that <code>poll</code> will never again be called once it has completed.</p> <p>Currently once a future has returned <code>Ready</code> or <code>Err</code> from <code>poll</code> any further calls could exhibit bad behavior such as blocking forever, panicking, never returning, etc. If it is known that <code>poll</code> may be called too often then this method can be used to ensure that it has defined semantics.</p> <p>Once a future has been <code>fuse</code>d and it returns a completion from <code>poll</code>, then it will forever return <code>NotReady</code> from <code>poll</code> again (never resolve). This, unlike the trait's <code>poll</code> method, is guaranteed.</p> <p>This combinator will drop this future as soon as it's been completed to ensure resources are reclaimed as soon as possible.</p> <h1 id="examples-12" class="section-header"><a href="#examples-12">Examples</a></h1> <pre class="rust rust-example-rendered"> <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>; <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>; <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"><</span><span class="ident">i32</span>, <span class="ident">u32</span><span class="op">></span>(<span class="number">2</span>); <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>))); <span class="comment">// Normally, a call such as this would panic:</span> <span class="comment">//future.poll();</span> <span class="comment">// This, however, is guaranteed to not panic</span> <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"><</span><span class="ident">i32</span>, <span class="ident">u32</span><span class="op">></span>(<span class="number">2</span>).<span class="ident">fuse</span>(); <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>))); <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> </div><h3 id='method.inspect' class='method'><span id='inspect.v' class='invisible'><code>fn <a href='#method.inspect' class='fnname'>inspect</a><F>(self, f: F) -> <a class="struct" href="../../futures/future/struct.Inspect.html" title="struct futures::future::Inspect">Inspect</a><Self, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>),<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span></h3><div class='docblock'><p>Do something with the item of a future, passing it on.</p> <p>When using futures, you'll often chain several of them together. While working on such code, you might want to check out what's happening at various parts in the pipeline. To do that, insert a call to inspect().</p> <h1 id="examples-13" class="section-header"><a href="#examples-13">Examples</a></h1> <pre class="rust rust-example-rendered"> <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>; <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>; <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"><</span><span class="ident">u32</span>, <span class="ident">u32</span><span class="op">></span>(<span class="number">1</span>); <span class="kw">let</span> <span class="ident">new_future</span> <span class="op">=</span> <span class="ident">future</span>.<span class="ident">inspect</span>(<span class="op">|</span><span class="kw-2">&</span><span class="ident">x</span><span class="op">|</span> <span class="macro">println</span><span class="macro">!</span>(<span class="string">"about to resolve: {}"</span>, <span class="ident">x</span>)); <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">new_future</span>.<span class="ident">wait</span>(), <span class="prelude-val">Ok</span>(<span class="number">1</span>));</pre> </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) -> <a class="struct" href="../../futures/future/struct.CatchUnwind.html" title="struct futures::future::CatchUnwind">CatchUnwind</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>, </span></code></span></h3><div class='docblock'><p>Catches unwinding panics while polling the future.</p> <p>In general, panics within a future can propagate all the way out to the task level. This combinator makes it possible to halt unwinding within the future itself. It's most commonly used within task executors. It's not recommended to use this for error handling.</p> <p>Note that this method requires the <code>UnwindSafe</code> bound from the standard library. This isn't always applied automatically, and the standard library provides an <code>AssertUnwindSafe</code> wrapper type to apply it after-the fact. To assist using this method, the <code>Future</code> trait is also implemented for <code>AssertUnwindSafe<F></code> where <code>F</code> implements <code>Future</code>.</p> <p>This method is only available when the <code>use_std</code> feature of this library is activated, and it is activated by default.</p> <h1 id="examples-14" class="section-header"><a href="#examples-14">Examples</a></h1> <pre class="rust rust-example-rendered"> <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>; <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>}; <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"><</span><span class="ident">i32</span>, <span class="ident">u32</span><span class="op">></span>(<span class="number">2</span>); <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>()); <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">-></span> <span class="ident">FutureResult</span><span class="op"><</span><span class="ident">i32</span>, <span class="ident">u32</span><span class="op">></span> { <span class="macro">panic</span><span class="macro">!</span>(); <span class="ident">future</span>::<span class="ident">ok</span>::<span class="op"><</span><span class="ident">i32</span>, <span class="ident">u32</span><span class="op">></span>(<span class="number">2</span>) }); <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> </div><h3 id='method.shared' class='method'><span id='shared.v' class='invisible'><code>fn <a href='#method.shared' class='fnname'>shared</a>(self) -> <a class="struct" href="../../futures/future/struct.Shared.html" title="struct futures::future::Shared">Shared</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span></h3><div class='docblock'><p>Create a cloneable handle to this future where all handles will resolve to the same result.</p> <p>The shared() method provides a method to convert any future into a cloneable future. It enables a future to be polled by multiple threads.</p> <p>The returned <code>Shared</code> future resolves successfully with <code>SharedItem<Self::Item></code> or erroneously with <code>SharedError<Self::Error></code>. Both <code>SharedItem</code> and <code>SharedError</code> implements <code>Deref</code> to allow shared access to the underlying result. Ownership of <code>Self::Item</code> and <code>Self::Error</code> cannot currently be reclaimed.</p> <p>This method is only available when the <code>use_std</code> feature of this library is activated, and it is activated by default.</p> <h1 id="examples-15" class="section-header"><a href="#examples-15">Examples</a></h1> <pre class="rust rust-example-rendered"> <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>; <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>; <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"><</span>_, <span class="ident">bool</span><span class="op">></span>(<span class="number">6</span>); <span class="kw">let</span> <span class="ident">shared1</span> <span class="op">=</span> <span class="ident">future</span>.<span class="ident">shared</span>(); <span class="kw">let</span> <span class="ident">shared2</span> <span class="op">=</span> <span class="ident">shared1</span>.<span class="ident">clone</span>(); <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>()); <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> <pre class="rust rust-example-rendered"> <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">thread</span>; <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>; <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">future</span>; <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"><</span>_, <span class="ident">bool</span><span class="op">></span>(<span class="number">6</span>); <span class="kw">let</span> <span class="ident">shared1</span> <span class="op">=</span> <span class="ident">future</span>.<span class="ident">shared</span>(); <span class="kw">let</span> <span class="ident">shared2</span> <span class="op">=</span> <span class="ident">shared1</span>.<span class="ident">clone</span>(); <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> { <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>()); }); <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>()); <span class="ident">join_handle</span>.<span class="ident">join</span>().<span class="ident">unwrap</span>();</pre> </div></div> <h2 id='foreign-impls' class='small-section-header'> Implementations on Foreign Types<a href='#foreign-impls' class='anchor'></a> </h2> <h3 id='impl-Future' class='impl'><span class='in-band'><code>impl<F, T, E> <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><F> <span class="where fmt-newline">where<br> F: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a><Item = T, Error = E>, </span></code><a href='#impl-Future' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/option.rs.html#5-15' title='goto source code'>[src]</a></span></h3> <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><T></code></span></h4> <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> <h4 id='method.poll' class="method"><span id='poll.v-1' class='invisible'><code>fn <a href='#method.poll' class='fnname'>poll</a>(&mut self) -> <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><T>, E></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/option.rs.html#9-14' title='goto source code'>[src]</a></span></h4> <h4 id='method.wait-1' class="method"><span id='wait.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.wait' class='fnname'>wait</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../futures/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>> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></span></h4> <h4 id='method.map-1' class="method"><span id='map.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../futures/future/struct.Map.html" title="struct futures::future::Map">Map</a><Self, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -> U,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></span></h4> <h4 id='method.map_err-1' class="method"><span id='map_err.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.map_err' class='fnname'>map_err</a><F, E>(self, f: F) -> <a class="struct" href="../../futures/future/struct.MapErr.html" title="struct futures::future::MapErr">MapErr</a><Self, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -> E,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#410-415' title='goto source code'>[src]</a></span></h4> <h4 id='method.from_err-1' class="method"><span id='from_err.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.from_err' class='fnname'>from_err</a><E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>>(self) -> <a class="struct" href="../../futures/future/struct.FromErr.html" title="struct futures::future::FromErr">FromErr</a><Self, E> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#440-444' title='goto source code'>[src]</a></span></h4> <h4 id='method.then-1' class="method"><span id='then.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.then' class='fnname'>then</a><F, B>(self, f: F) -> <a class="struct" href="../../futures/future/struct.Then.html" title="struct futures::future::Then">Then</a><Self, B, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../futures/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>>) -> B,<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#484-490' title='goto source code'>[src]</a></span></h4> <h4 id='method.and_then-1' class="method"><span id='and_then.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.and_then' class='fnname'>and_then</a><F, B>(self, f: F) -> <a class="struct" href="../../futures/future/struct.AndThen.html" title="struct futures::future::AndThen">AndThen</a><Self, B, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -> B,<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#525-531' title='goto source code'>[src]</a></span></h4> <h4 id='method.or_else-1' class="method"><span id='or_else.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.or_else' class='fnname'>or_else</a><F, B>(self, f: F) -> <a class="struct" href="../../futures/future/struct.OrElse.html" title="struct futures::future::OrElse">OrElse</a><Self, B, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -> B,<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Item = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#566-572' title='goto source code'>[src]</a></span></h4> <h4 id='method.select-1' class="method"><span id='select.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.select' class='fnname'>select</a><B>(self, other: B) -> <a class="struct" href="../../futures/future/struct.Select.html" title="struct futures::future::Select">Select</a><Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><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>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#624-631' title='goto source code'>[src]</a></span></h4> <h4 id='method.select2-1' class="method"><span id='select2.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.select2' class='fnname'>select2</a><B>(self, other: B) -> <a class="struct" href="../../futures/future/struct.Select2.html" title="struct futures::future::Select2">Select2</a><Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#670-674' title='goto source code'>[src]</a></span></h4> <h4 id='method.join-1' class="method"><span id='join.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join' class='fnname'>join</a><B>(self, other: B) -> <a class="struct" href="../../futures/future/struct.Join.html" title="struct futures::future::Join">Join</a><Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#715-721' title='goto source code'>[src]</a></span></h4> <h4 id='method.join3-1' class="method"><span id='join3.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join3' class='fnname'>join3</a><B, C>(self, b: B, c: C) -> <a class="struct" href="../../futures/future/struct.Join3.html" title="struct futures::future::Join3">Join3</a><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>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#724-730' title='goto source code'>[src]</a></span></h4> <h4 id='method.join4-1' class="method"><span id='join4.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join4' class='fnname'>join4</a><B, C, D>(<br> self, <br> b: B, <br> c: C, <br> d: D<br>) -> <a class="struct" href="../../futures/future/struct.Join4.html" title="struct futures::future::Join4">Join4</a><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>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#733-741' title='goto source code'>[src]</a></span></h4> <h4 id='method.join5-1' class="method"><span id='join5.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join5' class='fnname'>join5</a><B, C, D, E>(<br> self, <br> b: B, <br> c: C, <br> d: D, <br> e: E<br>) -> <a class="struct" href="../../futures/future/struct.Join5.html" title="struct futures::future::Join5">Join5</a><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>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> E: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#744-754' title='goto source code'>[src]</a></span></h4> <h4 id='method.into_stream-1' class="method"><span id='into_stream.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.into_stream' class='fnname'>into_stream</a>(self) -> <a class="struct" href="../../futures/future/struct.IntoStream.html" title="struct futures::future::IntoStream">IntoStream</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#777-781' title='goto source code'>[src]</a></span></h4> <h4 id='method.flatten-1' class="method"><span id='flatten.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.flatten' class='fnname'>flatten</a>(self) -> <a class="struct" href="../../futures/future/struct.Flatten.html" title="struct futures::future::Flatten">Flatten</a><Self> <span class="where fmt-newline">where<br> 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> <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>>::<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><Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#819-829' title='goto source code'>[src]</a></span></h4> <h4 id='method.flatten_stream-1' class="method"><span id='flatten_stream.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.flatten_stream' class='fnname'>flatten_stream</a>(self) -> <a class="struct" href="../../futures/future/struct.FlattenStream.html" title="struct futures::future::FlattenStream">FlattenStream</a><Self> <span class="where fmt-newline">where<br> 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><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#859-864' title='goto source code'>[src]</a></span></h4> <h4 id='method.fuse-1' class="method"><span id='fuse.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.fuse' class='fnname'>fuse</a>(self) -> <a class="struct" href="../../futures/future/struct.Fuse.html" title="struct futures::future::Fuse">Fuse</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#899-904' title='goto source code'>[src]</a></span></h4> <h4 id='method.inspect-1' class="method"><span id='inspect.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.inspect' class='fnname'>inspect</a><F>(self, f: F) -> <a class="struct" href="../../futures/future/struct.Inspect.html" title="struct futures::future::Inspect">Inspect</a><Self, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>),<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#922-927' title='goto source code'>[src]</a></span></h4> <h4 id='method.catch_unwind-1' class="method"><span id='catch_unwind.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.catch_unwind' class='fnname'>catch_unwind</a>(self) -> <a class="struct" href="../../futures/future/struct.CatchUnwind.html" title="struct futures::future::CatchUnwind">CatchUnwind</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#961-965' title='goto source code'>[src]</a></span></h4> <h4 id='method.shared-1' class="method"><span id='shared.v-1' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.shared' class='fnname'>shared</a>(self) -> <a class="struct" href="../../futures/future/struct.Shared.html" title="struct futures::future::Shared">Shared</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#1010-1014' title='goto source code'>[src]</a></span></h4> </div></span><h3 id='impl-Future-1' class='impl'><span class='in-band'><code>impl<F: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>> <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><F></code><a href='#impl-Future-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/catch_unwind.rs.html#44-51' title='goto source code'>[src]</a></span></h3> <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> <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> <h4 id='method.poll-1' class="method"><span id='poll.v-2' class='invisible'><code>fn <a href='#method.poll' class='fnname'>poll</a>(&mut self) -> <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a><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>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/catch_unwind.rs.html#48-50' title='goto source code'>[src]</a></span></h4> <h4 id='method.wait-2' class="method"><span id='wait.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.wait' class='fnname'>wait</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../futures/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>> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></span></h4> <h4 id='method.map-2' class="method"><span id='map.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../futures/future/struct.Map.html" title="struct futures::future::Map">Map</a><Self, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -> U,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></span></h4> <h4 id='method.map_err-2' class="method"><span id='map_err.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.map_err' class='fnname'>map_err</a><F, E>(self, f: F) -> <a class="struct" href="../../futures/future/struct.MapErr.html" title="struct futures::future::MapErr">MapErr</a><Self, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -> E,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#410-415' title='goto source code'>[src]</a></span></h4> <h4 id='method.from_err-2' class="method"><span id='from_err.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.from_err' class='fnname'>from_err</a><E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>>(self) -> <a class="struct" href="../../futures/future/struct.FromErr.html" title="struct futures::future::FromErr">FromErr</a><Self, E> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#440-444' title='goto source code'>[src]</a></span></h4> <h4 id='method.then-2' class="method"><span id='then.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.then' class='fnname'>then</a><F, B>(self, f: F) -> <a class="struct" href="../../futures/future/struct.Then.html" title="struct futures::future::Then">Then</a><Self, B, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../futures/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>>) -> B,<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#484-490' title='goto source code'>[src]</a></span></h4> <h4 id='method.and_then-2' class="method"><span id='and_then.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.and_then' class='fnname'>and_then</a><F, B>(self, f: F) -> <a class="struct" href="../../futures/future/struct.AndThen.html" title="struct futures::future::AndThen">AndThen</a><Self, B, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -> B,<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#525-531' title='goto source code'>[src]</a></span></h4> <h4 id='method.or_else-2' class="method"><span id='or_else.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.or_else' class='fnname'>or_else</a><F, B>(self, f: F) -> <a class="struct" href="../../futures/future/struct.OrElse.html" title="struct futures::future::OrElse">OrElse</a><Self, B, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -> B,<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Item = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#566-572' title='goto source code'>[src]</a></span></h4> <h4 id='method.select-2' class="method"><span id='select.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.select' class='fnname'>select</a><B>(self, other: B) -> <a class="struct" href="../../futures/future/struct.Select.html" title="struct futures::future::Select">Select</a><Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><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>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#624-631' title='goto source code'>[src]</a></span></h4> <h4 id='method.select2-2' class="method"><span id='select2.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.select2' class='fnname'>select2</a><B>(self, other: B) -> <a class="struct" href="../../futures/future/struct.Select2.html" title="struct futures::future::Select2">Select2</a><Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#670-674' title='goto source code'>[src]</a></span></h4> <h4 id='method.join-2' class="method"><span id='join.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join' class='fnname'>join</a><B>(self, other: B) -> <a class="struct" href="../../futures/future/struct.Join.html" title="struct futures::future::Join">Join</a><Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#715-721' title='goto source code'>[src]</a></span></h4> <h4 id='method.join3-2' class="method"><span id='join3.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join3' class='fnname'>join3</a><B, C>(self, b: B, c: C) -> <a class="struct" href="../../futures/future/struct.Join3.html" title="struct futures::future::Join3">Join3</a><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>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#724-730' title='goto source code'>[src]</a></span></h4> <h4 id='method.join4-2' class="method"><span id='join4.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join4' class='fnname'>join4</a><B, C, D>(<br> self, <br> b: B, <br> c: C, <br> d: D<br>) -> <a class="struct" href="../../futures/future/struct.Join4.html" title="struct futures::future::Join4">Join4</a><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>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#733-741' title='goto source code'>[src]</a></span></h4> <h4 id='method.join5-2' class="method"><span id='join5.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join5' class='fnname'>join5</a><B, C, D, E>(<br> self, <br> b: B, <br> c: C, <br> d: D, <br> e: E<br>) -> <a class="struct" href="../../futures/future/struct.Join5.html" title="struct futures::future::Join5">Join5</a><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>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> E: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#744-754' title='goto source code'>[src]</a></span></h4> <h4 id='method.into_stream-2' class="method"><span id='into_stream.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.into_stream' class='fnname'>into_stream</a>(self) -> <a class="struct" href="../../futures/future/struct.IntoStream.html" title="struct futures::future::IntoStream">IntoStream</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#777-781' title='goto source code'>[src]</a></span></h4> <h4 id='method.flatten-2' class="method"><span id='flatten.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.flatten' class='fnname'>flatten</a>(self) -> <a class="struct" href="../../futures/future/struct.Flatten.html" title="struct futures::future::Flatten">Flatten</a><Self> <span class="where fmt-newline">where<br> 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> <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>>::<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><Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#819-829' title='goto source code'>[src]</a></span></h4> <h4 id='method.flatten_stream-2' class="method"><span id='flatten_stream.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.flatten_stream' class='fnname'>flatten_stream</a>(self) -> <a class="struct" href="../../futures/future/struct.FlattenStream.html" title="struct futures::future::FlattenStream">FlattenStream</a><Self> <span class="where fmt-newline">where<br> 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><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#859-864' title='goto source code'>[src]</a></span></h4> <h4 id='method.fuse-2' class="method"><span id='fuse.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.fuse' class='fnname'>fuse</a>(self) -> <a class="struct" href="../../futures/future/struct.Fuse.html" title="struct futures::future::Fuse">Fuse</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#899-904' title='goto source code'>[src]</a></span></h4> <h4 id='method.inspect-2' class="method"><span id='inspect.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.inspect' class='fnname'>inspect</a><F>(self, f: F) -> <a class="struct" href="../../futures/future/struct.Inspect.html" title="struct futures::future::Inspect">Inspect</a><Self, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>),<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#922-927' title='goto source code'>[src]</a></span></h4> <h4 id='method.catch_unwind-2' class="method"><span id='catch_unwind.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.catch_unwind' class='fnname'>catch_unwind</a>(self) -> <a class="struct" href="../../futures/future/struct.CatchUnwind.html" title="struct futures::future::CatchUnwind">CatchUnwind</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#961-965' title='goto source code'>[src]</a></span></h4> <h4 id='method.shared-2' class="method"><span id='shared.v-2' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.shared' class='fnname'>shared</a>(self) -> <a class="struct" href="../../futures/future/struct.Shared.html" title="struct futures::future::Shared">Shared</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#1010-1014' title='goto source code'>[src]</a></span></h4> </div></span><h3 id='impl-Future-2' class='impl'><span class='in-band'><code>impl<F: ?<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>> <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><F></code><a href='#impl-Future-2' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#108-115' title='goto source code'>[src]</a></span></h3> <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> <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> <h4 id='method.poll-2' class="method"><span id='poll.v-3' class='invisible'><code>fn <a href='#method.poll' class='fnname'>poll</a>(&mut self) -> <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a><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>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#112-114' title='goto source code'>[src]</a></span></h4> <h4 id='method.wait-3' class="method"><span id='wait.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.wait' class='fnname'>wait</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../futures/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>> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></span></h4> <h4 id='method.map-3' class="method"><span id='map.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../futures/future/struct.Map.html" title="struct futures::future::Map">Map</a><Self, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -> U,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></span></h4> <h4 id='method.map_err-3' class="method"><span id='map_err.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.map_err' class='fnname'>map_err</a><F, E>(self, f: F) -> <a class="struct" href="../../futures/future/struct.MapErr.html" title="struct futures::future::MapErr">MapErr</a><Self, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -> E,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#410-415' title='goto source code'>[src]</a></span></h4> <h4 id='method.from_err-3' class="method"><span id='from_err.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.from_err' class='fnname'>from_err</a><E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>>(self) -> <a class="struct" href="../../futures/future/struct.FromErr.html" title="struct futures::future::FromErr">FromErr</a><Self, E> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#440-444' title='goto source code'>[src]</a></span></h4> <h4 id='method.then-3' class="method"><span id='then.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.then' class='fnname'>then</a><F, B>(self, f: F) -> <a class="struct" href="../../futures/future/struct.Then.html" title="struct futures::future::Then">Then</a><Self, B, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../futures/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>>) -> B,<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#484-490' title='goto source code'>[src]</a></span></h4> <h4 id='method.and_then-3' class="method"><span id='and_then.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.and_then' class='fnname'>and_then</a><F, B>(self, f: F) -> <a class="struct" href="../../futures/future/struct.AndThen.html" title="struct futures::future::AndThen">AndThen</a><Self, B, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -> B,<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#525-531' title='goto source code'>[src]</a></span></h4> <h4 id='method.or_else-3' class="method"><span id='or_else.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.or_else' class='fnname'>or_else</a><F, B>(self, f: F) -> <a class="struct" href="../../futures/future/struct.OrElse.html" title="struct futures::future::OrElse">OrElse</a><Self, B, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -> B,<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Item = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#566-572' title='goto source code'>[src]</a></span></h4> <h4 id='method.select-3' class="method"><span id='select.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.select' class='fnname'>select</a><B>(self, other: B) -> <a class="struct" href="../../futures/future/struct.Select.html" title="struct futures::future::Select">Select</a><Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><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>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#624-631' title='goto source code'>[src]</a></span></h4> <h4 id='method.select2-3' class="method"><span id='select2.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.select2' class='fnname'>select2</a><B>(self, other: B) -> <a class="struct" href="../../futures/future/struct.Select2.html" title="struct futures::future::Select2">Select2</a><Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#670-674' title='goto source code'>[src]</a></span></h4> <h4 id='method.join-3' class="method"><span id='join.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join' class='fnname'>join</a><B>(self, other: B) -> <a class="struct" href="../../futures/future/struct.Join.html" title="struct futures::future::Join">Join</a><Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#715-721' title='goto source code'>[src]</a></span></h4> <h4 id='method.join3-3' class="method"><span id='join3.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join3' class='fnname'>join3</a><B, C>(self, b: B, c: C) -> <a class="struct" href="../../futures/future/struct.Join3.html" title="struct futures::future::Join3">Join3</a><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>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#724-730' title='goto source code'>[src]</a></span></h4> <h4 id='method.join4-3' class="method"><span id='join4.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join4' class='fnname'>join4</a><B, C, D>(<br> self, <br> b: B, <br> c: C, <br> d: D<br>) -> <a class="struct" href="../../futures/future/struct.Join4.html" title="struct futures::future::Join4">Join4</a><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>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#733-741' title='goto source code'>[src]</a></span></h4> <h4 id='method.join5-3' class="method"><span id='join5.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join5' class='fnname'>join5</a><B, C, D, E>(<br> self, <br> b: B, <br> c: C, <br> d: D, <br> e: E<br>) -> <a class="struct" href="../../futures/future/struct.Join5.html" title="struct futures::future::Join5">Join5</a><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>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> E: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#744-754' title='goto source code'>[src]</a></span></h4> <h4 id='method.into_stream-3' class="method"><span id='into_stream.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.into_stream' class='fnname'>into_stream</a>(self) -> <a class="struct" href="../../futures/future/struct.IntoStream.html" title="struct futures::future::IntoStream">IntoStream</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#777-781' title='goto source code'>[src]</a></span></h4> <h4 id='method.flatten-3' class="method"><span id='flatten.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.flatten' class='fnname'>flatten</a>(self) -> <a class="struct" href="../../futures/future/struct.Flatten.html" title="struct futures::future::Flatten">Flatten</a><Self> <span class="where fmt-newline">where<br> 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> <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>>::<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><Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#819-829' title='goto source code'>[src]</a></span></h4> <h4 id='method.flatten_stream-3' class="method"><span id='flatten_stream.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.flatten_stream' class='fnname'>flatten_stream</a>(self) -> <a class="struct" href="../../futures/future/struct.FlattenStream.html" title="struct futures::future::FlattenStream">FlattenStream</a><Self> <span class="where fmt-newline">where<br> 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><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#859-864' title='goto source code'>[src]</a></span></h4> <h4 id='method.fuse-3' class="method"><span id='fuse.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.fuse' class='fnname'>fuse</a>(self) -> <a class="struct" href="../../futures/future/struct.Fuse.html" title="struct futures::future::Fuse">Fuse</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#899-904' title='goto source code'>[src]</a></span></h4> <h4 id='method.inspect-3' class="method"><span id='inspect.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.inspect' class='fnname'>inspect</a><F>(self, f: F) -> <a class="struct" href="../../futures/future/struct.Inspect.html" title="struct futures::future::Inspect">Inspect</a><Self, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>),<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#922-927' title='goto source code'>[src]</a></span></h4> <h4 id='method.catch_unwind-3' class="method"><span id='catch_unwind.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.catch_unwind' class='fnname'>catch_unwind</a>(self) -> <a class="struct" href="../../futures/future/struct.CatchUnwind.html" title="struct futures::future::CatchUnwind">CatchUnwind</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#961-965' title='goto source code'>[src]</a></span></h4> <h4 id='method.shared-3' class="method"><span id='shared.v-3' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.shared' class='fnname'>shared</a>(self) -> <a class="struct" href="../../futures/future/struct.Shared.html" title="struct futures::future::Shared">Shared</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#1010-1014' title='goto source code'>[src]</a></span></h4> </div></span><h3 id='impl-Future-3' class='impl'><span class='in-band'><code>impl<'a, F: ?<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>> <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">&'a mut </a>F</code><a href='#impl-Future-3' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#1017-1024' title='goto source code'>[src]</a></span></h3> <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> <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> <h4 id='method.poll-3' class="method"><span id='poll.v-4' class='invisible'><code>fn <a href='#method.poll' class='fnname'>poll</a>(&mut self) -> <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a><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>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#1021-1023' title='goto source code'>[src]</a></span></h4> <h4 id='method.wait-4' class="method"><span id='wait.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.wait' class='fnname'>wait</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../futures/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>> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></span></h4> <h4 id='method.map-4' class="method"><span id='map.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../futures/future/struct.Map.html" title="struct futures::future::Map">Map</a><Self, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -> U,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></span></h4> <h4 id='method.map_err-4' class="method"><span id='map_err.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.map_err' class='fnname'>map_err</a><F, E>(self, f: F) -> <a class="struct" href="../../futures/future/struct.MapErr.html" title="struct futures::future::MapErr">MapErr</a><Self, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -> E,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#410-415' title='goto source code'>[src]</a></span></h4> <h4 id='method.from_err-4' class="method"><span id='from_err.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.from_err' class='fnname'>from_err</a><E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>>(self) -> <a class="struct" href="../../futures/future/struct.FromErr.html" title="struct futures::future::FromErr">FromErr</a><Self, E> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#440-444' title='goto source code'>[src]</a></span></h4> <h4 id='method.then-4' class="method"><span id='then.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.then' class='fnname'>then</a><F, B>(self, f: F) -> <a class="struct" href="../../futures/future/struct.Then.html" title="struct futures::future::Then">Then</a><Self, B, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../futures/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>>) -> B,<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#484-490' title='goto source code'>[src]</a></span></h4> <h4 id='method.and_then-4' class="method"><span id='and_then.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.and_then' class='fnname'>and_then</a><F, B>(self, f: F) -> <a class="struct" href="../../futures/future/struct.AndThen.html" title="struct futures::future::AndThen">AndThen</a><Self, B, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -> B,<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#525-531' title='goto source code'>[src]</a></span></h4> <h4 id='method.or_else-4' class="method"><span id='or_else.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.or_else' class='fnname'>or_else</a><F, B>(self, f: F) -> <a class="struct" href="../../futures/future/struct.OrElse.html" title="struct futures::future::OrElse">OrElse</a><Self, B, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -> B,<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Item = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#566-572' title='goto source code'>[src]</a></span></h4> <h4 id='method.select-4' class="method"><span id='select.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.select' class='fnname'>select</a><B>(self, other: B) -> <a class="struct" href="../../futures/future/struct.Select.html" title="struct futures::future::Select">Select</a><Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><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>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#624-631' title='goto source code'>[src]</a></span></h4> <h4 id='method.select2-4' class="method"><span id='select2.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.select2' class='fnname'>select2</a><B>(self, other: B) -> <a class="struct" href="../../futures/future/struct.Select2.html" title="struct futures::future::Select2">Select2</a><Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#670-674' title='goto source code'>[src]</a></span></h4> <h4 id='method.join-4' class="method"><span id='join.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join' class='fnname'>join</a><B>(self, other: B) -> <a class="struct" href="../../futures/future/struct.Join.html" title="struct futures::future::Join">Join</a><Self, B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Future" title="type futures::future::IntoFuture::Future">Future</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#715-721' title='goto source code'>[src]</a></span></h4> <h4 id='method.join3-4' class="method"><span id='join3.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join3' class='fnname'>join3</a><B, C>(self, b: B, c: C) -> <a class="struct" href="../../futures/future/struct.Join3.html" title="struct futures::future::Join3">Join3</a><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>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#724-730' title='goto source code'>[src]</a></span></h4> <h4 id='method.join4-4' class="method"><span id='join4.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join4' class='fnname'>join4</a><B, C, D>(<br> self, <br> b: B, <br> c: C, <br> d: D<br>) -> <a class="struct" href="../../futures/future/struct.Join4.html" title="struct futures::future::Join4">Join4</a><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>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#733-741' title='goto source code'>[src]</a></span></h4> <h4 id='method.join5-4' class="method"><span id='join5.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.join5' class='fnname'>join5</a><B, C, D, E>(<br> self, <br> b: B, <br> c: C, <br> d: D, <br> e: E<br>) -> <a class="struct" href="../../futures/future/struct.Join5.html" title="struct futures::future::Join5">Join5</a><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>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> D: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> E: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#744-754' title='goto source code'>[src]</a></span></h4> <h4 id='method.into_stream-4' class="method"><span id='into_stream.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.into_stream' class='fnname'>into_stream</a>(self) -> <a class="struct" href="../../futures/future/struct.IntoStream.html" title="struct futures::future::IntoStream">IntoStream</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#777-781' title='goto source code'>[src]</a></span></h4> <h4 id='method.flatten-4' class="method"><span id='flatten.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.flatten' class='fnname'>flatten</a>(self) -> <a class="struct" href="../../futures/future/struct.Flatten.html" title="struct futures::future::Flatten">Flatten</a><Self> <span class="where fmt-newline">where<br> 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> <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>>::<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><Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#819-829' title='goto source code'>[src]</a></span></h4> <h4 id='method.flatten_stream-4' class="method"><span id='flatten_stream.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.flatten_stream' class='fnname'>flatten_stream</a>(self) -> <a class="struct" href="../../futures/future/struct.FlattenStream.html" title="struct futures::future::FlattenStream">FlattenStream</a><Self> <span class="where fmt-newline">where<br> 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><Error = Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#859-864' title='goto source code'>[src]</a></span></h4> <h4 id='method.fuse-4' class="method"><span id='fuse.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.fuse' class='fnname'>fuse</a>(self) -> <a class="struct" href="../../futures/future/struct.Fuse.html" title="struct futures::future::Fuse">Fuse</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#899-904' title='goto source code'>[src]</a></span></h4> <h4 id='method.inspect-4' class="method"><span id='inspect.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.inspect' class='fnname'>inspect</a><F>(self, f: F) -> <a class="struct" href="../../futures/future/struct.Inspect.html" title="struct futures::future::Inspect">Inspect</a><Self, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&Self::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>),<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#922-927' title='goto source code'>[src]</a></span></h4> <h4 id='method.catch_unwind-4' class="method"><span id='catch_unwind.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.catch_unwind' class='fnname'>catch_unwind</a>(self) -> <a class="struct" href="../../futures/future/struct.CatchUnwind.html" title="struct futures::future::CatchUnwind">CatchUnwind</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#961-965' title='goto source code'>[src]</a></span></h4> <h4 id='method.shared-4' class="method"><span id='shared.v-4' class='invisible'><code>fn <a href='../../futures/future/trait.Future.html#method.shared' class='fnname'>shared</a>(self) -> <a class="struct" href="../../futures/future/struct.Shared.html" title="struct futures::future::Shared">Shared</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/future/mod.rs.html#1010-1014' title='goto source code'>[src]</a></span></h4> </div></span> <h2 id='implementors' class='small-section-header'> Implementors<a href='#implementors' class='anchor'></a> </h2> <ul class='item-list' id='implementors-list'> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/empty.rs.html#24-31' title='goto source code'>[src]</a></div><code>impl<T, E> Future for <a class="struct" href="../../futures/future/struct.Empty.html" title="struct futures::future::Empty">Empty</a><T, E><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = E;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/lazy.rs.html#74-84' title='goto source code'>[src]</a></div><code>impl<F, R> Future for <a class="struct" href="../../futures/future/struct.Lazy.html" title="struct futures::future::Lazy">Lazy</a><F, R> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -> R,<br> R: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = R::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Item" title="type futures::future::IntoFuture::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = R::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/poll_fn.rs.html#36-45' title='goto source code'>[src]</a></div><code>impl<T, E, F> Future for <a class="struct" href="../../futures/future/struct.PollFn.html" title="struct futures::future::PollFn">PollFn</a><F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>() -> <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a><T, E>, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = E;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/result.rs.html#68-75' title='goto source code'>[src]</a></div><code>impl<T, E> Future for <a class="struct" href="../../futures/future/struct.FutureResult.html" title="struct futures::future::FutureResult">FutureResult</a><T, E><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = E;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/loop_fn.rs.html#84-99' title='goto source code'>[src]</a></div><code>impl<S, T, A, F> Future for <a class="struct" href="../../futures/future/struct.LoopFn.html" title="struct futures::future::LoopFn">LoopFn</a><A, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(S) -> A,<br> A: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Item = <a class="enum" href="../../futures/future/enum.Loop.html" title="enum futures::future::Loop">Loop</a><T, S>>, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = A::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/and_then.rs.html#23-38' title='goto source code'>[src]</a></div><code>impl<A, B, F> Future for <a class="struct" href="../../futures/future/struct.AndThen.html" title="struct futures::future::AndThen">AndThen</a><A, B, F> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -> B, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Item" title="type futures::future::IntoFuture::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/flatten.rs.html#35-49' title='goto source code'>[src]</a></div><code>impl<A> Future for <a class="struct" href="../../futures/future/struct.Flatten.html" title="struct futures::future::Flatten">Flatten</a><A> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br> 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> <<A as <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>>::<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>>::<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><<A as <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>>::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <<A as <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>>::<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>>::<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> = <<A as <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>>::<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>>::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/fuse.rs.html#34-49' title='goto source code'>[src]</a></div><code>impl<A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>> Future for <a class="struct" href="../../futures/future/struct.Fuse.html" title="struct futures::future::Fuse">Fuse</a><A><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/join.rs.html#59-90' title='goto source code'>[src]</a></div><code>impl<A, B> Future for <a class="struct" href="../../futures/future/struct.Join.html" title="struct futures::future::Join">Join</a><A, B> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br> B: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a><Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, B::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/join.rs.html#59-90' title='goto source code'>[src]</a></div><code>impl<A, B, C> Future for <a class="struct" href="../../futures/future/struct.Join3.html" title="struct futures::future::Join3">Join3</a><A, B, C> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br> B: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a><Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a><Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, B::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, C::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/join.rs.html#59-90' title='goto source code'>[src]</a></div><code>impl<A, B, C, D> Future for <a class="struct" href="../../futures/future/struct.Join4.html" title="struct futures::future::Join4">Join4</a><A, B, C, D> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br> B: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a><Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a><Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> D: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a><Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, B::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, C::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, D::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/join.rs.html#59-90' title='goto source code'>[src]</a></div><code>impl<A, B, C, D, E> Future for <a class="struct" href="../../futures/future/struct.Join5.html" title="struct futures::future::Join5">Join5</a><A, B, C, D, E> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br> B: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a><Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a><Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> D: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a><Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>,<br> E: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a><Error = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, B::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, C::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, D::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>, E::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/map.rs.html#22-38' title='goto source code'>[src]</a></div><code>impl<U, A, F> Future for <a class="struct" href="../../futures/future/struct.Map.html" title="struct futures::future::Map">Map</a><A, F> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>) -> U, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = U;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/map_err.rs.html#22-36' title='goto source code'>[src]</a></div><code>impl<U, A, F> Future for <a class="struct" href="../../futures/future/struct.MapErr.html" title="struct futures::future::MapErr">MapErr</a><A, F> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -> U, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = U;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/from_err.rs.html#24-35' title='goto source code'>[src]</a></div><code>impl<A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>, E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>> Future for <a class="struct" href="../../futures/future/struct.FromErr.html" title="struct futures::future::FromErr">FromErr</a><A, E><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = E;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/or_else.rs.html#23-39' title='goto source code'>[src]</a></div><code>impl<A, B, F> Future for <a class="struct" href="../../futures/future/struct.OrElse.html" title="struct futures::future::OrElse">OrElse</a><A, B, F> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Item = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>>,<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>) -> B, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Item" title="type futures::future::IntoFuture::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/select.rs.html#38-71' title='goto source code'>[src]</a></div><code>impl<A, B> Future for <a class="struct" href="../../futures/future/struct.Select.html" title="struct futures::future::Select">Select</a><A, B> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br> B: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a><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>>, </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><A, B><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><A, B><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/select.rs.html#73-86' title='goto source code'>[src]</a></div><code>impl<A, B> Future for <a class="struct" href="../../futures/future/struct.SelectNext.html" title="struct futures::future::SelectNext">SelectNext</a><A, B> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br> B: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a><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>>, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/select2.rs.html#20-39' title='goto source code'>[src]</a></div><code>impl<A, B> Future for <a class="struct" href="../../futures/future/struct.Select2.html" title="struct futures::future::Select2">Select2</a><A, B> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br> B: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>, </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><<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>>;</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><<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>>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/then.rs.html#23-36' title='goto source code'>[src]</a></div><code>impl<A, B, F> Future for <a class="struct" href="../../futures/future/struct.Then.html" title="struct futures::future::Then">Then</a><A, B, F> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br> B: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><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>>) -> B, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Item" title="type futures::future::IntoFuture::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = B::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/either.rs.html#26-39' title='goto source code'>[src]</a></div><code>impl<A, B> Future for <a class="enum" href="../../futures/future/enum.Either.html" title="enum futures::future::Either">Either</a><A, B> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br> B: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a><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>>, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/inspect.rs.html#23-40' title='goto source code'>[src]</a></div><code>impl<A, F> Future for <a class="struct" href="../../futures/future/struct.Inspect.html" title="struct futures::future::Inspect">Inspect</a><A, F> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&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.Item' class="type">Item</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Item" title="type futures::future::Future::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/catch_unwind.rs.html#24-42' title='goto source code'>[src]</a></div><code>impl<F> Future for <a class="struct" href="../../futures/future/struct.CatchUnwind.html" title="struct futures::future::CatchUnwind">CatchUnwind</a><F> <span class="where fmt-newline">where<br> 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>, </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><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>>;</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><<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>>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/join_all.rs.html#86-136' title='goto source code'>[src]</a></div><code>impl<I> Future for <a class="struct" href="../../futures/future/struct.JoinAll.html" title="struct futures::future::JoinAll">JoinAll</a><I> <span class="where fmt-newline">where<br> 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> 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>, </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><<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>>::<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> = <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>>::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/select_all.rs.html#45-71' title='goto source code'>[src]</a></div><code>impl<A> Future for <a class="struct" href="../../futures/future/struct.SelectAll.html" title="struct futures::future::SelectAll">SelectAll</a><A> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>, </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><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 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><A><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/select_ok.rs.html#43-81' title='goto source code'>[src]</a></div><code>impl<A> Future for <a class="struct" href="../../futures/future/struct.SelectOk.html" title="struct futures::future::SelectOk">SelectOk</a><A> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>, </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><A><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = A::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/future/shared.rs.html#123-206' title='goto source code'>[src]</a></div><code>impl<F> Future for <a class="struct" href="../../futures/future/struct.Shared.html" title="struct futures::future::Shared">Shared</a><F> <span class="where fmt-newline">where<br> F: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>, </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><F::<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 class="struct" href="../../futures/future/struct.SharedError.html" title="struct futures::future::SharedError">SharedError</a><F::<a class="type" href="../../futures/future/trait.Future.html#associatedtype.Error" title="type futures::future::Future::Error">Error</a>>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/concat.rs.html#37-54' title='goto source code'>[src]</a></div><code>impl<S> Future for <a class="struct" href="../../futures/stream/struct.Concat2.html" title="struct futures::stream::Concat2">Concat2</a><S> <span class="where fmt-newline">where<br> S: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>,<br> 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><<<S as <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>>::<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>>::<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="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>, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Item" title="type futures::stream::Stream::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/concat.rs.html#89-106' title='goto source code'>[src]</a></div><code>impl<S> Future for <a class="struct" href="../../futures/stream/struct.Concat.html" title="struct futures::stream::Concat">Concat</a><S> <span class="where fmt-newline">where<br> S: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>,<br> 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><<<S as <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>>::<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>>::<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="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a>, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Item" title="type futures::stream::Stream::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/fold.rs.html#42-81' title='goto source code'>[src]</a></div><code>impl<S, F, Fut, T> Future for <a class="struct" href="../../futures/stream/struct.Fold.html" title="struct futures::stream::Fold">Fold</a><S, F, Fut, T> <span class="where fmt-newline">where<br> S: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(T, S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Item" title="type futures::stream::Stream::Item">Item</a>) -> Fut,<br> Fut: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><Item = T>,<br> 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><Fut::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>>, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/for_each.rs.html#28-51' title='goto source code'>[src]</a></div><code>impl<S, F, U> Future for <a class="struct" href="../../futures/stream/struct.ForEach.html" title="struct futures::stream::ForEach">ForEach</a><S, F, U> <span class="where fmt-newline">where<br> S: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Item" title="type futures::stream::Stream::Item">Item</a>) -> U,<br> U: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a><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>>, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/future.rs.html#57-76' title='goto source code'>[src]</a></div><code>impl<S: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>> Future for <a class="struct" href="../../futures/stream/struct.StreamFuture.html" title="struct futures::stream::StreamFuture">StreamFuture</a><S><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><S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Item" title="type futures::stream::Stream::Item">Item</a>>, S<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>, S<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/forward.rs.html#78-110' title='goto source code'>[src]</a></div><code>impl<T, U> Future for <a class="struct" href="../../futures/stream/struct.Forward.html" title="struct futures::stream::Forward">Forward</a><T, U> <span class="where fmt-newline">where<br> U: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a><SinkItem = T::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Item" title="type futures::stream::Stream::Item">Item</a>>,<br> T: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>,<br> 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><U::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>>, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>T, U<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = T::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/collect.rs.html#33-52' title='goto source code'>[src]</a></div><code>impl<S> Future for <a class="struct" href="../../futures/stream/struct.Collect.html" title="struct futures::stream::Collect">Collect</a><S> <span class="where fmt-newline">where<br> S: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>, </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><S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Item" title="type futures::stream::Stream::Item">Item</a>>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sink/flush.rs.html#33-46' title='goto source code'>[src]</a></div><code>impl<S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>> Future for <a class="struct" href="../../futures/sink/struct.Flush.html" title="struct futures::sink::Flush">Flush</a><S><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = S;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sink/send.rs.html#40-59' title='goto source code'>[src]</a></div><code>impl<S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>> Future for <a class="struct" href="../../futures/sink/struct.Send.html" title="struct futures::sink::Send">Send</a><S><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = S;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sink/send_all.rs.html#59-88' title='goto source code'>[src]</a></div><code>impl<T, U> Future for <a class="struct" href="../../futures/sink/struct.SendAll.html" title="struct futures::sink::SendAll">SendAll</a><T, U> <span class="where fmt-newline">where<br> T: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>,<br> U: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a><Item = T::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>>,<br> 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><U::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>>, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>T, U<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = T::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sync/oneshot.rs.html#408-415' title='goto source code'>[src]</a></div><code>impl<T> Future for futures::sync::oneshot::<a class="struct" href="../../futures/sync/oneshot/struct.Receiver.html" title="struct futures::sync::oneshot::Receiver">Receiver</a><T><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../../futures/sync/oneshot/struct.Canceled.html" title="struct futures::sync::oneshot::Canceled">Canceled</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sync/oneshot.rs.html#513-525' title='goto source code'>[src]</a></div><code>impl<T, E> Future for futures::sync::oneshot::<a class="struct" href="../../futures/sync/oneshot/struct.SpawnHandle.html" title="struct futures::sync::oneshot::SpawnHandle">SpawnHandle</a><T, E><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = E;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sync/oneshot.rs.html#540-562' title='goto source code'>[src]</a></div><code>impl<F: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>> Future for futures::sync::oneshot::<a class="struct" href="../../futures/sync/oneshot/struct.Execute.html" title="struct futures::sync::oneshot::Execute">Execute</a><F><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sync/mpsc/mod.rs.html#1085-1099' title='goto source code'>[src]</a></div><code>impl<S: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>> Future for futures::sync::mpsc::<a class="struct" href="../../futures/sync/mpsc/struct.Execute.html" title="struct futures::sync::mpsc::Execute">Execute</a><S><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sync/bilock.rs.html#242-255' title='goto source code'>[src]</a></div><code>impl<T> Future for <a class="struct" href="../../futures/sync/struct.BiLockAcquire.html" title="struct futures::sync::BiLockAcquire">BiLockAcquire</a><T><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><T>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/unsync/mpsc.rs.html#453-467' title='goto source code'>[src]</a></div><code>impl<S: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>> Future for futures::unsync::mpsc::<a class="struct" href="../../futures/unsync/mpsc/struct.Execute.html" title="struct futures::unsync::mpsc::Execute">Execute</a><S><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/unsync/oneshot.rs.html#178-208' title='goto source code'>[src]</a></div><code>impl<T> Future for futures::unsync::oneshot::<a class="struct" href="../../futures/unsync/oneshot/struct.Receiver.html" title="struct futures::unsync::oneshot::Receiver">Receiver</a><T><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../../futures/sync/oneshot/struct.Canceled.html" title="struct futures::sync::oneshot::Canceled">Canceled</a>;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/unsync/oneshot.rs.html#300-312' title='goto source code'>[src]</a></div><code>impl<T, E> Future for futures::unsync::oneshot::<a class="struct" href="../../futures/unsync/oneshot/struct.SpawnHandle.html" title="struct futures::unsync::oneshot::SpawnHandle">SpawnHandle</a><T, E><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = E;</span></code></li> <li><div class='out-of-band'><a class='srclink' href='../../src/futures/unsync/oneshot.rs.html#321-343' title='goto source code'>[src]</a></div><code>impl<F: <a class="trait" href="../../futures/future/trait.Future.html" title="trait futures::future::Future">Future</a>> Future for futures::unsync::oneshot::<a class="struct" href="../../futures/unsync/oneshot/struct.Execute.html" title="struct futures::unsync::oneshot::Execute">Execute</a><F><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span></code></li> </ul><script type="text/javascript" async src="../../implementors/futures/future/trait.Future.js"> </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>⏎</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> </div> </div> </aside> <script> window.rootPath = "../../"; window.currentCrate = "futures"; </script> <script src="../../main.js"></script> <script defer src="../../search-index.js"></script> </body> </html>