trait.Sink.html 124 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta name="generator" content="rustdoc">
  7. <meta name="description" content="API documentation for the Rust `Sink` trait in crate `futures`.">
  8. <meta name="keywords" content="rust, rustlang, rust-lang, Sink">
  9. <title>futures::sink::Sink - Rust</title>
  10. <link rel="stylesheet" type="text/css" href="../../normalize.css">
  11. <link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle">
  12. <link rel="stylesheet" type="text/css" href="../../dark.css">
  13. <link rel="stylesheet" type="text/css" href="../../main.css" id="themeStyle">
  14. <script src="../../storage.js"></script>
  15. </head>
  16. <body class="rustdoc trait">
  17. <!--[if lte IE 8]>
  18. <div class="warning">
  19. This old browser is unsupported and will most likely display funky
  20. things.
  21. </div>
  22. <![endif]-->
  23. <nav class="sidebar">
  24. <div class="sidebar-menu">&#9776;</div>
  25. <p class='location'>Trait Sink</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#associated-types">Associated Types</a><div class="sidebar-links"><a href="#associatedtype.SinkItem">SinkItem</a><a href="#associatedtype.SinkError">SinkError</a></div><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.start_send">start_send</a><a href="#tymethod.poll_complete">poll_complete</a></div><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.close">close</a><a href="#method.wait">wait</a><a href="#method.with">with</a><a href="#method.with_flat_map">with_flat_map</a><a href="#method.sink_map_err">sink_map_err</a><a href="#method.sink_from_err">sink_from_err</a><a href="#method.buffer">buffer</a><a href="#method.fanout">fanout</a><a href="#method.flush">flush</a><a href="#method.send">send</a><a href="#method.send_all">send_all</a></div><a class="sidebar-title" href="#foreign-impls">Implementations on Foreign Types</a><div class="sidebar-links"><a href="#impl-Sink">Vec&lt;T&gt;</a><a href="#impl-Sink">Box&lt;S&gt;</a><a href="#impl-Sink">&amp;&#39;a mut S</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='../index.html'>futures</a>::<wbr><a href='index.html'>sink</a></p><script>window.sidebarCurrent = {name: 'Sink', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
  26. </nav>
  27. <div class="theme-picker">
  28. <button id="theme-picker" aria-label="Pick another theme!">
  29. <img src="../../brush.svg" width="18" alt="Pick another theme!">
  30. </button>
  31. <div id="theme-choices"></div>
  32. </div>
  33. <script src="../../theme.js"></script>
  34. <nav class="sub">
  35. <form class="search-form js-only">
  36. <div class="search-container">
  37. <input class="search-input" name="search"
  38. autocomplete="off"
  39. placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
  40. type="search">
  41. </div>
  42. </form>
  43. </nav>
  44. <section id='main' class="content">
  45. <h1 class='fqn'><span class='in-band'>Trait <a href='../index.html'>futures</a>::<wbr><a href='index.html'>sink</a>::<wbr><a class="trait" href=''>Sink</a></span><span class='out-of-band'><span id='render-detail'>
  46. <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
  47. [<span class='inner'>&#x2212;</span>]
  48. </a>
  49. </span><a class='srclink' href='../../src/futures/sink/mod.rs.html#117-471' title='goto source code'>[src]</a></span></h1>
  50. <pre class='rust trait'>pub trait Sink {
  51. type <a href='#associatedtype.SinkItem' class="type">SinkItem</a>;
  52. type <a href='#associatedtype.SinkError' class="type">SinkError</a>;
  53. fn <a href='#tymethod.start_send' class='fnname'>start_send</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;item: Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a><br>&nbsp;&nbsp;&nbsp;&nbsp;) -&gt; <a class="type" href="../../futures/type.StartSend.html" title="type futures::StartSend">StartSend</a>&lt;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>, Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;;
  54. <div class='item-spacer'></div> fn <a href='#tymethod.poll_complete' class='fnname'>poll_complete</a>(&amp;mut self) -&gt; <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;;
  55. fn <a href='#method.close' class='fnname'>close</a>(&amp;mut self) -&gt; <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt; { ... }
  56. <div class='item-spacer'></div> fn <a href='#method.wait' class='fnname'>wait</a>(self) -&gt; <a class="struct" href="../../futures/sink/struct.Wait.html" title="struct futures::sink::Wait">Wait</a>&lt;Self&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  57. { ... }
  58. <div class='item-spacer'></div> fn <a href='#method.with' class='fnname'>with</a>&lt;U, F, Fut&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/sink/struct.With.html" title="struct futures::sink::With">With</a>&lt;Self, U, F, Fut&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(U) -&gt; Fut,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fut: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fut::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  59. { ... }
  60. <div class='item-spacer'></div> fn <a href='#method.with_flat_map' class='fnname'>with_flat_map</a>&lt;U, F, St&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/sink/struct.WithFlatMap.html" title="struct futures::sink::WithFlatMap">WithFlatMap</a>&lt;Self, U, F, St&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(U) -&gt; St,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;St: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&lt;Item = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>, Error = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  61. { ... }
  62. <div class='item-spacer'></div> fn <a href='#method.sink_map_err' class='fnname'>sink_map_err</a>&lt;F, E&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/sink/struct.SinkMapErr.html" title="struct futures::sink::SinkMapErr">SinkMapErr</a>&lt;Self, F&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>) -&gt; E,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  63. { ... }
  64. <div class='item-spacer'></div> fn <a href='#method.sink_from_err' class='fnname'>sink_from_err</a>&lt;E:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;&gt;(self) -&gt; <a class="struct" href="../../futures/sink/struct.SinkFromErr.html" title="struct futures::sink::SinkFromErr">SinkFromErr</a>&lt;Self, E&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  65. { ... }
  66. <div class='item-spacer'></div> fn <a href='#method.buffer' class='fnname'>buffer</a>(self, amt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="../../futures/sink/struct.Buffer.html" title="struct futures::sink::Buffer">Buffer</a>&lt;Self&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  67. { ... }
  68. <div class='item-spacer'></div> fn <a href='#method.fanout' class='fnname'>fanout</a>&lt;S&gt;(self, other: S) -&gt; <a class="struct" href="../../futures/sink/struct.Fanout.html" title="struct futures::sink::Fanout">Fanout</a>&lt;Self, S&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>&lt;SinkItem = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>, SinkError = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;</span>,
  69. { ... }
  70. <div class='item-spacer'></div> fn <a href='#method.flush' class='fnname'>flush</a>(self) -&gt; <a class="struct" href="../../futures/sink/struct.Flush.html" title="struct futures::sink::Flush">Flush</a>&lt;Self&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  71. { ... }
  72. <div class='item-spacer'></div> fn <a href='#method.send' class='fnname'>send</a>(self, item: Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>) -&gt; <a class="struct" href="../../futures/sink/struct.Send.html" title="struct futures::sink::Send">Send</a>&lt;Self&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  73. { ... }
  74. <div class='item-spacer'></div> fn <a href='#method.send_all' class='fnname'>send_all</a>&lt;S&gt;(self, stream: S) -&gt; <a class="struct" href="../../futures/sink/struct.SendAll.html" title="struct futures::sink::SendAll">SendAll</a>&lt;Self, S&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&lt;Item = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
  75. { ... }
  76. }</pre><div class='docblock'><p>A <code>Sink</code> is a value into which other values can be sent, asynchronously.</p>
  77. <p>Basic examples of sinks include the sending side of:</p>
  78. <ul>
  79. <li>Channels</li>
  80. <li>Sockets</li>
  81. <li>Pipes</li>
  82. </ul>
  83. <p>In addition to such &quot;primitive&quot; sinks, it's typical to layer additional
  84. functionality, such as buffering, on top of an existing sink.</p>
  85. <p>Sending to a sink is &quot;asynchronous&quot; in the sense that the value may not be
  86. sent in its entirety immediately. Instead, values are sent in a two-phase
  87. way: first by initiating a send, and then by polling for completion. This
  88. two-phase setup is analogous to buffered writing in synchronous code, where
  89. writes often succeed immediately, but internally are buffered and are
  90. <em>actually</em> written only upon flushing.</p>
  91. <p>In addition, the <code>Sink</code> may be <em>full</em>, in which case it is not even possible
  92. to start the sending process.</p>
  93. <p>As with <code>Future</code> and <code>Stream</code>, the <code>Sink</code> trait is built from a few core
  94. required methods, and a host of default methods for working in a
  95. higher-level way. The <code>Sink::send_all</code> combinator is of particular
  96. importance: you can use it to send an entire stream to a sink, which is
  97. the simplest way to ultimately consume a sink.</p>
  98. <p>You can find more information/tutorials about streams <a href="https://tokio.rs/docs/getting-started/streams-and-sinks/">online at
  99. https://tokio.rs</a></p>
  100. </div>
  101. <h2 id='associated-types' class='small-section-header'>
  102. Associated Types<a href='#associated-types' class='anchor'></a>
  103. </h2>
  104. <div class='methods'>
  105. <h3 id='associatedtype.SinkItem' class='method'><span id='SinkItem.t' class='invisible'><code>type <a href='#associatedtype.SinkItem' class="type">SinkItem</a></code></span></h3><div class='docblock'><p>The type of value that the sink accepts.</p>
  106. </div><h3 id='associatedtype.SinkError' class='method'><span id='SinkError.t' class='invisible'><code>type <a href='#associatedtype.SinkError' class="type">SinkError</a></code></span></h3><div class='docblock'><p>The type of value produced by the sink when an error occurs.</p>
  107. </div></div>
  108. <h2 id='required-methods' class='small-section-header'>
  109. Required Methods<a href='#required-methods' class='anchor'></a>
  110. </h2>
  111. <div class='methods'>
  112. <h3 id='tymethod.start_send' class='method'><span id='start_send.v' class='invisible'><code>fn <a href='#tymethod.start_send' class='fnname'>start_send</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;item: Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a><br>) -&gt; <a class="type" href="../../futures/type.StartSend.html" title="type futures::StartSend">StartSend</a>&lt;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>, Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;</code></span></h3><div class='docblock'><p>Begin the process of sending a value to the sink.</p>
  113. <p>As the name suggests, this method only <em>begins</em> the process of sending
  114. the item. If the sink employs buffering, the item isn't fully processed
  115. until the buffer is fully flushed. Since sinks are designed to work with
  116. asynchronous I/O, the process of actually writing out the data to an
  117. underlying object takes place asynchronously. <strong>You <em>must</em> use
  118. <code>poll_complete</code> in order to drive completion of a send</strong>. In particular,
  119. <code>start_send</code> does not begin the flushing process</p>
  120. <h1 id="return-value" class="section-header"><a href="#return-value">Return value</a></h1>
  121. <p>This method returns <code>AsyncSink::Ready</code> if the sink was able to start
  122. sending <code>item</code>. In that case, you <em>must</em> ensure that you call
  123. <code>poll_complete</code> to process the sent item to completion. Note, however,
  124. that several calls to <code>start_send</code> can be made prior to calling
  125. <code>poll_complete</code>, which will work on completing all pending items.</p>
  126. <p>The method returns <code>AsyncSink::NotReady</code> if the sink was unable to begin
  127. sending, usually due to being full. The sink must have attempted to
  128. complete processing any outstanding requests (equivalent to
  129. <code>poll_complete</code>) before yielding this result. The current task will be
  130. automatically scheduled for notification when the sink may be ready to
  131. receive new values.</p>
  132. <h1 id="errors" class="section-header"><a href="#errors">Errors</a></h1>
  133. <p>If the sink encounters an error other than being temporarily full, it
  134. uses the <code>Err</code> variant to signal that error. In most cases, such errors
  135. mean that the sink will permanently be unable to receive items.</p>
  136. <h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
  137. <p>This method may panic in a few situations, depending on the specific
  138. sink:</p>
  139. <ul>
  140. <li>It is called outside of the context of a task.</li>
  141. <li>A previous call to <code>start_send</code> or <code>poll_complete</code> yielded an error.</li>
  142. </ul>
  143. </div><h3 id='tymethod.poll_complete' class='method'><span id='poll_complete.v' class='invisible'><code>fn <a href='#tymethod.poll_complete' class='fnname'>poll_complete</a>(&amp;mut self) -&gt; <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;</code></span></h3><div class='docblock'><p>Flush all output from this sink, if necessary.</p>
  144. <p>Some sinks may buffer intermediate data as an optimization to improve
  145. throughput. In other words, if a sink has a corresponding receiver then
  146. a successful <code>start_send</code> above may not guarantee that the value is
  147. actually ready to be received by the receiver. This function is intended
  148. to be used to ensure that values do indeed make their way to the
  149. receiver.</p>
  150. <p>This function will attempt to process any pending requests on behalf of
  151. the sink and drive it to completion.</p>
  152. <h1 id="return-value-1" class="section-header"><a href="#return-value-1">Return value</a></h1>
  153. <p>Returns <code>Ok(Async::Ready(()))</code> when no buffered items remain. If this
  154. value is returned then it is guaranteed that all previous values sent
  155. via <code>start_send</code> will be guaranteed to be available to a listening
  156. receiver.</p>
  157. <p>Returns <code>Ok(Async::NotReady)</code> if there is more work left to do, in which
  158. case the current task is scheduled to wake up when more progress may be
  159. possible.</p>
  160. <h1 id="errors-1" class="section-header"><a href="#errors-1">Errors</a></h1>
  161. <p>Returns <code>Err</code> if the sink encounters an error while processing one of
  162. its pending requests. Due to the buffered nature of requests, it is not
  163. generally possible to correlate the error with a particular request. As
  164. with <code>start_send</code>, these errors are generally &quot;fatal&quot; for continued use
  165. of the sink.</p>
  166. <h1 id="panics-1" class="section-header"><a href="#panics-1">Panics</a></h1>
  167. <p>This method may panic in a few situations, depending on the specific sink:</p>
  168. <ul>
  169. <li>It is called outside of the context of a task.</li>
  170. <li>A previous call to <code>start_send</code> or <code>poll_complete</code> yielded an error.</li>
  171. </ul>
  172. <h1 id="compatibility-nodes" class="section-header"><a href="#compatibility-nodes">Compatibility nodes</a></h1>
  173. <p>The name of this method may be slightly misleading as the original
  174. intention was to have this method be more general than just flushing
  175. requests. Over time though it was decided to trim back the ambitions of
  176. this method to what it's always done, just flushing.</p>
  177. <p>In the 0.2 release series of futures this method will be renamed to
  178. <code>poll_flush</code>. For 0.1, however, the breaking change is not happening
  179. yet.</p>
  180. </div></div>
  181. <h2 id='provided-methods' class='small-section-header'>
  182. Provided Methods<a href='#provided-methods' class='anchor'></a>
  183. </h2>
  184. <div class='methods'>
  185. <h3 id='method.close' class='method'><span id='close.v' class='invisible'><code>fn <a href='#method.close' class='fnname'>close</a>(&amp;mut self) -&gt; <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;</code></span></h3><div class='docblock'><p>A method to indicate that no more values will ever be pushed into this
  186. sink.</p>
  187. <p>This method is used to indicate that a sink will no longer even be given
  188. another value by the caller. That is, the <code>start_send</code> method above will
  189. be called no longer (nor <code>poll_complete</code>). This method is intended to
  190. model &quot;graceful shutdown&quot; in various protocols where the intent to shut
  191. down is followed by a little more blocking work.</p>
  192. <p>Callers of this function should work it it in a similar fashion to
  193. <code>poll_complete</code>. Once called it may return <code>NotReady</code> which indicates
  194. that more external work needs to happen to make progress. The current
  195. task will be scheduled to receive a notification in such an event,
  196. however.</p>
  197. <p>Note that this function will imply <code>poll_complete</code> above. That is, if a
  198. sink has buffered data, then it'll be flushed out during a <code>close</code>
  199. operation. It is not necessary to have <code>poll_complete</code> return <code>Ready</code>
  200. before a <code>close</code> is called. Once a <code>close</code> is called, though,
  201. <code>poll_complete</code> cannot be called.</p>
  202. <h1 id="return-value-2" class="section-header"><a href="#return-value-2">Return value</a></h1>
  203. <p>This function, like <code>poll_complete</code>, returns a <code>Poll</code>. The value is
  204. <code>Ready</code> once the close operation has completed. At that point it should
  205. be safe to drop the sink and deallocate associated resources.</p>
  206. <p>If the value returned is <code>NotReady</code> then the sink is not yet closed and
  207. work needs to be done to close it. The work has been scheduled and the
  208. current task will receive a notification when it's next ready to call
  209. this method again.</p>
  210. <p>Finally, this function may also return an error.</p>
  211. <h1 id="errors-2" class="section-header"><a href="#errors-2">Errors</a></h1>
  212. <p>This function will return an <code>Err</code> if any operation along the way during
  213. the close operation fails. An error typically is fatal for a sink and is
  214. unable to be recovered from, but in specific situations this may not
  215. always be true.</p>
  216. <p>Note that it's also typically an error to call <code>start_send</code> or
  217. <code>poll_complete</code> after the <code>close</code> function is called. This method will
  218. <em>initiate</em> a close, and continuing to send values after that (or attempt
  219. to flush) may result in strange behavior, panics, errors, etc. Once this
  220. method is called, it must be the only method called on this <code>Sink</code>.</p>
  221. <h1 id="panics-2" class="section-header"><a href="#panics-2">Panics</a></h1>
  222. <p>This method may panic or cause panics if:</p>
  223. <ul>
  224. <li>It is called outside the context of a future's task</li>
  225. <li>It is called and then <code>start_send</code> or <code>poll_complete</code> is called</li>
  226. </ul>
  227. <h1 id="compatibility-notes" class="section-header"><a href="#compatibility-notes">Compatibility notes</a></h1>
  228. <p>Note that this function is currently by default a provided function,
  229. defaulted to calling <code>poll_complete</code> above. This function was added
  230. in the 0.1 series of the crate as a backwards-compatible addition. It
  231. is intended that in the 0.2 series the method will no longer be a
  232. default method.</p>
  233. <p>It is highly recommended to consider this method a required method and
  234. to implement it whenever you implement <code>Sink</code> locally. It is especially
  235. crucial to be sure to close inner sinks, if applicable.</p>
  236. </div><h3 id='method.wait' class='method'><span id='wait.v' class='invisible'><code>fn <a href='#method.wait' class='fnname'>wait</a>(self) -&gt; <a class="struct" href="../../futures/sink/struct.Wait.html" title="struct futures::sink::Wait">Wait</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span></h3><div class='docblock'><p>Creates a new object which will produce a synchronous sink.</p>
  237. <p>The sink returned does <strong>not</strong> implement the <code>Sink</code> trait, and instead
  238. only has two methods: <code>send</code> and <code>flush</code>. These two methods correspond
  239. to <code>start_send</code> and <code>poll_complete</code> above except are executed in a
  240. blocking fashion.</p>
  241. </div><h3 id='method.with' class='method'><span id='with.v' class='invisible'><code>fn <a href='#method.with' class='fnname'>with</a>&lt;U, F, Fut&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/sink/struct.With.html" title="struct futures::sink::With">With</a>&lt;Self, U, F, Fut&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(U) -&gt; Fut,<br>&nbsp;&nbsp;&nbsp;&nbsp;Fut: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Fut::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span></h3><div class='docblock'><p>Composes a function <em>in front of</em> the sink.</p>
  242. <p>This adapter produces a new sink that passes each value through the
  243. given function <code>f</code> before sending it to <code>self</code>.</p>
  244. <p>To process each value, <code>f</code> produces a <em>future</em>, which is then polled to
  245. completion before passing its result down to the underlying sink. If the
  246. future produces an error, that error is returned by the new sink.</p>
  247. <p>Note that this function consumes the given sink, returning a wrapped
  248. version, much like <code>Iterator::map</code>.</p>
  249. </div><h3 id='method.with_flat_map' class='method'><span id='with_flat_map.v' class='invisible'><code>fn <a href='#method.with_flat_map' class='fnname'>with_flat_map</a>&lt;U, F, St&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/sink/struct.WithFlatMap.html" title="struct futures::sink::WithFlatMap">WithFlatMap</a>&lt;Self, U, F, St&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(U) -&gt; St,<br>&nbsp;&nbsp;&nbsp;&nbsp;St: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&lt;Item = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>, Error = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span></h3><div class='docblock'><p>Composes a function <em>in front of</em> the sink.</p>
  250. <p>This adapter produces a new sink that passes each value through the
  251. given function <code>f</code> before sending it to <code>self</code>.</p>
  252. <p>To process each value, <code>f</code> produces a <em>stream</em>, of which each value
  253. is passed to the underlying sink. A new value will not be accepted until
  254. the stream has been drained</p>
  255. <p>Note that this function consumes the given sink, returning a wrapped
  256. version, much like <code>Iterator::flat_map</code>.</p>
  257. <h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
  258. <hr />
  259. <p>Using this function with an iterator through use of the <code>stream::iter_ok()</code>
  260. function</p>
  261. <pre class="rust rust-example-rendered">
  262. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
  263. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">stream</span>;
  264. <span class="kw">use</span> <span class="ident">futures</span>::<span class="ident">sync</span>::<span class="ident">mpsc</span>;
  265. <span class="kw">let</span> (<span class="ident">tx</span>, <span class="ident">rx</span>) <span class="op">=</span> <span class="ident">mpsc</span>::<span class="ident">channel</span>::<span class="op">&lt;</span><span class="ident">i32</span><span class="op">&gt;</span>(<span class="number">5</span>);
  266. <span class="kw">let</span> <span class="ident">tx</span> <span class="op">=</span> <span class="ident">tx</span>.<span class="ident">with_flat_map</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> {
  267. <span class="ident">stream</span>::<span class="ident">iter_ok</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="number">42</span>; <span class="ident">x</span>].<span class="ident">into_iter</span>().<span class="ident">map</span>(<span class="op">|</span><span class="ident">y</span><span class="op">|</span> <span class="ident">y</span>))
  268. });
  269. <span class="ident">tx</span>.<span class="ident">send</span>(<span class="number">5</span>).<span class="ident">wait</span>().<span class="ident">unwrap</span>();
  270. <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">rx</span>.<span class="ident">collect</span>().<span class="ident">wait</span>(), <span class="prelude-val">Ok</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="number">42</span>, <span class="number">42</span>, <span class="number">42</span>, <span class="number">42</span>, <span class="number">42</span>]))</pre>
  271. </div><h3 id='method.sink_map_err' class='method'><span id='sink_map_err.v' class='invisible'><code>fn <a href='#method.sink_map_err' class='fnname'>sink_map_err</a>&lt;F, E&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/sink/struct.SinkMapErr.html" title="struct futures::sink::SinkMapErr">SinkMapErr</a>&lt;Self, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>) -&gt; E,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span></h3><div class='docblock'><p>Transforms the error returned by the sink.</p>
  272. </div><h3 id='method.sink_from_err' class='method'><span id='sink_from_err.v' class='invisible'><code>fn <a href='#method.sink_from_err' class='fnname'>sink_from_err</a>&lt;E:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;&gt;(self) -&gt; <a class="struct" href="../../futures/sink/struct.SinkFromErr.html" title="struct futures::sink::SinkFromErr">SinkFromErr</a>&lt;Self, E&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span></h3><div class='docblock'><p>Map this sink's error to any error implementing <code>From</code> for this sink's
  273. <code>Error</code>, returning a new sink.</p>
  274. <p>If wanting to map errors of a <code>Sink + Stream</code>, use <code>.sink_from_err().from_err()</code>.</p>
  275. </div><h3 id='method.buffer' class='method'><span id='buffer.v' class='invisible'><code>fn <a href='#method.buffer' class='fnname'>buffer</a>(self, amt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="../../futures/sink/struct.Buffer.html" title="struct futures::sink::Buffer">Buffer</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span></h3><div class='docblock'><p>Adds a fixed-size buffer to the current sink.</p>
  276. <p>The resulting sink will buffer up to <code>amt</code> items when the underlying
  277. sink is unwilling to accept additional items. Calling <code>poll_complete</code> on
  278. the buffered sink will attempt to both empty the buffer and complete
  279. processing on the underlying sink.</p>
  280. <p>Note that this function consumes the given sink, returning a wrapped
  281. version, much like <code>Iterator::map</code>.</p>
  282. <p>This method is only available when the <code>use_std</code> feature of this
  283. library is activated, and it is activated by default.</p>
  284. </div><h3 id='method.fanout' class='method'><span id='fanout.v' class='invisible'><code>fn <a href='#method.fanout' class='fnname'>fanout</a>&lt;S&gt;(self, other: S) -&gt; <a class="struct" href="../../futures/sink/struct.Fanout.html" title="struct futures::sink::Fanout">Fanout</a>&lt;Self, S&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>&lt;SinkItem = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>, SinkError = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;,&nbsp;</span></code></span></h3><div class='docblock'><p>Fanout items to multiple sinks.</p>
  285. <p>This adapter clones each incoming item and forwards it to both this as well as
  286. the other sink at the same time.</p>
  287. </div><h3 id='method.flush' class='method'><span id='flush.v' class='invisible'><code>fn <a href='#method.flush' class='fnname'>flush</a>(self) -&gt; <a class="struct" href="../../futures/sink/struct.Flush.html" title="struct futures::sink::Flush">Flush</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span></h3><div class='docblock'><p>A future that completes when the sink has finished processing all
  288. pending requests.</p>
  289. <p>The sink itself is returned after flushing is complete; this adapter is
  290. intended to be used when you want to stop sending to the sink until
  291. all current requests are processed.</p>
  292. </div><h3 id='method.send' class='method'><span id='send.v' class='invisible'><code>fn <a href='#method.send' class='fnname'>send</a>(self, item: Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>) -&gt; <a class="struct" href="../../futures/sink/struct.Send.html" title="struct futures::sink::Send">Send</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span></h3><div class='docblock'><p>A future that completes after the given item has been fully processed
  293. into the sink, including flushing.</p>
  294. <p>Note that, <strong>because of the flushing requirement, it is usually better
  295. to batch together items to send via <code>send_all</code>, rather than flushing
  296. between each item.</strong></p>
  297. <p>On completion, the sink is returned.</p>
  298. </div><h3 id='method.send_all' class='method'><span id='send_all.v' class='invisible'><code>fn <a href='#method.send_all' class='fnname'>send_all</a>&lt;S&gt;(self, stream: S) -&gt; <a class="struct" href="../../futures/sink/struct.SendAll.html" title="struct futures::sink::SendAll">SendAll</a>&lt;Self, S&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&lt;Item = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span></h3><div class='docblock'><p>A future that completes after the given stream has been fully processed
  299. into the sink, including flushing.</p>
  300. <p>This future will drive the stream to keep producing items until it is
  301. exhausted, sending each item to the sink. It will complete once both the
  302. stream is exhausted, the sink has received all items, the sink has been
  303. flushed, and the sink has been closed.</p>
  304. <p>Doing <code>sink.send_all(stream)</code> is roughly equivalent to
  305. <code>stream.forward(sink)</code>. The returned future will exhaust all items from
  306. <code>stream</code> and send them to <code>self</code>, closing <code>self</code> when all items have been
  307. received.</p>
  308. <p>On completion, the pair <code>(sink, source)</code> is returned.</p>
  309. </div></div>
  310. <h2 id='foreign-impls' class='small-section-header'>
  311. Implementations on Foreign Types<a href='#foreign-impls' class='anchor'></a>
  312. </h2>
  313. <h3 id='impl-Sink' class='impl'><span class='in-band'><code>impl&lt;T&gt; <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;T&gt;</code><a href='#impl-Sink' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#34-52' title='goto source code'>[src]</a></span></h3>
  314. <span class='docblock autohide'><div class='impl-items'><h4 id='associatedtype.SinkItem-1' class="type"><span id='SinkItem.t-1' class='invisible'><code>type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = T</code></span></h4>
  315. <h4 id='associatedtype.SinkError-1' class="type"><span id='SinkError.t-1' class='invisible'><code>type <a href='#associatedtype.SinkError' class="type">SinkError</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></code></span></h4>
  316. <h4 id='method.start_send' class="method"><span id='start_send.v-1' class='invisible'><code>fn <a href='#method.start_send' class='fnname'>start_send</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;item: Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a><br>) -&gt; <a class="type" href="../../futures/type.StartSend.html" title="type futures::StartSend">StartSend</a>&lt;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>, Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#38-43' title='goto source code'>[src]</a></span></h4>
  317. <h4 id='method.poll_complete' class="method"><span id='poll_complete.v-1' class='invisible'><code>fn <a href='#method.poll_complete' class='fnname'>poll_complete</a>(&amp;mut self) -&gt; <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#45-47' title='goto source code'>[src]</a></span></h4>
  318. <h4 id='method.close-1' class="method"><span id='close.v-1' class='invisible'><code>fn <a href='#method.close' class='fnname'>close</a>(&amp;mut self) -&gt; <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#49-51' title='goto source code'>[src]</a></span></h4>
  319. <h4 id='method.wait-1' class="method"><span id='wait.v-1' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.wait' class='fnname'>wait</a>(self) -&gt; <a class="struct" href="../../futures/sink/struct.Wait.html" title="struct futures::sink::Wait">Wait</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#296-300' title='goto source code'>[src]</a></span></h4>
  320. <h4 id='method.with-1' class="method"><span id='with.v-1' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.with' class='fnname'>with</a>&lt;U, F, Fut&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/sink/struct.With.html" title="struct futures::sink::With">With</a>&lt;Self, U, F, Fut&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(U) -&gt; Fut,<br>&nbsp;&nbsp;&nbsp;&nbsp;Fut: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Fut::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#313-320' title='goto source code'>[src]</a></span></h4>
  321. <h4 id='method.with_flat_map-1' class="method"><span id='with_flat_map.v-1' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.with_flat_map' class='fnname'>with_flat_map</a>&lt;U, F, St&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/sink/struct.WithFlatMap.html" title="struct futures::sink::WithFlatMap">WithFlatMap</a>&lt;Self, U, F, St&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(U) -&gt; St,<br>&nbsp;&nbsp;&nbsp;&nbsp;St: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&lt;Item = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>, Error = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#352-358' title='goto source code'>[src]</a></span></h4>
  322. <h4 id='method.sink_map_err-1' class="method"><span id='sink_map_err.v-1' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.sink_map_err' class='fnname'>sink_map_err</a>&lt;F, E&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/sink/struct.SinkMapErr.html" title="struct futures::sink::SinkMapErr">SinkMapErr</a>&lt;Self, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>) -&gt; E,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#375-380' title='goto source code'>[src]</a></span></h4>
  323. <h4 id='method.sink_from_err-1' class="method"><span id='sink_from_err.v-1' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.sink_from_err' class='fnname'>sink_from_err</a>&lt;E:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;&gt;(self) -&gt; <a class="struct" href="../../futures/sink/struct.SinkFromErr.html" title="struct futures::sink::SinkFromErr">SinkFromErr</a>&lt;Self, E&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#386-390' title='goto source code'>[src]</a></span></h4>
  324. <h4 id='method.buffer-1' class="method"><span id='buffer.v-1' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.buffer' class='fnname'>buffer</a>(self, amt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="../../futures/sink/struct.Buffer.html" title="struct futures::sink::Buffer">Buffer</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#406-410' title='goto source code'>[src]</a></span></h4>
  325. <h4 id='method.fanout-1' class="method"><span id='fanout.v-1' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.fanout' class='fnname'>fanout</a>&lt;S&gt;(self, other: S) -&gt; <a class="struct" href="../../futures/sink/struct.Fanout.html" title="struct futures::sink::Fanout">Fanout</a>&lt;Self, S&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>&lt;SinkItem = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>, SinkError = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#416-422' title='goto source code'>[src]</a></span></h4>
  326. <h4 id='method.flush-1' class="method"><span id='flush.v-1' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.flush' class='fnname'>flush</a>(self) -&gt; <a class="struct" href="../../futures/sink/struct.Flush.html" title="struct futures::sink::Flush">Flush</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#430-434' title='goto source code'>[src]</a></span></h4>
  327. <h4 id='method.send-1' class="method"><span id='send.v-1' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.send' class='fnname'>send</a>(self, item: Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>) -&gt; <a class="struct" href="../../futures/sink/struct.Send.html" title="struct futures::sink::Send">Send</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#444-448' title='goto source code'>[src]</a></span></h4>
  328. <h4 id='method.send_all-1' class="method"><span id='send_all.v-1' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.send_all' class='fnname'>send_all</a>&lt;S&gt;(self, stream: S) -&gt; <a class="struct" href="../../futures/sink/struct.SendAll.html" title="struct futures::sink::SendAll">SendAll</a>&lt;Self, S&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&lt;Item = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#464-470' title='goto source code'>[src]</a></span></h4>
  329. </div></span><h3 id='impl-Sink-1' class='impl'><span class='in-band'><code>impl&lt;S:&nbsp;?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>&gt; <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</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;S&gt;</code><a href='#impl-Sink-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#58-74' title='goto source code'>[src]</a></span></h3>
  330. <span class='docblock autohide'><div class='impl-items'><h4 id='associatedtype.SinkItem-2' class="type"><span id='SinkItem.t-2' class='invisible'><code>type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a></code></span></h4>
  331. <h4 id='associatedtype.SinkError-2' class="type"><span id='SinkError.t-2' class='invisible'><code>type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a></code></span></h4>
  332. <h4 id='method.start_send-1' class="method"><span id='start_send.v-2' class='invisible'><code>fn <a href='#method.start_send' class='fnname'>start_send</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;item: Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a><br>) -&gt; <a class="type" href="../../futures/type.StartSend.html" title="type futures::StartSend">StartSend</a>&lt;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>, Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#62-65' title='goto source code'>[src]</a></span></h4>
  333. <h4 id='method.poll_complete-1' class="method"><span id='poll_complete.v-2' class='invisible'><code>fn <a href='#method.poll_complete' class='fnname'>poll_complete</a>(&amp;mut self) -&gt; <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#67-69' title='goto source code'>[src]</a></span></h4>
  334. <h4 id='method.close-2' class="method"><span id='close.v-2' class='invisible'><code>fn <a href='#method.close' class='fnname'>close</a>(&amp;mut self) -&gt; <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#71-73' title='goto source code'>[src]</a></span></h4>
  335. <h4 id='method.wait-2' class="method"><span id='wait.v-2' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.wait' class='fnname'>wait</a>(self) -&gt; <a class="struct" href="../../futures/sink/struct.Wait.html" title="struct futures::sink::Wait">Wait</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#296-300' title='goto source code'>[src]</a></span></h4>
  336. <h4 id='method.with-2' class="method"><span id='with.v-2' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.with' class='fnname'>with</a>&lt;U, F, Fut&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/sink/struct.With.html" title="struct futures::sink::With">With</a>&lt;Self, U, F, Fut&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(U) -&gt; Fut,<br>&nbsp;&nbsp;&nbsp;&nbsp;Fut: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Fut::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#313-320' title='goto source code'>[src]</a></span></h4>
  337. <h4 id='method.with_flat_map-2' class="method"><span id='with_flat_map.v-2' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.with_flat_map' class='fnname'>with_flat_map</a>&lt;U, F, St&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/sink/struct.WithFlatMap.html" title="struct futures::sink::WithFlatMap">WithFlatMap</a>&lt;Self, U, F, St&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(U) -&gt; St,<br>&nbsp;&nbsp;&nbsp;&nbsp;St: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&lt;Item = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>, Error = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#352-358' title='goto source code'>[src]</a></span></h4>
  338. <h4 id='method.sink_map_err-2' class="method"><span id='sink_map_err.v-2' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.sink_map_err' class='fnname'>sink_map_err</a>&lt;F, E&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/sink/struct.SinkMapErr.html" title="struct futures::sink::SinkMapErr">SinkMapErr</a>&lt;Self, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>) -&gt; E,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#375-380' title='goto source code'>[src]</a></span></h4>
  339. <h4 id='method.sink_from_err-2' class="method"><span id='sink_from_err.v-2' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.sink_from_err' class='fnname'>sink_from_err</a>&lt;E:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;&gt;(self) -&gt; <a class="struct" href="../../futures/sink/struct.SinkFromErr.html" title="struct futures::sink::SinkFromErr">SinkFromErr</a>&lt;Self, E&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#386-390' title='goto source code'>[src]</a></span></h4>
  340. <h4 id='method.buffer-2' class="method"><span id='buffer.v-2' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.buffer' class='fnname'>buffer</a>(self, amt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="../../futures/sink/struct.Buffer.html" title="struct futures::sink::Buffer">Buffer</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#406-410' title='goto source code'>[src]</a></span></h4>
  341. <h4 id='method.fanout-2' class="method"><span id='fanout.v-2' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.fanout' class='fnname'>fanout</a>&lt;S&gt;(self, other: S) -&gt; <a class="struct" href="../../futures/sink/struct.Fanout.html" title="struct futures::sink::Fanout">Fanout</a>&lt;Self, S&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>&lt;SinkItem = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>, SinkError = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#416-422' title='goto source code'>[src]</a></span></h4>
  342. <h4 id='method.flush-2' class="method"><span id='flush.v-2' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.flush' class='fnname'>flush</a>(self) -&gt; <a class="struct" href="../../futures/sink/struct.Flush.html" title="struct futures::sink::Flush">Flush</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#430-434' title='goto source code'>[src]</a></span></h4>
  343. <h4 id='method.send-2' class="method"><span id='send.v-2' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.send' class='fnname'>send</a>(self, item: Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>) -&gt; <a class="struct" href="../../futures/sink/struct.Send.html" title="struct futures::sink::Send">Send</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#444-448' title='goto source code'>[src]</a></span></h4>
  344. <h4 id='method.send_all-2' class="method"><span id='send_all.v-2' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.send_all' class='fnname'>send_all</a>&lt;S&gt;(self, stream: S) -&gt; <a class="struct" href="../../futures/sink/struct.SendAll.html" title="struct futures::sink::SendAll">SendAll</a>&lt;Self, S&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&lt;Item = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#464-470' title='goto source code'>[src]</a></span></h4>
  345. </div></span><h3 id='impl-Sink-2' class='impl'><span class='in-band'><code>impl&lt;'a, S:&nbsp;?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>&gt; <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>S</code><a href='#impl-Sink-2' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#473-489' title='goto source code'>[src]</a></span></h3>
  346. <span class='docblock autohide'><div class='impl-items'><h4 id='associatedtype.SinkItem-3' class="type"><span id='SinkItem.t-3' class='invisible'><code>type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a></code></span></h4>
  347. <h4 id='associatedtype.SinkError-3' class="type"><span id='SinkError.t-3' class='invisible'><code>type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a></code></span></h4>
  348. <h4 id='method.start_send-2' class="method"><span id='start_send.v-3' class='invisible'><code>fn <a href='#method.start_send' class='fnname'>start_send</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;item: Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a><br>) -&gt; <a class="type" href="../../futures/type.StartSend.html" title="type futures::StartSend">StartSend</a>&lt;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>, Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#477-480' title='goto source code'>[src]</a></span></h4>
  349. <h4 id='method.poll_complete-2' class="method"><span id='poll_complete.v-3' class='invisible'><code>fn <a href='#method.poll_complete' class='fnname'>poll_complete</a>(&amp;mut self) -&gt; <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#482-484' title='goto source code'>[src]</a></span></h4>
  350. <h4 id='method.close-3' class="method"><span id='close.v-3' class='invisible'><code>fn <a href='#method.close' class='fnname'>close</a>(&amp;mut self) -&gt; <a class="type" href="../../futures/type.Poll.html" title="type futures::Poll">Poll</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#486-488' title='goto source code'>[src]</a></span></h4>
  351. <h4 id='method.wait-3' class="method"><span id='wait.v-3' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.wait' class='fnname'>wait</a>(self) -&gt; <a class="struct" href="../../futures/sink/struct.Wait.html" title="struct futures::sink::Wait">Wait</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#296-300' title='goto source code'>[src]</a></span></h4>
  352. <h4 id='method.with-3' class="method"><span id='with.v-3' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.with' class='fnname'>with</a>&lt;U, F, Fut&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/sink/struct.With.html" title="struct futures::sink::With">With</a>&lt;Self, U, F, Fut&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(U) -&gt; Fut,<br>&nbsp;&nbsp;&nbsp;&nbsp;Fut: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Fut::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#313-320' title='goto source code'>[src]</a></span></h4>
  353. <h4 id='method.with_flat_map-3' class="method"><span id='with_flat_map.v-3' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.with_flat_map' class='fnname'>with_flat_map</a>&lt;U, F, St&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/sink/struct.WithFlatMap.html" title="struct futures::sink::WithFlatMap">WithFlatMap</a>&lt;Self, U, F, St&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(U) -&gt; St,<br>&nbsp;&nbsp;&nbsp;&nbsp;St: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&lt;Item = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>, Error = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#352-358' title='goto source code'>[src]</a></span></h4>
  354. <h4 id='method.sink_map_err-3' class="method"><span id='sink_map_err.v-3' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.sink_map_err' class='fnname'>sink_map_err</a>&lt;F, E&gt;(self, f: F) -&gt; <a class="struct" href="../../futures/sink/struct.SinkMapErr.html" title="struct futures::sink::SinkMapErr">SinkMapErr</a>&lt;Self, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>) -&gt; E,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#375-380' title='goto source code'>[src]</a></span></h4>
  355. <h4 id='method.sink_from_err-3' class="method"><span id='sink_from_err.v-3' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.sink_from_err' class='fnname'>sink_from_err</a>&lt;E:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;&gt;(self) -&gt; <a class="struct" href="../../futures/sink/struct.SinkFromErr.html" title="struct futures::sink::SinkFromErr">SinkFromErr</a>&lt;Self, E&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#386-390' title='goto source code'>[src]</a></span></h4>
  356. <h4 id='method.buffer-3' class="method"><span id='buffer.v-3' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.buffer' class='fnname'>buffer</a>(self, amt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="../../futures/sink/struct.Buffer.html" title="struct futures::sink::Buffer">Buffer</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#406-410' title='goto source code'>[src]</a></span></h4>
  357. <h4 id='method.fanout-3' class="method"><span id='fanout.v-3' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.fanout' class='fnname'>fanout</a>&lt;S&gt;(self, other: S) -&gt; <a class="struct" href="../../futures/sink/struct.Fanout.html" title="struct futures::sink::Fanout">Fanout</a>&lt;Self, S&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>&lt;SinkItem = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>, SinkError = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#416-422' title='goto source code'>[src]</a></span></h4>
  358. <h4 id='method.flush-3' class="method"><span id='flush.v-3' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.flush' class='fnname'>flush</a>(self) -&gt; <a class="struct" href="../../futures/sink/struct.Flush.html" title="struct futures::sink::Flush">Flush</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#430-434' title='goto source code'>[src]</a></span></h4>
  359. <h4 id='method.send-3' class="method"><span id='send.v-3' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.send' class='fnname'>send</a>(self, item: Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>) -&gt; <a class="struct" href="../../futures/sink/struct.Send.html" title="struct futures::sink::Send">Send</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#444-448' title='goto source code'>[src]</a></span></h4>
  360. <h4 id='method.send_all-3' class="method"><span id='send_all.v-3' class='invisible'><code>fn <a href='../../futures/sink/trait.Sink.html#method.send_all' class='fnname'>send_all</a>&lt;S&gt;(self, stream: S) -&gt; <a class="struct" href="../../futures/sink/struct.SendAll.html" title="struct futures::sink::SendAll">SendAll</a>&lt;Self, S&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&lt;Item = Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Error" title="type futures::stream::Stream::Error">Error</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/futures/sink/mod.rs.html#464-470' title='goto source code'>[src]</a></span></h4>
  361. </div></span>
  362. <h2 id='implementors' class='small-section-header'>
  363. Implementors<a href='#implementors' class='anchor'></a>
  364. </h2>
  365. <ul class='item-list' id='implementors-list'>
  366. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/and_then.rs.html#58-75' title='goto source code'>[src]</a></div><code>impl&lt;S, F, U:&nbsp;<a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&gt; Sink for <a class="struct" href="../../futures/stream/struct.AndThen.html" title="struct futures::stream::AndThen">AndThen</a>&lt;S, F, U&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  367. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/filter.rs.html#51-68' title='goto source code'>[src]</a></div><code>impl&lt;S, F&gt; Sink for <a class="struct" href="../../futures/stream/struct.Filter.html" title="struct futures::stream::Filter">Filter</a>&lt;S, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  368. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/filter_map.rs.html#51-68' title='goto source code'>[src]</a></div><code>impl&lt;S, F&gt; Sink for <a class="struct" href="../../futures/stream/struct.FilterMap.html" title="struct futures::stream::FilterMap">FilterMap</a>&lt;S, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  369. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/flatten.rs.html#54-71' title='goto source code'>[src]</a></div><code>impl&lt;S&gt; Sink for <a class="struct" href="../../futures/stream/struct.Flatten.html" title="struct futures::stream::Flatten">Flatten</a>&lt;S&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a> + <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  370. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/from_err.rs.html#65-80' title='goto source code'>[src]</a></div><code>impl&lt;S:&nbsp;<a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a> + <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>, E&gt; Sink for <a class="struct" href="../../futures/stream/struct.FromErr.html" title="struct futures::stream::FromErr">FromErr</a>&lt;S, E&gt;<span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  371. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/fuse.rs.html#17-34' title='goto source code'>[src]</a></div><code>impl&lt;S&gt; Sink for <a class="struct" href="../../futures/stream/struct.Fuse.html" title="struct futures::stream::Fuse">Fuse</a>&lt;S&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  372. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/inspect.rs.html#49-66' title='goto source code'>[src]</a></div><code>impl&lt;S, F&gt; Sink for <a class="struct" href="../../futures/stream/struct.Inspect.html" title="struct futures::stream::Inspect">Inspect</a>&lt;S, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a> + <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  373. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/inspect_err.rs.html#49-66' title='goto source code'>[src]</a></div><code>impl&lt;S, F&gt; Sink for <a class="struct" href="../../futures/stream/struct.InspectErr.html" title="struct futures::stream::InspectErr">InspectErr</a>&lt;S, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a> + <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  374. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/map.rs.html#51-68' title='goto source code'>[src]</a></div><code>impl&lt;S, F&gt; Sink for <a class="struct" href="../../futures/stream/struct.Map.html" title="struct futures::stream::Map">Map</a>&lt;S, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  375. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/map_err.rs.html#51-68' title='goto source code'>[src]</a></div><code>impl&lt;S, F&gt; Sink for <a class="struct" href="../../futures/stream/struct.MapErr.html" title="struct futures::stream::MapErr">MapErr</a>&lt;S, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  376. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/or_else.rs.html#31-48' title='goto source code'>[src]</a></div><code>impl&lt;S, F, U&gt; Sink for <a class="struct" href="../../futures/stream/struct.OrElse.html" title="struct futures::stream::OrElse">OrElse</a>&lt;S, F, U&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  377. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/peek.rs.html#25-42' title='goto source code'>[src]</a></div><code>impl&lt;S&gt; Sink for <a class="struct" href="../../futures/stream/struct.Peekable.html" title="struct futures::stream::Peekable">Peekable</a>&lt;S&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a> + <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  378. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/skip.rs.html#49-66' title='goto source code'>[src]</a></div><code>impl&lt;S&gt; Sink for <a class="struct" href="../../futures/stream/struct.Skip.html" title="struct futures::stream::Skip">Skip</a>&lt;S&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  379. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/skip_while.rs.html#56-73' title='goto source code'>[src]</a></div><code>impl&lt;S, P, R&gt; Sink for <a class="struct" href="../../futures/stream/struct.SkipWhile.html" title="struct futures::stream::SkipWhile">SkipWhile</a>&lt;S, P, R&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a> + <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  380. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/take.rs.html#49-66' title='goto source code'>[src]</a></div><code>impl&lt;S&gt; Sink for <a class="struct" href="../../futures/stream/struct.Take.html" title="struct futures::stream::Take">Take</a>&lt;S&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a> + <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  381. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/take_while.rs.html#56-73' title='goto source code'>[src]</a></div><code>impl&lt;S, P, R&gt; Sink for <a class="struct" href="../../futures/stream/struct.TakeWhile.html" title="struct futures::stream::TakeWhile">TakeWhile</a>&lt;S, P, R&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a> + <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  382. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/then.rs.html#31-48' title='goto source code'>[src]</a></div><code>impl&lt;S, F, U&gt; Sink for <a class="struct" href="../../futures/stream/struct.Then.html" title="struct futures::stream::Then">Then</a>&lt;S, F, U&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  383. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/buffered.rs.html#78-96' title='goto source code'>[src]</a></div><code>impl&lt;S&gt; Sink for <a class="struct" href="../../futures/stream/struct.Buffered.html" title="struct futures::stream::Buffered">Buffered</a>&lt;S&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a> + <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Item" title="type futures::stream::Stream::Item">Item</a>: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  384. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/buffer_unordered.rs.html#112-130' title='goto source code'>[src]</a></div><code>impl&lt;S&gt; Sink for <a class="struct" href="../../futures/stream/struct.BufferUnordered.html" title="struct futures::stream::BufferUnordered">BufferUnordered</a>&lt;S&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a> + <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;S::<a class="type" href="../../futures/stream/trait.Stream.html#associatedtype.Item" title="type futures::stream::Stream::Item">Item</a>: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  385. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/chunks.rs.html#35-52' title='goto source code'>[src]</a></div><code>impl&lt;S&gt; Sink for <a class="struct" href="../../futures/stream/struct.Chunks.html" title="struct futures::stream::Chunks">Chunks</a>&lt;S&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a> + <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  386. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/stream/split.rs.html#48-74' title='goto source code'>[src]</a></div><code>impl&lt;S:&nbsp;<a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>&gt; Sink for <a class="struct" href="../../futures/stream/struct.SplitSink.html" title="struct futures::stream::SplitSink">SplitSink</a>&lt;S&gt;<span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  387. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sink/with.rs.html#124-153' title='goto source code'>[src]</a></div><code>impl&lt;S, U, F, Fut&gt; Sink for <a class="struct" href="../../futures/sink/struct.With.html" title="struct futures::sink::With">With</a>&lt;S, U, F, Fut&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(U) -&gt; Fut,<br>&nbsp;&nbsp;&nbsp;&nbsp;Fut: <a class="trait" href="../../futures/future/trait.IntoFuture.html" title="trait futures::future::IntoFuture">IntoFuture</a>&lt;Item = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Fut::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = U;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = Fut::<a class="type" href="../../futures/future/trait.IntoFuture.html#associatedtype.Error" title="type futures::future::IntoFuture::Error">Error</a>;</span></code></li>
  388. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sink/with_flat_map.rs.html#96-126' title='goto source code'>[src]</a></div><code>impl&lt;S, U, F, St&gt; Sink for <a class="struct" href="../../futures/sink/struct.WithFlatMap.html" title="struct futures::sink::WithFlatMap">WithFlatMap</a>&lt;S, U, F, St&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(U) -&gt; St,<br>&nbsp;&nbsp;&nbsp;&nbsp;St: <a class="trait" href="../../futures/stream/trait.Stream.html" title="trait futures::stream::Stream">Stream</a>&lt;Item = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>, Error = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = U;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  389. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sink/from_err.rs.html#44-62' title='goto source code'>[src]</a></div><code>impl&lt;S, E&gt; Sink for <a class="struct" href="../../futures/sink/struct.SinkFromErr.html" title="struct futures::sink::SinkFromErr">SinkFromErr</a>&lt;S, E&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = E;</span></code></li>
  390. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sink/map_err.rs.html#37-55' title='goto source code'>[src]</a></div><code>impl&lt;S, F, E&gt; Sink for <a class="struct" href="../../futures/sink/struct.SinkMapErr.html" title="struct futures::sink::SinkMapErr">SinkMapErr</a>&lt;S, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>) -&gt; E,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = E;</span></code></li>
  391. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sink/fanout.rs.html#44-90' title='goto source code'>[src]</a></div><code>impl&lt;A, B&gt; Sink for <a class="struct" href="../../futures/sink/struct.Fanout.html" title="struct futures::sink::Fanout">Fanout</a>&lt;A, B&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;A::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>&lt;SinkItem = A::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>, SinkError = A::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>&gt;,&nbsp;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = A::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = A::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  392. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sink/buffer.rs.html#70-108' title='goto source code'>[src]</a></div><code>impl&lt;S:&nbsp;<a class="trait" href="../../futures/sink/trait.Sink.html" title="trait futures::sink::Sink">Sink</a>&gt; Sink for <a class="struct" href="../../futures/sink/struct.Buffer.html" title="struct futures::sink::Buffer">Buffer</a>&lt;S&gt;<span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkItem" title="type futures::sink::Sink::SinkItem">SinkItem</a>;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = S::<a class="type" href="../../futures/sink/trait.Sink.html#associatedtype.SinkError" title="type futures::sink::Sink::SinkError">SinkError</a>;</span></code></li>
  393. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sync/mpsc/mod.rs.html#634-658' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Sink for futures::sync::mpsc::<a class="struct" href="../../futures/sync/mpsc/struct.Sender.html" title="struct futures::sync::mpsc::Sender">Sender</a>&lt;T&gt;<span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = <a class="struct" href="../../futures/sync/mpsc/struct.SendError.html" title="struct futures::sync::mpsc::SendError">SendError</a>&lt;T&gt;;</span></code></li>
  394. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sync/mpsc/mod.rs.html#682-697' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Sink for futures::sync::mpsc::<a class="struct" href="../../futures/sync/mpsc/struct.UnboundedSender.html" title="struct futures::sync::mpsc::UnboundedSender">UnboundedSender</a>&lt;T&gt;<span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = <a class="struct" href="../../futures/sync/mpsc/struct.SendError.html" title="struct futures::sync::mpsc::SendError">SendError</a>&lt;T&gt;;</span></code></li>
  395. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/sync/mpsc/mod.rs.html#699-715' title='goto source code'>[src]</a></div><code>impl&lt;'a, T&gt; Sink for &amp;'a futures::sync::mpsc::<a class="struct" href="../../futures/sync/mpsc/struct.UnboundedSender.html" title="struct futures::sync::mpsc::UnboundedSender">UnboundedSender</a>&lt;T&gt;<span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = <a class="struct" href="../../futures/sync/mpsc/struct.SendError.html" title="struct futures::sync::mpsc::SendError">SendError</a>&lt;T&gt;;</span></code></li>
  396. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/unsync/mpsc.rs.html#90-105' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Sink for futures::unsync::mpsc::<a class="struct" href="../../futures/unsync/mpsc/struct.Sender.html" title="struct futures::unsync::mpsc::Sender">Sender</a>&lt;T&gt;<span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = <a class="struct" href="../../futures/unsync/mpsc/struct.SendError.html" title="struct futures::unsync::mpsc::SendError">SendError</a>&lt;T&gt;;</span></code></li>
  397. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/unsync/mpsc.rs.html#214-227' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Sink for futures::unsync::mpsc::<a class="struct" href="../../futures/unsync/mpsc/struct.UnboundedSender.html" title="struct futures::unsync::mpsc::UnboundedSender">UnboundedSender</a>&lt;T&gt;<span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = <a class="struct" href="../../futures/unsync/mpsc/struct.SendError.html" title="struct futures::unsync::mpsc::SendError">SendError</a>&lt;T&gt;;</span></code></li>
  398. <li><div class='out-of-band'><a class='srclink' href='../../src/futures/unsync/mpsc.rs.html#229-244' title='goto source code'>[src]</a></div><code>impl&lt;'a, T&gt; Sink for &amp;'a futures::unsync::mpsc::<a class="struct" href="../../futures/unsync/mpsc/struct.UnboundedSender.html" title="struct futures::unsync::mpsc::UnboundedSender">UnboundedSender</a>&lt;T&gt;<span class="where fmt-newline"> type <a href='#associatedtype.SinkItem' class="type">SinkItem</a> = T;</span><span class="where fmt-newline"> type <a href='#associatedtype.SinkError' class="type">SinkError</a> = <a class="struct" href="../../futures/unsync/mpsc/struct.SendError.html" title="struct futures::unsync::mpsc::SendError">SendError</a>&lt;T&gt;;</span></code></li>
  399. </ul><script type="text/javascript" async
  400. src="../../implementors/futures/sink/trait.Sink.js">
  401. </script></section>
  402. <section id='search' class="content hidden"></section>
  403. <section class="footer"></section>
  404. <aside id="help" class="hidden">
  405. <div>
  406. <h1 class="hidden">Help</h1>
  407. <div class="shortcuts">
  408. <h2>Keyboard Shortcuts</h2>
  409. <dl>
  410. <dt><kbd>?</kbd></dt>
  411. <dd>Show this help dialog</dd>
  412. <dt><kbd>S</kbd></dt>
  413. <dd>Focus the search field</dd>
  414. <dt><kbd>↑</kbd></dt>
  415. <dd>Move up in search results</dd>
  416. <dt><kbd>↓</kbd></dt>
  417. <dd>Move down in search results</dd>
  418. <dt><kbd>↹</kbd></dt>
  419. <dd>Switch tab</dd>
  420. <dt><kbd>&#9166;</kbd></dt>
  421. <dd>Go to active search result</dd>
  422. <dt><kbd>+</kbd></dt>
  423. <dd>Expand all sections</dd>
  424. <dt><kbd>-</kbd></dt>
  425. <dd>Collapse all sections</dd>
  426. </dl>
  427. </div>
  428. <div class="infos">
  429. <h2>Search Tricks</h2>
  430. <p>
  431. Prefix searches with a type followed by a colon (e.g.
  432. <code>fn:</code>) to restrict the search to a given type.
  433. </p>
  434. <p>
  435. Accepted types are: <code>fn</code>, <code>mod</code>,
  436. <code>struct</code>, <code>enum</code>,
  437. <code>trait</code>, <code>type</code>, <code>macro</code>,
  438. and <code>const</code>.
  439. </p>
  440. <p>
  441. Search functions by type signature (e.g.
  442. <code>vec -> usize</code> or <code>* -> vec</code>)
  443. </p>
  444. </div>
  445. </div>
  446. </aside>
  447. <script>
  448. window.rootPath = "../../";
  449. window.currentCrate = "futures";
  450. </script>
  451. <script src="../../main.js"></script>
  452. <script defer src="../../search-index.js"></script>
  453. </body>
  454. </html>