187 lines
53 KiB
HTML
187 lines
53 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="An extension trait for `Sink`s that provides a variety of convenient combinator functions."><title>SinkExt in futures_util::sink - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="futures_util" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">SinkExt</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../futures_util/index.html">futures_<wbr>util</a><span class="version">0.3.32</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">SinkExt</a></h2><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.buffer" title="buffer">buffer</a></li><li><a href="#method.close" title="close">close</a></li><li><a href="#method.fanout" title="fanout">fanout</a></li><li><a href="#method.feed" title="feed">feed</a></li><li><a href="#method.flush" title="flush">flush</a></li><li><a href="#method.left_sink" title="left_sink">left_sink</a></li><li><a href="#method.poll_close_unpin" title="poll_close_unpin">poll_close_unpin</a></li><li><a href="#method.poll_flush_unpin" title="poll_flush_unpin">poll_flush_unpin</a></li><li><a href="#method.poll_ready_unpin" title="poll_ready_unpin">poll_ready_unpin</a></li><li><a href="#method.right_sink" title="right_sink">right_sink</a></li><li><a href="#method.send" title="send">send</a></li><li><a href="#method.send_all" title="send_all">send_all</a></li><li><a href="#method.sink_err_into" title="sink_err_into">sink_err_into</a></li><li><a href="#method.sink_map_err" title="sink_map_err">sink_map_err</a></li><li><a href="#method.start_send_unpin" title="start_send_unpin">start_send_unpin</a></li><li><a href="#method.with" title="with">with</a></li><li><a href="#method.with_flat_map" title="with_flat_map">with_flat_map</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In futures_<wbr>util::<wbr>sink</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">futures_util</a>::<wbr><a href="index.html">sink</a></div><h1>Trait <span class="trait">SinkExt</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/futures_util/sink/mod.rs.html#65-335">Source</a> </span></div><pre class="rust item-decl"><code>pub trait SinkExt<Item>: <a class="trait" href="trait.Sink.html" title="trait futures_util::sink::Sink">Sink</a><Item> {
|
||
<details class="toggle type-contents-toggle"><summary class="hideme"><span>Show 17 methods</span></summary> // Provided methods
|
||
fn <a href="#method.with" class="fn">with</a><U, Fut, F, E>(self, f: F) -> <a class="struct" href="struct.With.html" title="struct futures_util::sink::With">With</a><Self, Item, U, Fut, F>
|
||
<span class="where">where F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(U) -> Fut,
|
||
Fut: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Item, E>>,
|
||
E: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>>,
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.with_flat_map" class="fn">with_flat_map</a><U, St, F>(self, f: F) -> <a class="struct" href="struct.WithFlatMap.html" title="struct futures_util::sink::WithFlatMap">WithFlatMap</a><Self, Item, U, St, F>
|
||
<span class="where">where F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(U) -> St,
|
||
St: <a class="trait" href="../stream/trait.Stream.html" title="trait futures_util::stream::Stream">Stream</a><Item = <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Item, Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>>>,
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.sink_map_err" class="fn">sink_map_err</a><E, F>(self, f: F) -> <a class="struct" href="struct.SinkMapErr.html" title="struct futures_util::sink::SinkMapErr">SinkMapErr</a><Self, F>
|
||
<span class="where">where F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>) -> E,
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.sink_err_into" class="fn">sink_err_into</a><E>(self) -> <a class="struct" href="struct.SinkErrInto.html" title="struct futures_util::sink::SinkErrInto">SinkErrInto</a><Self, Item, E>
|
||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
|
||
Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><E></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.buffer" class="fn">buffer</a>(self, capacity: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>) -> <a class="struct" href="struct.Buffer.html" title="struct futures_util::sink::Buffer">Buffer</a><Self, Item>
|
||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.close" class="fn">close</a>(&mut self) -> <a class="struct" href="struct.Close.html" title="struct futures_util::sink::Close">Close</a><'_, Self, Item> <a href="#" class="tooltip" data-notable-ty="Close<'_, Self, Item>">ⓘ</a>
|
||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.fanout" class="fn">fanout</a><Si>(self, other: Si) -> <a class="struct" href="struct.Fanout.html" title="struct futures_util::sink::Fanout">Fanout</a><Self, Si>
|
||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
|
||
Item: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,
|
||
Si: <a class="trait" href="trait.Sink.html" title="trait futures_util::sink::Sink">Sink</a><Item, Error = Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.flush" class="fn">flush</a>(&mut self) -> <a class="struct" href="struct.Flush.html" title="struct futures_util::sink::Flush">Flush</a><'_, Self, Item> <a href="#" class="tooltip" data-notable-ty="Flush<'_, Self, Item>">ⓘ</a>
|
||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.send" class="fn">send</a>(&mut self, item: Item) -> <a class="struct" href="struct.Send.html" title="struct futures_util::sink::Send">Send</a><'_, Self, Item> <a href="#" class="tooltip" data-notable-ty="Send<'_, Self, Item>">ⓘ</a>
|
||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.feed" class="fn">feed</a>(&mut self, item: Item) -> <a class="struct" href="struct.Feed.html" title="struct futures_util::sink::Feed">Feed</a><'_, Self, Item> <a href="#" class="tooltip" data-notable-ty="Feed<'_, Self, Item>">ⓘ</a>
|
||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.send_all" class="fn">send_all</a><'a, St>(
|
||
&'a mut self,
|
||
stream: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&'a mut St</a>,
|
||
) -> <a class="struct" href="struct.SendAll.html" title="struct futures_util::sink::SendAll">SendAll</a><'a, Self, St> <a href="#" class="tooltip" data-notable-ty="SendAll<'a, Self, St>">ⓘ</a>
|
||
<span class="where">where St: <a class="trait" href="../stream/trait.TryStream.html" title="trait futures_util::stream::TryStream">TryStream</a><Ok = Item, Error = Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>> + <a class="trait" href="../stream/trait.Stream.html" title="trait futures_util::stream::Stream">Stream</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.left_sink" class="fn">left_sink</a><Si2>(self) -> <a class="enum" href="../future/enum.Either.html" title="enum futures_util::future::Either">Either</a><Self, Si2> <a href="#" class="tooltip" data-notable-ty="Either<Self, Si2>">ⓘ</a>
|
||
<span class="where">where Si2: <a class="trait" href="trait.Sink.html" title="trait futures_util::sink::Sink">Sink</a><Item, Error = Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>>,
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.right_sink" class="fn">right_sink</a><Si1>(self) -> <a class="enum" href="../future/enum.Either.html" title="enum futures_util::future::Either">Either</a><Si1, Self> <a href="#" class="tooltip" data-notable-ty="Either<Si1, Self>">ⓘ</a>
|
||
<span class="where">where Si1: <a class="trait" href="trait.Sink.html" title="trait futures_util::sink::Sink">Sink</a><Item, Error = Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>>,
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.poll_ready_unpin" class="fn">poll_ready_unpin</a>(
|
||
&mut self,
|
||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>>>
|
||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.start_send_unpin" class="fn">start_send_unpin</a>(&mut self, item: Item) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>>
|
||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.poll_flush_unpin" class="fn">poll_flush_unpin</a>(
|
||
&mut self,
|
||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>>>
|
||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.poll_close_unpin" class="fn">poll_close_unpin</a>(
|
||
&mut self,
|
||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>>>
|
||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a></span> { ... }
|
||
</details>}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An extension trait for <code>Sink</code>s that provides a variety of convenient
|
||
combinator functions.</p>
|
||
</div></details><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.with" class="method"><a class="src rightside" href="../../src/futures_util/sink/mod.rs.html#77-85">Source</a><h4 class="code-header">fn <a href="#method.with" class="fn">with</a><U, Fut, F, E>(self, f: F) -> <a class="struct" href="struct.With.html" title="struct futures_util::sink::With">With</a><Self, Item, U, Fut, F><div class="where">where
|
||
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(U) -> Fut,
|
||
Fut: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Item, E>>,
|
||
E: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>>,
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Composes a function <em>in front of</em> the sink.</p>
|
||
<p>This adapter produces a new sink that passes each value through the
|
||
given function <code>f</code> before sending it to <code>self</code>.</p>
|
||
<p>To process each value, <code>f</code> produces a <em>future</em>, which is then polled to
|
||
completion before passing its result down to the underlying sink. If the
|
||
future produces an error, that error is returned by the new sink.</p>
|
||
<p>Note that this function consumes the given sink, returning a wrapped
|
||
version, much like <code>Iterator::map</code>.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.with_flat_map" class="method"><a class="src rightside" href="../../src/futures_util/sink/mod.rs.html#119-126">Source</a><h4 class="code-header">fn <a href="#method.with_flat_map" class="fn">with_flat_map</a><U, St, F>(self, f: F) -> <a class="struct" href="struct.WithFlatMap.html" title="struct futures_util::sink::WithFlatMap">WithFlatMap</a><Self, Item, U, St, F><div class="where">where
|
||
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(U) -> St,
|
||
St: <a class="trait" href="../stream/trait.Stream.html" title="trait futures_util::stream::Stream">Stream</a><Item = <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Item, Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>>>,
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Composes a function <em>in front of</em> the sink.</p>
|
||
<p>This adapter produces a new sink that passes each value through the
|
||
given function <code>f</code> before sending it to <code>self</code>.</p>
|
||
<p>To process each value, <code>f</code> produces a <em>stream</em>, of which each value
|
||
is passed to the underlying sink. A new value will not be accepted until
|
||
the stream has been drained</p>
|
||
<p>Note that this function consumes the given sink, returning a wrapped
|
||
version, much like <code>Iterator::flat_map</code>.</p>
|
||
<h5 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>futures::channel::mpsc;
|
||
<span class="kw">use </span>futures::sink::SinkExt;
|
||
<span class="kw">use </span>futures::stream::{<span class="self">self</span>, StreamExt};
|
||
|
||
<span class="kw">let </span>(tx, rx) = mpsc::channel(<span class="number">5</span>);
|
||
|
||
<span class="kw">let </span><span class="kw-2">mut </span>tx = tx.with_flat_map(|x| {
|
||
stream::iter(<span class="macro">vec!</span>[<span class="prelude-val">Ok</span>(<span class="number">42</span>); x])
|
||
});
|
||
|
||
tx.send(<span class="number">5</span>).<span class="kw">await</span>.unwrap();
|
||
drop(tx);
|
||
<span class="kw">let </span>received: Vec<i32> = rx.collect().<span class="kw">await</span>;
|
||
<span class="macro">assert_eq!</span>(received, <span class="macro">vec!</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>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.sink_map_err" class="method"><a class="src rightside" href="../../src/futures_util/sink/mod.rs.html#143-149">Source</a><h4 class="code-header">fn <a href="#method.sink_map_err" class="fn">sink_map_err</a><E, F>(self, f: F) -> <a class="struct" href="struct.SinkMapErr.html" title="struct futures_util::sink::SinkMapErr">SinkMapErr</a><Self, F><div class="where">where
|
||
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>) -> E,
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Transforms the error returned by the sink.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.sink_err_into" class="method"><a class="src rightside" href="../../src/futures_util/sink/mod.rs.html#154-160">Source</a><h4 class="code-header">fn <a href="#method.sink_err_into" class="fn">sink_err_into</a><E>(self) -> <a class="struct" href="struct.SinkErrInto.html" title="struct futures_util::sink::SinkErrInto">SinkErrInto</a><Self, Item, E><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
|
||
Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><E>,</div></h4></section></summary><div class="docblock"><p>Map this sink’s error to a different error type using the <code>Into</code> trait.</p>
|
||
<p>If wanting to map errors of a <code>Sink + Stream</code>, use <code>.sink_err_into().err_into()</code>.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.buffer" class="method"><a class="src rightside" href="../../src/futures_util/sink/mod.rs.html#175-180">Source</a><h4 class="code-header">fn <a href="#method.buffer" class="fn">buffer</a>(self, capacity: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>) -> <a class="struct" href="struct.Buffer.html" title="struct futures_util::sink::Buffer">Buffer</a><Self, Item><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Adds a fixed-size buffer to the current sink.</p>
|
||
<p>The resulting sink will buffer up to <code>capacity</code> items when the
|
||
underlying sink is unwilling to accept additional items. Calling <code>flush</code>
|
||
on the buffered sink will attempt to both empty the buffer and complete
|
||
processing on the underlying sink.</p>
|
||
<p>Note that this function consumes the given sink, returning a wrapped
|
||
version, much like <code>Iterator::map</code>.</p>
|
||
<p>This method is only available when the <code>std</code> or <code>alloc</code> feature of this
|
||
library is activated, and it is activated by default.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.close" class="method"><a class="src rightside" href="../../src/futures_util/sink/mod.rs.html#183-188">Source</a><h4 class="code-header">fn <a href="#method.close" class="fn">close</a>(&mut self) -> <a class="struct" href="struct.Close.html" title="struct futures_util::sink::Close">Close</a><'_, Self, Item> <a href="#" class="tooltip" data-notable-ty="Close<'_, Self, Item>">ⓘ</a><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class="docblock"><p>Close the sink.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.fanout" class="method"><a class="src rightside" href="../../src/futures_util/sink/mod.rs.html#194-201">Source</a><h4 class="code-header">fn <a href="#method.fanout" class="fn">fanout</a><Si>(self, other: Si) -> <a class="struct" href="struct.Fanout.html" title="struct futures_util::sink::Fanout">Fanout</a><Self, Si><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
|
||
Item: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,
|
||
Si: <a class="trait" href="trait.Sink.html" title="trait futures_util::sink::Sink">Sink</a><Item, Error = Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>>,</div></h4></section></summary><div class="docblock"><p>Fanout items to multiple sinks.</p>
|
||
<p>This adapter clones each incoming item and forwards it to both this as well as
|
||
the other sink at the same time.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.flush" class="method"><a class="src rightside" href="../../src/futures_util/sink/mod.rs.html#207-212">Source</a><h4 class="code-header">fn <a href="#method.flush" class="fn">flush</a>(&mut self) -> <a class="struct" href="struct.Flush.html" title="struct futures_util::sink::Flush">Flush</a><'_, Self, Item> <a href="#" class="tooltip" data-notable-ty="Flush<'_, Self, Item>">ⓘ</a><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class="docblock"><p>Flush the sink, processing all pending items.</p>
|
||
<p>This adapter is intended to be used when you want to stop sending to the sink
|
||
until all current requests are processed.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.send" class="method"><a class="src rightside" href="../../src/futures_util/sink/mod.rs.html#220-225">Source</a><h4 class="code-header">fn <a href="#method.send" class="fn">send</a>(&mut self, item: Item) -> <a class="struct" href="struct.Send.html" title="struct futures_util::sink::Send">Send</a><'_, Self, Item> <a href="#" class="tooltip" data-notable-ty="Send<'_, Self, Item>">ⓘ</a><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class="docblock"><p>A future that completes after the given item has been fully processed
|
||
into the sink, including flushing.</p>
|
||
<p>Note that, <strong>because of the flushing requirement, it is usually better
|
||
to batch together items to send via <code>feed</code> or <code>send_all</code>,
|
||
rather than flushing between each item.</strong></p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.feed" class="method"><a class="src rightside" href="../../src/futures_util/sink/mod.rs.html#233-238">Source</a><h4 class="code-header">fn <a href="#method.feed" class="fn">feed</a>(&mut self, item: Item) -> <a class="struct" href="struct.Feed.html" title="struct futures_util::sink::Feed">Feed</a><'_, Self, Item> <a href="#" class="tooltip" data-notable-ty="Feed<'_, Self, Item>">ⓘ</a><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class="docblock"><p>A future that completes after the given item has been received
|
||
by the sink.</p>
|
||
<p>Unlike <code>send</code>, the returned future does not flush the sink.
|
||
It is the caller’s responsibility to ensure all pending items
|
||
are processed, which can be done via <code>flush</code> or <code>close</code>.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.send_all" class="method"><a class="src rightside" href="../../src/futures_util/sink/mod.rs.html#252-261">Source</a><h4 class="code-header">fn <a href="#method.send_all" class="fn">send_all</a><'a, St>(&'a mut self, stream: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&'a mut St</a>) -> <a class="struct" href="struct.SendAll.html" title="struct futures_util::sink::SendAll">SendAll</a><'a, Self, St> <a href="#" class="tooltip" data-notable-ty="SendAll<'a, Self, St>">ⓘ</a><div class="where">where
|
||
St: <a class="trait" href="../stream/trait.TryStream.html" title="trait futures_util::stream::TryStream">TryStream</a><Ok = Item, Error = Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>> + <a class="trait" href="../stream/trait.Stream.html" title="trait futures_util::stream::Stream">Stream</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class="docblock"><p>A future that completes after the given stream has been fully processed
|
||
into the sink, including flushing.</p>
|
||
<p>This future will drive the stream to keep producing items until it is
|
||
exhausted, sending each item to the sink. It will complete once both the
|
||
stream is exhausted, the sink has received all items, and the sink has
|
||
been flushed. Note that the sink is <strong>not</strong> closed. If the stream produces
|
||
an error, that error will be returned by this future without flushing the sink.</p>
|
||
<p>Doing <code>sink.send_all(stream)</code> is roughly equivalent to
|
||
<code>stream.forward(sink)</code>. The returned future will exhaust all items from
|
||
<code>stream</code> and send them to <code>self</code>.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.left_sink" class="method"><a class="src rightside" href="../../src/futures_util/sink/mod.rs.html#268-274">Source</a><h4 class="code-header">fn <a href="#method.left_sink" class="fn">left_sink</a><Si2>(self) -> <a class="enum" href="../future/enum.Either.html" title="enum futures_util::future::Either">Either</a><Self, Si2> <a href="#" class="tooltip" data-notable-ty="Either<Self, Si2>">ⓘ</a><div class="where">where
|
||
Si2: <a class="trait" href="trait.Sink.html" title="trait futures_util::sink::Sink">Sink</a><Item, Error = Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>>,
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Wrap this sink in an <code>Either</code> sink, making it the left-hand variant
|
||
of that <code>Either</code>.</p>
|
||
<p>This can be used in combination with the <code>right_sink</code> method to write <code>if</code>
|
||
statements that evaluate to different streams in different branches.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.right_sink" class="method"><a class="src rightside" href="../../src/futures_util/sink/mod.rs.html#281-287">Source</a><h4 class="code-header">fn <a href="#method.right_sink" class="fn">right_sink</a><Si1>(self) -> <a class="enum" href="../future/enum.Either.html" title="enum futures_util::future::Either">Either</a><Si1, Self> <a href="#" class="tooltip" data-notable-ty="Either<Si1, Self>">ⓘ</a><div class="where">where
|
||
Si1: <a class="trait" href="trait.Sink.html" title="trait futures_util::sink::Sink">Sink</a><Item, Error = Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>>,
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Wrap this stream in an <code>Either</code> stream, making it the right-hand variant
|
||
of that <code>Either</code>.</p>
|
||
<p>This can be used in combination with the <code>left_sink</code> method to write <code>if</code>
|
||
statements that evaluate to different streams in different branches.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.poll_ready_unpin" class="method"><a class="src rightside" href="../../src/futures_util/sink/mod.rs.html#302-307">Source</a><h4 class="code-header">fn <a href="#method.poll_ready_unpin" class="fn">poll_ready_unpin</a>(
|
||
&mut self,
|
||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>>><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class="docblock"><p>A convenience method for calling <a href="trait.Sink.html#tymethod.poll_ready" title="method futures_util::sink::Sink::poll_ready"><code>Sink::poll_ready</code></a> on <a href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin"><code>Unpin</code></a>
|
||
sink types.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.start_send_unpin" class="method"><a class="src rightside" href="../../src/futures_util/sink/mod.rs.html#311-316">Source</a><h4 class="code-header">fn <a href="#method.start_send_unpin" class="fn">start_send_unpin</a>(&mut self, item: Item) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class="docblock"><p>A convenience method for calling <a href="trait.Sink.html#tymethod.start_send" title="method futures_util::sink::Sink::start_send"><code>Sink::start_send</code></a> on <a href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin"><code>Unpin</code></a>
|
||
sink types.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.poll_flush_unpin" class="method"><a class="src rightside" href="../../src/futures_util/sink/mod.rs.html#320-325">Source</a><h4 class="code-header">fn <a href="#method.poll_flush_unpin" class="fn">poll_flush_unpin</a>(
|
||
&mut self,
|
||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>>><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class="docblock"><p>A convenience method for calling <a href="trait.Sink.html#tymethod.poll_flush" title="method futures_util::sink::Sink::poll_flush"><code>Sink::poll_flush</code></a> on <a href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin"><code>Unpin</code></a>
|
||
sink types.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.poll_close_unpin" class="method"><a class="src rightside" href="../../src/futures_util/sink/mod.rs.html#329-334">Source</a><h4 class="code-header">fn <a href="#method.poll_close_unpin" class="fn">poll_close_unpin</a>(
|
||
&mut self,
|
||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, Self::<a class="associatedtype" href="trait.Sink.html#associatedtype.Error" title="type futures_util::sink::Sink::Error">Error</a>>><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class="docblock"><p>A convenience method for calling <a href="trait.Sink.html#tymethod.poll_close" title="method futures_util::sink::Sink::poll_close"><code>Sink::poll_close</code></a> on <a href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin"><code>Unpin</code></a>
|
||
sink types.</p>
|
||
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.93.1/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-SinkExt%3CItem%3E-for-T" class="impl"><a class="src rightside" href="../../src/futures_util/sink/mod.rs.html#61">Source</a><a href="#impl-SinkExt%3CItem%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, Item> <a class="trait" href="trait.SinkExt.html" title="trait futures_util::sink::SinkExt">SinkExt</a><Item> for T<div class="where">where
|
||
T: <a class="trait" href="trait.Sink.html" title="trait futures_util::sink::Sink">Sink</a><Item> + ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></div><script src="../../trait.impl/futures_util/sink/trait.SinkExt.js" async></script><script type="text/json" id="notable-traits-data">{"Close<'_, Self, Item>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.Close.html\" title=\"struct futures_util::sink::Close\">Close</a><'_, Si, Item></code></h3><pre><code><div class=\"where\">impl<Si: <a class=\"trait\" href=\"trait.Sink.html\" title=\"trait futures_util::sink::Sink\">Sink</a><Item> + <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> + ?<a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html\" title=\"trait core::marker::Sized\">Sized</a>, Item> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html\" title=\"trait core::future::future::Future\">Future</a> for <a class=\"struct\" href=\"struct.Close.html\" title=\"struct futures_util::sink::Close\">Close</a><'_, Si, Item></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"enum\" href=\"https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.93.1/std/primitive.unit.html\">()</a>, Si::<a class=\"associatedtype\" href=\"trait.Sink.html#associatedtype.Error\" title=\"type futures_util::sink::Sink::Error\">Error</a>>;</div>","Either<Self, Si2>":"<h3>Notable traits for <code><a class=\"enum\" href=\"../future/enum.Either.html\" title=\"enum futures_util::future::Either\">Either</a><A, B></code></h3><pre><code><div class=\"where\">impl<A, B> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html\" title=\"trait core::future::future::Future\">Future</a> for <a class=\"enum\" href=\"../future/enum.Either.html\" title=\"enum futures_util::future::Either\">Either</a><A, B><div class=\"where\">where\n A: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html\" title=\"trait core::future::future::Future\">Future</a>,\n B: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html\" title=\"trait core::future::future::Future\">Future</a><Output = A::<a class=\"associatedtype\" href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html#associatedtype.Output\" title=\"type core::future::future::Future::Output\">Output</a>>,</div></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = A::<a class=\"associatedtype\" href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html#associatedtype.Output\" title=\"type core::future::future::Future::Output\">Output</a>;</div>","Either<Si1, Self>":"<h3>Notable traits for <code><a class=\"enum\" href=\"../future/enum.Either.html\" title=\"enum futures_util::future::Either\">Either</a><A, B></code></h3><pre><code><div class=\"where\">impl<A, B> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html\" title=\"trait core::future::future::Future\">Future</a> for <a class=\"enum\" href=\"../future/enum.Either.html\" title=\"enum futures_util::future::Either\">Either</a><A, B><div class=\"where\">where\n A: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html\" title=\"trait core::future::future::Future\">Future</a>,\n B: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html\" title=\"trait core::future::future::Future\">Future</a><Output = A::<a class=\"associatedtype\" href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html#associatedtype.Output\" title=\"type core::future::future::Future::Output\">Output</a>>,</div></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = A::<a class=\"associatedtype\" href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html#associatedtype.Output\" title=\"type core::future::future::Future::Output\">Output</a>;</div>","Feed<'_, Self, Item>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.Feed.html\" title=\"struct futures_util::sink::Feed\">Feed</a><'_, Si, Item></code></h3><pre><code><div class=\"where\">impl<Si: <a class=\"trait\" href=\"trait.Sink.html\" title=\"trait futures_util::sink::Sink\">Sink</a><Item> + <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> + ?<a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html\" title=\"trait core::marker::Sized\">Sized</a>, Item> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html\" title=\"trait core::future::future::Future\">Future</a> for <a class=\"struct\" href=\"struct.Feed.html\" title=\"struct futures_util::sink::Feed\">Feed</a><'_, Si, Item></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"enum\" href=\"https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.93.1/std/primitive.unit.html\">()</a>, Si::<a class=\"associatedtype\" href=\"trait.Sink.html#associatedtype.Error\" title=\"type futures_util::sink::Sink::Error\">Error</a>>;</div>","Flush<'_, Self, Item>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.Flush.html\" title=\"struct futures_util::sink::Flush\">Flush</a><'_, Si, Item></code></h3><pre><code><div class=\"where\">impl<Si: <a class=\"trait\" href=\"trait.Sink.html\" title=\"trait futures_util::sink::Sink\">Sink</a><Item> + <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> + ?<a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html\" title=\"trait core::marker::Sized\">Sized</a>, Item> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html\" title=\"trait core::future::future::Future\">Future</a> for <a class=\"struct\" href=\"struct.Flush.html\" title=\"struct futures_util::sink::Flush\">Flush</a><'_, Si, Item></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"enum\" href=\"https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.93.1/std/primitive.unit.html\">()</a>, Si::<a class=\"associatedtype\" href=\"trait.Sink.html#associatedtype.Error\" title=\"type futures_util::sink::Sink::Error\">Error</a>>;</div>","Send<'_, Self, Item>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.Send.html\" title=\"struct futures_util::sink::Send\">Send</a><'_, Si, Item></code></h3><pre><code><div class=\"where\">impl<Si: <a class=\"trait\" href=\"trait.Sink.html\" title=\"trait futures_util::sink::Sink\">Sink</a><Item> + <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> + ?<a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html\" title=\"trait core::marker::Sized\">Sized</a>, Item> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html\" title=\"trait core::future::future::Future\">Future</a> for <a class=\"struct\" href=\"struct.Send.html\" title=\"struct futures_util::sink::Send\">Send</a><'_, Si, Item></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"enum\" href=\"https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.93.1/std/primitive.unit.html\">()</a>, Si::<a class=\"associatedtype\" href=\"trait.Sink.html#associatedtype.Error\" title=\"type futures_util::sink::Sink::Error\">Error</a>>;</div>","SendAll<'a, Self, St>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.SendAll.html\" title=\"struct futures_util::sink::SendAll\">SendAll</a><'_, Si, St></code></h3><pre><code><div class=\"where\">impl<Si, St, Ok, Error> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html\" title=\"trait core::future::future::Future\">Future</a> for <a class=\"struct\" href=\"struct.SendAll.html\" title=\"struct futures_util::sink::SendAll\">SendAll</a><'_, Si, St><div class=\"where\">where\n Si: <a class=\"trait\" href=\"trait.Sink.html\" title=\"trait futures_util::sink::Sink\">Sink</a><Ok, Error = Error> + <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> + ?<a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html\" title=\"trait core::marker::Sized\">Sized</a>,\n St: <a class=\"trait\" href=\"../stream/trait.Stream.html\" title=\"trait futures_util::stream::Stream\">Stream</a><Item = <a class=\"enum\" href=\"https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><Ok, Error>> + <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> + ?<a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html\" title=\"trait core::marker::Sized\">Sized</a>,</div></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.93.1/core/future/future/trait.Future.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"enum\" href=\"https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.93.1/std/primitive.unit.html\">()</a>, Error>;</div>"}</script></section></div></main></body></html> |