mentat/tokio/prelude/trait.AsyncWrite.html

303 lines
59 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 `AsyncWrite` trait in crate `tokio`.">
<meta name="keywords" content="rust, rustlang, rust-lang, AsyncWrite">
<title>tokio::prelude::AsyncWrite - 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 AsyncWrite</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.shutdown">shutdown</a></div><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.poll_write">poll_write</a><a href="#method.poll_flush">poll_flush</a><a href="#method.write_buf">write_buf</a></div><a class="sidebar-title" href="#foreign-impls">Implementations on Foreign Types</a><div class="sidebar-links"><a href="#impl-AsyncWrite">Cursor&lt;Vec&lt;u8&gt;&gt;</a><a href="#impl-AsyncWrite">Sink</a><a href="#impl-AsyncWrite">AllowStdIo&lt;T&gt;</a><a href="#impl-AsyncWrite">BufWriter&lt;T&gt;</a><a href="#impl-AsyncWrite">Cursor&lt;Box&lt;[u8]&gt;&gt;</a><a href="#impl-AsyncWrite">Cursor&lt;&amp;&#39;a mut [u8]&gt;</a><a href="#impl-AsyncWrite">Box&lt;T&gt;</a><a href="#impl-AsyncWrite">&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: 'AsyncWrite', 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=''>AsyncWrite</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_write.rs.html#36-149' title='goto source code'>[src]</a></span></h1>
<pre class='rust trait'>pub trait AsyncWrite: <a class="trait" href="../../tokio/prelude/trait.Write.html" title="trait tokio::prelude::Write">Write</a> {
fn <a href='#tymethod.shutdown' class='fnname'>shutdown</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="../../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.unit.html">()</a>&gt;, <a class="struct" href="../../tokio/io/struct.Error.html" title="struct tokio::io::Error">Error</a>&gt;;
fn <a href='#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="../../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.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="../../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.unit.html">()</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.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="../../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/trait.Buf.html" title="trait bytes::buf::buf::Buf">Buf</a></span>,
{ ... }
}</pre><div class='docblock'><p>Writes bytes asynchronously.</p>
<p>The trait inherits from <code>std::io::Write</code> and indicates that an I/O object is
<strong>nonblocking</strong>. All non-blocking I/O objects must return an error when
bytes cannot be written instead of blocking the current thread.</p>
<p>Specifically, this means that the <code>write</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 written .</p>
</li>
<li>
<p><code>Err(e) if e.kind() == ErrorKind::WouldBlock</code> means that no data was
written from the buffer provided. The I/O object is not currently
writable but may become writable 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 writable 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>write</code> method only works in the
context of a future's task. The object may panic if used outside of a task.</p>
<p>Note that this trait also represents that the <code>Write::flush</code> method works
very similarly to the <code>write</code> method, notably that <code>Ok(())</code> means that the
writer has successfully been flushed, a &quot;would block&quot; error means that the
current task is ready to receive a notification when flushing can make more
progress, and otherwise normal errors can happen as well.</p>
</div>
<h2 id='required-methods' class='small-section-header'>
Required Methods<a href='#required-methods' class='anchor'></a>
</h2>
<div class='methods'>
<h3 id='tymethod.shutdown' class='method'><span id='shutdown.v' class='invisible'><code>fn <a href='#tymethod.shutdown' class='fnname'>shutdown</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="../../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.unit.html">()</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>Initiates or attempts to shut down this writer, returning success when
the I/O connection has completely shut down.</p>
<p>This method is intended to be used for asynchronous shutdown of I/O
connections. For example this is suitable for implementing shutdown of a
TLS connection or calling <code>TcpStream::shutdown</code> on a proxied connection.
Protocols sometimes need to flush out final pieces of data or otherwise
perform a graceful shutdown handshake, reading/writing more data as
appropriate. This method is the hook for such protocols to implement the
graceful shutdown logic.</p>
<p>This <code>shutdown</code> method is required by implementors of the
<code>AsyncWrite</code> trait. Wrappers typically just want to proxy this call
through to the wrapped type, and base types will typically implement
shutdown logic here or just return <code>Ok(().into())</code>. Note that if you're
wrapping an underlying <code>AsyncWrite</code> a call to <code>shutdown</code> implies that
transitively the entire stream has been shut down. After your wrapper's
shutdown logic has been executed you should shut down the underlying
stream.</p>
<p>Invocation of a <code>shutdown</code> implies an invocation of <code>flush</code>. Once this
method returns <code>Ready</code> it implies that a flush successfully happened
before the shutdown happened. That is, callers don't need to call
<code>flush</code> before calling <code>shutdown</code>. They can rely that by calling
<code>shutdown</code> any pending buffered data will be written out.</p>
<h1 id="return-value" class="section-header"><a href="#return-value">Return value</a></h1>
<p>This function returns a <code>Poll&lt;(), io::Error&gt;</code> classified as such:</p>
<ul>
<li>
<p><code>Ok(Async::Ready(()))</code> - indicates that the connection was
successfully shut down and is now safe to deallocate/drop/close
resources associated with it. This method means that the current task
will no longer receive any notifications due to this method and the
I/O object itself is likely no longer usable.</p>
</li>
<li>
<p><code>Ok(Async::NotReady)</code> - indicates that shutdown is initiated but could
not complete just yet. This may mean that more I/O needs to happen to
continue this shutdown operation. The current task is scheduled to
receive a notification when it's otherwise ready to continue the
shutdown operation. When woken up this method should be called again.</p>
</li>
<li>
<p><code>Err(e)</code> - indicates a fatal error has happened with shutdown,
indicating that the shutdown operation did not complete successfully.
This typically means that the I/O object is no longer usable.</p>
</li>
</ul>
<h1 id="errors" class="section-header"><a href="#errors">Errors</a></h1>
<p>This function can return normal I/O errors through <code>Err</code>, described
above. Additionally this method may also render the underlying
<code>Write::write</code> method no longer usable (e.g. will return errors in the
future). It's recommended that once <code>shutdown</code> is called the
<code>write</code> method is no longer called.</p>
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
<p>This function will panic if not called within the context of a future's
task.</p>
</div></div>
<h2 id='provided-methods' class='small-section-header'>
Provided Methods<a href='#provided-methods' class='anchor'></a>
</h2>
<div class='methods'>
<h3 id='method.poll_write' class='method'><span id='poll_write.v' class='invisible'><code>fn <a href='#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="../../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 write bytes from <code>buf</code> into the object.</p>
<p>On success, returns <code>Ok(Async::Ready(num_bytes_written))</code>.</p>
<p>If the object is not ready for writing, 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.poll_flush' class='method'><span id='poll_flush.v' class='invisible'><code>fn <a href='#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="../../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.unit.html">()</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 flush the object, ensuring that any buffered data reach
their destination.</p>
<p>On success, returns <code>Ok(Async::Ready(()))</code>.</p>
<p>If flushing cannot immediately complete, this 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 can make
progress towards flushing.</p>
</div><h3 id='method.write_buf' class='method'><span id='write_buf.v' class='invisible'><code>fn <a href='#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="../../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/trait.Buf.html" title="trait bytes::buf::buf::Buf">Buf</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Write a <code>Buf</code> into this value, returning how many bytes were written.</p>
<p>Note that this method will advance the <code>buf</code> provided automatically by
the number of bytes written.</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-AsyncWrite' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</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;<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;</code><a href='#impl-AsyncWrite' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_write.rs.html#209-213' title='goto source code'>[src]</a></span></h3>
<span class='docblock autohide'><div class='impl-items'><h4 id='method.shutdown' class="method"><span id='shutdown.v-1' class='invisible'><code>fn <a href='#method.shutdown' class='fnname'>shutdown</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="../../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.unit.html">()</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_write.rs.html#210-212' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_write-1' class="method"><span id='poll_write.v-1' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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_write.rs.html#45-53' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_flush-1' class="method"><span id='poll_flush.v-1' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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.unit.html">()</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_write.rs.html#64-72' title='goto source code'>[src]</a></span></h4>
<h4 id='method.write_buf-1' class="method"><span id='write_buf.v-1' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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/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></span><h3 id='impl-AsyncWrite-1' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/util/struct.Sink.html" title="struct std::io::util::Sink">Sink</a></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_io/async_write.rs.html#168-172' title='goto source code'>[src]</a></span></h3>
<span class='docblock autohide'><div class='impl-items'><h4 id='method.shutdown-1' class="method"><span id='shutdown.v-2' class='invisible'><code>fn <a href='#method.shutdown' class='fnname'>shutdown</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="../../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.unit.html">()</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_write.rs.html#169-171' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_write-2' class="method"><span id='poll_write.v-2' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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_write.rs.html#45-53' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_flush-2' class="method"><span id='poll_flush.v-2' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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.unit.html">()</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_write.rs.html#64-72' title='goto source code'>[src]</a></span></h4>
<h4 id='method.write_buf-2' class="method"><span id='write_buf.v-2' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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/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></span><h3 id='impl-AsyncWrite-2' class='impl'><span class='in-band'><code>impl&lt;T&gt; <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</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.Write.html" title="trait tokio::prelude::Write">Write</a>,&nbsp;</span></code><a href='#impl-AsyncWrite-2' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/allow_std.rs.html#55-59' title='goto source code'>[src]</a></span></h3>
<span class='docblock autohide'><div class='impl-items'><h4 id='method.shutdown-2' class="method"><span id='shutdown.v-3' class='invisible'><code>fn <a href='#method.shutdown' class='fnname'>shutdown</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="../../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.unit.html">()</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/allow_std.rs.html#56-58' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_write-3' class="method"><span id='poll_write.v-3' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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_write.rs.html#45-53' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_flush-3' class="method"><span id='poll_flush.v-3' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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.unit.html">()</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_write.rs.html#64-72' title='goto source code'>[src]</a></span></h4>
<h4 id='method.write_buf-3' class="method"><span id='write_buf.v-3' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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/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></span><h3 id='impl-AsyncWrite-3' class='impl'><span class='in-band'><code>impl&lt;T&gt; <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/buffered/struct.BufWriter.html" title="struct std::io::buffered::BufWriter">BufWriter</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,&nbsp;</span></code><a href='#impl-AsyncWrite-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#187-192' title='goto source code'>[src]</a></span></h3>
<span class='docblock autohide'><div class='impl-items'><h4 id='method.shutdown-3' class="method"><span id='shutdown.v-4' class='invisible'><code>fn <a href='#method.shutdown' class='fnname'>shutdown</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="../../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.unit.html">()</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_write.rs.html#188-191' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_write-4' class="method"><span id='poll_write.v-4' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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_write.rs.html#45-53' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_flush-4' class="method"><span id='poll_flush.v-4' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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.unit.html">()</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_write.rs.html#64-72' title='goto source code'>[src]</a></span></h4>
<h4 id='method.write_buf-4' class="method"><span id='write_buf.v-4' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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/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></span><h3 id='impl-AsyncWrite-4' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</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;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</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;&gt;</code><a href='#impl-AsyncWrite-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#215-219' title='goto source code'>[src]</a></span></h3>
<span class='docblock autohide'><div class='impl-items'><h4 id='method.shutdown-4' class="method"><span id='shutdown.v-5' class='invisible'><code>fn <a href='#method.shutdown' class='fnname'>shutdown</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="../../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.unit.html">()</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_write.rs.html#216-218' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_write-5' class="method"><span id='poll_write.v-5' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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_write.rs.html#45-53' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_flush-5' class="method"><span id='poll_flush.v-5' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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.unit.html">()</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_write.rs.html#64-72' title='goto source code'>[src]</a></span></h4>
<h4 id='method.write_buf-5' class="method"><span id='write_buf.v-5' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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/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></span><h3 id='impl-AsyncWrite-5' class='impl'><span class='in-band'><code>impl&lt;'a&gt; <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</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;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'a 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;</code><a href='#impl-AsyncWrite-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#203-207' title='goto source code'>[src]</a></span></h3>
<span class='docblock autohide'><div class='impl-items'><h4 id='method.shutdown-5' class="method"><span id='shutdown.v-6' class='invisible'><code>fn <a href='#method.shutdown' class='fnname'>shutdown</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="../../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.unit.html">()</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_write.rs.html#204-206' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_write-6' class="method"><span id='poll_write.v-6' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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_write.rs.html#45-53' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_flush-6' class="method"><span id='poll_flush.v-6' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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.unit.html">()</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_write.rs.html#64-72' title='goto source code'>[src]</a></span></h4>
<h4 id='method.write_buf-6' class="method"><span id='write_buf.v-6' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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/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></span><h3 id='impl-AsyncWrite-6' class='impl'><span class='in-band'><code>impl&lt;T&gt; <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</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.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</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-AsyncWrite-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#151-155' title='goto source code'>[src]</a></span></h3>
<span class='docblock autohide'><div class='impl-items'><h4 id='method.shutdown-6' class="method"><span id='shutdown.v-7' class='invisible'><code>fn <a href='#method.shutdown' class='fnname'>shutdown</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="../../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.unit.html">()</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_write.rs.html#152-154' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_write-7' class="method"><span id='poll_write.v-7' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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_write.rs.html#45-53' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_flush-7' class="method"><span id='poll_flush.v-7' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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.unit.html">()</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_write.rs.html#64-72' title='goto source code'>[src]</a></span></h4>
<h4 id='method.write_buf-7' class="method"><span id='write_buf.v-7' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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/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></span><h3 id='impl-AsyncWrite-7' class='impl'><span class='in-band'><code>impl&lt;'a, T&gt; <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</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.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</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-AsyncWrite-7' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tokio_io/async_write.rs.html#156-160' title='goto source code'>[src]</a></span></h3>
<span class='docblock autohide'><div class='impl-items'><h4 id='method.shutdown-7' class="method"><span id='shutdown.v-8' class='invisible'><code>fn <a href='#method.shutdown' class='fnname'>shutdown</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="../../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.unit.html">()</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_write.rs.html#157-159' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_write-8' class="method"><span id='poll_write.v-8' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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_write.rs.html#45-53' title='goto source code'>[src]</a></span></h4>
<h4 id='method.poll_flush-8' class="method"><span id='poll_flush.v-8' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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.unit.html">()</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_write.rs.html#64-72' title='goto source code'>[src]</a></span></h4>
<h4 id='method.write_buf-8' class="method"><span id='write_buf.v-8' class='invisible'><code>fn <a href='../../tokio/prelude/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="../../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/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></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#64-80' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; AsyncWrite for <a class="struct" href="../../tokio/io/struct.WriteHalf.html" title="struct tokio::io::WriteHalf">WriteHalf</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../tokio/prelude/trait.AsyncWrite.html" title="trait tokio::prelude::AsyncWrite">AsyncWrite</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/tokio_fs/stderr.rs.html#40-44' title='goto source code'>[src]</a></div><code>impl AsyncWrite for <a class="struct" href="../../tokio/io/struct.Stderr.html" title="struct tokio::io::Stderr">Stderr</a></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/tokio_fs/file/mod.rs.html#227-234' title='goto source code'>[src]</a></div><code>impl AsyncWrite 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_fs/stdout.rs.html#40-44' title='goto source code'>[src]</a></div><code>impl AsyncWrite for <a class="struct" href="../../tokio/io/struct.Stdout.html" title="struct tokio::io::Stdout">Stdout</a></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/tokio_reactor/poll_evented.rs.html#634-640' title='goto source code'>[src]</a></div><code>impl&lt;'a, E&gt; AsyncWrite 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.Write.html" title="trait tokio::prelude::Write">Write</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/tokio_reactor/poll_evented.rs.html#506-512' title='goto source code'>[src]</a></div><code>impl&lt;E&gt; AsyncWrite 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.Write.html" title="trait tokio::prelude::Write">Write</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/tokio_tcp/stream.rs.html#436-444' title='goto source code'>[src]</a></div><code>impl AsyncWrite for <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#575-607' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; AsyncWrite for &amp;'a <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_write/trait.AsyncWrite.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>