1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-08-29 02:47:48 +02:00

Deploying to gh-pages from @ actix/actix-extras@6b04450703 🚀

This commit is contained in:
github-merge-queue[bot]
2024-05-13 16:54:55 +00:00
parent d57d78c8ae
commit 66afb9e19c
15 changed files with 170 additions and 33 deletions

View File

@@ -1,11 +1,11 @@
<!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="A stream of Messages from a websocket client"><title>MessageStream in actix_ws - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="actix_ws" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (ef0027897 2024-05-12)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc struct"><!--[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" title="show sidebar"></button><a class="logo-container" href="../actix_ws/index.html"><img src="https://actix.rs/img/logo.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../actix_ws/index.html"><img src="https://actix.rs/img/logo.png" alt="logo"></a><h2><a href="../actix_ws/index.html">actix_ws</a><span class="version">0.2.0</span></h2></div><h2 class="location"><a href="#">MessageStream</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.recv">recv</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Stream-for-MessageStream">Stream</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-MessageStream">!RefUnwindSafe</a></li><li><a href="#impl-Send-for-MessageStream">!Send</a></li><li><a href="#impl-Sync-for-MessageStream">!Sync</a></li><li><a href="#impl-UnwindSafe-for-MessageStream">!UnwindSafe</a></li><li><a href="#impl-Freeze-for-MessageStream">Freeze</a></li><li><a href="#impl-Unpin-for-MessageStream">Unpin</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-From%3CT%3E-for-T">From&lt;T&gt;</a></li><li><a href="#impl-Instrument-for-T">Instrument</a></li><li><a href="#impl-Into%3CU%3E-for-T">Into&lt;U&gt;</a></li><li><a href="#impl-Same-for-T">Same</a></li><li><a href="#impl-StreamExt-for-T">StreamExt</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto&lt;U&gt;</a></li><li><a href="#impl-TryStream-for-S">TryStream</a></li><li><a href="#impl-TryStreamExt-for-S">TryStreamExt</a></li><li><a href="#impl-VZip%3CV%3E-for-T">VZip&lt;V&gt;</a></li><li><a href="#impl-WithSubscriber-for-T">WithSubscriber</a></li></ul></section><h2><a href="index.html">In crate actix_ws</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="index.html">actix_ws</a>::<wbr><a class="struct" href="#">MessageStream</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../src/actix_ws/fut.rs.html#34-41">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub struct MessageStream { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A stream of Messages from a websocket client</p>
<p>Messages can be accessed via the streams <code>.next()</code> method</p>
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-MessageStream" class="impl"><a class="src rightside" href="../src/actix_ws/fut.rs.html#55-76">source</a><a href="#impl-MessageStream" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.MessageStream.html" title="struct actix_ws::MessageStream">MessageStream</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.recv" class="method"><a class="src rightside" href="../src/actix_ws/fut.rs.html#73-75">source</a><h4 class="code-header">pub async fn <a href="#method.recv" class="fn">recv</a>(&amp;mut self) -&gt; <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="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="enum.Message.html" title="enum actix_ws::Message">Message</a>, <a class="enum" href="enum.ProtocolError.html" title="enum actix_ws::ProtocolError">ProtocolError</a>&gt;&gt;</h4></section></summary><div class="docblock"><p>Wait for the next item from the message stream</p>
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-MessageStream" class="impl"><a class="src rightside" href="../src/actix_ws/fut.rs.html#55-79">source</a><a href="#impl-MessageStream" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.MessageStream.html" title="struct actix_ws::MessageStream">MessageStream</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.recv" class="method"><a class="src rightside" href="../src/actix_ws/fut.rs.html#76-78">source</a><h4 class="code-header">pub async fn <a href="#method.recv" class="fn">recv</a>(&amp;mut self) -&gt; <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="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="enum.Message.html" title="enum actix_ws::Message">Message</a>, <a class="enum" href="enum.ProtocolError.html" title="enum actix_ws::ProtocolError">ProtocolError</a>&gt;&gt;</h4></section></summary><div class="docblock"><p>Wait for the next item from the message stream</p>
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested"></a><pre class="rust rust-example-rendered"><code><span class="kw">while let </span><span class="prelude-val">Some</span>(<span class="prelude-val">Ok</span>(msg)) = stream.recv().<span class="kw">await </span>{
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">while let </span><span class="prelude-val">Some</span>(<span class="prelude-val">Ok</span>(msg)) = stream.recv().<span class="kw">await </span>{
<span class="comment">// handle message
</span>}</code></pre></div>
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Stream-for-MessageStream" class="impl"><a class="src rightside" href="../src/actix_ws/fut.rs.html#115-183">source</a><a href="#impl-Stream-for-MessageStream" class="anchor">§</a><h3 class="code-header">impl Stream for <a class="struct" href="struct.MessageStream.html" title="struct actix_ws::MessageStream">MessageStream</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item" class="associatedtype trait-impl"><a href="#associatedtype.Item" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Item</a> = <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="enum.Message.html" title="enum actix_ws::Message">Message</a>, <a class="enum" href="enum.ProtocolError.html" title="enum actix_ws::ProtocolError">ProtocolError</a>&gt;</h4></section></summary><div class='docblock'>Values yielded by the stream.</div></details><details class="toggle method-toggle" open><summary><section id="method.poll_next" class="method trait-impl"><a class="src rightside" href="../src/actix_ws/fut.rs.html#118-182">source</a><a href="#method.poll_next" class="anchor">§</a><h4 class="code-header">fn <a class="fn">poll_next</a>(
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Stream-for-MessageStream" class="impl"><a class="src rightside" href="../src/actix_ws/fut.rs.html#118-186">source</a><a href="#impl-Stream-for-MessageStream" class="anchor">§</a><h3 class="code-header">impl Stream for <a class="struct" href="struct.MessageStream.html" title="struct actix_ws::MessageStream">MessageStream</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item" class="associatedtype trait-impl"><a href="#associatedtype.Item" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Item</a> = <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="enum.Message.html" title="enum actix_ws::Message">Message</a>, <a class="enum" href="enum.ProtocolError.html" title="enum actix_ws::ProtocolError">ProtocolError</a>&gt;</h4></section></summary><div class='docblock'>Values yielded by the stream.</div></details><details class="toggle method-toggle" open><summary><section id="method.poll_next" class="method trait-impl"><a class="src rightside" href="../src/actix_ws/fut.rs.html#121-185">source</a><a href="#method.poll_next" class="anchor">§</a><h4 class="code-header">fn <a class="fn">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 Self</a>&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;Self::Item&gt;&gt;</h4></section></summary><div class='docblock'>Attempt to pull out the next value of this stream, registering the