mentat/tokio/prelude/trait.AsyncRead.html

297 lines
76 KiB
HTML
Raw Normal View History

2018-08-22 17:04:13 +00:00
<!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 `AsyncRead` trait in crate `tokio`.">
<meta name="keywords" content="rust, rustlang, rust-lang, AsyncRead">
<title>tokio::prelude::AsyncRead - Rust</title>
<link rel="stylesheet" type="text/css" href="../../normalize.css">
<link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle">
<link rel="stylesheet" type="text/css" href="../../dark.css">
<link rel="stylesheet" type="text/css" href="../../main.css" id="themeStyle">
<script src="../../storage.js"></script>
</head>
<body class="rustdoc trait">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<div class="sidebar-menu">&#9776;</div>
<p class='location'>Trait AsyncRead</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.prepare_uninitialized_buffer">prepare_uninitialized_buffer</a><a href="#method.poll_read">poll_read</a><a href="#method.read_buf">read_buf</a><a href="#method.framed">framed</a><a href="#method.split">split</a></div><a class="sidebar-title" href="#foreign-impls">Implementations on Foreign Types</a><div class="sidebar-links"><a href="#impl-AsyncRead">Box&lt;T&gt;</a><a href="#impl-AsyncRead">&amp;&#39;a [u8]</a><a href="#impl-AsyncRead">Cursor&lt;T&gt;</a><a href="#impl-AsyncRead">Take&lt;T&gt;</a><a href="#impl-AsyncRead">BufReader&lt;T&gt;</a><a href="#impl-AsyncRead">Repeat</a><a href="#impl-AsyncRead">Chain&lt;T, U&gt;</a><a href="#impl-AsyncRead">AllowStdIo&lt;T&gt;</a><a href="#impl-AsyncRead">&amp;&#39;a mut 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></p><script>window.sidebarCurrent = {name: 'AsyncRead', 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 class="trait" href=''>AsyncRead</a></span><span class='out-of-band'><span id='render-detail'>
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>&#x2212;</span>]
</a>
</span><a class='srclink' href='../../src/tokio_io/async_read.rs.html#34-150' title='goto source code'>[src]</a></span></h1>
<pre class='rust trait'>pub trait AsyncRead: <a class="trait" href="../../tokio/prelude/trait.Read.html" title="trait tokio::prelude::Read">Read</a> {
unsafe fn <a href='#method.prepare_uninitialized_buffer' class='fnname'>prepare_uninitialized_buffer</a>(&amp;self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</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>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.poll_read' class='fnname'>poll_read</a>(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</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>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;, <a class="struct" href="../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>&gt; { ... }
<div class='item-spacer'></div> fn <a href='#method.read_buf' class='fnname'>read_buf</a>&lt;B&gt;(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>B) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;, <a class="struct" href="../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../bytes/buf/buf_mut/trait.BufMut.html" title="trait bytes::buf::buf_mut::BufMut">BufMut</a></span>,
{ ... }
<div class='item-spacer'></div> fn <a href='#method.framed' class='fnname'>framed</a>&lt;T&gt;(self, codec: T) -&gt; Framed&lt;Self, T&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../tokio_io/codec/decoder/trait.Decoder.html" title="trait tokio_io::codec::decoder::Decoder">Decoder</a> + <a class="trait" href="../../tokio_io/codec/encoder/trait.Encoder.html" title="trait tokio_io::codec::encoder::Encoder">Encoder</a></span>,
{ ... }
<div class='item-spacer'></div> fn <a href='#method.split' class='fnname'>split</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../tokio/io/struct.ReadHalf.html" title="struct tokio::io::ReadHalf">ReadHalf</a>&lt;Self&gt;, <a class="struct" href="../../tokio/io/struct.WriteHalf.html" title="struct tokio::io::WriteHalf">WriteHalf</a>&lt;Self&gt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a><br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a></span>,
{ ... }
}</pre><div class='docblock'><p>Read bytes asynchronously.</p>
<p>This trait inherits from <code>std::io::Read</code> and indicates that an I/O object is
<strong>non-blocking</strong>. All non-blocking I/O objects must return an error when
bytes are unavailable instead of blocking the current thread.</p>
<p>Specifically, this means that the <code>read</code> function will return one of the
following:</p>
<ul>
<li>
<p><code>Ok(n)</code> means that <code>n</code> bytes of data was immediately read and placed into
the output buffer, where <code>n</code> == 0 implies that EOF has been reached.</p>
</li>
<li>
<p><code>Err(e) if e.kind() == ErrorKind::WouldBlock</code> means that no data was read
into the buffer provided. The I/O object is not currently readable but may
become readable in the future. Most importantly, <strong>the current future's
task is scheduled to get unparked when the object is readable</strong>. This
means that like <code>Future::poll</code> you'll receive a notification when the I/O
object is readable again.</p>
</li>
<li>
<p><code>Err(e)</code> for other errors are standard I/O errors coming from the
underlying object.</p>
</li>
</ul>
<p>This trait importantly means that the <code>read</code> method only works in the
context of a future's task. The object may panic if used outside of a task.</p>
</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.prepare_uninitialized_buffer' class='method'><span id='prepare_uninitialized_buffer.v' class='invisible'><code>unsafe fn <a href='#method.prepare_uninitialized_buffer' class='fnname'>prepare_uninitialized_buffer</a>(&amp;self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</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>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></h3><div class='docblock'><p>Prepares an uninitialized buffer to be safe to pass to <code>read</code>. Returns
<code>true</code> if the supplied buffer was zeroed out.</p>
<p>While it would be highly unusual, implementations of <a href="https://doc.rust-lang.org/std/io/trait.Read.html"><code>io::Read</code></a> are
able to read data from the buffer passed as an argument. Because of
this, the buffer passed to <a href="https://doc.rust-lang.org/std/io/trait.Read.html"><code>io::Read</code></a> must be initialized memory. In
situations where large numbers of buffers are used, constantly having to
zero out buffers can be expensive.</p>
<p>This function does any necessary work to prepare an uninitialized buffer
to be safe to pass to <code>read</code>. If <code>read</code> guarantees to never attempt read
data out of the supplied buffer, then <code>prepare_uninitialized_buffer</code>
doesn't need to do any work.</p>
<p>If this function returns <code>true</code>, then the memory has been zeroed out.
This allows implementations of <code>AsyncRead</code> which are composed of
multiple sub implementations to efficiently implement
<code>prepare_uninitialized_buffer</code>.</p>
<p>This function isn't actually <code>unsafe</code> to call but <code>unsafe</code> to implement.
The implementor must ensure that either the whole <code>buf</code> has been zeroed
or <code>read_buf()</code> overwrites the buffer without reading it and returns
correct value.</p>
<p>This function is called from <a href="#method.read_buf"><code>read_buf</code></a>.</p>
</div><h3 id='method.poll_read' class='method'><span id='poll_read.v' class='invisible'><code>fn <a href='#method.poll_read' class='fnname'>poll_read</a>(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</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>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;, <a class="struct" href="../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>&gt;</code></span></h3><div class='docblock'><p>Attempt to read from the <code>AsyncRead</code> into <code>buf</code>.</p>
<p>On success, returns <code>Ok(Async::Ready(num_bytes_read))</code>.</p>
<p>If no data is available for reading, the method returns
<code>Ok(Async::Pending)</code> and arranges for the current task (via
<code>cx.waker()</code>) to receive a notification when the object becomes
readable or is closed.</p>
</div><h3 id='method.read_buf' class='method'><span id='read_buf.v' class='invisible'><code>fn <a href='#method.read_buf' class='fnname'>read_buf</a>&lt;B&gt;(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>B) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;, <a class="struct" href="../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../bytes/buf/buf_mut/trait.BufMut.html" title="trait bytes::buf::buf_mut::BufMut">BufMut</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Pull some bytes from this source into the specified <code>Buf</code>, returning
how many bytes were read.</p>
<p>The <code>buf</code> provided will have bytes read into it and the internal cursor
will be advanced if any bytes were read. Note that this method typically
will not reallocate the buffer provided.</p>
</div><h3 id='method.framed' class='method'><span id='framed.v' class='invisible'><code>fn <a href='#method.framed' class='fnname'>framed</a>&lt;T&gt;(self, codec: T) -&gt; Framed&lt;Self, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../tokio_io/codec/decoder/trait.Decoder.html" title="trait tokio_io::codec::decoder::Decoder">Decoder</a> + <a class="trait" href="../../tokio_io/codec/encoder/trait.Encoder.html" title="trait tokio_io::codec::encoder::Encoder">Encoder</a>,&nbsp;</span></code></span></h3><div class='stability'><div class='stab deprecated'>Deprecated since 0.1.7<p>: Use tokio_codec::Decoder::framed instead</p>
</div></div><div class='docblock'><p>Provides a <code>Stream</code> and <code>Sink</code> interface for reading and writing to this
<code>Io</code> object, using <code>Decode</code> and <code>Encode</code> to read and write the raw data.</p>
<p>Raw I/O objects work with byte sequences, but higher-level code usually
wants to batch these into meaningful chunks, called &quot;frames&quot;. This
method layers framing on top of an I/O object, by using the <code>Codec</code>
traits to handle encoding and decoding of messages frames. Note that
the incoming and outgoing frame types may be distinct.</p>
<p>This function returns a <em>single</em> object that is both <code>Stream</code> and
<code>Sink</code>; grouping this into a single object is often useful for layering
things like gzip or TLS, which require both read and write access to the
underlying object.</p>
<p>If you want to work more directly with the streams and sink, consider
calling <code>split</code> on the <code>Framed</code> returned by this method, which will
break them into separate objects, allowing them to interact more easily.</p>
</div><h3 id='method.split' class='method'><span id='split.v' class='invisible'><code>fn <a href='#method.split' class='fnname'>split</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../tokio/io/struct.ReadHalf.html" title="struct tokio::io::ReadHalf">ReadHalf</a>&lt;Self&gt;, <a class="struct" href="../../tokio/io/struct.WriteHalf.html" title="struct tokio::io::WriteHalf">WriteHalf</a>&lt;Self&gt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Helper method for splitting this read/write object into two halves.</p>
<p>The two halves returned implement the <code>Read</code> and <code>Write</code> traits,
respectively.</p>
</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-AsyncRead' class='impl'><span class='in-band'><code>impl&lt;T&gt; <a class="trait" href="../../tokio/prelude/trait.AsyncRead.html" title="trait tokio::prelude::AsyncRead">AsyncRead</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <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/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-AsyncRead' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#152-156' title='goto source code'>[src]</a></span></h3>
<span class='docblock autohide'><div class='impl-items'><h4 id='method.prepare_uninitialized_buffer-1' class="method"><span id='prepare_uninitialized_buffer.v-1' class='invisible'><code>unsafe fn <a href='#method.prepare_uninitialized_buffer' class='fnname'>prepare_uninitialized_buffer</a>(&amp;self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</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>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#153-155' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_read-1' class="method"><span id='poll_read.v-1' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.poll_read' class='fnname'>poll_read</a>(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</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>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;, <a class="struct" href="../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#79-87' title='goto source code'>[src]</a></span></h4>
<h4 id='method.read_buf-1' class="method"><span id='read_buf.v-1' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.read_buf' class='fnname'>read_buf</a>&lt;B&gt;(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>B) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;, <a class="struct" href="../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../bytes/buf/buf_mut/trait.BufMut.html" title="trait bytes::buf::buf_mut::BufMut">BufMut</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#95-114' title='goto source code'>[src]</a></span></h4>
<h4 id='method.framed-1' class="method"><span id='framed.v-1' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.framed' class='fnname'>framed</a>&lt;T&gt;(self, codec: T) -&gt; Framed&lt;Self, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../tokio_io/codec/decoder/trait.Decoder.html" title="trait tokio_io::codec::decoder::Decoder">Decoder</a> + <a class="trait" href="../../tokio_io/codec/encoder/trait.Encoder.html" title="trait tokio_io::codec::encoder::Encoder">Encoder</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#135-139' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab deprecated'>Deprecated since 0.1.7<p>: Use tokio_codec::Decoder::framed instead</p>
</div></div><h4 id='method.split-1' class="method"><span id='split.v-1' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.split' class='fnname'>split</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../tokio/io/struct.ReadHalf.html" title="struct tokio::io::ReadHalf">ReadHalf</a>&lt;Self&gt;, <a class="struct" href="../../tokio/io/struct.WriteHalf.html" title="struct tokio::io::WriteHalf">WriteHalf</a>&lt;Self&gt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#145-149' title='goto source code'>[src]</a></span></h4>
</div></span><h3 id='impl-AsyncRead-1' class='impl'><span class='in-band'><code>impl&lt;'a&gt; <a class="trait" href="../../tokio/prelude/trait.AsyncRead.html" title="trait tokio::prelude::AsyncRead">AsyncRead</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'a [</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></code><a href='#impl-AsyncRead-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#164-168' title='goto source code'>[src]</a></span></h3>
<span class='docblock autohide'><div class='impl-items'><h4 id='method.prepare_uninitialized_buffer-2' class="method"><span id='prepare_uninitialized_buffer.v-2' class='invisible'><code>unsafe fn <a href='#method.prepare_uninitialized_buffer' class='fnname'>prepare_uninitialized_buffer</a>(&amp;self, _buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</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>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#165-167' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_read-2' class="method"><span id='poll_read.v-2' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.poll_read' class='fnname'>poll_read</a>(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</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>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;, <a class="struct" href="../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#79-87' title='goto source code'>[src]</a></span></h4>
<h4 id='method.read_buf-2' class="method"><span id='read_buf.v-2' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.read_buf' class='fnname'>read_buf</a>&lt;B&gt;(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>B) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;, <a class="struct" href="../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../bytes/buf/buf_mut/trait.BufMut.html" title="trait bytes::buf::buf_mut::BufMut">BufMut</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#95-114' title='goto source code'>[src]</a></span></h4>
<h4 id='method.framed-2' class="method"><span id='framed.v-2' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.framed' class='fnname'>framed</a>&lt;T&gt;(self, codec: T) -&gt; Framed&lt;Self, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../tokio_io/codec/decoder/trait.Decoder.html" title="trait tokio_io::codec::decoder::Decoder">Decoder</a> + <a class="trait" href="../../tokio_io/codec/encoder/trait.Encoder.html" title="trait tokio_io::codec::encoder::Encoder">Encoder</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#135-139' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab deprecated'>Deprecated since 0.1.7<p>: Use tokio_codec::Decoder::framed instead</p>
</div></div><h4 id='method.split-2' class="method"><span id='split.v-2' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.split' class='fnname'>split</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../tokio/io/struct.ReadHalf.html" title="struct tokio::io::ReadHalf">ReadHalf</a>&lt;Self&gt;, <a class="struct" href="../../tokio/io/struct.WriteHalf.html" title="struct tokio::io::WriteHalf">WriteHalf</a>&lt;Self&gt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#145-149' title='goto source code'>[src]</a></span></h4>
</div></span><h3 id='impl-AsyncRead-2' class='impl'><span class='in-band'><code>impl&lt;T&gt; <a class="trait" href="../../tokio/prelude/trait.AsyncRead.html" title="trait tokio::prelude::AsyncRead">AsyncRead</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/cursor/struct.Cursor.html" title="struct std::io::cursor::Cursor">Cursor</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<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>&gt;,&nbsp;</span></code><a href='#impl-AsyncRead-2' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_write.rs.html#200-201' title='goto source code'>[src]</a></span></h3>
<span class='docblock autohide'><div class='impl-items'><h4 id='method.prepare_uninitialized_buffer-3' class="method"><span id='prepare_uninitialized_buffer.v-3' class='invisible'><code>unsafe fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.prepare_uninitialized_buffer' class='fnname'>prepare_uninitialized_buffer</a>(&amp;self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</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>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#63-69' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_read-3' class="method"><span id='poll_read.v-3' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.poll_read' class='fnname'>poll_read</a>(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</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>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;, <a class="struct" href="../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#79-87' title='goto source code'>[src]</a></span></h4>
<h4 id='method.read_buf-3' class="method"><span id='read_buf.v-3' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.read_buf' class='fnname'>read_buf</a>&lt;B&gt;(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>B) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;, <a class="struct" href="../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../bytes/buf/buf_mut/trait.BufMut.html" title="trait bytes::buf::buf_mut::BufMut">BufMut</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#95-114' title='goto source code'>[src]</a></span></h4>
<h4 id='method.framed-3' class="method"><span id='framed.v-3' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.framed' class='fnname'>framed</a>&lt;T&gt;(self, codec: T) -&gt; Framed&lt;Self, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../tokio_io/codec/decoder/trait.Decoder.html" title="trait tokio_io::codec::decoder::Decoder">Decoder</a> + <a class="trait" href="../../tokio_io/codec/encoder/trait.Encoder.html" title="trait tokio_io::codec::encoder::Encoder">Encoder</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#135-139' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab deprecated'>Deprecated since 0.1.7<p>: Use tokio_codec::Decoder::framed instead</p>
</div></div><h4 id='method.split-3' class="method"><span id='split.v-3' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.split' class='fnname'>split</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../tokio/io/struct.ReadHalf.html" title="struct tokio::io::ReadHalf">ReadHalf</a>&lt;Self&gt;, <a class="struct" href="../../tokio/io/struct.WriteHalf.html" title="struct tokio::io::WriteHalf">WriteHalf</a>&lt;Self&gt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#145-149' title='goto source code'>[src]</a></span></h4>
</div></span><h3 id='impl-AsyncRead-3' class='impl'><span class='in-band'><code>impl&lt;T&gt; <a class="trait" href="../../tokio/prelude/trait.AsyncRead.html" title="trait tokio::prelude::AsyncRead">AsyncRead</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.Take.html" title="struct std::io::Take">Take</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../tokio/prelude/trait.AsyncRead.html" title="trait tokio::prelude::AsyncRead">AsyncRead</a>,&nbsp;</span></code><a href='#impl-AsyncRead-3' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_write.rs.html#176-177' title='goto source code'>[src]</a></span></h3>
<span class='docblock autohide'><div class='impl-items'><h4 id='method.prepare_uninitialized_buffer-4' class="method"><span id='prepare_uninitialized_buffer.v-4' class='invisible'><code>unsafe fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.prepare_uninitialized_buffer' class='fnname'>prepare_uninitialized_buffer</a>(&amp;self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</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>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#63-69' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_read-4' class="method"><span id='poll_read.v-4' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.poll_read' class='fnname'>poll_read</a>(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</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>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;, <a class="struct" href="../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#79-87' title='goto source code'>[src]</a></span></h4>
<h4 id='method.read_buf-4' class="method"><span id='read_buf.v-4' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.read_buf' class='fnname'>read_buf</a>&lt;B&gt;(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>B) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;, <a class="struct" href="../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../bytes/buf/buf_mut/trait.BufMut.html" title="trait bytes::buf::buf_mut::BufMut">BufMut</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#95-114' title='goto source code'>[src]</a></span></h4>
<h4 id='method.framed-4' class="method"><span id='framed.v-4' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.framed' class='fnname'>framed</a>&lt;T&gt;(self, codec: T) -&gt; Framed&lt;Self, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../tokio_io/codec/decoder/trait.Decoder.html" title="trait tokio_io::codec::decoder::Decoder">Decoder</a> + <a class="trait" href="../../tokio_io/codec/encoder/trait.Encoder.html" title="trait tokio_io::codec::encoder::Encoder">Encoder</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#135-139' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab deprecated'>Deprecated since 0.1.7<p>: Use tokio_codec::Decoder::framed instead</p>
</div></div><h4 id='method.split-4' class="method"><span id='split.v-4' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.split' class='fnname'>split</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../tokio/io/struct.ReadHalf.html" title="struct tokio::io::ReadHalf">ReadHalf</a>&lt;Self&gt;, <a class="struct" href="../../tokio/io/struct.WriteHalf.html" title="struct tokio::io::WriteHalf">WriteHalf</a>&lt;Self&gt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#145-149' title='goto source code'>[src]</a></span></h4>
</div></span><h3 id='impl-AsyncRead-4' class='impl'><span class='in-band'><code>impl&lt;T&gt; <a class="trait" href="../../tokio/prelude/trait.AsyncRead.html" title="trait tokio::prelude::AsyncRead">AsyncRead</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/buffered/struct.BufReader.html" title="struct std::io::buffered::BufReader">BufReader</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../tokio/prelude/trait.AsyncRead.html" title="trait tokio::prelude::AsyncRead">AsyncRead</a>,&nbsp;</span></code><a href='#impl-AsyncRead-4' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_write.rs.html#194-198' title='goto source code'>[src]</a></span></h3>
<span class='docblock autohide'><div class='impl-items'><h4 id='method.prepare_uninitialized_buffer-5' class="method"><span id='prepare_uninitialized_buffer.v-5' class='invisible'><code>unsafe fn <a href='#method.prepare_uninitialized_buffer' class='fnname'>prepare_uninitialized_buffer</a>(&amp;self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</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>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_write.rs.html#195-197' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_read-5' class="method"><span id='poll_read.v-5' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.poll_read' class='fnname'>poll_read</a>(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</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>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;, <a class="struct" href="../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#79-87' title='goto source code'>[src]</a></span></h4>
<h4 id='method.read_buf-5' class="method"><span id='read_buf.v-5' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.read_buf' class='fnname'>read_buf</a>&lt;B&gt;(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>B) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;, <a class="struct" href="../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../bytes/buf/buf_mut/trait.BufMut.html" title="trait bytes::buf::buf_mut::BufMut">BufMut</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#95-114' title='goto source code'>[src]</a></span></h4>
<h4 id='method.framed-5' class="method"><span id='framed.v-5' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.framed' class='fnname'>framed</a>&lt;T&gt;(self, codec: T) -&gt; Framed&lt;Self, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../tokio_io/codec/decoder/trait.Decoder.html" title="trait tokio_io::codec::decoder::Decoder">Decoder</a> + <a class="trait" href="../../tokio_io/codec/encoder/trait.Encoder.html" title="trait tokio_io::codec::encoder::Encoder">Encoder</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#135-139' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab deprecated'>Deprecated since 0.1.7<p>: Use tokio_codec::Decoder::framed instead</p>
</div></div><h4 id='method.split-5' class="method"><span id='split.v-5' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.split' class='fnname'>split</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../tokio/io/struct.ReadHalf.html" title="struct tokio::io::ReadHalf">ReadHalf</a>&lt;Self&gt;, <a class="struct" href="../../tokio/io/struct.WriteHalf.html" title="struct tokio::io::WriteHalf">WriteHalf</a>&lt;Self&gt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#145-149' title='goto source code'>[src]</a></span></h4>
</div></span><h3 id='impl-AsyncRead-5' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../tokio/prelude/trait.AsyncRead.html" title="trait tokio::prelude::AsyncRead">AsyncRead</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/util/struct.Repeat.html" title="struct std::io::util::Repeat">Repeat</a></code><a href='#impl-AsyncRead-5' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_write.rs.html#162-166' title='goto source code'>[src]</a></span></h3>
<span class='docblock autohide'><div class='impl-items'><h4 id='method.prepare_uninitialized_buffer-6' class="method"><span id='prepare_uninitialized_buffer.v-6' class='invisible'><code>unsafe fn <a href='#method.prepare_uninitialized_buffer' class='fnname'>prepare_uninitialized_buffer</a>(&amp;self, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</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>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_write.rs.html#163-165' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_read-6' class="method"><span id='poll_read.v-6' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.poll_read' class='fnname'>poll_read</a>(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</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>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;, <a class="struct" href="../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#79-87' title='goto source code'>[src]</a></span></h4>
<h4 id='method.read_buf-6' class="method"><span id='read_buf.v-6' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.read_buf' class='fnname'>read_buf</a>&lt;B&gt;(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>B) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;, <a class="struct" href="../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../bytes/buf/buf_mut/trait.BufMut.html" title="trait bytes::buf::buf_mut::BufMut">BufMut</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#95-114' title='goto source code'>[src]</a></span></h4>
<h4 id='method.framed-6' class="method"><span id='framed.v-6' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.framed' class='fnname'>framed</a>&lt;T&gt;(self, codec: T) -&gt; Framed&lt;Self, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../tokio_io/codec/decoder/trait.Decoder.html" title="trait tokio_io::codec::decoder::Decoder">Decoder</a> + <a class="trait" href="../../tokio_io/codec/encoder/trait.Encoder.html" title="trait tokio_io::codec::encoder::Encoder">Encoder</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#135-139' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab deprecated'>Deprecated since 0.1.7<p>: Use tokio_codec::Decoder::framed instead</p>
</div></div><h4 id='method.split-6' class="method"><span id='split.v-6' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.split' class='fnname'>split</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../tokio/io/struct.ReadHalf.html" title="struct tokio::io::ReadHalf">ReadHalf</a>&lt;Self&gt;, <a class="struct" href="../../tokio/io/struct.WriteHalf.html" title="struct tokio::io::WriteHalf">WriteHalf</a>&lt;Self&gt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#145-149' title='goto source code'>[src]</a></span></h4>
</div></span><h3 id='impl-AsyncRead-6' class='impl'><span class='in-band'><code>impl&lt;T, U&gt; <a class="trait" href="../../tokio/prelude/trait.AsyncRead.html" title="trait tokio::prelude::AsyncRead">AsyncRead</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.Chain.html" title="struct std::io::Chain">Chain</a>&lt;T, U&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../tokio/prelude/trait.AsyncRead.html" title="trait tokio::prelude::AsyncRead">AsyncRead</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="../../tokio/prelude/trait.AsyncRead.html" title="trait tokio::prelude::AsyncRead">AsyncRead</a>,&nbsp;</span></code><a href='#impl-AsyncRead-6' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_write.rs.html#181-185' title='goto source code'>[src]</a></span></h3>
<span class='docblock autohide'><div class='impl-items'><h4 id='method.prepare_uninitialized_buffer-7' class="method"><span id='prepare_uninitialized_buffer.v-7' class='invisible'><code>unsafe fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.prepare_uninitialized_buffer' class='fnname'>prepare_uninitialized_buffer</a>(&amp;self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</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>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#63-69' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_read-7' class="method"><span id='poll_read.v-7' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.poll_read' class='fnname'>poll_read</a>(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</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>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;, <a class="struct" href="../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#79-87' title='goto source code'>[src]</a></span></h4>
<h4 id='method.read_buf-7' class="method"><span id='read_buf.v-7' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.read_buf' class='fnname'>read_buf</a>&lt;B&gt;(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>B) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;, <a class="struct" href="../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../bytes/buf/buf_mut/trait.BufMut.html" title="trait bytes::buf::buf_mut::BufMut">BufMut</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#95-114' title='goto source code'>[src]</a></span></h4>
<h4 id='method.framed-7' class="method"><span id='framed.v-7' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.framed' class='fnname'>framed</a>&lt;T&gt;(self, codec: T) -&gt; Framed&lt;Self, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../tokio_io/codec/decoder/trait.Decoder.html" title="trait tokio_io::codec::decoder::Decoder">Decoder</a> + <a class="trait" href="../../tokio_io/codec/encoder/trait.Encoder.html" title="trait tokio_io::codec::encoder::Encoder">Encoder</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#135-139' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab deprecated'>Deprecated since 0.1.7<p>: Use tokio_codec::Decoder::framed instead</p>
</div></div><h4 id='method.split-7' class="method"><span id='split.v-7' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.split' class='fnname'>split</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../tokio/io/struct.ReadHalf.html" title="struct tokio::io::ReadHalf">ReadHalf</a>&lt;Self&gt;, <a class="struct" href="../../tokio/io/struct.WriteHalf.html" title="struct tokio::io::WriteHalf">WriteHalf</a>&lt;Self&gt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#145-149' title='goto source code'>[src]</a></span></h4>
</div></span><h3 id='impl-AsyncRead-7' class='impl'><span class='in-band'><code>impl&lt;T&gt; <a class="trait" href="../../tokio/prelude/trait.AsyncRead.html" title="trait tokio::prelude::AsyncRead">AsyncRead</a> for <a class="struct" href="../../tokio_io/allow_std/struct.AllowStdIo.html" title="struct tokio_io::allow_std::AllowStdIo">AllowStdIo</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../tokio/prelude/trait.Read.html" title="trait tokio::prelude::Read">Read</a>,&nbsp;</span></code><a href='#impl-AsyncRead-7' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/allow_std.rs.html#78-81' title='goto source code'>[src]</a></span></h3>
<span class='docblock autohide'><div class='impl-items'><h4 id='method.prepare_uninitialized_buffer-8' class="method"><span id='prepare_uninitialized_buffer.v-8' class='invisible'><code>unsafe fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.prepare_uninitialized_buffer' class='fnname'>prepare_uninitialized_buffer</a>(&amp;self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</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>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#63-69' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_read-8' class="method"><span id='poll_read.v-8' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.poll_read' class='fnname'>poll_read</a>(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</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>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;, <a class="struct" href="../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#79-87' title='goto source code'>[src]</a></span></h4>
<h4 id='method.read_buf-8' class="method"><span id='read_buf.v-8' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.read_buf' class='fnname'>read_buf</a>&lt;B&gt;(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>B) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;, <a class="struct" href="../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../bytes/buf/buf_mut/trait.BufMut.html" title="trait bytes::buf::buf_mut::BufMut">BufMut</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#95-114' title='goto source code'>[src]</a></span></h4>
<h4 id='method.framed-8' class="method"><span id='framed.v-8' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.framed' class='fnname'>framed</a>&lt;T&gt;(self, codec: T) -&gt; Framed&lt;Self, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../tokio_io/codec/decoder/trait.Decoder.html" title="trait tokio_io::codec::decoder::Decoder">Decoder</a> + <a class="trait" href="../../tokio_io/codec/encoder/trait.Encoder.html" title="trait tokio_io::codec::encoder::Encoder">Encoder</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#135-139' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab deprecated'>Deprecated since 0.1.7<p>: Use tokio_codec::Decoder::framed instead</p>
</div></div><h4 id='method.split-8' class="method"><span id='split.v-8' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.split' class='fnname'>split</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../tokio/io/struct.ReadHalf.html" title="struct tokio::io::ReadHalf">ReadHalf</a>&lt;Self&gt;, <a class="struct" href="../../tokio/io/struct.WriteHalf.html" title="struct tokio::io::WriteHalf">WriteHalf</a>&lt;Self&gt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#145-149' title='goto source code'>[src]</a></span></h4>
</div></span><h3 id='impl-AsyncRead-8' class='impl'><span class='in-band'><code>impl&lt;'a, T&gt; <a class="trait" href="../../tokio/prelude/trait.AsyncRead.html" title="trait tokio::prelude::AsyncRead">AsyncRead</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <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/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-AsyncRead-8' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#158-162' title='goto source code'>[src]</a></span></h3>
<span class='docblock autohide'><div class='impl-items'><h4 id='method.prepare_uninitialized_buffer-9' class="method"><span id='prepare_uninitialized_buffer.v-9' class='invisible'><code>unsafe fn <a href='#method.prepare_uninitialized_buffer' class='fnname'>prepare_uninitialized_buffer</a>(&amp;self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</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>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#159-161' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_read-9' class="method"><span id='poll_read.v-9' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.poll_read' class='fnname'>poll_read</a>(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</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>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;, <a class="struct" href="../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#79-87' title='goto source code'>[src]</a></span></h4>
<h4 id='method.read_buf-9' class="method"><span id='read_buf.v-9' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.read_buf' class='fnname'>read_buf</a>&lt;B&gt;(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>B) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../../tokio/prelude/enum.Async.html" title="enum tokio::prelude::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;, <a class="struct" href="../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../bytes/buf/buf_mut/trait.BufMut.html" title="trait bytes::buf::buf_mut::BufMut">BufMut</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#95-114' title='goto source code'>[src]</a></span></h4>
<h4 id='method.framed-9' class="method"><span id='framed.v-9' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.framed' class='fnname'>framed</a>&lt;T&gt;(self, codec: T) -&gt; Framed&lt;Self, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../tokio_io/codec/decoder/trait.Decoder.html" title="trait tokio_io::codec::decoder::Decoder">Decoder</a> + <a class="trait" href="../../tokio_io/codec/encoder/trait.Encoder.html" title="trait tokio_io::codec::encoder::Encoder">Encoder</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#135-139' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab deprecated'>Deprecated since 0.1.7<p>: Use tokio_codec::Decoder::framed instead</p>
</div></div><h4 id='method.split-9' class="method"><span id='split.v-9' class='invisible'><code>fn <a href='../../tokio/prelude/trait.AsyncRead.html#method.split' class='fnname'>split</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../tokio/io/struct.ReadHalf.html" title="struct tokio::io::ReadHalf">ReadHalf</a>&lt;Self&gt;, <a class="struct" href="../../tokio/io/struct.WriteHalf.html" title="struct tokio::io::WriteHalf">WriteHalf</a>&lt;Self&gt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_read.rs.html#145-149' title='goto source code'>[src]</a></span></h4>
</div></span>
<h2 id='implementors' class='small-section-header'>
Implementors<a href='#implementors' class='anchor'></a>
</h2>
<ul class='item-list' id='implementors-list'>
<li><div class='out-of-band'><a class='srclink' href='../../src/tokio_io/split.rs.html#39-46' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; AsyncRead for <a class="struct" href="../../tokio/io/struct.ReadHalf.html" title="struct tokio::io::ReadHalf">ReadHalf</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../tokio/prelude/trait.AsyncRead.html" title="trait tokio::prelude::AsyncRead">AsyncRead</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/tokio_fs/stdin.rs.html#34-38' title='goto source code'>[src]</a></div><code>impl AsyncRead for <a class="struct" href="../../tokio/io/struct.Stdin.html" title="struct tokio::io::Stdin">Stdin</a></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/tokio_fs/file/mod.rs.html#211-215' title='goto source code'>[src]</a></div><code>impl AsyncRead for <a class="struct" href="../../tokio/fs/struct.File.html" title="struct tokio::fs::File">File</a></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/tokio_reactor/poll_evented.rs.html#629-632' title='goto source code'>[src]</a></div><code>impl&lt;'a, E&gt; AsyncRead for &amp;'a <a class="struct" href="../../tokio/reactor/struct.PollEvented2.html" title="struct tokio::reactor::PollEvented2">PollEvented</a>&lt;E&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;E: <a class="trait" href="../../mio/event_imp/trait.Evented.html" title="trait mio::event_imp::Evented">Evented</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>E: <a class="trait" href="../../tokio/prelude/trait.Read.html" title="trait tokio::prelude::Read">Read</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/tokio_reactor/poll_evented.rs.html#501-504' title='goto source code'>[src]</a></div><code>impl&lt;E&gt; AsyncRead for <a class="struct" href="../../tokio/reactor/struct.PollEvented2.html" title="struct tokio::reactor::PollEvented2">PollEvented</a>&lt;E&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;E: <a class="trait" href="../../mio/event_imp/trait.Evented.html" title="trait mio::event_imp::Evented">Evented</a> + <a class="trait" href="../../tokio/prelude/trait.Read.html" title="trait tokio::prelude::Read">Read</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/tokio_tcp/stream.rs.html#487-539' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; AsyncRead for &amp;'a <a class="struct" href="../../tokio/net/struct.TcpStream.html" title="struct tokio::net::TcpStream">TcpStream</a></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/tokio_tcp/stream.rs.html#407-415' title='goto source code'>[src]</a></div><code>impl AsyncRead for <a class="struct" href="../../tokio/net/struct.TcpStream.html" title="struct tokio::net::TcpStream">TcpStream</a></code></li>
</ul><script type="text/javascript" async
src="../../implementors/tokio_io/async_read/trait.AsyncRead.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>&#9166;</kbd></dt>
<dd>Go to active search result</dd>
<dt><kbd>+</kbd></dt>
<dd>Expand all sections</dd>
<dt><kbd>-</kbd></dt>
<dd>Collapse all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../../";
window.currentCrate = "tokio";
</script>
<script src="../../main.js"></script>
<script defer src="../../search-index.js"></script>
</body>
</html>