mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-25 12:57:07 +00:00
219 lines
85 KiB
HTML
219 lines
85 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="A stream that can only be used to send data"><title>SendStream in noq - 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="noq" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (b6f0945e4 2025-10-08)" data-channel="nightly" data-search-js="search-8d3311b9.js" data-stringdex-js="stringdex-828709d0.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-ce535bd0.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 struct"><!--[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="#">SendStream</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../noq/index.html">noq</a><span class="version">0.17.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Send<wbr>Stream</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#cancellation" title="Cancellation">Cancellation</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.finish" title="finish">finish</a></li><li><a href="#method.id" title="id">id</a></li><li><a href="#method.poll_write" title="poll_write">poll_write</a></li><li><a href="#method.priority" title="priority">priority</a></li><li><a href="#method.reset" title="reset">reset</a></li><li><a href="#method.set_priority" title="set_priority">set_priority</a></li><li><a href="#method.stopped" title="stopped">stopped</a></li><li><a href="#method.write" title="write">write</a></li><li><a href="#method.write_all" title="write_all">write_all</a></li><li><a href="#method.write_all_chunks" title="write_all_chunks">write_all_chunks</a></li><li><a href="#method.write_chunk" title="write_chunk">write_chunk</a></li><li><a href="#method.write_chunks" title="write_chunks">write_chunks</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-AsyncWrite-for-SendStream" title="AsyncWrite">AsyncWrite</a></li><li><a href="#impl-AsyncWrite-for-SendStream-1" title="AsyncWrite">AsyncWrite</a></li><li><a href="#impl-Debug-for-SendStream" title="Debug">Debug</a></li><li><a href="#impl-Drop-for-SendStream" title="Drop">Drop</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-SendStream" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-SendStream" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-SendStream" title="Send">Send</a></li><li><a href="#impl-Sync-for-SendStream" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-SendStream" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-SendStream" title="UnwindSafe">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-AsyncWriteExt-for-W" title="AsyncWriteExt">AsyncWriteExt</a></li><li><a href="#impl-AsyncWriteExt-for-W-1" title="AsyncWriteExt">AsyncWriteExt</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow<T>">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut<T>">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T" title="From<T>">From<T></a></li><li><a href="#impl-Instrument-for-T" title="Instrument">Instrument</a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into<U>">Into<U></a></li><li><a href="#impl-IntoEither-for-T" title="IntoEither">IntoEither</a></li><li><a href="#impl-Same-for-T" title="Same">Same</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom<U>">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto<U>">TryInto<U></a></li><li><a href="#impl-WithSubscriber-for-T" title="WithSubscriber">WithSubscriber</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate noq</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">noq</a></div><h1>Struct <span class="struct">Send<wbr>Stream</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/noq/send_stream.rs.html#36-40">Source</a> </span></div><pre class="rust item-decl"><code>pub struct SendStream { <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 that can only be used to send data</p>
|
||
<p>If dropped, streams that haven’t been explicitly <a href="struct.SendStream.html#method.reset" title="method noq::SendStream::reset"><code>reset()</code></a> will be implicitly <a href="struct.SendStream.html#method.finish" title="method noq::SendStream::finish"><code>finish()</code></a>ed,
|
||
continuing to (re)transmit previously written data until it has been fully acknowledged or the
|
||
connection is closed.</p>
|
||
<h2 id="cancellation"><a class="doc-anchor" href="#cancellation">§</a>Cancellation</h2>
|
||
<p>A <code>write</code> method is said to be <em>cancel-safe</em> when dropping its future before the future becomes
|
||
ready will always result in no data being written to the stream. This is true of methods which
|
||
succeed immediately when any progress is made, and is not true of methods which might need to
|
||
perform multiple writes internally before succeeding. Each <code>write</code> method documents whether it is
|
||
cancel-safe.</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-SendStream" class="impl"><a class="src rightside" href="../src/noq/send_stream.rs.html#42-290">Source</a><a href="#impl-SendStream" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.SendStream.html" title="struct noq::SendStream">SendStream</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.write" class="method"><a class="src rightside" href="../src/noq/send_stream.rs.html#61-63">Source</a><h4 class="code-header">pub async fn <a href="#method.write" class="fn">write</a>(&mut self, buf: &[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="enum" href="enum.WriteError.html" title="enum noq::WriteError">WriteError</a>></h4></section></summary><div class="docblock"><p>Write a buffer into this stream, returning how many bytes were written</p>
|
||
<p>Unless this method errors, it waits until some amount of <code>buf</code> can be written into this
|
||
stream, and then writes as much as it can without waiting again. Due to congestion and flow
|
||
control, this may be shorter than <code>buf.len()</code>. On success this yields the length of the
|
||
prefix that was written.</p>
|
||
<h5 id="cancel-safety"><a class="doc-anchor" href="#cancel-safety">§</a>Cancel safety</h5>
|
||
<p>This method is cancellation safe. If this does not resolve, no bytes were written.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_all" class="method"><a class="src rightside" href="../src/noq/send_stream.rs.html#74-80">Source</a><h4 class="code-header">pub async fn <a href="#method.write_all" class="fn">write_all</a>(&mut self, buf: &[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="enum.WriteError.html" title="enum noq::WriteError">WriteError</a>></h4></section></summary><div class="docblock"><p>Write a buffer into this stream in its entirety</p>
|
||
<p>This method repeatedly calls <a href="struct.SendStream.html#method.write" title="method noq::SendStream::write"><code>write</code></a> until all bytes are written, or an
|
||
error occurs.</p>
|
||
<h5 id="cancel-safety-1"><a class="doc-anchor" href="#cancel-safety-1">§</a>Cancel safety</h5>
|
||
<p>This method is <em>not</em> cancellation safe. Even if this does not resolve, some prefix of <code>buf</code>
|
||
may have been written when previously polled.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_chunks" class="method"><a class="src rightside" href="../src/noq/send_stream.rs.html#101-103">Source</a><h4 class="code-header">pub async fn <a href="#method.write_chunks" class="fn">write_chunks</a>(
|
||
&mut self,
|
||
bufs: &mut [Bytes],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.Written.html" title="struct noq::Written">Written</a>, <a class="enum" href="enum.WriteError.html" title="enum noq::WriteError">WriteError</a>></h4></section></summary><div class="docblock"><p>Write a slice of [<code>Bytes</code>] into this stream, returning how much was written</p>
|
||
<p>Bytes to try to write are provided to this method as an array of cheaply cloneable chunks.
|
||
Unless this method errors, it waits until some amount of those bytes can be written into
|
||
this stream, and then writes as much as it can without waiting again. Due to congestion and
|
||
flow control, this may be less than the total number of bytes.</p>
|
||
<p>On success, this method both mutates <code>bufs</code> and yields an informative <a href="struct.Written.html" title="struct noq::Written"><code>Written</code></a> struct
|
||
indicating how much was written:</p>
|
||
<ul>
|
||
<li>[<code>Bytes</code>] chunks that were fully written are mutated to be <a href="Bytes::is_empty">empty</a>.</li>
|
||
<li>If a [<code>Bytes</code>] chunk was partially written, it is <a href="Bytes::split_to">split to</a> contain
|
||
only the suffix of bytes that were not written.</li>
|
||
<li>The yielded <a href="struct.Written.html" title="struct noq::Written"><code>Written</code></a> struct indicates how many chunks were fully written as well as
|
||
how many bytes were written.</li>
|
||
</ul>
|
||
<h5 id="cancel-safety-2"><a class="doc-anchor" href="#cancel-safety-2">§</a>Cancel safety</h5>
|
||
<p>This method is cancellation safe. If this does not resolve, no bytes were written.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_chunk" class="method"><a class="src rightside" href="../src/noq/send_stream.rs.html#115-118">Source</a><h4 class="code-header">pub async fn <a href="#method.write_chunk" class="fn">write_chunk</a>(&mut self, buf: Bytes) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="enum.WriteError.html" title="enum noq::WriteError">WriteError</a>></h4></section></summary><div class="docblock"><p>Write a single [<code>Bytes</code>] into this stream in its entirety</p>
|
||
<p>Bytes to write are provided to this method as an single cheaply cloneable chunk. This
|
||
method repeatedly calls <a href="struct.SendStream.html#method.write_chunks" title="method noq::SendStream::write_chunks"><code>write_chunks</code></a> until all bytes are written,
|
||
or an error occurs.</p>
|
||
<h5 id="cancel-safety-3"><a class="doc-anchor" href="#cancel-safety-3">§</a>Cancel safety</h5>
|
||
<p>This method is <em>not</em> cancellation safe. Even if this does not resolve, some bytes may have
|
||
been written when previously polled.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_all_chunks" class="method"><a class="src rightside" href="../src/noq/send_stream.rs.html#131-137">Source</a><h4 class="code-header">pub async fn <a href="#method.write_all_chunks" class="fn">write_all_chunks</a>(
|
||
&mut self,
|
||
bufs: &mut [Bytes],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="enum.WriteError.html" title="enum noq::WriteError">WriteError</a>></h4></section></summary><div class="docblock"><p>Write a slice of [<code>Bytes</code>] into this stream in its entirety</p>
|
||
<p>Bytes to write are provided to this method as an array of cheaply cloneable chunks. This
|
||
method repeatedly calls <a href="struct.SendStream.html#method.write_chunks" title="method noq::SendStream::write_chunks"><code>write_chunks</code></a> until all bytes are written,
|
||
or an error occurs. This method mutates <code>bufs</code> by mutating all chunks to be
|
||
<a href="Bytes::is_empty">empty</a>.</p>
|
||
<h5 id="cancel-safety-4"><a class="doc-anchor" href="#cancel-safety-4">§</a>Cancel safety</h5>
|
||
<p>This method is <em>not</em> cancellation safe. Even if this does not resolve, some bytes may have
|
||
been written when previously polled.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.finish" class="method"><a class="src rightside" href="../src/noq/send_stream.rs.html#189-202">Source</a><h4 class="code-header">pub fn <a href="#method.finish" class="fn">finish</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="struct.ClosedStream.html" title="struct noq::ClosedStream">ClosedStream</a>></h4></section></summary><div class="docblock"><p>Notify the peer that no more data will ever be written to this stream</p>
|
||
<p>It is an error to write to a <a href="struct.SendStream.html" title="struct noq::SendStream"><code>SendStream</code></a> after <code>finish()</code>ing it. <a href="struct.SendStream.html#method.reset" title="method noq::SendStream::reset"><code>reset()</code></a>
|
||
may still be called after <code>finish</code> to abandon transmission of any stream data that might
|
||
still be buffered.</p>
|
||
<p>To wait for the peer to receive all buffered stream data, see <a href="struct.SendStream.html#method.stopped" title="method noq::SendStream::stopped"><code>stopped()</code></a>.</p>
|
||
<p>May fail if <a href="struct.SendStream.html#method.finish" title="method noq::SendStream::finish"><code>finish()</code></a> or <a href="struct.SendStream.html#method.reset" title="method noq::SendStream::reset"><code>reset()</code></a> was previously
|
||
called. This error is harmless and serves only to indicate that the caller may have
|
||
incorrect assumptions about the stream’s state.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.reset" class="method"><a class="src rightside" href="../src/noq/send_stream.rs.html#213-221">Source</a><h4 class="code-header">pub fn <a href="#method.reset" class="fn">reset</a>(&mut self, error_code: <a class="struct" href="struct.VarInt.html" title="struct noq::VarInt">VarInt</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="struct.ClosedStream.html" title="struct noq::ClosedStream">ClosedStream</a>></h4></section></summary><div class="docblock"><p>Close the send stream immediately.</p>
|
||
<p>No new data can be written after calling this method. Locally buffered data is dropped, and
|
||
previously transmitted data will no longer be retransmitted if lost. If an attempt has
|
||
already been made to finish the stream, the peer may still receive all written data.</p>
|
||
<p>May fail if <a href="struct.SendStream.html#method.finish" title="method noq::SendStream::finish"><code>finish()</code></a> or <a href="struct.SendStream.html#method.reset" title="method noq::SendStream::reset"><code>reset()</code></a> was previously
|
||
called. This error is harmless and serves only to indicate that the caller may have
|
||
incorrect assumptions about the stream’s state.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_priority" class="method"><a class="src rightside" href="../src/noq/send_stream.rs.html#230-234">Source</a><h4 class="code-header">pub fn <a href="#method.set_priority" class="fn">set_priority</a>(&self, priority: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="struct.ClosedStream.html" title="struct noq::ClosedStream">ClosedStream</a>></h4></section></summary><div class="docblock"><p>Set the priority of the send stream</p>
|
||
<p>Every send stream has an initial priority of 0. Locally buffered data from streams with
|
||
higher priority will be transmitted before data from streams with lower priority. Changing
|
||
the priority of a stream with pending data may only take effect after that data has been
|
||
transmitted. Using many different priority levels per connection may have a negative
|
||
impact on performance.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.priority" class="method"><a class="src rightside" href="../src/noq/send_stream.rs.html#237-240">Source</a><h4 class="code-header">pub fn <a href="#method.priority" class="fn">priority</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, <a class="struct" href="struct.ClosedStream.html" title="struct noq::ClosedStream">ClosedStream</a>></h4></section></summary><div class="docblock"><p>Get the priority of the send stream</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.stopped" class="method"><a class="src rightside" href="../src/noq/send_stream.rs.html#252-269">Source</a><h4 class="code-header">pub fn <a href="#method.stopped" class="fn">stopped</a>(&self) -> <a class="struct" href="struct.Stopped.html" title="struct noq::Stopped">Stopped</a> <a href="#" class="tooltip" data-notable-ty="Stopped">ⓘ</a></h4></section></summary><div class="docblock"><p>Completes when the peer stops the stream or reads the stream to completion</p>
|
||
<p>Yields <code>Some</code> with the stop error code if the peer stops the stream. Yields <code>None</code> if the
|
||
local side <a href="struct.SendStream.html#method.finish" title="method noq::SendStream::finish"><code>finish()</code></a>es the stream and then the peer acknowledges receipt
|
||
of all stream data (although not necessarily the processing of it), after which the peer
|
||
closing the stream is no longer meaningful.</p>
|
||
<p>For a variety of reasons, the peer may not send acknowledgements immediately upon receiving
|
||
data. As such, relying on <code>stopped</code> to know when the peer has read a stream to completion
|
||
may introduce more latency than using an application-level response of some sort.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.id" class="method"><a class="src rightside" href="../src/noq/send_stream.rs.html#272-274">Source</a><h4 class="code-header">pub fn <a href="#method.id" class="fn">id</a>(&self) -> <a class="struct" href="struct.StreamId.html" title="struct noq::StreamId">StreamId</a></h4></section></summary><div class="docblock"><p>Get the identity of this stream</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.poll_write" class="method"><a class="src rightside" href="../src/noq/send_stream.rs.html#283-289">Source</a><h4 class="code-header">pub fn <a href="#method.poll_write" class="fn">poll_write</a>(
|
||
self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||
cx: &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><'_>,
|
||
buf: &[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="enum" href="enum.WriteError.html" title="enum noq::WriteError">WriteError</a>>></h4></section></summary><div class="docblock"><p>Attempt to write bytes from buf into the stream.</p>
|
||
<p>On success, returns Poll::Ready(Ok(num_bytes_written)).</p>
|
||
<p>If the stream is not ready for writing, the method returns Poll::Pending and arranges
|
||
for the current task (via cx.waker().wake_by_ref()) to receive a notification when the
|
||
stream becomes writable or is closed.</p>
|
||
</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-AsyncWrite-for-SendStream" class="impl"><a class="src rightside" href="../src/noq/send_stream.rs.html#312-328">Source</a><a href="#impl-AsyncWrite-for-SendStream" class="anchor">§</a><h3 class="code-header">impl AsyncWrite for <a class="struct" href="struct.SendStream.html" title="struct noq::SendStream">SendStream</a></h3><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>futures-io</code></strong> only.</div></span></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.poll_write-1" class="method trait-impl"><a class="src rightside" href="../src/noq/send_stream.rs.html#313-319">Source</a><a href="#method.poll_write-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">poll_write</a>(
|
||
self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||
cx: &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><'_>,
|
||
buf: &[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>></h4></section></summary><div class='docblock'>Attempt to write bytes from <code>buf</code> into the object. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.poll_flush" class="method trait-impl"><a class="src rightside" href="../src/noq/send_stream.rs.html#321-323">Source</a><a href="#method.poll_flush" class="anchor">§</a><h4 class="code-header">fn <a class="fn">poll_flush</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>, _cx: &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><'_>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>>></h4></section></summary><div class='docblock'>Attempt to flush the object, ensuring that any buffered data reach
|
||
their destination. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.poll_close" class="method trait-impl"><a class="src rightside" href="../src/noq/send_stream.rs.html#325-327">Source</a><a href="#method.poll_close" class="anchor">§</a><h4 class="code-header">fn <a class="fn">poll_close</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>, _cx: &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><'_>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>>></h4></section></summary><div class='docblock'>Attempt to close the object. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.poll_write_vectored" class="method trait-impl"><a href="#method.poll_write_vectored" class="anchor">§</a><h4 class="code-header">fn <a class="fn">poll_write_vectored</a>(
|
||
self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||
cx: &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><'_>,
|
||
bufs: &[<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a><'_>],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>>></h4></section></summary><div class='docblock'>Attempt to write bytes from <code>bufs</code> into the object using vectored
|
||
IO operations. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsyncWrite-for-SendStream-1" class="impl"><a class="src rightside" href="../src/noq/send_stream.rs.html#330-346">Source</a><a href="#impl-AsyncWrite-for-SendStream-1" class="anchor">§</a><h3 class="code-header">impl AsyncWrite for <a class="struct" href="struct.SendStream.html" title="struct noq::SendStream">SendStream</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.poll_write-2" class="method trait-impl"><a class="src rightside" href="../src/noq/send_stream.rs.html#331-337">Source</a><a href="#method.poll_write-2" class="anchor">§</a><h4 class="code-header">fn <a class="fn">poll_write</a>(
|
||
self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||
cx: &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><'_>,
|
||
buf: &[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>></h4></section></summary><div class='docblock'>Attempt to write bytes from <code>buf</code> into the object. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.poll_flush-1" class="method trait-impl"><a class="src rightside" href="../src/noq/send_stream.rs.html#339-341">Source</a><a href="#method.poll_flush-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">poll_flush</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>, _cx: &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><'_>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>>></h4></section></summary><div class='docblock'>Attempts to flush the object, ensuring that any buffered data reach
|
||
their destination. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.poll_shutdown" class="method trait-impl"><a class="src rightside" href="../src/noq/send_stream.rs.html#343-345">Source</a><a href="#method.poll_shutdown" class="anchor">§</a><h4 class="code-header">fn <a class="fn">poll_shutdown</a>(
|
||
self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||
_cx: &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><'_>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>>></h4></section></summary><div class='docblock'>Initiates or attempts to shut down this writer, returning success when
|
||
the I/O connection has completely shut down. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.poll_write_vectored-1" class="method trait-impl"><a href="#method.poll_write_vectored-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">poll_write_vectored</a>(
|
||
self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||
cx: &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><'_>,
|
||
bufs: &[<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a><'_>],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>>></h4></section></summary><div class='docblock'>Like <a href="AsyncWrite::poll_write"><code>poll_write</code></a>, except that it writes from a slice of buffers. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.is_write_vectored" class="method trait-impl"><a href="#method.is_write_vectored" class="anchor">§</a><h4 class="code-header">fn <a class="fn">is_write_vectored</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Determines if this writer has an efficient <a href="AsyncWrite::poll_write_vectored"><code>poll_write_vectored</code></a>
|
||
implementation. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-SendStream" class="impl"><a class="src rightside" href="../src/noq/send_stream.rs.html#35">Source</a><a href="#impl-Debug-for-SendStream" class="anchor">§</a><h3 class="code-header">impl <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="struct.SendStream.html" title="struct noq::SendStream">SendStream</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../src/noq/send_stream.rs.html#35">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>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></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Drop-for-SendStream" class="impl"><a class="src rightside" href="../src/noq/send_stream.rs.html#348-372">Source</a><a href="#impl-Drop-for-SendStream" class="anchor">§</a><h3 class="code-header">impl <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="struct.SendStream.html" title="struct noq::SendStream">SendStream</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.drop" class="method trait-impl"><a class="src rightside" href="../src/noq/send_stream.rs.html#349-371">Source</a><a href="#method.drop" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop" class="fn">drop</a>(&mut self)</h4></section></summary><div class='docblock'>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></div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-SendStream" class="impl"><a href="#impl-Freeze-for-SendStream" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.SendStream.html" title="struct noq::SendStream">SendStream</a></h3></section><section id="impl-RefUnwindSafe-for-SendStream" class="impl"><a href="#impl-RefUnwindSafe-for-SendStream" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.SendStream.html" title="struct noq::SendStream">SendStream</a></h3></section><section id="impl-Send-for-SendStream" class="impl"><a href="#impl-Send-for-SendStream" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.SendStream.html" title="struct noq::SendStream">SendStream</a></h3></section><section id="impl-Sync-for-SendStream" class="impl"><a href="#impl-Sync-for-SendStream" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.SendStream.html" title="struct noq::SendStream">SendStream</a></h3></section><section id="impl-Unpin-for-SendStream" class="impl"><a href="#impl-Unpin-for-SendStream" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.SendStream.html" title="struct noq::SendStream">SendStream</a></h3></section><section id="impl-UnwindSafe-for-SendStream" class="impl"><a href="#impl-UnwindSafe-for-SendStream" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.SendStream.html" title="struct noq::SendStream">SendStream</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
|
||
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AsyncWriteExt-for-W" class="impl"><a href="#impl-AsyncWriteExt-for-W" class="anchor">§</a><h3 class="code-header">impl<W> AsyncWriteExt for W<div class="where">where
|
||
W: AsyncWrite + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.write-1" class="method trait-impl"><a href="#method.write-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write</a><'a>(&'a mut self, src: &'a [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -> Write<'a, Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a buffer into this writer, returning how many bytes were
|
||
written. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_vectored" class="method trait-impl"><a href="#method.write_vectored" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_vectored</a><'a, 'b>(
|
||
&'a mut self,
|
||
bufs: &'a [<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a><'b>],
|
||
) -> WriteVectored<'a, 'b, Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Like <a href="AsyncWriteExt::write"><code>write</code></a>, except that it writes from a slice of buffers. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_buf" class="method trait-impl"><a href="#method.write_buf" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_buf</a><'a, B>(&'a mut self, src: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a mut B</a>) -> WriteBuf<'a, Self, B><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,
|
||
B: Buf,</div></h4></section></summary><div class='docblock'>Writes a buffer into this writer, advancing the buffer’s internal
|
||
cursor. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_all_buf" class="method trait-impl"><a href="#method.write_all_buf" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_all_buf</a><'a, B>(
|
||
&'a mut self,
|
||
src: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a mut B</a>,
|
||
) -> WriteAllBuf<'a, Self, B><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,
|
||
B: Buf,</div></h4></section></summary><div class='docblock'>Attempts to write an entire buffer into this writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_all-1" class="method trait-impl"><a href="#method.write_all-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_all</a><'a>(&'a mut self, src: &'a [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -> WriteAll<'a, Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Attempts to write an entire buffer into this writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u8" class="method trait-impl"><a href="#method.write_u8" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_u8</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>) -> WriteU8<&mut Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 8-bit integer to the underlying writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i8" class="method trait-impl"><a href="#method.write_i8" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_i8</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>) -> WriteI8<&mut Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a signed 8-bit integer to the underlying writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u16" class="method trait-impl"><a href="#method.write_u16" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_u16</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>) -> WriteU16<&mut Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 16-bit integer in big-endian order to the
|
||
underlying writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i16" class="method trait-impl"><a href="#method.write_i16" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_i16</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>) -> WriteI16<&mut Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a signed 16-bit integer in big-endian order to the
|
||
underlying writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u32" class="method trait-impl"><a href="#method.write_u32" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_u32</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> WriteU32<&mut Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 32-bit integer in big-endian order to the
|
||
underlying writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i32" class="method trait-impl"><a href="#method.write_i32" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_i32</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> WriteI32<&mut Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a signed 32-bit integer in big-endian order to the
|
||
underlying writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u64" class="method trait-impl"><a href="#method.write_u64" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_u64</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -> WriteU64<&mut Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 64-bit integer in big-endian order to the
|
||
underlying writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i64" class="method trait-impl"><a href="#method.write_i64" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_i64</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> WriteI64<&mut Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an signed 64-bit integer in big-endian order to the
|
||
underlying writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u128" class="method trait-impl"><a href="#method.write_u128" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_u128</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>) -> WriteU128<&mut Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 128-bit integer in big-endian order to the
|
||
underlying writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i128" class="method trait-impl"><a href="#method.write_i128" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_i128</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>) -> WriteI128<&mut Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an signed 128-bit integer in big-endian order to the
|
||
underlying writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_f32" class="method trait-impl"><a href="#method.write_f32" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_f32</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>) -> WriteF32<&mut Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an 32-bit floating point type in big-endian order to the
|
||
underlying writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_f64" class="method trait-impl"><a href="#method.write_f64" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_f64</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> WriteF64<&mut Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an 64-bit floating point type in big-endian order to the
|
||
underlying writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u16_le" class="method trait-impl"><a href="#method.write_u16_le" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_u16_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>) -> WriteU16Le<&mut Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 16-bit integer in little-endian order to the
|
||
underlying writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i16_le" class="method trait-impl"><a href="#method.write_i16_le" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_i16_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>) -> WriteI16Le<&mut Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a signed 16-bit integer in little-endian order to the
|
||
underlying writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u32_le" class="method trait-impl"><a href="#method.write_u32_le" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_u32_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> WriteU32Le<&mut Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 32-bit integer in little-endian order to the
|
||
underlying writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i32_le" class="method trait-impl"><a href="#method.write_i32_le" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_i32_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> WriteI32Le<&mut Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a signed 32-bit integer in little-endian order to the
|
||
underlying writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u64_le" class="method trait-impl"><a href="#method.write_u64_le" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_u64_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -> WriteU64Le<&mut Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 64-bit integer in little-endian order to the
|
||
underlying writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i64_le" class="method trait-impl"><a href="#method.write_i64_le" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_i64_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> WriteI64Le<&mut Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an signed 64-bit integer in little-endian order to the
|
||
underlying writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u128_le" class="method trait-impl"><a href="#method.write_u128_le" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_u128_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>) -> WriteU128Le<&mut Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 128-bit integer in little-endian order to the
|
||
underlying writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i128_le" class="method trait-impl"><a href="#method.write_i128_le" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_i128_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>) -> WriteI128Le<&mut Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an signed 128-bit integer in little-endian order to the
|
||
underlying writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_f32_le" class="method trait-impl"><a href="#method.write_f32_le" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_f32_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>) -> WriteF32Le<&mut Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an 32-bit floating point type in little-endian order to the
|
||
underlying writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_f64_le" class="method trait-impl"><a href="#method.write_f64_le" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_f64_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> WriteF64Le<&mut Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an 64-bit floating point type in little-endian order to the
|
||
underlying writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.flush" class="method trait-impl"><a href="#method.flush" class="anchor">§</a><h4 class="code-header">fn <a class="fn">flush</a>(&mut self) -> Flush<'_, Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Flushes this output stream, ensuring that all intermediately buffered
|
||
contents reach their destination. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.shutdown" class="method trait-impl"><a href="#method.shutdown" class="anchor">§</a><h4 class="code-header">fn <a class="fn">shutdown</a>(&mut self) -> Shutdown<'_, Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Shuts down the output stream, ensuring that the value can be dropped
|
||
cleanly. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AsyncWriteExt-for-W-1" class="impl"><a href="#impl-AsyncWriteExt-for-W-1" class="anchor">§</a><h3 class="code-header">impl<W> AsyncWriteExt for W<div class="where">where
|
||
W: AsyncWrite + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.write-2" class="method trait-impl"><a href="#method.write-2" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write</a><'a>(&'a mut self, buf: &'a [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -> WriteFuture<'a, Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes some bytes into the byte stream. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_vectored-1" class="method trait-impl"><a href="#method.write_vectored-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_vectored</a><'a>(
|
||
&'a mut self,
|
||
bufs: &'a [<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a><'a>],
|
||
) -> WriteVectoredFuture<'a, Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Like [<code>write()</code>][<code>AsyncWriteExt::write()</code>], except that it writes a slice of buffers. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_all-2" class="method trait-impl"><a href="#method.write_all-2" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_all</a><'a>(&'a mut self, buf: &'a [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -> WriteAllFuture<'a, Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an entire buffer into the byte stream. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.flush-1" class="method trait-impl"><a href="#method.flush-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">flush</a>(&mut self) -> FlushFuture<'_, Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Flushes the stream to ensure that all buffered contents reach their destination. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.close" class="method trait-impl"><a href="#method.close" class="anchor">§</a><h4 class="code-header">fn <a class="fn">close</a>(&mut self) -> CloseFuture<'_, Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Closes the writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.boxed_writer" class="method trait-impl"><a href="#method.boxed_writer" class="anchor">§</a><h4 class="code-header">fn <a class="fn">boxed_writer</a><'a>(self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn AsyncWrite + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'a>><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'a,</div></h4></section></summary><div class='docblock'>Boxes the writer and changes its type to <code>dyn AsyncWrite + Send + 'a</code>. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#212">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where
|
||
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where
|
||
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#222">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#785">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#788">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
|
||
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Instrument-for-T" class="impl"><a href="#impl-Instrument-for-T" class="anchor">§</a><h3 class="code-header">impl<T> Instrument for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.instrument" class="method trait-impl"><a href="#method.instrument" class="anchor">§</a><h4 class="code-header">fn <a class="fn">instrument</a>(self, span: Span) -> Instrumented<Self></h4></section></summary><div class='docblock'>Instruments this type with the provided [<code>Span</code>], returning an
|
||
<code>Instrumented</code> wrapper. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.in_current_span" class="method trait-impl"><a href="#method.in_current_span" class="anchor">§</a><h4 class="code-header">fn <a class="fn">in_current_span</a>(self) -> Instrumented<Self></h4></section></summary><div class='docblock'>Instruments this type with the <a href="super::Span::current()">current</a> <a href="crate::Span"><code>Span</code></a>, returning an
|
||
<code>Instrumented</code> wrapper. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#767-769">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where
|
||
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#777">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
|
||
<p>That is, this conversion is whatever the implementation of
|
||
<code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
|
||
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-IntoEither-for-T" class="impl"><a class="src rightside" href="https://docs.rs/either/1/src/either/into_either.rs.html#64">Source</a><a href="#impl-IntoEither-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://docs.rs/either/1/either/into_either/trait.IntoEither.html" title="trait either::into_either::IntoEither">IntoEither</a> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_either" class="method trait-impl"><a class="src rightside" href="https://docs.rs/either/1/src/either/into_either.rs.html#29">Source</a><a href="#method.into_either" class="anchor">§</a><h4 class="code-header">fn <a href="https://docs.rs/either/1/either/into_either/trait.IntoEither.html#method.into_either" class="fn">into_either</a>(self, into_left: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="enum" href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either">Either</a><Self, Self></h4></section></summary><div class='docblock'>Converts <code>self</code> into a <a href="https://docs.rs/either/1/either/enum.Either.html#variant.Left" title="variant either::Either::Left"><code>Left</code></a> variant of <a href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either"><code>Either<Self, Self></code></a>
|
||
if <code>into_left</code> is <code>true</code>.
|
||
Converts <code>self</code> into a <a href="https://docs.rs/either/1/either/enum.Either.html#variant.Right" title="variant either::Either::Right"><code>Right</code></a> variant of <a href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either"><code>Either<Self, Self></code></a>
|
||
otherwise. <a href="https://docs.rs/either/1/either/into_either/trait.IntoEither.html#method.into_either">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.into_either_with" class="method trait-impl"><a class="src rightside" href="https://docs.rs/either/1/src/either/into_either.rs.html#55-57">Source</a><a href="#method.into_either_with" class="anchor">§</a><h4 class="code-header">fn <a href="https://docs.rs/either/1/either/into_either/trait.IntoEither.html#method.into_either_with" class="fn">into_either_with</a><F>(self, into_left: F) -> <a class="enum" href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either">Either</a><Self, Self><div class="where">where
|
||
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&Self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class='docblock'>Converts <code>self</code> into a <a href="https://docs.rs/either/1/either/enum.Either.html#variant.Left" title="variant either::Either::Left"><code>Left</code></a> variant of <a href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either"><code>Either<Self, Self></code></a>
|
||
if <code>into_left(&self)</code> returns <code>true</code>.
|
||
Converts <code>self</code> into a <a href="https://docs.rs/either/1/either/enum.Either.html#variant.Right" title="variant either::Either::Right"><code>Right</code></a> variant of <a href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either"><code>Either<Self, Self></code></a>
|
||
otherwise. <a href="https://docs.rs/either/1/either/into_either/trait.IntoEither.html#method.into_either_with">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Same-for-T" class="impl"><a class="src rightside" href="https://docs.rs/typenum/1.19.0/src/typenum/type_operators.rs.html#34">Source</a><a href="#impl-Same-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://docs.rs/typenum/1.19.0/typenum/type_operators/trait.Same.html" title="trait typenum::type_operators::Same">Same</a> for T</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl"><a class="src rightside" href="https://docs.rs/typenum/1.19.0/src/typenum/type_operators.rs.html#35">Source</a><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a href="https://docs.rs/typenum/1.19.0/typenum/type_operators/trait.Same.html#associatedtype.Output" class="associatedtype">Output</a> = T</h4></section></summary><div class='docblock'>Should always be <code>Self</code></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#827-829">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where
|
||
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#831">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#834">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#811-813">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where
|
||
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#815">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#818">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-WithSubscriber-for-T" class="impl"><a href="#impl-WithSubscriber-for-T" class="anchor">§</a><h3 class="code-header">impl<T> WithSubscriber for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.with_subscriber" class="method trait-impl"><a href="#method.with_subscriber" class="anchor">§</a><h4 class="code-header">fn <a class="fn">with_subscriber</a><S>(self, subscriber: S) -> WithDispatch<Self><div class="where">where
|
||
S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><Dispatch>,</div></h4></section></summary><div class='docblock'>Attaches the provided <a href="super::Subscriber"><code>Subscriber</code></a> to this type, returning a
|
||
[<code>WithDispatch</code>] wrapper. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.with_current_subscriber" class="method trait-impl"><a href="#method.with_current_subscriber" class="anchor">§</a><h4 class="code-header">fn <a class="fn">with_current_subscriber</a>(self) -> WithDispatch<Self></h4></section></summary><div class='docblock'>Attaches the current <a href="crate::dispatcher#setting-the-default-subscriber">default</a> <a href="super::Subscriber"><code>Subscriber</code></a> to this type, returning a
|
||
[<code>WithDispatch</code>] wrapper. <a>Read more</a></div></details></div></details></div><script type="text/json" id="notable-traits-data">{"Stopped":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.Stopped.html\" title=\"struct noq::Stopped\">Stopped</a></code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html\" title=\"trait core::future::future::Future\">Future</a> for <a class=\"struct\" href=\"struct.Stopped.html\" title=\"struct noq::Stopped\">Stopped</a></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"enum\" href=\"https://doc.rust-lang.org/nightly/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><<a class=\"enum\" href=\"https://doc.rust-lang.org/nightly/core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a><<a class=\"struct\" href=\"struct.VarInt.html\" title=\"struct noq::VarInt\">VarInt</a>>, <a class=\"enum\" href=\"enum.StoppedError.html\" title=\"enum noq::StoppedError\">StoppedError</a>>;</div>"}</script></section></div></main></body></html> |