mentat/tokio_reactor/struct.PollEvented.html

371 lines
88 KiB
HTML
Raw Permalink 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 `PollEvented` struct in crate `tokio_reactor`.">
<meta name="keywords" content="rust, rustlang, rust-lang, PollEvented">
<title>tokio_reactor::PollEvented - 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 struct">
<!--[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'>Struct PollEvented</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.new_with_handle">new_with_handle</a><a href="#method.get_ref">get_ref</a><a href="#method.get_mut">get_mut</a><a href="#method.into_inner">into_inner</a><a href="#method.poll_read_ready">poll_read_ready</a><a href="#method.clear_read_ready">clear_read_ready</a><a href="#method.poll_write_ready">poll_write_ready</a><a href="#method.clear_write_ready">clear_write_ready</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Read">Read</a><a href="#impl-Write">Write</a><a href="#impl-AsyncRead">AsyncRead</a><a href="#impl-AsyncWrite">AsyncWrite</a><a href="#impl-Debug">Debug</a><a href="#impl-Drop">Drop</a></div></div><p class='location'><a href='index.html'>tokio_reactor</a></p><script>window.sidebarCurrent = {name: 'PollEvented', ty: 'struct', 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'>Struct <a href='index.html'>tokio_reactor</a>::<wbr><a class="struct" href=''>PollEvented</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_reactor/poll_evented.rs.html#91-94' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct PollEvented&lt;E:&nbsp;<a class="trait" href="../mio/event_imp/trait.Evented.html" title="trait mio::event_imp::Evented">Evented</a>&gt; { /* fields omitted */ }</pre><div class='docblock'><p>Associates an I/O resource that implements the <a href="https://doc.rust-lang.org/std/io/trait.Read.html"><code>std::Read</code></a> and / or
<a href="https://doc.rust-lang.org/std/io/trait.Write.html"><code>std::Write</code></a> traits with the reactor that drives it.</p>
<p><code>PollEvented</code> uses <a href="struct.Registration.html"><code>Registration</code></a> internally to take a type that
implements <a href="https://docs.rs/mio/0.6/mio/trait.Evented.html"><code>mio::Evented</code></a> as well as <a href="https://doc.rust-lang.org/std/io/trait.Read.html"><code>std::Read</code></a> and or <a href="https://doc.rust-lang.org/std/io/trait.Write.html"><code>std::Write</code></a>
and associate it with a reactor that will drive it.</p>
<p>Once the <a href="https://docs.rs/mio/0.6/mio/trait.Evented.html"><code>mio::Evented</code></a> type is wrapped by <code>PollEvented</code>, it can be
used from within the future's execution model. As such, the <code>PollEvented</code>
type provides <a href="../io/trait.AsyncRead.html"><code>AsyncRead</code></a> and <a href="../io/trait.AsyncWrite.html"><code>AsyncWrite</code></a> implementations using the
underlying I/O resource as well as readiness events provided by the reactor.</p>
<p><strong>Note</strong>: While <code>PollEvented</code> is <code>Sync</code> (if the underlying I/O type is
<code>Sync</code>), the caller must ensure that there are at most two tasks that use a
<code>PollEvented</code> instance concurrently. One for reading and one for writing.
While violating this requirement is &quot;safe&quot; from a Rust memory model point of
view, it will result in unexpected behavior in the form of lost
notifications and tasks hanging.</p>
<h2 id="readiness-events" class="section-header"><a href="#readiness-events">Readiness events</a></h2>
<p>Besides just providing <a href="../io/trait.AsyncRead.html"><code>AsyncRead</code></a> and <a href="../io/trait.AsyncWrite.html"><code>AsyncWrite</code></a> implementations,
this type also supports access to the underlying readiness event stream.
While similar in function to what <a href="struct.Registration.html"><code>Registration</code></a> provides, the semantics
are a bit different.</p>
<p>Two functions are provided to access the readiness events:
<a href="#method.poll_read_ready"><code>poll_read_ready</code></a> and <a href="#method.poll_write_ready"><code>poll_write_ready</code></a>. These functions return the
current readiness state of the <code>PollEvented</code> instance. If
<a href="#method.poll_read_ready"><code>poll_read_ready</code></a> indicates read readiness, immediately calling
<a href="#method.poll_read_ready"><code>poll_read_ready</code></a> again will also indicate read readiness.</p>
<p>When the operation is attempted and is unable to succeed due to the I/O
resource not being ready, the caller must call <a href="#method.clear_read_ready"><code>clear_read_ready</code></a> or
[<code>clear_write_ready</code>]. This clears the readiness state until a new readiness
event is received.</p>
<p>This allows the caller to implement additional functions. For example,
<a href="../net/struct.TcpListener.html"><code>TcpListener</code></a> implements poll_accept by using <a href="#method.poll_read_ready"><code>poll_read_ready</code></a> and
<a href="#method.clear_read_ready"><code>clear_read_ready</code></a>.</p>
<div class='information'><div class='tooltip ignore'><span class='tooltiptext'>This example is not tested</span></div></div><pre class="rust rust-example-rendered ignore">
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">poll_accept</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>) <span class="op">-&gt;</span> <span class="ident">Poll</span><span class="op">&lt;</span>(<span class="ident">net</span>::<span class="ident">TcpStream</span>, <span class="ident">SocketAddr</span>), <span class="ident">io</span>::<span class="ident">Error</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">ready</span> <span class="op">=</span> <span class="ident">Ready</span>::<span class="ident">readable</span>();
<span class="macro">try_ready</span><span class="macro">!</span>(<span class="self">self</span>.<span class="ident">poll_evented</span>.<span class="ident">poll_read_ready</span>(<span class="ident">ready</span>));
<span class="kw">match</span> <span class="self">self</span>.<span class="ident">poll_evented</span>.<span class="ident">get_ref</span>().<span class="ident">accept_std</span>() {
<span class="prelude-val">Ok</span>(<span class="ident">pair</span>) <span class="op">=&gt;</span> <span class="prelude-val">Ok</span>(<span class="ident">Async</span>::<span class="ident">Ready</span>(<span class="ident">pair</span>)),
<span class="prelude-val">Err</span>(<span class="kw-2">ref</span> <span class="ident">e</span>) <span class="kw">if</span> <span class="ident">e</span>.<span class="ident">kind</span>() <span class="op">==</span> <span class="ident">io</span>::<span class="ident">ErrorKind</span>::<span class="ident">WouldBlock</span> <span class="op">=&gt;</span> {
<span class="self">self</span>.<span class="ident">poll_evented</span>.<span class="ident">clear_read_ready</span>(<span class="ident">ready</span>);
<span class="prelude-val">Ok</span>(<span class="ident">Async</span>::<span class="ident">NotReady</span>)
}
<span class="prelude-val">Err</span>(<span class="ident">e</span>) <span class="op">=&gt;</span> <span class="prelude-val">Err</span>(<span class="ident">e</span>),
}
}</pre>
<h2 id="platform-specific-events" class="section-header"><a href="#platform-specific-events">Platform-specific events</a></h2>
<p><code>PollEvented</code> also allows receiving platform-specific <code>mio::Ready</code> events.
These events are included as part of the read readiness event stream. The
write readiness event stream is only for <code>Ready::writable()</code> events.</p>
</div>
<h2 id='methods' class='small-section-header'>
Methods<a href='#methods' class='anchor'></a>
</h2>
<h3 id='impl' class='impl'><span class='in-band'><code>impl&lt;E&gt; <a class="struct" href="../tokio_reactor/struct.PollEvented.html" title="struct tokio_reactor::PollEvented">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>,&nbsp;</span></code><a href='#impl' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#149-383' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.new' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="struct" href="../tokio_reactor/struct.PollEvented.html" title="struct tokio_reactor::PollEvented">PollEvented</a>&lt;E&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../tokio_reactor/struct.PollEvented.html" title="struct tokio_reactor::PollEvented">PollEvented</a>&lt;E&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;E&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="struct" href="../tokio_reactor/struct.PollEvented.html" title="struct tokio_reactor::PollEvented">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="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a>,&nbsp;</span></span><span class="where fmt-newline">impl&lt;E&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="../tokio_reactor/struct.PollEvented.html" title="struct tokio_reactor::PollEvented">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="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a>,&nbsp;</span></span><span class="where fmt-newline">impl&lt;'a, E&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> for &amp;'a <a class="struct" href="../tokio_reactor/struct.PollEvented.html" title="struct tokio_reactor::PollEvented">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="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a>,&nbsp;</span></span><span class="where fmt-newline">impl&lt;'a, E&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for &amp;'a <a class="struct" href="../tokio_reactor/struct.PollEvented.html" title="struct tokio_reactor::PollEvented">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="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a>,&nbsp;</span></span></code></div></div><span id='new.v' class='invisible'><code>pub fn <a href='#method.new' class='fnname'>new</a>(io: E) -&gt; <a class="struct" href="../tokio_reactor/struct.PollEvented.html" title="struct tokio_reactor::PollEvented">PollEvented</a>&lt;E&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#153-162' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates a new <code>PollEvented</code> associated with the default reactor.</p>
</div><h4 id='method.new_with_handle' class="method"><span id='new_with_handle.v' class='invisible'><code>pub fn <a href='#method.new_with_handle' class='fnname'>new_with_handle</a>(io: E, handle: &amp;<a class="struct" href="../tokio_reactor/struct.Handle.html" title="struct tokio_reactor::Handle">Handle</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;Self&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#165-174' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates a new <code>PollEvented</code> associated with the specified reactor.</p>
</div><h4 id='method.get_ref' class="method"><span id='get_ref.v' class='invisible'><code>pub fn <a href='#method.get_ref' class='fnname'>get_ref</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>E</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#178-180' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns a shared reference to the underlying I/O object this readiness
stream is wrapping.</p>
</div><h4 id='method.get_mut' class="method"><span id='get_mut.v' class='invisible'><code>pub fn <a href='#method.get_mut' class='fnname'>get_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>E</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#184-186' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns a mutable reference to the underlying I/O object this readiness
stream is wrapping.</p>
</div><h4 id='method.into_inner' class="method"><span id='into_inner.v' class='invisible'><code>pub fn <a href='#method.into_inner' class='fnname'>into_inner</a>(self) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;E&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#196-200' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Consumes self, returning the inner I/O object</p>
<p>This function will deregister the I/O resource from the reactor before
returning. If the deregistration operation fails, an error is returned.</p>
<p>Note that deregistering does not guarantee that the I/O resource can be
registered with a different reactor. Some I/O resource types can only be
associated with a single reactor instance for their lifetime.</p>
</div><h4 id='method.poll_read_ready' class="method"><span id='poll_read_ready.v' class='invisible'><code>pub fn <a href='#method.poll_read_ready' class='fnname'>poll_read_ready</a>(&amp;self, mask: <a class="struct" href="../mio/event_imp/struct.Ready.html" title="struct mio::event_imp::Ready">Ready</a>) -&gt; <a class="type" href="../futures/poll/type.Poll.html" title="type futures::poll::Poll">Poll</a>&lt;<a class="struct" href="../mio/event_imp/struct.Ready.html" title="struct mio::event_imp::Ready">Ready</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#223-229' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Check the I/O resource's read readiness state.</p>
<p>The mask argument allows specifying what readiness to notify on. This
can be any value, including platform specific readiness, <strong>except</strong>
<code>writable</code>. HUP is always implicitly included on platforms that support
it.</p>
<p>If the resource is not ready for a read then <code>Async::NotReady</code> is
returned and the current task is notified once a new event is received.</p>
<p>The I/O resource will remain in a read-ready state until readiness is
cleared by calling <a href="#method.clear_read_ready"><code>clear_read_ready</code></a>.</p>
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
<p>This function panics if:</p>
<ul>
<li><code>ready</code> includes writable.</li>
<li>called from outside of a task context.</li>
</ul>
</div><h4 id='method.clear_read_ready' class="method"><span id='clear_read_ready.v' class='invisible'><code>pub fn <a href='#method.clear_read_ready' class='fnname'>clear_read_ready</a>(&amp;self, ready: <a class="struct" href="../mio/event_imp/struct.Ready.html" title="struct mio::event_imp::Ready">Ready</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#259-272' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Clears the I/O resource's read readiness state and registers the current
task to be notified once a read readiness event is received.</p>
<p>After calling this function, <code>poll_read_ready</code> will return <code>NotReady</code>
until a new read readiness event has been received.</p>
<p>The <code>mask</code> argument specifies the readiness bits to clear. This may not
include <code>writable</code> or <code>hup</code>.</p>
<h1 id="panics-1" class="section-header"><a href="#panics-1">Panics</a></h1>
<p>This function panics if:</p>
<ul>
<li><code>ready</code> includes writable or HUP</li>
<li>called from outside of a task context.</li>
</ul>
</div><h4 id='method.poll_write_ready' class="method"><span id='poll_write_ready.v' class='invisible'><code>pub fn <a href='#method.poll_write_ready' class='fnname'>poll_write_ready</a>(&amp;self) -&gt; <a class="type" href="../futures/poll/type.Poll.html" title="type futures::poll::Poll">Poll</a>&lt;<a class="struct" href="../mio/event_imp/struct.Ready.html" title="struct mio::event_imp::Ready">Ready</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#312-320' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Check the I/O resource's write readiness state.</p>
<p>This always checks for writable readiness and also checks for HUP
readiness on platforms that support it.</p>
<p>If the resource is not ready for a write then <code>Async::NotReady</code> is
returned and the current task is notified once a new event is received.</p>
<p>The I/O resource will remain in a write-ready state until readiness is
cleared by calling <a href="#method.clear_write_ready"><code>clear_write_ready</code></a>.</p>
<h1 id="panics-2" class="section-header"><a href="#panics-2">Panics</a></h1>
<p>This function panics if:</p>
<ul>
<li><code>ready</code> contains bits besides <code>writable</code> and <code>hup</code>.</li>
<li>called from outside of a task context.</li>
</ul>
</div><h4 id='method.clear_write_ready' class="method"><span id='clear_write_ready.v' class='invisible'><code>pub fn <a href='#method.clear_write_ready' class='fnname'>clear_write_ready</a>(&amp;self) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#350-361' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Resets the I/O resource's write readiness state and registers the current
task to be notified once a write readiness event is received.</p>
<p>This only clears writable readiness. HUP (on platforms that support HUP)
cannot be cleared as it is a final state.</p>
<p>After calling this function, <code>poll_write_ready(Ready::writable())</code> will
return <code>NotReady</code> until a new write readiness event has been received.</p>
<h1 id="panics-3" class="section-header"><a href="#panics-3">Panics</a></h1>
<p>This function will panic if called from outside of a task context.</p>
</div></div>
<h2 id='implementations' class='small-section-header'>
Trait Implementations<a href='#implementations' class='anchor'></a>
</h2>
<h3 id='impl-Read' class='impl'><span class='in-band'><code>impl&lt;E&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="struct" href="../tokio_reactor/struct.PollEvented.html" title="struct tokio_reactor::PollEvented">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="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a>,&nbsp;</span></code><a href='#impl-Read' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#387-403' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.read' class="method"><span id='read.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#tymethod.read' class='fnname'>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="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#390-402' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Pull some bytes from this source into the specified buffer, returning how many bytes were read. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#tymethod.read">Read more</a></p>
</div><h4 id='method.initializer' class="method"><span id='initializer.v' class='invisible'><code>unsafe fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.initializer' class='fnname'>initializer</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.Initializer.html" title="struct std::io::Initializer">Initializer</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#553-555' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab unstable'><span class=microscope>🔬</span> This is a nightly-only experimental API. (<code>read_initializer</code>)</div></div><div class='docblock'><p>Determines if this <code>Read</code>er can work with buffers of uninitialized memory. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.initializer">Read more</a></p>
</div><h4 id='method.read_to_end' class="method"><span id='read_to_end.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_end' class='fnname'>read_to_end</a>(&amp;mut self, buf: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;) -&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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#600-602' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Read all bytes until EOF in this source, placing them into <code>buf</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_end">Read more</a></p>
</div><h4 id='method.read_to_string' class="method"><span id='read_to_string.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_string' class='fnname'>read_to_string</a>(&amp;mut self, buf: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#638-649' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Read all bytes until EOF in this source, appending them to <code>buf</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_string">Read more</a></p>
</div><h4 id='method.read_exact' class="method"><span id='read_exact.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_exact' class='fnname'>read_exact</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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.6.0'>1.6.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#701-716' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Read the exact number of bytes required to fill <code>buf</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_exact">Read more</a></p>
</div><h4 id='method.by_ref' class="method"><span id='by_ref.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.by_ref' class='fnname'>by_ref</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#753' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates a &quot;by reference&quot; adaptor for this instance of <code>Read</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.by_ref">Read more</a></p>
</div><h4 id='method.bytes' class="method"><span id='bytes.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.bytes' class='fnname'>bytes</a>(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.Bytes.html" title="struct std::io::Bytes">Bytes</a>&lt;Self&gt;</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#790-792' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Transforms this <code>Read</code> instance to an [<code>Iterator</code>] over its bytes. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.bytes">Read more</a></p>
</div><h4 id='method.chars' class="method"><span id='chars.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chars' class='fnname'>chars</a>(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.Chars.html" title="struct std::io::Chars">Chars</a>&lt;Self&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#834-836' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab unstable'><details><summary><span class=microscope>🔬</span> This is a nightly-only experimental API. (<code>io</code>)</summary><p>the semantics of a partial read/write of where errors happen is currently unclear and may change</p>
</details></div></div><div class='docblock'><p>Transforms this <code>Read</code> instance to an [<code>Iterator</code>] over [<code>char</code>]s. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chars">Read more</a></p>
</div><h4 id='method.chain' class="method"><span id='chain.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chain' class='fnname'>chain</a>&lt;R&gt;(self, next: R) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.Chain.html" title="struct std::io::Chain">Chain</a>&lt;Self, R&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#869-871' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates an adaptor which will chain this stream with another. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chain">Read more</a></p>
</div><h4 id='method.take' class="method"><span id='take.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.take' class='fnname'>take</a>(self, limit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.Take.html" title="struct std::io::Take">Take</a>&lt;Self&gt;</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#905-907' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates an adaptor which will read at most <code>limit</code> bytes from it. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.take">Read more</a></p>
</div></div><h3 id='impl-Write' class='impl'><span class='in-band'><code>impl&lt;E&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="../tokio_reactor/struct.PollEvented.html" title="struct tokio_reactor::PollEvented">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="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a>,&nbsp;</span></code><a href='#impl-Write' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#427-457' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.write' class="method"><span id='write.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html#tymethod.write' class='fnname'>write</a>(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</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="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#430-442' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Write a buffer into this object, returning how many bytes were written. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#tymethod.write">Read more</a></p>
</div><h4 id='method.flush' class="method"><span id='flush.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html#tymethod.flush' class='fnname'>flush</a>(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#444-456' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Flush this output stream, ensuring that all intermediately buffered contents reach their destination. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#tymethod.flush">Read more</a></p>
</div><h4 id='method.write_all' class="method"><span id='write_all.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_all' class='fnname'>write_all</a>(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#1097-1108' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Attempts to write an entire buffer into this write. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_all">Read more</a></p>
</div><h4 id='method.write_fmt' class="method"><span id='write_fmt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_fmt' class='fnname'>write_fmt</a>(&amp;mut self, fmt: <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Arguments.html" title="struct core::fmt::Arguments">Arguments</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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#1149-1181' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Writes a formatted string into this writer, returning any error encountered. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_fmt">Read more</a></p>
</div><h4 id='method.by_ref-1' class="method"><span id='by_ref.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.by_ref' class='fnname'>by_ref</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#1205' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates a &quot;by reference&quot; adaptor for this instance of <code>Write</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.by_ref">Read more</a></p>
</div></div><h3 id='impl-AsyncRead' class='impl'><span class='in-band'><code>impl&lt;E&gt; <a class="trait" href="../tokio_io/async_read/trait.AsyncRead.html" title="trait tokio_io::async_read::AsyncRead">AsyncRead</a> for <a class="struct" href="../tokio_reactor/struct.PollEvented.html" title="struct tokio_reactor::PollEvented">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="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</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_reactor/poll_evented.rs.html#501-504' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.prepare_uninitialized_buffer' class="method"><span id='prepare_uninitialized_buffer.v' class='invisible'><code>unsafe fn <a href='../tokio_io/async_read/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>
<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. <a href="../tokio_io/async_read/trait.AsyncRead.html#method.prepare_uninitialized_buffer">Read more</a></p>
</div><h4 id='method.poll_read' class="method"><span id='poll_read.v' class='invisible'><code>fn <a href='../tokio_io/async_read/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="../futures/poll/enum.Async.html" title="enum futures::poll::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="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::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>
<div class='docblock'><p>Attempt to read from the <code>AsyncRead</code> into <code>buf</code>. <a href="../tokio_io/async_read/trait.AsyncRead.html#method.poll_read">Read more</a></p>
</div><h4 id='method.read_buf' class="method"><span id='read_buf.v' class='invisible'><code>fn <a href='../tokio_io/async_read/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="../futures/poll/enum.Async.html" title="enum futures::poll::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="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::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>
<div class='docblock'><p>Pull some bytes from this source into the specified <code>Buf</code>, returning how many bytes were read. <a href="../tokio_io/async_read/trait.AsyncRead.html#method.read_buf">Read more</a></p>
</div><h4 id='method.framed' class="method"><span id='framed.v' class='invisible'><code>fn <a href='../tokio_io/async_read/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_io/async_write/trait.AsyncWrite.html" title="trait tokio_io::async_write::AsyncWrite">AsyncWrite</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: Decoder + Encoder,&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><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. <a href="../tokio_io/async_read/trait.AsyncRead.html#method.framed">Read more</a></p>
</div><h4 id='method.split' class="method"><span id='split.v' class='invisible'><code>fn <a href='../tokio_io/async_read/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/split/struct.ReadHalf.html" title="struct tokio_io::split::ReadHalf">ReadHalf</a>&lt;Self&gt;, <a class="struct" href="../tokio_io/split/struct.WriteHalf.html" title="struct tokio_io::split::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_io/async_write/trait.AsyncWrite.html" title="trait tokio_io::async_write::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 class='docblock'><p>Helper method for splitting this read/write object into two halves. <a href="../tokio_io/async_read/trait.AsyncRead.html#method.split">Read more</a></p>
</div></div><h3 id='impl-AsyncWrite' class='impl'><span class='in-band'><code>impl&lt;E&gt; <a class="trait" href="../tokio_io/async_write/trait.AsyncWrite.html" title="trait tokio_io::async_write::AsyncWrite">AsyncWrite</a> for <a class="struct" href="../tokio_reactor/struct.PollEvented.html" title="struct tokio_reactor::PollEvented">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="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a>,&nbsp;</span></code><a href='#impl-AsyncWrite' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#506-512' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.shutdown' class="method"><span id='shutdown.v' class='invisible'><code>fn <a href='../tokio_io/async_write/trait.AsyncWrite.html#tymethod.shutdown' class='fnname'>shutdown</a>(&amp;mut self) -&gt; <a class="type" href="../futures/poll/type.Poll.html" title="type futures::poll::Poll">Poll</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#509-511' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Initiates or attempts to shut down this writer, returning success when the I/O connection has completely shut down. <a href="../tokio_io/async_write/trait.AsyncWrite.html#tymethod.shutdown">Read more</a></p>
</div><h4 id='method.poll_write' class="method"><span id='poll_write.v' class='invisible'><code>fn <a href='../tokio_io/async_write/trait.AsyncWrite.html#method.poll_write' class='fnname'>poll_write</a>(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</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="../futures/poll/enum.Async.html" title="enum futures::poll::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="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_io/async_write.rs.html#45-53' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Attempt to write bytes from <code>buf</code> into the object. <a href="../tokio_io/async_write/trait.AsyncWrite.html#method.poll_write">Read more</a></p>
</div><h4 id='method.poll_flush' class="method"><span id='poll_flush.v' class='invisible'><code>fn <a href='../tokio_io/async_write/trait.AsyncWrite.html#method.poll_flush' class='fnname'>poll_flush</a>(&amp;mut self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../futures/poll/enum.Async.html" title="enum futures::poll::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_io/async_write.rs.html#64-72' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Attempt to flush the object, ensuring that any buffered data reach their destination. <a href="../tokio_io/async_write/trait.AsyncWrite.html#method.poll_flush">Read more</a></p>
</div><h4 id='method.write_buf' class="method"><span id='write_buf.v' class='invisible'><code>fn <a href='../tokio_io/async_write/trait.AsyncWrite.html#method.write_buf' class='fnname'>write_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="../futures/poll/enum.Async.html" title="enum futures::poll::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="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../bytes/buf/buf/trait.Buf.html" title="trait bytes::buf::buf::Buf">Buf</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_io/async_write.rs.html#138-148' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Write a <code>Buf</code> into this value, returning how many bytes were written. <a href="../tokio_io/async_write/trait.AsyncWrite.html#method.write_buf">Read more</a></p>
</div></div><h3 id='impl-Read-1' class='impl'><span class='in-band'><code>impl&lt;'a, E&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> for &amp;'a <a class="struct" href="../tokio_reactor/struct.PollEvented.html" title="struct tokio_reactor::PollEvented">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="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a>,&nbsp;</span></code><a href='#impl-Read-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#516-532' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.read-1' class="method"><span id='read.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#tymethod.read' class='fnname'>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="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#519-531' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Pull some bytes from this source into the specified buffer, returning how many bytes were read. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#tymethod.read">Read more</a></p>
</div><h4 id='method.initializer-1' class="method"><span id='initializer.v-1' class='invisible'><code>unsafe fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.initializer' class='fnname'>initializer</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.Initializer.html" title="struct std::io::Initializer">Initializer</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#553-555' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab unstable'><span class=microscope>🔬</span> This is a nightly-only experimental API. (<code>read_initializer</code>)</div></div><div class='docblock'><p>Determines if this <code>Read</code>er can work with buffers of uninitialized memory. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.initializer">Read more</a></p>
</div><h4 id='method.read_to_end-1' class="method"><span id='read_to_end.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_end' class='fnname'>read_to_end</a>(&amp;mut self, buf: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;) -&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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#600-602' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Read all bytes until EOF in this source, placing them into <code>buf</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_end">Read more</a></p>
</div><h4 id='method.read_to_string-1' class="method"><span id='read_to_string.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_string' class='fnname'>read_to_string</a>(&amp;mut self, buf: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#638-649' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Read all bytes until EOF in this source, appending them to <code>buf</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_string">Read more</a></p>
</div><h4 id='method.read_exact-1' class="method"><span id='read_exact.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_exact' class='fnname'>read_exact</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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.6.0'>1.6.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#701-716' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Read the exact number of bytes required to fill <code>buf</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_exact">Read more</a></p>
</div><h4 id='method.by_ref-2' class="method"><span id='by_ref.v-2' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.by_ref' class='fnname'>by_ref</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#753' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates a &quot;by reference&quot; adaptor for this instance of <code>Read</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.by_ref">Read more</a></p>
</div><h4 id='method.bytes-1' class="method"><span id='bytes.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.bytes' class='fnname'>bytes</a>(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.Bytes.html" title="struct std::io::Bytes">Bytes</a>&lt;Self&gt;</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#790-792' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Transforms this <code>Read</code> instance to an [<code>Iterator</code>] over its bytes. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.bytes">Read more</a></p>
</div><h4 id='method.chars-1' class="method"><span id='chars.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chars' class='fnname'>chars</a>(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.Chars.html" title="struct std::io::Chars">Chars</a>&lt;Self&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#834-836' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab unstable'><details><summary><span class=microscope>🔬</span> This is a nightly-only experimental API. (<code>io</code>)</summary><p>the semantics of a partial read/write of where errors happen is currently unclear and may change</p>
</details></div></div><div class='docblock'><p>Transforms this <code>Read</code> instance to an [<code>Iterator</code>] over [<code>char</code>]s. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chars">Read more</a></p>
</div><h4 id='method.chain-1' class="method"><span id='chain.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chain' class='fnname'>chain</a>&lt;R&gt;(self, next: R) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.Chain.html" title="struct std::io::Chain">Chain</a>&lt;Self, R&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#869-871' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates an adaptor which will chain this stream with another. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chain">Read more</a></p>
</div><h4 id='method.take-1' class="method"><span id='take.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.take' class='fnname'>take</a>(self, limit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.Take.html" title="struct std::io::Take">Take</a>&lt;Self&gt;</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#905-907' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates an adaptor which will read at most <code>limit</code> bytes from it. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.take">Read more</a></p>
</div></div><h3 id='impl-Write-1' class='impl'><span class='in-band'><code>impl&lt;'a, E&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for &amp;'a <a class="struct" href="../tokio_reactor/struct.PollEvented.html" title="struct tokio_reactor::PollEvented">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="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a>,&nbsp;</span></code><a href='#impl-Write-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#556-586' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.write-1' class="method"><span id='write.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html#tymethod.write' class='fnname'>write</a>(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</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="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#559-571' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Write a buffer into this object, returning how many bytes were written. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#tymethod.write">Read more</a></p>
</div><h4 id='method.flush-1' class="method"><span id='flush.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html#tymethod.flush' class='fnname'>flush</a>(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#573-585' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Flush this output stream, ensuring that all intermediately buffered contents reach their destination. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#tymethod.flush">Read more</a></p>
</div><h4 id='method.write_all-1' class="method"><span id='write_all.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_all' class='fnname'>write_all</a>(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#1097-1108' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Attempts to write an entire buffer into this write. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_all">Read more</a></p>
</div><h4 id='method.write_fmt-1' class="method"><span id='write_fmt.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_fmt' class='fnname'>write_fmt</a>(&amp;mut self, fmt: <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Arguments.html" title="struct core::fmt::Arguments">Arguments</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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#1149-1181' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Writes a formatted string into this writer, returning any error encountered. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_fmt">Read more</a></p>
</div><h4 id='method.by_ref-3' class="method"><span id='by_ref.v-3' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.by_ref' class='fnname'>by_ref</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#1205' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates a &quot;by reference&quot; adaptor for this instance of <code>Write</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.by_ref">Read more</a></p>
</div></div><h3 id='impl-AsyncRead-1' class='impl'><span class='in-band'><code>impl&lt;'a, E&gt; <a class="trait" href="../tokio_io/async_read/trait.AsyncRead.html" title="trait tokio_io::async_read::AsyncRead">AsyncRead</a> for &amp;'a <a class="struct" href="../tokio_reactor/struct.PollEvented.html" title="struct tokio_reactor::PollEvented">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="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a>,&nbsp;</span></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_reactor/poll_evented.rs.html#629-632' title='goto source code'>[src]</a></span></h3>
<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='../tokio_io/async_read/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>
<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. <a href="../tokio_io/async_read/trait.AsyncRead.html#method.prepare_uninitialized_buffer">Read more</a></p>
</div><h4 id='method.poll_read-1' class="method"><span id='poll_read.v-1' class='invisible'><code>fn <a href='../tokio_io/async_read/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="../futures/poll/enum.Async.html" title="enum futures::poll::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="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::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>
<div class='docblock'><p>Attempt to read from the <code>AsyncRead</code> into <code>buf</code>. <a href="../tokio_io/async_read/trait.AsyncRead.html#method.poll_read">Read more</a></p>
</div><h4 id='method.read_buf-1' class="method"><span id='read_buf.v-1' class='invisible'><code>fn <a href='../tokio_io/async_read/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="../futures/poll/enum.Async.html" title="enum futures::poll::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="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::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>
<div class='docblock'><p>Pull some bytes from this source into the specified <code>Buf</code>, returning how many bytes were read. <a href="../tokio_io/async_read/trait.AsyncRead.html#method.read_buf">Read more</a></p>
</div><h4 id='method.framed-1' class="method"><span id='framed.v-1' class='invisible'><code>fn <a href='../tokio_io/async_read/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_io/async_write/trait.AsyncWrite.html" title="trait tokio_io::async_write::AsyncWrite">AsyncWrite</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: Decoder + Encoder,&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><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. <a href="../tokio_io/async_read/trait.AsyncRead.html#method.framed">Read more</a></p>
</div><h4 id='method.split-1' class="method"><span id='split.v-1' class='invisible'><code>fn <a href='../tokio_io/async_read/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/split/struct.ReadHalf.html" title="struct tokio_io::split::ReadHalf">ReadHalf</a>&lt;Self&gt;, <a class="struct" href="../tokio_io/split/struct.WriteHalf.html" title="struct tokio_io::split::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_io/async_write/trait.AsyncWrite.html" title="trait tokio_io::async_write::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 class='docblock'><p>Helper method for splitting this read/write object into two halves. <a href="../tokio_io/async_read/trait.AsyncRead.html#method.split">Read more</a></p>
</div></div><h3 id='impl-AsyncWrite-1' class='impl'><span class='in-band'><code>impl&lt;'a, E&gt; <a class="trait" href="../tokio_io/async_write/trait.AsyncWrite.html" title="trait tokio_io::async_write::AsyncWrite">AsyncWrite</a> for &amp;'a <a class="struct" href="../tokio_reactor/struct.PollEvented.html" title="struct tokio_reactor::PollEvented">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="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a>,&nbsp;</span></code><a href='#impl-AsyncWrite-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#634-640' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.shutdown-1' class="method"><span id='shutdown.v-1' class='invisible'><code>fn <a href='../tokio_io/async_write/trait.AsyncWrite.html#tymethod.shutdown' class='fnname'>shutdown</a>(&amp;mut self) -&gt; <a class="type" href="../futures/poll/type.Poll.html" title="type futures::poll::Poll">Poll</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#637-639' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Initiates or attempts to shut down this writer, returning success when the I/O connection has completely shut down. <a href="../tokio_io/async_write/trait.AsyncWrite.html#tymethod.shutdown">Read more</a></p>
</div><h4 id='method.poll_write-1' class="method"><span id='poll_write.v-1' class='invisible'><code>fn <a href='../tokio_io/async_write/trait.AsyncWrite.html#method.poll_write' class='fnname'>poll_write</a>(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</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="../futures/poll/enum.Async.html" title="enum futures::poll::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="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_io/async_write.rs.html#45-53' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Attempt to write bytes from <code>buf</code> into the object. <a href="../tokio_io/async_write/trait.AsyncWrite.html#method.poll_write">Read more</a></p>
</div><h4 id='method.poll_flush-1' class="method"><span id='poll_flush.v-1' class='invisible'><code>fn <a href='../tokio_io/async_write/trait.AsyncWrite.html#method.poll_flush' class='fnname'>poll_flush</a>(&amp;mut self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="../futures/poll/enum.Async.html" title="enum futures::poll::Async">Async</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_io/async_write.rs.html#64-72' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Attempt to flush the object, ensuring that any buffered data reach their destination. <a href="../tokio_io/async_write/trait.AsyncWrite.html#method.poll_flush">Read more</a></p>
</div><h4 id='method.write_buf-1' class="method"><span id='write_buf.v-1' class='invisible'><code>fn <a href='../tokio_io/async_write/trait.AsyncWrite.html#method.write_buf' class='fnname'>write_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="../futures/poll/enum.Async.html" title="enum futures::poll::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="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../bytes/buf/buf/trait.Buf.html" title="trait bytes::buf::buf::Buf">Buf</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_io/async_write.rs.html#138-148' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Write a <code>Buf</code> into this value, returning how many bytes were written. <a href="../tokio_io/async_write/trait.AsyncWrite.html#method.write_buf">Read more</a></p>
</div></div><h3 id='impl-Debug' class='impl'><span class='in-band'><code>impl&lt;E:&nbsp;<a class="trait" href="../mio/event_imp/trait.Evented.html" title="trait mio::event_imp::Evented">Evented</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../tokio_reactor/struct.PollEvented.html" title="struct tokio_reactor::PollEvented">PollEvented</a>&lt;E&gt;</code><a href='#impl-Debug' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#649-655' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#650-654' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-Drop' class='impl'><span class='in-band'><code>impl&lt;E:&nbsp;<a class="trait" href="../mio/event_imp/trait.Evented.html" title="trait mio::event_imp::Evented">Evented</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html" title="trait core::ops::drop::Drop">Drop</a> for <a class="struct" href="../tokio_reactor/struct.PollEvented.html" title="struct tokio_reactor::PollEvented">PollEvented</a>&lt;E&gt;</code><a href='#impl-Drop' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#657-664' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.drop' class="method"><span id='drop.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop' class='fnname'>drop</a>(&amp;mut self)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tokio_reactor/poll_evented.rs.html#658-663' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Executes the destructor for this type. <a href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop">Read more</a></p>
</div></div></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_reactor";
</script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>