blob: 94b372a12718a813278f0ddd289c61d933b31444 [file] [log] [blame]
<!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="Asynchronous sinks."><meta name="keywords" content="rust, rustlang, rust-lang, sink"><title>futures_util::sink - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../futures_util/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../futures_util/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Module sink</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Module <a href="../index.html">futures_util</a>::<wbr><a class="mod" href="#">sink</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/futures_util/sink/mod.rs.html#1-344">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Asynchronous sinks.</p>
<p>This module contains:</p>
<ul>
<li>The <a href="trait.Sink.html" title="Sink"><code>Sink</code></a> trait, which allows you to asynchronously write data.</li>
<li>The <a href="trait.SinkExt.html" title="SinkExt"><code>SinkExt</code></a> trait, which provides adapters for chaining and composing
sinks.</li>
</ul>
</div></details><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Buffer.html" title="futures_util::sink::Buffer struct">Buffer</a></div><div class="item-right docblock-short">Sink for the <a href="trait.SinkExt.html#method.buffer"><code>buffer</code></a> method.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Close.html" title="futures_util::sink::Close struct">Close</a></div><div class="item-right docblock-short">Future for the <a href="trait.SinkExt.html#method.close"><code>close</code></a> method.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Drain.html" title="futures_util::sink::Drain struct">Drain</a></div><div class="item-right docblock-short">Sink for the <a href="fn.drain.html" title="drain"><code>drain</code></a> function.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Fanout.html" title="futures_util::sink::Fanout struct">Fanout</a></div><div class="item-right docblock-short">Sink that clones incoming items and forwards them to two sinks at the same time.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Feed.html" title="futures_util::sink::Feed struct">Feed</a></div><div class="item-right docblock-short">Future for the <a href="trait.SinkExt.html#method.feed"><code>feed</code></a> method.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Flush.html" title="futures_util::sink::Flush struct">Flush</a></div><div class="item-right docblock-short">Future for the <a href="trait.SinkExt.html#method.flush"><code>flush</code></a> method.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Send.html" title="futures_util::sink::Send struct">Send</a></div><div class="item-right docblock-short">Future for the <a href="trait.SinkExt.html#method.send"><code>send</code></a> method.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SendAll.html" title="futures_util::sink::SendAll struct">SendAll</a></div><div class="item-right docblock-short">Future for the <a href="trait.SinkExt.html#method.send_all"><code>send_all</code></a> method.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SinkErrInto.html" title="futures_util::sink::SinkErrInto struct">SinkErrInto</a></div><div class="item-right docblock-short">Sink for the <a href="trait.SinkExt.html#method.sink_err_into"><code>sink_err_into</code></a> method.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SinkMapErr.html" title="futures_util::sink::SinkMapErr struct">SinkMapErr</a></div><div class="item-right docblock-short">Sink for the <a href="trait.SinkExt.html#method.sink_map_err"><code>sink_map_err</code></a> method.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Unfold.html" title="futures_util::sink::Unfold struct">Unfold</a></div><div class="item-right docblock-short">Sink for the <a href="fn.unfold.html" title="unfold"><code>unfold</code></a> function.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.With.html" title="futures_util::sink::With struct">With</a></div><div class="item-right docblock-short">Sink for the <a href="trait.SinkExt.html#method.with"><code>with</code></a> method.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.WithFlatMap.html" title="futures_util::sink::WithFlatMap struct">WithFlatMap</a></div><div class="item-right docblock-short">Sink for the <a href="trait.SinkExt.html#method.with_flat_map"><code>with_flat_map</code></a> method.</div></div></div><h2 id="traits" class="small-section-header"><a href="#traits">Traits</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.Sink.html" title="futures_util::sink::Sink trait">Sink</a></div><div class="item-right docblock-short">A <code>Sink</code> is a value into which other values can be sent, asynchronously.</div></div><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.SinkExt.html" title="futures_util::sink::SinkExt trait">SinkExt</a></div><div class="item-right docblock-short">An extension trait for <code>Sink</code>s that provides a variety of convenient
combinator functions.</div></div></div><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.drain.html" title="futures_util::sink::drain fn">drain</a></div><div class="item-right docblock-short">Create a sink that will just discard all items given to it.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.unfold.html" title="futures_util::sink::unfold fn">unfold</a></div><div class="item-right docblock-short">Create a sink from a function which processes one item at a time.</div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures_util" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html>