833 lines
697 KiB
HTML
833 lines
697 KiB
HTML
|
<!DOCTYPE html>
|
|||
|
<html lang="en">
|
|||
|
<head>
|
|||
|
<meta charset="utf-8">
|
|||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|||
|
<meta name="generator" content="rustdoc">
|
|||
|
<meta name="description" content="API documentation for the Rust `Future` trait in crate `tokio`.">
|
|||
|
<meta name="keywords" content="rust, rustlang, rust-lang, Future">
|
|||
|
|
|||
|
<title>tokio::prelude::future::Future - Rust</title>
|
|||
|
|
|||
|
<link rel="stylesheet" type="text/css" href="../../../normalize.css">
|
|||
|
<link rel="stylesheet" type="text/css" href="../../../rustdoc.css"
|
|||
|
id="mainThemeStyle">
|
|||
|
|
|||
|
<link rel="stylesheet" type="text/css" href="../../../dark.css">
|
|||
|
<link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle">
|
|||
|
<script src="../../../storage.js"></script>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
</head>
|
|||
|
<body class="rustdoc trait">
|
|||
|
<!--[if lte IE 8]>
|
|||
|
<div class="warning">
|
|||
|
This old browser is unsupported and will most likely display funky
|
|||
|
things.
|
|||
|
</div>
|
|||
|
<![endif]-->
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<nav class="sidebar">
|
|||
|
<div class="sidebar-menu">☰</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">Receiver<T></a><a href="#impl-Future">Box<F></a><a href="#impl-Future">Execute<F></a><a href="#impl-Future">Flush<S></a><a href="#impl-Future">Execute<F></a><a href="#impl-Future">Execute<S></a><a href="#impl-Future">Option<F></a><a href="#impl-Future">Execute<S></a><a href="#impl-Future">SendAll<T, U></a><a href="#impl-Future">&'a mut F</a><a href="#impl-Future">Send<S></a><a href="#impl-Future">BiLockAcquire<T></a><a href="#impl-Future">SpawnHandle<T, E></a><a href="#impl-Future">SpawnHandle<T, E></a><a href="#impl-Future">AssertUnwindSafe<F></a><a href="#impl-Future">Receiver<T></a><a href="#impl-Future">Read<R, T></a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='../../index.html'>tokio</a>::<wbr><a href='../index.html'>prelude</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'>tokio</a>::<wbr><a href='../index.html'>prelude</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><div class="docblock type-decl"><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="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a><Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>>, Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>> { ... }
|
|||
|
<div class='item-spacer'></div> fn <a href='#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.Map.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>) -> U</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="../../../tokio/prelude/future/struct.MapErr.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>) -> E</span>,
|
|||
|
{ ... }
|
|||
|
<div class='item-spacer'></div> fn <a href='#method.from_err' class='fnname'>from_err</a><E>(self) -> <a class="struct" href="../../../tokio/prelude/future/struct.FromErr.html" title="struct tokio::prelude::future::FromErr">FromErr</a><Self, E><br> <span class="where">where<br> 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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</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="../../../tokio/prelude/future/struct.Then.html" title="struct tokio::prelude::future::Then">Then</a><Self, B, F><br> <span class="where">where<br> B: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::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><Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>>) -> B</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="../../../tokio/prelude/future/struct.AndThen.html" title="struct tokio::prelude::future::AndThen">AndThen</a><Self, B, F><br> <span class="where">where<br> B: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::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>(Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>) -> B</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="../../../tokio/prelude/future/struct.OrElse.html" title="struct tokio::prelude::future::OrElse">OrElse</a><Self, B, F><br> <span class="where">where<br> B: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Item = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::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>(Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>) -> B</span>,
|
|||
|
{ ... }
|
|||
|
<div class='item-spacer'></div> fn <a href='#method.select' class='fnname'>select</a><B>(self, other: B) -> <a class="struct" href="../../../tokio/prelude/future/struct.Select.html" title="struct tokio::prelude::future::Select">Select</a><Self, <B as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>><br> <span class="where">where<br> B: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Item = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></span>,
|
|||
|
{ ... }
|
|||
|
<div class='item-spacer'></div> fn <a href='#method.select2' class='fnname'>select2</a><B>(self, other: B) -> <a class="struct" href="../../../tokio/prelude/future/struct.Select2.html" title="struct tokio::prelude::future::Select2">Select2</a><Self, <B as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>><br> <span class="where">where<br> B: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a></span>,
|
|||
|
{ ... }
|
|||
|
<div class='item-spacer'></div> fn <a href='#method.join' class='fnname'>join</a><B>(self, other: B) -> <a class="struct" href="../../../tokio/prelude/future/struct.Join.html" title="struct tokio::prelude::future::Join">Join</a><Self, <B as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>><br> <span class="where">where<br> B: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></span>,
|
|||
|
{ ... }
|
|||
|
<div class='item-spacer'></div> fn <a href='#method.join3' class='fnname'>join3</a><B, C>(<br> self, <br> b: B, <br> c: C<br> ) -> <a class="struct" href="../../../tokio/prelude/future/struct.Join3.html" title="struct tokio::prelude::future::Join3">Join3</a><Self, <B as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>, <C as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>><br> <span class="where">where<br> B: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</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="../../../tokio/prelude/future/struct.Join4.html" title="struct tokio::prelude::future::Join4">Join4</a><Self, <B as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>, <C as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>, <D as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>><br> <span class="where">where<br> B: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>>,<br> D: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</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="../../../tokio/prelude/future/struct.Join5.html" title="struct tokio::prelude::future::Join5">Join5</a><Self, <B as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>, <C as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>, <D as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>, <E as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>><br> <span class="where">where<br> B: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>>,<br> D: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>>,<br> E: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></span>,
|
|||
|
{ ... }
|
|||
|
<div class='item-spacer'></div> fn <a href='#method.into_stream' class='fnname'>into_stream</a>(self) -> <a class="struct" href="../../../tokio/prelude/future/struct.IntoStream.html" title="struct tokio::prelude::future::IntoStream">IntoStream</a><Self> { ... }
|
|||
|
<div class='item-spacer'></div> fn <a href='#method.flatten' class='fnname'>flatten</a>(self) -> <a class="struct" href="../../../tokio/prelude/future/struct.Flatten.html" title="struct tokio::prelude::future::Flatten">Flatten</a><Self><br> <span class="where">where<br> Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>,<br> <Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a> as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Error" title="type tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></span>,
|
|||
|
{ ... }
|
|||
|
<div class='item-spacer'></div> fn <a href='#method.flatten_stream' class='fnname'>flatten_stream</a>(self) -> <a class="struct" href="../../../tokio/prelude/future/struct.FlattenStream.html" title="struct tokio::prelude::future::FlattenStream">FlattenStream</a><Self><br> <span class="where">where<br> Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>: <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>,<br> <Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a> as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Error" title="type tokio::prelude::stream::Stream::Error">Error</a> == Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a></span>,
|
|||
|
{ ... }
|
|||
|
<div class='item-spacer'></div> fn <a href='#method.fuse' class='fnname'>fuse</a>(self) -> <a class="struct" href="../../../tokio/prelude/future/struct.Fuse.html" title="struct tokio::prelude::future::Fuse">Fuse</a><Self> { ... }
|
|||
|
<div class='item-spacer'></div> fn <a href='#method.inspect' class='fnname'>inspect</a><F>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.Inspect.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>)</span>,
|
|||
|
{ ... }
|
|||
|
<div class='item-spacer'></div> fn <a href='#method.catch_unwind' class='fnname'>catch_unwind</a>(self) -> <a class="struct" href="../../../tokio/prelude/future/struct.CatchUnwind.html" title="struct tokio::prelude::future::CatchUnwind">CatchUnwind</a><Self><br> <span class="where">where<br> Self: <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="../../../tokio/prelude/future/struct.Shared.html" title="struct tokio::prelude::future::Shared">Shared</a><Self> { ... }
|
|||
|
}</pre></div><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="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a><Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>>, Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></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="../../../tokio/prelude/future/struct.Map.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>) -> U, </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="../../../tokio/prelude/future/struct.MapErr.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>) -> E, </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>(self) -> <a class="struct" href="../../../tokio/prelude/future/struct.FromErr.html" title="struct tokio::prelude::future::FromErr">FromErr</a><Self, E> <span class="where fmt-newline">where<br> 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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</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="../../../tokio/prelude/future/struct.Then.html" title="struct tokio::prelude::future::Then">Then</a><Self, B, F> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::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><Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>>) -> B, </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="kw">_</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="../../../tokio/prelude/future/struct.AndThen.html" title="struct tokio::prelude::future::AndThen">AndThen</a><Self, B, F> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::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>(Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>) -> B, </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="kw">_</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="../../../tokio/prelude/future/struct.OrElse.html" title="struct tokio::prelude::future::OrElse">OrElse</a><Self, B, F> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Item = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::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>(Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>) -> B, </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="kw">_</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="../../../tokio/prelude/future/struct.Select.html" title="struct tokio::prelude::future::Select">Select</a><Self, <B as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Item = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</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="kw">_</span>, <span class="ident">Error</span><span class="op">=</span><span class="kw">_</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="kw">_</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="../../../tokio/prelude/future/struct.Select2.html" title="struct tokio::prelude::future::Select2">Select2</a><Self, <B as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</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="kw">_</span>, <span class="ident">Error</span><span class="op">=</span><span class="kw">_</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="kw">_</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="kw">_</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="../../../tokio/prelude/future/struct.Join.html" title="struct tokio::prelude::future::Join">Join</a><Self, <B as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</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>(<br> self, <br> b: B, <br> c: C<br>) -> <a class="struct" href="../../../tokio/prelude/future/struct.Join3.html" title="struct tokio::prelude::future::Join3">Join3</a><Self, <B as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>, <C as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</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="../../../tokio/prelude/future/struct.Join4.html" title="struct tokio::prelude::future::Join4">Join4</a><Self, <B as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>, <C as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>, <D as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>>,<br> D: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</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="../../../tokio/prelude/future/struct.Join5.html" title="struct tokio::prelude::future::Join5">Join5</a><Self, <B as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>, <C as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>, <D as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>, <E as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Future" title="type tokio::prelude::IntoFuture::Future">Future</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>>,<br> D: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>>,<br> E: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Error = Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</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="../../../tokio/prelude/future/struct.IntoStream.html" title="struct tokio::prelude::future::IntoStream">IntoStream</a><Self></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="kw">_</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="kw">_</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="../../../tokio/prelude/future/struct.Flatten.html" title="struct tokio::prelude::future::Flatten">Flatten</a><Self> <span class="where fmt-newline">where<br> Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>,<br> <Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a> as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Error" title="type tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</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="kw">_</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="kw">_</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="../../../tokio/prelude/future/struct.FlattenStream.html" title="struct tokio::prelude::future::FlattenStream">FlattenStream</a><Self> <span class="where fmt-newline">where<br> Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>: <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>,<br> <Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a> as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Error" title="type tokio::prelude::stream::Stream::Error">Error</a> == Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</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="kw">_</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="../../../tokio/prelude/future/struct.Fuse.html" title="struct tokio::prelude::future::Fuse">Fuse</a><Self></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="../../../tokio/prelude/future/struct.Inspect.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</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="../../../tokio/prelude/future/struct.CatchUnwind.html" title="struct tokio::prelude::future::CatchUnwind">CatchUnwind</a><Self> <span class="where fmt-newline">where<br> Self: <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="../../../tokio/prelude/future/struct.Shared.html" title="struct tokio::prelude::future::Shared">Shared</a><Self></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="kw">_</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="kw">_</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'><table class='table-display'><tbody><tr><td><code>impl<T> <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a> for <a class="struct" href="../../../futures/sync/oneshot/struct.Receiver.html" title="struct futures::sync::oneshot::Receiver">Receiver</a><T></code><a href='#impl-Future' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/sync/oneshot.rs.html#408-415' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><span class='docblock autohide'><div class='impl-items'><h4 id='associatedtype.Item-1' class="type"><span id='Item.t-1' class='invisible'><code>type <a href='#associatedtype.Item' class="type">Item</a> = 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> = <a class="struct" href="../../../futures/sync/oneshot/struct.Canceled.html" title="struct futures::sync::oneshot::Canceled">Canceled</a></code></span></h4>
|
|||
|
<h4 id='method.poll' class="method"><span id='poll.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.poll' class='fnname'>poll</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a><T>, <a class="struct" href="../../../futures/sync/oneshot/struct.Canceled.html" title="struct futures::sync::oneshot::Canceled">Canceled</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/sync/oneshot.rs.html#412-414' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.wait-1' class="method"><span id='wait.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map-1' class="method"><span id='map.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.Map.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>) -> U, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map_err-1' class="method"><span id='map_err.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map_err' class='fnname'>map_err</a><F, E>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.MapErr.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>) -> E, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#410-415' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.from_err-1' class="method"><span id='from_err.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.from_err' class='fnname'>from_err</a><E>(self) -> <a class="struct" href="../../../tokio/prelude/future/struct.FromErr.html" title="struct toki
|
|||
|
<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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a></code></span></h4>
|
|||
|
<h4 id='method.poll-1' class="method"><span id='poll.v-2' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.poll' class='fnname'>poll</a>(<br> &mut self<br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a><<<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><F> as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>>, <<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><F> as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#112-114' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.wait-2' class="method"><span id='wait.v-2' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map-2' class="method"><span id='map.v-2' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.Map.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>) -> U, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map_err-2' class="method"><span id='map_err.v-2' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map_err' class='fnname'>map_err</a><F, E>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.MapErr.html" title="struct tokio::prelude::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
|
|||
|
<h4 id='associatedtype.Error-3' class="type"><span id='Error.t-3' class='invisible'><code>type <a href='#associatedtype.Error' class="type">Error</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></code></span></h4>
|
|||
|
<h4 id='method.poll-2' class="method"><span id='poll.v-3' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.poll' class='fnname'>poll</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/sync/oneshot.rs.html#544-561' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.wait-3' class="method"><span id='wait.v-3' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map-3' class="method"><span id='map.v-3' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.Map.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>) -> U, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map_err-3' class="method"><span id='map_err.v-3' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map_err' class='fnname'>map_err</a><F, E>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.MapErr.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>) -> E, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#410-415' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.from_err-3' class="method"><span id='from_err.v-3' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.from_err' class='fnname'>from_err</a><E>(self) -> <a class="struct" href="../../../tokio/prelu
|
|||
|
<h4 id='associatedtype.Error-4' class="type"><span id='Error.t-4' class='invisible'><code>type <a href='#associatedtype.Error' class="type">Error</a> = <S as <a class="trait" href="../../../tokio/prelude/trait.Sink.html" title="trait tokio::prelude::Sink">Sink</a>>::<a class="type" href="../../../tokio/prelude/trait.Sink.html#associatedtype.SinkError" title="type tokio::prelude::Sink::SinkError">SinkError</a></code></span></h4>
|
|||
|
<h4 id='method.poll-3' class="method"><span id='poll.v-4' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.poll' class='fnname'>poll</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a><S>, <S as <a class="trait" href="../../../tokio/prelude/trait.Sink.html" title="trait tokio::prelude::Sink">Sink</a>>::<a class="type" href="../../../tokio/prelude/trait.Sink.html#associatedtype.SinkError" title="type tokio::prelude::Sink::SinkError">SinkError</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/sink/flush.rs.html#37-45' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.wait-4' class="method"><span id='wait.v-4' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map-4' class="method"><span id='map.v-4' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.Map.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>) -> U, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map_err-4' class="method"><span id='map_err.v-4' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map_err' class='fnname'>map_err</a><F, E>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.MapErr.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>) -> E, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#410-415' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.from_err-4' class="method"><span id='from_err.v-4' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.from_err' class='fnname'
|
|||
|
<h4 id='associatedtype.Error-5' class="type"><span id='Error.t-5' class='invisible'><code>type <a href='#associatedtype.Error' class="type">Error</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></code></span></h4>
|
|||
|
<h4 id='method.poll-4' class="method"><span id='poll.v-5' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.poll' class='fnname'>poll</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/unsync/oneshot.rs.html#325-342' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.wait-5' class="method"><span id='wait.v-5' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map-5' class="method"><span id='map.v-5' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.Map.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>) -> U, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map_err-5' class="method"><span id='map_err.v-5' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map_err' class='fnname'>map_err</a><F, E>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.MapErr.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>) -> E, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#410-415' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.from_err-5' class="method"><span id='from_err.v-5' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.from_err' class='fnname'>from_err</a><E>(self) -> <a class="struct" href="../../../tokio/pre
|
|||
|
<h4 id='associatedtype.Error-6' class="type"><span id='Error.t-6' class='invisible'><code>type <a href='#associatedtype.Error' class="type">Error</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></code></span></h4>
|
|||
|
<h4 id='method.poll-5' class="method"><span id='poll.v-6' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.poll' class='fnname'>poll</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/unsync/mpsc.rs.html#457-466' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.wait-6' class="method"><span id='wait.v-6' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map-6' class="method"><span id='map.v-6' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.Map.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>) -> U, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map_err-6' class="method"><span id='map_err.v-6' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map_err' class='fnname'>map_err</a><F, E>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.MapErr.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>) -> E, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#410-415' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.from_err-6' class="method"><span id='from_err.v-6' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.from_err' class='fnname'>from_err</a><E>(self) -> <a class="struct" href="../../../tokio/prelud
|
|||
|
<h4 id='associatedtype.Error-7' class="type"><span id='Error.t-7' class='invisible'><code>type <a href='#associatedtype.Error' class="type">Error</a> = E</code></span></h4>
|
|||
|
<h4 id='method.poll-6' class="method"><span id='poll.v-7' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.poll' class='fnname'>poll</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</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></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/option.rs.html#9-14' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.wait-7' class="method"><span id='wait.v-7' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map-7' class="method"><span id='map.v-7' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.Map.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>) -> U, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map_err-7' class="method"><span id='map_err.v-7' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map_err' class='fnname'>map_err</a><F, E>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.MapErr.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>) -> E, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#410-415' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.from_err-7' class="method"><span id='from_err.v-7' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.from_err' class='fnname'>from_err</a><E>(self) -> <a class="struct" href="../../../tokio/prelude/future/struct.FromErr.html" title="struct t
|
|||
|
<h4 id='associatedtype.Error-8' class="type"><span id='Error.t-8' class='invisible'><code>type <a href='#associatedtype.Error' class="type">Error</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></code></span></h4>
|
|||
|
<h4 id='method.poll-7' class="method"><span id='poll.v-8' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.poll' class='fnname'>poll</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/sync/mpsc/mod.rs.html#1089-1098' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.wait-8' class="method"><span id='wait.v-8' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map-8' class="method"><span id='map.v-8' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.Map.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>) -> U, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map_err-8' class="method"><span id='map_err.v-8' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map_err' class='fnname'>map_err</a><F, E>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.MapErr.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>) -> E, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#410-415' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.from_err-8' class="method"><span id='from_err.v-8' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.from_err' class='fnname'>from_err</a><E>(self) -> <a class="struct" href="../../../tokio/pr
|
|||
|
<h4 id='associatedtype.Error-9' class="type"><span id='Error.t-9' class='invisible'><code>type <a href='#associatedtype.Error' class="type">Error</a> = <T as <a class="trait" href="../../../tokio/prelude/trait.Sink.html" title="trait tokio::prelude::Sink">Sink</a>>::<a class="type" href="../../../tokio/prelude/trait.Sink.html#associatedtype.SinkError" title="type tokio::prelude::Sink::SinkError">SinkError</a></code></span></h4>
|
|||
|
<h4 id='method.poll-8' class="method"><span id='poll.v-9' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.poll' class='fnname'>poll</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</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>>, <T as <a class="trait" href="../../../tokio/prelude/trait.Sink.html" title="trait tokio::prelude::Sink">Sink</a>>::<a class="type" href="../../../tokio/prelude/trait.Sink.html#associatedtype.SinkError" title="type tokio::prelude::Sink::SinkError">SinkError</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/sink/send_all.rs.html#67-87' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.wait-9' class="method"><span id='wait.v-9' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map-9' class="method"><span id='map.v-9' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.Map.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>) -> U, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map_err-9' class="method"><span id='map_err.v-9' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map_err' class='fnname'>map_err</a><F, E>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.MapErr.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>) -> E, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#410-415' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.from_err-9' class="m
|
|||
|
<h4 id='associatedtype.Error-10' class="type"><span id='Error.t-10' class='invisible'><code>type <a href='#associatedtype.Error' class="type">Error</a> = <F as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a></code></span></h4>
|
|||
|
<h4 id='method.poll-9' class="method"><span id='poll.v-10' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.poll' class='fnname'>poll</a>(<br> &mut self<br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a><<<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a mut </a>F as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>>, <<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a mut </a>F as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#1021-1023' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.wait-10' class="method"><span id='wait.v-10' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map-10' class="method"><span id='map.v-10' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.Map.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>) -> U, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map_err-10' class="method"><span id='map_err.v-10' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map_err' class='fnname'>map_err</a><F, E>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.MapErr.html" title="struct tokio::prelude::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="../../../tokio/prelude/
|
|||
|
<h4 id='associatedtype.Error-11' class="type"><span id='Error.t-11' class='invisible'><code>type <a href='#associatedtype.Error' class="type">Error</a> = <S as <a class="trait" href="../../../tokio/prelude/trait.Sink.html" title="trait tokio::prelude::Sink">Sink</a>>::<a class="type" href="../../../tokio/prelude/trait.Sink.html#associatedtype.SinkError" title="type tokio::prelude::Sink::SinkError">SinkError</a></code></span></h4>
|
|||
|
<h4 id='method.poll-10' class="method"><span id='poll.v-11' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.poll' class='fnname'>poll</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a><S>, <S as <a class="trait" href="../../../tokio/prelude/trait.Sink.html" title="trait tokio::prelude::Sink">Sink</a>>::<a class="type" href="../../../tokio/prelude/trait.Sink.html#associatedtype.SinkError" title="type tokio::prelude::Sink::SinkError">SinkError</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/sink/send.rs.html#44-58' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.wait-11' class="method"><span id='wait.v-11' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map-11' class="method"><span id='map.v-11' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.Map.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>) -> U, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map_err-11' class="method"><span id='map_err.v-11' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map_err' class='fnname'>map_err</a><F, E>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.MapErr.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>) -> E, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#410-415' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.from_err-11' class="method"><span id='from_err.v-11' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.from_err' class
|
|||
|
<h4 id='associatedtype.Error-12' class="type"><span id='Error.t-12' class='invisible'><code>type <a href='#associatedtype.Error' class="type">Error</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></code></span></h4>
|
|||
|
<h4 id='method.poll-11' class="method"><span id='poll.v-12' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.poll' class='fnname'>poll</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a><<a class="struct" href="../../../futures/sync/bilock/struct.BiLockAcquired.html" title="struct futures::sync::bilock::BiLockAcquired">BiLockAcquired</a><T>>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/sync/bilock.rs.html#246-254' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.wait-12' class="method"><span id='wait.v-12' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map-12' class="method"><span id='map.v-12' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.Map.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>) -> U, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map_err-12' class="method"><span id='map_err.v-12' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map_err' class='fnname'>map_err</a><F, E>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.MapErr.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>) -> E, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#410-415' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.from_err-12' class="method"><span id='from_err.v-12' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.from_err' class='fnname'>
|
|||
|
<h4 id='associatedtype.Error-13' class="type"><span id='Error.t-13' class='invisible'><code>type <a href='#associatedtype.Error' class="type">Error</a> = E</code></span></h4>
|
|||
|
<h4 id='method.poll-12' class="method"><span id='poll.v-13' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.poll' class='fnname'>poll</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a><T>, E></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/unsync/oneshot.rs.html#304-311' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.wait-13' class="method"><span id='wait.v-13' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map-13' class="method"><span id='map.v-13' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.Map.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>) -> U, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map_err-13' class="method"><span id='map_err.v-13' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map_err' class='fnname'>map_err</a><F, E>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.MapErr.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>) -> E, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#410-415' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.from_err-13' class="method"><span id='from_err.v-13' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.from_err' class='fnname'>from_err</a><E>(self) -> <a class="struct" href="../../../tokio/prelude/future/struct.FromErr.html" title="struct tokio::prelude::future::FromErr">FromErr</a><Self, E> <span class="where fmt-newline">where<br>
|
|||
|
<h4 id='associatedtype.Error-14' class="type"><span id='Error.t-14' class='invisible'><code>type <a href='#associatedtype.Error' class="type">Error</a> = E</code></span></h4>
|
|||
|
<h4 id='method.poll-13' class="method"><span id='poll.v-14' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.poll' class='fnname'>poll</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a><T>, E></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/sync/oneshot.rs.html#517-524' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.wait-14' class="method"><span id='wait.v-14' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map-14' class="method"><span id='map.v-14' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.Map.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>) -> U, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map_err-14' class="method"><span id='map_err.v-14' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map_err' class='fnname'>map_err</a><F, E>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.MapErr.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>) -> E, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#410-415' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.from_err-14' class="method"><span id='from_err.v-14' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.from_err' class='fnname'>from_err</a><E>(self) -> <a class="struct" href="../../../tokio/prelude/future/struct.FromErr.html" title="struct tokio::prelude::future::FromErr">FromErr</a><Self, E> <span class="where fmt-newline">where<br> E:
|
|||
|
<h4 id='associatedtype.Error-15' class="type"><span id='Error.t-15' class='invisible'><code>type <a href='#associatedtype.Error' class="type">Error</a> = <F as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a></code></span></h4>
|
|||
|
<h4 id='method.poll-14' class="method"><span id='poll.v-15' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.poll' class='fnname'>poll</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a><<F as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>>, <F as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/catch_unwind.rs.html#48-50' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.wait-15' class="method"><span id='wait.v-15' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map-15' class="method"><span id='map.v-15' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.Map.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>) -> U, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map_err-15' class="method"><span id='map_err.v-15' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map_err' class='fnname'>map_err</a><F, E>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.MapErr.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>) -> E, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../sr
|
|||
|
<h4 id='associatedtype.Error-16' class="type"><span id='Error.t-16' class='invisible'><code>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></code></span></h4>
|
|||
|
<h4 id='method.poll-15' class="method"><span id='poll.v-16' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.poll' class='fnname'>poll</a>(<br> &mut self<br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a><<<a class="struct" href="../../../futures/unsync/oneshot/struct.Receiver.html" title="struct futures::unsync::oneshot::Receiver">Receiver</a><T> as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>>, <<a class="struct" href="../../../futures/unsync/oneshot/struct.Receiver.html" title="struct futures::unsync::oneshot::Receiver">Receiver</a><T> as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/unsync/oneshot.rs.html#182-207' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.wait-16' class="method"><span id='wait.v-16' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map-16' class="method"><span id='map.v-16' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.Map.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>) -> U, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map_err-16' class="method"><span id='map_err.v-16' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map_err' class='fnname'>map_err</a><F, E>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.MapErr.html" title="struct tokio::prelude::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::
|
|||
|
<h4 id='associatedtype.Error-17' class="type"><span id='Error.t-17' class='invisible'><code>type <a href='#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a></code></span></h4>
|
|||
|
<h4 id='method.poll-16' class="method"><span id='poll.v-17' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='#method.poll' class='fnname'>poll</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>R, T, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>, <a class="struct" href="../../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/tokio_io/io/read.rs.html#45-55' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.wait-17' class="method"><span id='wait.v-17' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Self::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#296-300' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map-17' class="method"><span id='map.v-17' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map' class='fnname'>map</a><F, U>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.Map.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>) -> U, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#370-375' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.map_err-17' class="method"><span id='map_err.v-17' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../../tokio/prelude/future/trait.Future.html#method.map_err' class='fnname'>map_err</a><F, E>(self, f: F) -> <a class="struct" href="../../../tokio/prelude/future/struct.MapErr.html" title="struct tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>) -> E, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/futures/future/mod.rs.html#410-415' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.from_err-17' class="method"><span id='from_err.v-17' class='invisible'><table class
|
|||
|
<h2 id='implementors' class='small-section-header'>
|
|||
|
Implementors<a href='#implementors' class='anchor'></a>
|
|||
|
</h2>
|
|||
|
<ul class='item-list' id='implementors-list'>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<U, A, F> Future for <a class="struct" href="../../../tokio/prelude/future/struct.Map.html" title="struct tokio::prelude::future::Map">Map</a><A, F> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/map.rs.html#22-38' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<A, B> Future for <a class="enum" href="../../../tokio/prelude/future/enum.Either.html" title="enum tokio::prelude::future::Either">Either</a><A, B> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>,<br> B: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a><Item = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Error = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/either.rs.html#26-39' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<T, E> Future for <a class="struct" href="../../../tokio/prelude/stream/struct.FutureSender.html" title="struct tokio::prelude::stream::FutureSender">FutureSender</a><T, E><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../../../tokio/prelude/stream/struct.Sender.html" title="struct tokio::prelude::stream::Sender">Sender</a><T, E>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../../../tokio/prelude/stream/struct.SendError.html" title="struct tokio::prelude::stream::SendError">SendError</a><T, E>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/stream/channel.rs.html#104-114' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<A, B, F> Future for <a class="struct" href="../../../tokio/prelude/future/struct.OrElse.html" title="struct tokio::prelude::future::OrElse">OrElse</a><A, B, F> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>,<br> B: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Item = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>) -> B, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <B as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Item" title="type tokio::prelude::IntoFuture::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <B as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Error" title="type tokio::prelude::IntoFuture::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/or_else.rs.html#23-39' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<A, B> Future for <a class="struct" href="../../../tokio/prelude/future/struct.Join.html" title="struct tokio::prelude::future::Join">Join</a><A, B> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>,<br> B: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a><Error = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, <B as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/join.rs.html#59-90' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<A, B, C> Future for <a class="struct" href="../../../tokio/prelude/future/struct.Join3.html" title="struct tokio::prelude::future::Join3">Join3</a><A, B, C> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>,<br> B: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a><Error = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a><Error = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, <B as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, <C as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/join.rs.html#59-90' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<I> Future for <a class="struct" href="../../../tokio/prelude/future/struct.JoinAll.html" title="struct tokio::prelude::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 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="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::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 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> as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Item" title="type tokio::prelude::IntoFuture::Item">Item</a>>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <<I 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> as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Error" title="type tokio::prelude::IntoFuture::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/join_all.rs.html#86-136' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<T, E, F> Future for <a class="struct" href="../../../tokio/prelude/future/struct.PollFn.html" title="struct tokio::prelude::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="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</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><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/poll_fn.rs.html#36-45' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<F> Future for <a class="struct" href="../../../tokio/prelude/future/struct.Shared.html" title="struct tokio::prelude::future::Shared">Shared</a><F> <span class="where fmt-newline">where<br> F: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../../../tokio/prelude/future/struct.SharedItem.html" title="struct tokio::prelude::future::SharedItem">SharedItem</a><<F as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../../../tokio/prelude/future/struct.SharedError.html" title="struct tokio::prelude::future::SharedError">SharedError</a><<F as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/shared.rs.html#123-206' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<S> Future for <a class="struct" href="../../../tokio/prelude/stream/struct.Collect.html" title="struct tokio::prelude::stream::Collect">Collect</a><S> <span class="where fmt-newline">where<br> S: <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Item" title="type tokio::prelude::stream::Stream::Item">Item</a>>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <S as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Error" title="type tokio::prelude::stream::Stream::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/stream/collect.rs.html#33-52' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<F> Future for <a class="struct" href="../../../tokio/prelude/future/struct.CatchUnwind.html" title="struct tokio::prelude::future::CatchUnwind">CatchUnwind</a><F> <span class="where fmt-newline">where<br> F: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, <F as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::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> + 'static + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/catch_unwind.rs.html#24-42' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<U, A, F> Future for <a class="struct" href="../../../tokio/prelude/future/struct.MapErr.html" title="struct tokio::prelude::future::MapErr">MapErr</a><A, F> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>) -> U, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = U;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/map_err.rs.html#22-36' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<A, B, C, D, E> Future for <a class="struct" href="../../../tokio/prelude/future/struct.Join5.html" title="struct tokio::prelude::future::Join5">Join5</a><A, B, C, D, E> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>,<br> B: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a><Error = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a><Error = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>>,<br> D: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a><Error = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>>,<br> E: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a><Error = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, <B as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, <C as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, <D as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, <E as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span><span class="where fm
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<T, U> Future for <a class="struct" href="../../../tokio/prelude/stream/struct.Forward.html" title="struct tokio::prelude::stream::Forward">Forward</a><T, U> <span class="where fmt-newline">where<br> T: <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>,<br> U: <a class="trait" href="../../../tokio/prelude/trait.Sink.html" title="trait tokio::prelude::Sink">Sink</a><SinkItem = <T as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Item" title="type tokio::prelude::stream::Stream::Item">Item</a>>,<br> <T as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Error" title="type tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/trait.Sink.html" title="trait tokio::prelude::Sink">Sink</a>>::<a class="type" href="../../../tokio/prelude/trait.Sink.html#associatedtype.SinkError" title="type tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Error" title="type tokio::prelude::stream::Stream::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/stream/forward.rs.html#78-110' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<T, E> Future for <a class="struct" href="../../../tokio/prelude/future/struct.Empty.html" title="struct tokio::prelude::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><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/empty.rs.html#24-31' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<A, B, C, D> Future for <a class="struct" href="../../../tokio/prelude/future/struct.Join4.html" title="struct tokio::prelude::future::Join4">Join4</a><A, B, C, D> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>,<br> B: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a><Error = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>>,<br> C: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a><Error = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>>,<br> D: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a><Error = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, <B as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, <C as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, <D as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/join.rs.html#59-90' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<S, T, A, F> Future for <a class="struct" href="../../../tokio/prelude/future/struct.LoopFn.html" title="struct tokio::prelude::future::LoopFn">LoopFn</a><A, F> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Item = <a class="enum" href="../../../tokio/prelude/future/enum.Loop.html" title="enum tokio::prelude::future::Loop">Loop</a><T, S>>,<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, </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 as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Error" title="type tokio::prelude::IntoFuture::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/loop_fn.rs.html#84-99' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<A, B> Future for <a class="struct" href="../../../tokio/prelude/future/struct.Select.html" title="struct tokio::prelude::future::Select">Select</a><A, B> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>,<br> B: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a><Item = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Error = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, <a class="struct" href="../../../tokio/prelude/future/struct.SelectNext.html" title="struct tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>, <a class="struct" href="../../../tokio/prelude/future/struct.SelectNext.html" title="struct tokio::prelude::future::SelectNext">SelectNext</a><A, B><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/select.rs.html#38-71' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<S> Future for <a class="struct" href="../../../tokio/prelude/stream/struct.Concat.html" title="struct tokio::prelude::stream::Concat">Concat</a><S> <span class="where fmt-newline">where<br> S: <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>,<br> <S as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Item" title="type tokio::prelude::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="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Item" title="type tokio::prelude::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>>,<br> <S as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Item" title="type tokio::prelude::stream::Stream::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 as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Item" title="type tokio::prelude::stream::Stream::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <S as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Error" title="type tokio::prelude::stream::Stream::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/stream/concat.rs.html#89-106' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<A> Future for <a class="struct" href="../../../tokio/prelude/future/struct.SelectAll.html" title="struct tokio::prelude::future::SelectAll">SelectAll</a><A> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::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><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/select_all.rs.html#45-71' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<A> Future for <a class="struct" href="../../../tokio/prelude/future/struct.Fuse.html" title="struct tokio::prelude::future::Fuse">Fuse</a><A> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/fuse.rs.html#34-49' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<A> Future for <a class="struct" href="../../../tokio/prelude/future/struct.SelectOk.html" title="struct tokio::prelude::future::SelectOk">SelectOk</a><A> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/select_ok.rs.html#43-81' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<A> Future for <a class="struct" href="../../../tokio/prelude/future/struct.Flatten.html" title="struct tokio::prelude::future::Flatten">Flatten</a><A> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>,<br> <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>,<br> <<A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a> as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Error" title="type tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a> as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Item" title="type tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a> as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Error" title="type tokio::prelude::IntoFuture::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/flatten.rs.html#35-49' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<S> Future for <a class="struct" href="../../../tokio/prelude/stream/struct.Concat2.html" title="struct tokio::prelude::stream::Concat2">Concat2</a><S> <span class="where fmt-newline">where<br> S: <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>,<br> <S as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Item" title="type tokio::prelude::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="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Item" title="type tokio::prelude::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>>,<br> <S as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Item" title="type tokio::prelude::stream::Stream::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>,<br> <S as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Item" title="type tokio::prelude::stream::Stream::Item">Item</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 as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Item" title="type tokio::prelude::stream::Stream::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <S as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Error" title="type tokio::prelude::stream::Stream::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/stream/concat.rs.html#37-54' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<A, F> Future for <a class="struct" href="../../../tokio/prelude/future/struct.Inspect.html" title="struct tokio::prelude::future::Inspect">Inspect</a><A, F> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>), </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/inspect.rs.html#23-40' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<T, E> Future for <a class="struct" href="../../../tokio/prelude/future/struct.FutureResult.html" title="struct tokio::prelude::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><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/result.rs.html#68-75' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<A, B> Future for <a class="struct" href="../../../tokio/prelude/future/struct.SelectNext.html" title="struct tokio::prelude::future::SelectNext">SelectNext</a><A, B> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>,<br> B: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a><Item = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, Error = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/select.rs.html#73-86' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<S, F, U> Future for <a class="struct" href="../../../tokio/prelude/stream/struct.ForEach.html" title="struct tokio::prelude::stream::ForEach">ForEach</a><S, F, U> <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 as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Item" title="type tokio::prelude::stream::Stream::Item">Item</a>) -> U,<br> S: <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>,<br> U: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Error = <S as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Error" title="type tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Error" title="type tokio::prelude::stream::Stream::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/stream/for_each.rs.html#28-51' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<F, R> Future for <a class="struct" href="../../../tokio/prelude/future/struct.Lazy.html" title="struct tokio::prelude::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="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <R as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Item" title="type tokio::prelude::IntoFuture::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <R as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Error" title="type tokio::prelude::IntoFuture::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/lazy.rs.html#74-84' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<S, F, Fut, T> Future for <a class="struct" href="../../../tokio/prelude/stream/struct.Fold.html" title="struct tokio::prelude::stream::Fold">Fold</a><S, F, Fut, T> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(T, <S as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Item" title="type tokio::prelude::stream::Stream::Item">Item</a>) -> Fut,<br> Fut: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Item = T>,<br> S: <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>,<br> <S as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Error" title="type tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Error" title="type tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Error" title="type tokio::prelude::stream::Stream::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/stream/fold.rs.html#42-81' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<A, B, F> Future for <a class="struct" href="../../../tokio/prelude/future/struct.AndThen.html" title="struct tokio::prelude::future::AndThen">AndThen</a><A, B, F> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>,<br> B: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a><Error = <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>) -> B, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <B as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Item" title="type tokio::prelude::IntoFuture::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <B as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Error" title="type tokio::prelude::IntoFuture::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/and_then.rs.html#23-38' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<A, E> Future for <a class="struct" href="../../../tokio/prelude/future/struct.FromErr.html" title="struct tokio::prelude::future::FromErr">FromErr</a><A, E> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>,<br> E: <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="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::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="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = E;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/from_err.rs.html#24-35' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<A, B, F> Future for <a class="struct" href="../../../tokio/prelude/future/struct.Then.html" title="struct tokio::prelude::future::Then">Then</a><A, B, F> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>,<br> B: <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>, <A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>>) -> B, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <B as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Item" title="type tokio::prelude::IntoFuture::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <B as <a class="trait" href="../../../tokio/prelude/trait.IntoFuture.html" title="trait tokio::prelude::IntoFuture">IntoFuture</a>>::<a class="type" href="../../../tokio/prelude/trait.IntoFuture.html#associatedtype.Error" title="type tokio::prelude::IntoFuture::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/then.rs.html#23-36' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<S> Future for <a class="struct" href="../../../tokio/prelude/stream/struct.StreamFuture.html" title="struct tokio::prelude::stream::StreamFuture">StreamFuture</a><S> <span class="where fmt-newline">where<br> S: <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</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 class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<S as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Item" title="type tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/stream/trait.Stream.html" title="trait tokio::prelude::stream::Stream">Stream</a>>::<a class="type" href="../../../tokio/prelude/stream/trait.Stream.html#associatedtype.Error" title="type tokio::prelude::stream::Stream::Error">Error</a>, S<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/stream/future.rs.html#57-76' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<A, B> Future for <a class="struct" href="../../../tokio/prelude/future/struct.Select2.html" title="struct tokio::prelude::future::Select2">Select2</a><A, B> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>,<br> B: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="enum" href="../../../tokio/prelude/future/enum.Either.html" title="enum tokio::prelude::future::Either">Either</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::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="../../../tokio/prelude/future/enum.Either.html" title="enum tokio::prelude::future::Either">Either</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><A as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::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 as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>, A<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/futures/future/select2.rs.html#20-39' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<A> Future for <a class="struct" href="../../../tokio/io/struct.ReadUntil.html" title="struct tokio::io::ReadUntil">ReadUntil</a><A> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/trait.AsyncRead.html" title="trait tokio::prelude::AsyncRead">AsyncRead</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.BufRead.html" title="trait std::io::BufRead">BufRead</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="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</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="struct" href="../../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/tokio_io/io/read_until.rs.html#51-74' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<R, W> Future for <a class="struct" href="../../../tokio/io/struct.Copy.html" title="struct tokio::io::Copy">Copy</a><R, W> <span class="where fmt-newline">where<br> R: <a class="trait" href="../../../tokio/prelude/trait.AsyncRead.html" title="trait tokio::prelude::AsyncRead">AsyncRead</a>,<br> W: <a class="trait" href="../../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</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 class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, R, W<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="struct" href="../../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/tokio_io/io/copy.rs.html#50-96' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<A> Future for <a class="struct" href="../../../tokio/io/struct.ReadToEnd.html" title="struct tokio::io::ReadToEnd">ReadToEnd</a><A> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/trait.AsyncRead.html" title="trait tokio::prelude::AsyncRead">AsyncRead</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="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</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="struct" href="../../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/tokio_io/io/read_to_end.rs.html#46-68' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<A> Future for tokio::io::<a class="struct" href="../../../tokio/io/struct.Flush.html" title="struct tokio::io::Flush">Flush</a><A> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = A;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/tokio_io/io/flush.rs.html#33-43' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<A> Future for tokio::io::<a class="struct" href="../../../tokio/io/struct.Shutdown.html" title="struct tokio::io::Shutdown">Shutdown</a><A> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = A;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/tokio_io/io/shutdown.rs.html#34-44' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<A, T> Future for <a class="struct" href="../../../tokio/io/struct.WriteAll.html" title="struct tokio::io::WriteAll">WriteAll</a><A, T> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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, T<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="struct" href="../../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/tokio_io/io/write_all.rs.html#59-86' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<A, T> Future for <a class="struct" href="../../../tokio/io/struct.ReadExact.html" title="struct tokio::io::ReadExact">ReadExact</a><A, T> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../../tokio/prelude/trait.AsyncRead.html" title="trait tokio::prelude::AsyncRead">AsyncRead</a>,<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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, T<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="struct" href="../../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/tokio_io/io/read_exact.rs.html#56-83' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<P> Future for <a class="struct" href="../../../tokio/fs/file/struct.CreateFuture.html" title="struct tokio::fs::file::CreateFuture">CreateFuture</a><P> <span class="where fmt-newline">where<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="https://doc.rust-lang.org/nightly/std/path/struct.Path.html" title="struct std::path::Path">Path</a>> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../../../tokio/fs/struct.File.html" title="struct tokio::fs::File">File</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/tokio_fs/file/create.rs.html#23-37' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<P> Future for <a class="struct" href="../../../tokio/fs/file/struct.OpenFuture.html" title="struct tokio::fs::file::OpenFuture">OpenFuture</a><P> <span class="where fmt-newline">where<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="https://doc.rust-lang.org/nightly/std/path/struct.Path.html" title="struct std::path::Path">Path</a>> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../../../tokio/fs/struct.File.html" title="struct tokio::fs::File">File</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/tokio_fs/file/open.rs.html#24-38' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl Future for tokio::executor::thread_pool::<a class="struct" href="../../../tokio/executor/thread_pool/struct.Shutdown.html" title="struct tokio::executor::thread_pool::Shutdown">Shutdown</a><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/tokio_threadpool/shutdown.rs.html#30-45' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<T> Future for <a class="struct" href="../../../tokio/timer/struct.Deadline.html" title="struct tokio::timer::Deadline">Deadline</a><T> <span class="where fmt-newline">where<br> T: <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>, </span><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <T as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Item" title="type tokio::prelude::future::Future::Item">Item</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../../../tokio/timer/struct.DeadlineError.html" title="struct tokio::timer::DeadlineError">DeadlineError</a><<T as <a class="trait" href="../../../tokio/prelude/future/trait.Future.html" title="trait tokio::prelude::future::Future">Future</a>>::<a class="type" href="../../../tokio/prelude/future/trait.Future.html#associatedtype.Error" title="type tokio::prelude::future::Future::Error">Error</a>>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/tokio_timer/deadline.rs.html#70-93' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl Future for <a class="struct" href="../../../tokio/timer/struct.Delay.html" title="struct tokio::timer::Delay">Delay</a><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="struct" href="../../../tokio/timer/struct.Error.html" title="struct tokio::timer::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/tokio_timer/delay.rs.html#97-108' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl Future for <a class="struct" href="../../../tokio/net/struct.ConnectFuture.html" title="struct tokio::net::ConnectFuture">ConnectFuture</a><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../../../tokio/net/struct.TcpStream.html" title="struct tokio::net::TcpStream">TcpStream</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/tokio_tcp/stream.rs.html#643-650' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<T> Future for <a class="struct" href="../../../tokio/net/struct.SendDgram.html" title="struct tokio::net::SendDgram">SendDgram</a><T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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 class="struct" href="../../../tokio/net/struct.UdpSocket.html" title="struct tokio::net::UdpSocket">UdpSocket</a>, T<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="struct" href="../../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/tokio_udp/send_dgram.rs.html#41-61' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl<T> Future for <a class="struct" href="../../../tokio/net/struct.RecvDgram.html" title="struct tokio::net::RecvDgram">RecvDgram</a><T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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 class="struct" href="../../../tokio/net/struct.UdpSocket.html" title="struct tokio::net::UdpSocket">UdpSocket</a>, T, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="enum" href="https://doc.rust-lang.org/nightly/std/net/addr/enum.SocketAddr.html" title="enum std::net::addr::SocketAddr">SocketAddr</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="struct" href="../../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/tokio_udp/recv_dgram.rs.html#35-52' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
<li><table class='table-display'><tbody><tr><td><code>impl Future for tokio::runtime::<a class="struct" href="../../../tokio/runtime/struct.Shutdown.html" title="struct tokio::runtime::Shutdown">Shutdown</a><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.Error' class="type">Error</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../../src/tokio/runtime/shutdown.rs.html#30-38' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
|||
|
</ul><script type="text/javascript">window.inlined_types=new Set([]);</script><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 = "tokio";
|
|||
|
</script>
|
|||
|
<script src="../../../main.js"></script>
|
|||
|
<script defer src="../../../search-index.js"></script>
|
|||
|
</body>
|
|||
|
</html>
|