Auto Generated Documentation

This commit is contained in:
github-actions[bot]
2021-04-10 20:17:59 +00:00
parent cdef276097
commit c5868e0e20
3080 changed files with 38772 additions and 18286 deletions
@@ -3,20 +3,24 @@
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../futures_channel/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct UnboundedReceiver</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.close">close</a><a href="#method.try_next">try_next</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Drop">Drop</a><a href="#impl-FusedStream">FusedStream</a><a href="#impl-Stream">Stream</a><a href="#impl-Unpin">Unpin</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-TryStream">TryStream</a></div></div><p class="location"><a href="../index.html">futures_channel</a>::<wbr><a href="index.html">mpsc</a></p><div id="sidebar-vars" data-name="UnboundedReceiver" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">futures_channel</a>::<wbr><a href="index.html">mpsc</a>::<wbr><a class="struct" href="">UnboundedReceiver</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/futures_channel/mpsc/mod.rs.html#149-151" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct UnboundedReceiver&lt;T&gt; { /* fields omitted */ }</pre></div><div class="docblock"><p>The receiving end of an unbounded mpsc channel.</p>
<p>This value is created by the <a href="../../futures_channel/mpsc/fn.unbounded.html"><code>unbounded</code></a> function.</p>
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl&lt;T&gt; <a class="struct" href="../../futures_channel/mpsc/struct.UnboundedReceiver.html" title="struct futures_channel::mpsc::UnboundedReceiver">UnboundedReceiver</a>&lt;T&gt;</code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/futures_channel/mpsc/mod.rs.html#1155-1222" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.close" class="method"><code>pub fn <a href="#method.close" class="fnname">close</a>(&amp;mut self)</code><a class="srclink" href="../../src/futures_channel/mpsc/mod.rs.html#1160-1164" title="goto source code">[src]</a></h4><div class="docblock"><p>Closes the receiving half of a channel, without dropping it.</p>
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl&lt;T&gt; <a class="struct" href="../../futures_channel/mpsc/struct.UnboundedReceiver.html" title="struct futures_channel::mpsc::UnboundedReceiver">UnboundedReceiver</a>&lt;T&gt;</code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/futures_channel/mpsc/mod.rs.html#1160-1232" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.close" class="method"><code>pub fn <a href="#method.close" class="fnname">close</a>(&amp;mut self)</code><a class="srclink" href="../../src/futures_channel/mpsc/mod.rs.html#1165-1169" title="goto source code">[src]</a></h4><div class="docblock"><p>Closes the receiving half of a channel, without dropping it.</p>
<p>This prevents any further messages from being sent on the channel while
still enabling the receiver to drain messages that are buffered.</p>
</div><h4 id="method.try_next" class="method"><code>pub fn <a href="#method.try_next" class="fnname">try_next</a>(&amp;mut self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;T&gt;, <a class="struct" href="../../futures_channel/mpsc/struct.TryRecvError.html" title="struct futures_channel::mpsc::TryRecvError">TryRecvError</a>&gt;</code><a class="srclink" href="../../src/futures_channel/mpsc/mod.rs.html#1174-1181" title="goto source code">[src]</a></h4><div class="docblock"><p>Tries to receive the next message without notifying a context if empty.</p>
</div><h4 id="method.try_next" class="method"><code>pub fn <a href="#method.try_next" class="fnname">try_next</a>(&amp;mut self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;T&gt;, <a class="struct" href="../../futures_channel/mpsc/struct.TryRecvError.html" title="struct futures_channel::mpsc::TryRecvError">TryRecvError</a>&gt;</code><a class="srclink" href="../../src/futures_channel/mpsc/mod.rs.html#1181-1188" title="goto source code">[src]</a></h4><div class="docblock"><p>Tries to receive the next message without notifying a context if empty.</p>
<p>It is not recommended to call this function from inside of a future,
only when you've otherwise arranged to be notified when the channel is
no longer empty.</p>
<p>This function will panic if called after <code>try_next</code> or <code>poll_next</code> has
returned <code>None</code>.</p>
<p>This function returns:</p>
<ul>
<li><code>Ok(Some(t))</code> when message is fetched</li>
<li><code>Ok(None)</code> when channel is closed and no messages left in the queue</li>
<li><code>Err(e)</code> when there are no messages available, but channel is not yet closed</li>
</ul>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Debug" class="impl"><code class="in-band">impl&lt;T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../futures_channel/mpsc/struct.UnboundedReceiver.html" title="struct futures_channel::mpsc::UnboundedReceiver">UnboundedReceiver</a>&lt;T&gt;</code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/futures_channel/mpsc/mod.rs.html#148" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/futures_channel/mpsc/mod.rs.html#148" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id="impl-Drop" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html" title="trait core::ops::drop::Drop">Drop</a> for <a class="struct" href="../../futures_channel/mpsc/struct.UnboundedReceiver.html" title="struct futures_channel::mpsc::UnboundedReceiver">UnboundedReceiver</a>&lt;T&gt;</code><a href="#impl-Drop" class="anchor"></a><a class="srclink" href="../../src/futures_channel/mpsc/mod.rs.html#1257-1285" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.drop" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop" class="fnname">drop</a>(&amp;mut self)</code><a class="srclink" href="../../src/futures_channel/mpsc/mod.rs.html#1258-1284" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Executes the destructor for this type. <a href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop">Read more</a></p>
</div></div><h3 id="impl-FusedStream" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="../../futures_core/stream/trait.FusedStream.html" title="trait futures_core::stream::FusedStream">FusedStream</a> for <a class="struct" href="../../futures_channel/mpsc/struct.UnboundedReceiver.html" title="struct futures_channel::mpsc::UnboundedReceiver">UnboundedReceiver</a>&lt;T&gt;</code><a href="#impl-FusedStream" class="anchor"></a><a class="srclink" href="../../src/futures_channel/mpsc/mod.rs.html#1224-1228" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.is_terminated" class="method hidden"><code>fn <a href="../../futures_core/stream/trait.FusedStream.html#tymethod.is_terminated" class="fnname">is_terminated</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/futures_channel/mpsc/mod.rs.html#1225-1227" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns <code>true</code> if the stream should no longer be polled.</p>
</div></div><h3 id="impl-Stream" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="../../futures_core/stream/trait.Stream.html" title="trait futures_core::stream::Stream">Stream</a> for <a class="struct" href="../../futures_channel/mpsc/struct.UnboundedReceiver.html" title="struct futures_channel::mpsc::UnboundedReceiver">UnboundedReceiver</a>&lt;T&gt;</code><a href="#impl-Stream" class="anchor"></a><a class="srclink" href="../../src/futures_channel/mpsc/mod.rs.html#1230-1255" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Item" class="type"><code>type <a href="../../futures_core/stream/trait.Stream.html#associatedtype.Item" class="type">Item</a> = T</code></h4><div class='docblock'><p>Values yielded by the stream.</p>
</div><h4 id="method.poll_next" class="method hidden"><code>fn <a href="../../futures_core/stream/trait.Stream.html#tymethod.poll_next" class="fnname">poll_next</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self&gt;, cx: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a>&lt;'_&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;T&gt;&gt;</code><a class="srclink" href="../../src/futures_channel/mpsc/mod.rs.html#1233-1254" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Attempt to pull out the next value of this stream, registering the
</div></div><h3 id="impl-Drop" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html" title="trait core::ops::drop::Drop">Drop</a> for <a class="struct" href="../../futures_channel/mpsc/struct.UnboundedReceiver.html" title="struct futures_channel::mpsc::UnboundedReceiver">UnboundedReceiver</a>&lt;T&gt;</code><a href="#impl-Drop" class="anchor"></a><a class="srclink" href="../../src/futures_channel/mpsc/mod.rs.html#1267-1295" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.drop" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop" class="fnname">drop</a>(&amp;mut self)</code><a class="srclink" href="../../src/futures_channel/mpsc/mod.rs.html#1268-1294" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Executes the destructor for this type. <a href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop">Read more</a></p>
</div></div><h3 id="impl-FusedStream" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="../../futures_core/stream/trait.FusedStream.html" title="trait futures_core::stream::FusedStream">FusedStream</a> for <a class="struct" href="../../futures_channel/mpsc/struct.UnboundedReceiver.html" title="struct futures_channel::mpsc::UnboundedReceiver">UnboundedReceiver</a>&lt;T&gt;</code><a href="#impl-FusedStream" class="anchor"></a><a class="srclink" href="../../src/futures_channel/mpsc/mod.rs.html#1234-1238" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.is_terminated" class="method hidden"><code>fn <a href="../../futures_core/stream/trait.FusedStream.html#tymethod.is_terminated" class="fnname">is_terminated</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/futures_channel/mpsc/mod.rs.html#1235-1237" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns <code>true</code> if the stream should no longer be polled.</p>
</div></div><h3 id="impl-Stream" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="../../futures_core/stream/trait.Stream.html" title="trait futures_core::stream::Stream">Stream</a> for <a class="struct" href="../../futures_channel/mpsc/struct.UnboundedReceiver.html" title="struct futures_channel::mpsc::UnboundedReceiver">UnboundedReceiver</a>&lt;T&gt;</code><a href="#impl-Stream" class="anchor"></a><a class="srclink" href="../../src/futures_channel/mpsc/mod.rs.html#1240-1265" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Item" class="type"><code>type <a href="../../futures_core/stream/trait.Stream.html#associatedtype.Item" class="type">Item</a> = T</code></h4><div class='docblock'><p>Values yielded by the stream.</p>
</div><h4 id="method.poll_next" class="method hidden"><code>fn <a href="../../futures_core/stream/trait.Stream.html#tymethod.poll_next" class="fnname">poll_next</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self&gt;, cx: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a>&lt;'_&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;T&gt;&gt;</code><a class="srclink" href="../../src/futures_channel/mpsc/mod.rs.html#1243-1264" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Attempt to pull out the next value of this stream, registering the
current task for wakeup if the value is not yet available, and returning
<code>None</code> if the stream is exhausted. <a href="../../futures_core/stream/trait.Stream.html#tymethod.poll_next">Read more</a></p>
</div><h4 id="method.size_hint" class="method hidden"><code>pub fn <a href="../../futures_core/stream/trait.Stream.html#method.size_hint" class="fnname">size_hint</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class="srclink" href="../../src/futures_core/stream.rs.html#98" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the bounds on the remaining length of the stream. <a href="../../futures_core/stream/trait.Stream.html#method.size_hint">Read more</a></p>