blob: a553419099c5f1d9add69232542ed636a0833312 [file] [log] [blame]
<!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="Read bytes asynchronously."><meta name="keywords" content="rust, rustlang, rust-lang, AsyncRead"><title>AsyncRead in futures_util::io - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../futures_util/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../futures_util/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">AsyncRead</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.poll_read">poll_read</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.poll_read_vectored">poll_read_vectored</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-AsyncRead-for-%26%5Bu8%5D">&amp;[u8]</a></li><li><a href="#impl-AsyncRead-for-%26mut%20T">&amp;mut T</a></li><li><a href="#impl-AsyncRead-for-Box%3CT%2C%20Global%3E">Box&lt;T, Global&gt;</a></li><li><a href="#impl-AsyncRead-for-Pin%3CP%3E">Pin&lt;P&gt;</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In futures_util::io</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Trait <a href="../index.html">futures_util</a>::<wbr><a href="index.html">io</a>::<wbr><a class="trait" href="#">AsyncRead</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/futures_io/lib.rs.html#44">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="item-decl"><pre class="rust trait"><code>pub trait AsyncRead {
fn <a href="#tymethod.poll_read" class="fnname">poll_read</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self: Pin&lt;&amp;mut Self&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cx: &amp;mut Context&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;buf: &amp;mut [u8]<br>&nbsp;&nbsp;&nbsp;&nbsp;) -&gt; Poll&lt;Result&lt;usize, Error&gt;&gt;;
fn <a href="#method.poll_read_vectored" class="fnname">poll_read_vectored</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self: Pin&lt;&amp;mut Self&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cx: &amp;mut Context&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bufs: &amp;mut [IoSliceMut&lt;'_&gt;]<br>&nbsp;&nbsp;&nbsp;&nbsp;) -&gt; Poll&lt;Result&lt;usize, Error&gt;&gt; { ... }
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Read bytes asynchronously.</p>
<p>This trait is analogous to the <code>std::io::Read</code> trait, but integrates
with the asynchronous task system. In particular, the <code>poll_read</code>
method, unlike <code>Read::read</code>, will automatically queue the current task
for wakeup and return if data is not yet available, rather than blocking
the calling thread.</p>
</div></details><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.poll_read" class="method has-srclink"><a class="srclink rightside" href="../../src/futures_io/lib.rs.html#60-64">source</a><h4 class="code-header">fn <a href="#tymethod.poll_read" class="fnname">poll_read</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self: Pin&lt;&amp;mut Self&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;cx: &amp;mut Context&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;buf: &amp;mut [u8]<br>) -&gt; Poll&lt;Result&lt;usize, Error&gt;&gt;</h4></section></summary><div class="docblock"><p>Attempt to read from the <code>AsyncRead</code> into <code>buf</code>.</p>
<p>On success, returns <code>Poll::Ready(Ok(num_bytes_read))</code>.</p>
<p>If no data is available for reading, the method returns
<code>Poll::Pending</code> and arranges for the current task (via
<code>cx.waker().wake_by_ref()</code>) to receive a notification when the object becomes
readable or is closed.</p>
<h5 id="implementation"><a href="#implementation">Implementation</a></h5>
<p>This function may not return errors of kind <code>WouldBlock</code> or
<code>Interrupted</code>. Implementations must convert <code>WouldBlock</code> into
<code>Poll::Pending</code> and either internally retry or convert
<code>Interrupted</code> into another error kind.</p>
</div></details></div><h2 id="provided-methods" class="small-section-header">Provided Methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.poll_read_vectored" class="method has-srclink"><a class="srclink rightside" href="../../src/futures_io/lib.rs.html#88-92">source</a><h4 class="code-header">fn <a href="#method.poll_read_vectored" class="fnname">poll_read_vectored</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self: Pin&lt;&amp;mut Self&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;cx: &amp;mut Context&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;bufs: &amp;mut [IoSliceMut&lt;'_&gt;]<br>) -&gt; Poll&lt;Result&lt;usize, Error&gt;&gt;</h4></section></summary><div class="docblock"><p>Attempt to read from the <code>AsyncRead</code> into <code>bufs</code> using vectored
IO operations.</p>
<p>This method is similar to <code>poll_read</code>, but allows data to be read
into multiple buffers using a single operation.</p>
<p>On success, returns <code>Poll::Ready(Ok(num_bytes_read))</code>.</p>
<p>If no data is available for reading, the method returns
<code>Poll::Pending</code> and arranges for the current task (via
<code>cx.waker().wake_by_ref()</code>) to receive a notification when the object becomes
readable or is closed.
By default, this method delegates to using <code>poll_read</code> on the first
nonempty buffer in <code>bufs</code>, or an empty one if none exists. Objects which
support vectored IO should override this method.</p>
<h5 id="implementation-1"><a href="#implementation-1">Implementation</a></h5>
<p>This function may not return errors of kind <code>WouldBlock</code> or
<code>Interrupted</code>. Implementations must convert <code>WouldBlock</code> into
<code>Poll::Pending</code> and either internally retry or convert
<code>Interrupted</code> into another error kind.</p>
</div></details></div><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-AsyncRead-for-%26mut%20T" class="impl has-srclink"><a class="srclink rightside" href="../../src/futures_io/lib.rs.html#324">source</a><a href="#impl-AsyncRead-for-%26mut%20T" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a> for &amp;mut T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a> + Unpin + ?Sized,</span></h3></section></summary><div class="impl-items"><section id="method.poll_read" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/futures_io/lib.rs.html#325">source</a><a href="#method.poll_read" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.poll_read" class="fnname">poll_read</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self: Pin&lt;&amp;mut &amp;mut T&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;cx: &amp;mut Context&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;buf: &amp;mut [u8]<br>) -&gt; Poll&lt;Result&lt;usize, Error&gt;&gt;</h4></section><section id="method.poll_read_vectored-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/futures_io/lib.rs.html#325">source</a><a href="#method.poll_read_vectored-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.poll_read_vectored" class="fnname">poll_read_vectored</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self: Pin&lt;&amp;mut &amp;mut T&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;cx: &amp;mut Context&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;bufs: &amp;mut [IoSliceMut&lt;'_&gt;]<br>) -&gt; Poll&lt;Result&lt;usize, Error&gt;&gt;</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-AsyncRead-for-%26%5Bu8%5D" class="impl has-srclink"><a class="srclink rightside" href="../../src/futures_io/lib.rs.html#370">source</a><a href="#impl-AsyncRead-for-%26%5Bu8%5D" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a> for &amp;[u8]</h3></section></summary><div class="impl-items"><section id="method.poll_read-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/futures_io/lib.rs.html#371">source</a><a href="#method.poll_read-1" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.poll_read" class="fnname">poll_read</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self: Pin&lt;&amp;mut &amp;[u8]&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut Context&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;buf: &amp;mut [u8]<br>) -&gt; Poll&lt;Result&lt;usize, Error&gt;&gt;</h4></section><section id="method.poll_read_vectored-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/futures_io/lib.rs.html#371">source</a><a href="#method.poll_read_vectored-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.poll_read_vectored" class="fnname">poll_read_vectored</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self: Pin&lt;&amp;mut &amp;[u8]&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut Context&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;bufs: &amp;mut [IoSliceMut&lt;'_&gt;]<br>) -&gt; Poll&lt;Result&lt;usize, Error&gt;&gt;</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-AsyncRead-for-Pin%3CP%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/futures_io/lib.rs.html#328">source</a><a href="#impl-AsyncRead-for-Pin%3CP%3E" class="anchor"></a><h3 class="code-header">impl&lt;P&gt; <a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a> for Pin&lt;P&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;P: DerefMut + Unpin,<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;P as Deref&gt;::Target: <a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a>,</span></h3></section></summary><div class="impl-items"><section id="method.poll_read-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/futures_io/lib.rs.html#333-337">source</a><a href="#method.poll_read-2" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.poll_read" class="fnname">poll_read</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self: Pin&lt;&amp;mut Pin&lt;P&gt;&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;cx: &amp;mut Context&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;buf: &amp;mut [u8]<br>) -&gt; Poll&lt;Result&lt;usize, Error&gt;&gt;</h4></section><section id="method.poll_read_vectored-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/futures_io/lib.rs.html#341-345">source</a><a href="#method.poll_read_vectored-3" class="anchor"></a><h4 class="code-header">fn <a href="#method.poll_read_vectored" class="fnname">poll_read_vectored</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self: Pin&lt;&amp;mut Pin&lt;P&gt;&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;cx: &amp;mut Context&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;bufs: &amp;mut [IoSliceMut&lt;'_&gt;]<br>) -&gt; Poll&lt;Result&lt;usize, Error&gt;&gt;</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-AsyncRead-for-Box%3CT%2C%20Global%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/futures_io/lib.rs.html#320">source</a><a href="#impl-AsyncRead-for-Box%3CT%2C%20Global%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a> for Box&lt;T, Global&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a> + Unpin + ?Sized,</span></h3></section></summary><div class="impl-items"><section id="method.poll_read-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/futures_io/lib.rs.html#321">source</a><a href="#method.poll_read-3" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.poll_read" class="fnname">poll_read</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self: Pin&lt;&amp;mut Box&lt;T, Global&gt;&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;cx: &amp;mut Context&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;buf: &amp;mut [u8]<br>) -&gt; Poll&lt;Result&lt;usize, Error&gt;&gt;</h4></section><section id="method.poll_read_vectored-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/futures_io/lib.rs.html#321">source</a><a href="#method.poll_read_vectored-4" class="anchor"></a><h4 class="code-header">fn <a href="#method.poll_read_vectored" class="fnname">poll_read_vectored</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self: Pin&lt;&amp;mut Box&lt;T, Global&gt;&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;cx: &amp;mut Context&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;bufs: &amp;mut [IoSliceMut&lt;'_&gt;]<br>) -&gt; Poll&lt;Result&lt;usize, Error&gt;&gt;</h4></section></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div id="implementors-list"><section id="impl-AsyncRead-for-Empty" class="impl has-srclink"><a class="srclink rightside" href="../../src/futures_util/io/empty.rs.html#35-44">source</a><a href="#impl-AsyncRead-for-Empty" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a> for <a class="struct" href="struct.Empty.html" title="struct futures_util::io::Empty">Empty</a></h3></section><section id="impl-AsyncRead-for-Repeat" class="impl has-srclink"><a class="srclink rightside" href="../../src/futures_util/io/repeat.rs.html#35-60">source</a><a href="#impl-AsyncRead-for-Repeat" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a> for <a class="struct" href="struct.Repeat.html" title="struct futures_util::io::Repeat">Repeat</a></h3></section><section id="impl-AsyncRead-for-Either%3CA%2C%20B%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/futures_util/future/either.rs.html#211-237">source</a><a href="#impl-AsyncRead-for-Either%3CA%2C%20B%3E" class="anchor"></a><h3 class="code-header">impl&lt;A, B&gt; <a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a> for <a class="enum" href="../future/enum.Either.html" title="enum futures_util::future::Either">Either</a>&lt;A, B&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a>,</span></h3></section><section id="impl-AsyncRead-for-BufReader%3CR%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/futures_util/io/buf_reader.rs.html#109-145">source</a><a href="#impl-AsyncRead-for-BufReader%3CR%3E" class="anchor"></a><h3 class="code-header">impl&lt;R:&nbsp;<a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a>&gt; <a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a> for <a class="struct" href="struct.BufReader.html" title="struct futures_util::io::BufReader">BufReader</a>&lt;R&gt;</h3></section><section id="impl-AsyncRead-for-ReadHalf%3CR%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/futures_util/io/split.rs.html#54-70">source</a><a href="#impl-AsyncRead-for-ReadHalf%3CR%3E" class="anchor"></a><h3 class="code-header">impl&lt;R:&nbsp;<a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a>&gt; <a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a> for <a class="struct" href="struct.ReadHalf.html" title="struct futures_util::io::ReadHalf">ReadHalf</a>&lt;R&gt;</h3></section><section id="impl-AsyncRead-for-Take%3CR%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/futures_util/io/take.rs.html#84-101">source</a><a href="#impl-AsyncRead-for-Take%3CR%3E" class="anchor"></a><h3 class="code-header">impl&lt;R:&nbsp;<a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a>&gt; <a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a> for <a class="struct" href="struct.Take.html" title="struct futures_util::io::Take">Take</a>&lt;R&gt;</h3></section><section id="impl-AsyncRead-for-IntoAsyncRead%3CSt%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/futures_util/stream/try_stream/into_async_read.rs.html#43-91">source</a><a href="#impl-AsyncRead-for-IntoAsyncRead%3CSt%3E" class="anchor"></a><h3 class="code-header">impl&lt;St&gt; <a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a> for <a class="struct" href="../stream/struct.IntoAsyncRead.html" title="struct futures_util::stream::IntoAsyncRead">IntoAsyncRead</a>&lt;St&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;St: <a class="trait" href="../stream/trait.TryStream.html" title="trait futures_util::stream::TryStream">TryStream</a>&lt;Error = Error&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;St::<a class="associatedtype" href="../stream/trait.TryStream.html#associatedtype.Ok" title="type futures_util::stream::TryStream::Ok">Ok</a>: AsRef&lt;[u8]&gt;,</span></h3></section><section id="impl-AsyncRead-for-AllowStdIo%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/futures_util/io/allow_std.rs.html#133-152">source</a><a href="#impl-AsyncRead-for-AllowStdIo%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a> for <a class="struct" href="struct.AllowStdIo.html" title="struct futures_util::io::AllowStdIo">AllowStdIo</a>&lt;T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: Read,</span></h3></section><section id="impl-AsyncRead-for-Chain%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/futures_util/io/chain.rs.html#74-112">source</a><a href="#impl-AsyncRead-for-Chain%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a> for <a class="struct" href="struct.Chain.html" title="struct futures_util::io::Chain">Chain</a>&lt;T, U&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a>,</span></h3></section><section id="impl-AsyncRead-for-Cursor%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/futures_util/io/cursor.rs.html#159-175">source</a><a href="#impl-AsyncRead-for-Cursor%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;AsRef&lt;[u8]&gt; + Unpin&gt; <a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a> for <a class="struct" href="struct.Cursor.html" title="struct futures_util::io::Cursor">Cursor</a>&lt;T&gt;</h3></section><section id="impl-AsyncRead-for-BufWriter%3CW%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/futures_util/io/buf_writer.rs.html#194-196">source</a><a href="#impl-AsyncRead-for-BufWriter%3CW%3E" class="anchor"></a><h3 class="code-header">impl&lt;W:&nbsp;<a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a>&gt; <a class="trait" href="trait.AsyncRead.html" title="trait futures_util::io::AsyncRead">AsyncRead</a> for <a class="struct" href="struct.BufWriter.html" title="struct futures_util::io::BufWriter">BufWriter</a>&lt;W&gt;</h3></section></div><script src="../../implementors/futures_io/if_std/trait.AsyncRead.js" data-ignore-extern-crates="core,alloc" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html>