| <!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 unified `Stream` and `Sink` interface to an underlying I/O object, using the `Encoder` and `Decoder` traits to encode and decode frames."><meta name="keywords" content="rust, rustlang, rust-lang, Framed"><title>Framed in tokio_util::codec - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc 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">☰</button><a class="sidebar-logo" href="../../tokio_util/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../tokio_util/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Framed</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.backpressure_boundary">backpressure_boundary</a></li><li><a href="#method.codec">codec</a></li><li><a href="#method.codec_mut">codec_mut</a></li><li><a href="#method.codec_pin_mut">codec_pin_mut</a></li><li><a href="#method.from_parts">from_parts</a></li><li><a href="#method.get_mut">get_mut</a></li><li><a href="#method.get_pin_mut">get_pin_mut</a></li><li><a href="#method.get_ref">get_ref</a></li><li><a href="#method.into_inner">into_inner</a></li><li><a href="#method.into_parts">into_parts</a></li><li><a href="#method.map_codec">map_codec</a></li><li><a href="#method.new">new</a></li><li><a href="#method.read_buffer">read_buffer</a></li><li><a href="#method.read_buffer_mut">read_buffer_mut</a></li><li><a href="#method.set_backpressure_boundary">set_backpressure_boundary</a></li><li><a href="#method.with_capacity">with_capacity</a></li><li><a href="#method.write_buffer">write_buffer</a></li><li><a href="#method.write_buffer_mut">write_buffer_mut</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Debug-for-Framed%3CT%2C%20U%3E">Debug</a></li><li><a href="#impl-Sink%3CI%3E-for-Framed%3CT%2C%20U%3E">Sink<I></a></li><li><a href="#impl-Stream-for-Framed%3CT%2C%20U%3E">Stream</a></li><li><a href="#impl-Unpin-for-Framed%3CT%2C%20U%3E">Unpin</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-Framed%3CT%2C%20U%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Framed%3CT%2C%20U%3E">Send</a></li><li><a href="#impl-Sync-for-Framed%3CT%2C%20U%3E">Sync</a></li><li><a href="#impl-UnwindSafe-for-Framed%3CT%2C%20U%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-Framed%3CT%2C%20U%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-Framed%3CT%2C%20U%3E">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-Framed%3CT%2C%20U%3E">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-Framed%3CT%2C%20U%3E">From<T></a></li><li><a href="#impl-Instrument-for-Framed%3CT%2C%20U%3E">Instrument</a></li><li><a href="#impl-Into%3CU%3E-for-Framed%3CT%2C%20U%3E">Into<U></a></li><li><a href="#impl-TryFrom%3CU%3E-for-Framed%3CT%2C%20U%3E">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-Framed%3CT%2C%20U%3E">TryInto<U></a></li><li><a href="#impl-TryStream-for-Framed%3CT%2C%20U%3E">TryStream</a></li><li><a href="#impl-WithSubscriber-for-Framed%3CT%2C%20U%3E">WithSubscriber</a></li></ul></section><h2><a href="index.html">In tokio_util::codec</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../index.html">tokio_util</a>::<wbr><a href="index.html">codec</a>::<wbr><a class="struct" href="#">Framed</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/tokio_util/codec/framed.rs.html#16-31">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct Framed<T, U> { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A unified <a href="../../futures_core/stream/trait.Stream.html"><code>Stream</code></a> and <a href="../../futures_sink/trait.Sink.html"><code>Sink</code></a> interface to an underlying I/O object, using |
| the <code>Encoder</code> and <code>Decoder</code> traits to encode and decode frames.</p> |
| <p>You can create a <code>Framed</code> instance by using the <a href="trait.Decoder.html#method.framed"><code>Decoder::framed</code></a> adapter, or |
| by using the <code>new</code> function seen below.</p> |
| </div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Framed%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#33-116">source</a><a href="#impl-Framed%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="struct" href="struct.Framed.html" title="struct tokio_util::codec::Framed">Framed</a><T, U><span class="where fmt-newline">where<br> T: <a class="trait" href="../../tokio/io/async_read/trait.AsyncRead.html" title="trait tokio::io::async_read::AsyncRead">AsyncRead</a> + <a class="trait" href="../../tokio/io/async_write/trait.AsyncWrite.html" title="trait tokio::io::async_write::AsyncWrite">AsyncWrite</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new" class="method has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#65-73">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>(inner: T, codec: U) -> <a class="struct" href="struct.Framed.html" title="struct tokio_util::codec::Framed">Framed</a><T, U></h4></section></summary><div class="docblock"><p>Provides a <a href="../../futures_core/stream/trait.Stream.html"><code>Stream</code></a> and <a href="../../futures_sink/trait.Sink.html"><code>Sink</code></a> interface for reading and writing to this |
| I/O object, using <a href="trait.Decoder.html" title="Decoder"><code>Decoder</code></a> and <a href="trait.Encoder.html"><code>Encoder</code></a> to read and write the raw data.</p> |
| <p>Raw I/O objects work with byte sequences, but higher-level code usually |
| wants to batch these into meaningful chunks, called “frames”. This |
| method layers framing on top of an I/O object, by using the codec |
| traits to handle encoding and decoding of messages frames. Note that |
| the incoming and outgoing frame types may be distinct.</p> |
| <p>This function returns a <em>single</em> object that is both <a href="../../futures_core/stream/trait.Stream.html"><code>Stream</code></a> and |
| <a href="../../futures_sink/trait.Sink.html"><code>Sink</code></a>; grouping this into a single object is often useful for layering |
| things like gzip or TLS, which require both read and write access to the |
| underlying object.</p> |
| <p>If you want to work more directly with the streams and sink, consider |
| calling <a href="https://docs.rs/futures/0.3/futures/stream/trait.StreamExt.html#method.split"><code>split</code></a> on the <code>Framed</code> returned by this method, which will |
| break them into separate objects, allowing them to interact more easily.</p> |
| <p>Note that, for some byte sources, the stream can be resumed after an EOF |
| by reading from it, even after it has returned <code>None</code>. Repeated attempts |
| to do so, without new data available, continue to return <code>None</code> without |
| creating more (closing) frames.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_capacity" class="method has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#99-115">source</a><h4 class="code-header">pub fn <a href="#method.with_capacity" class="fnname">with_capacity</a>(inner: T, codec: U, capacity: usize) -> <a class="struct" href="struct.Framed.html" title="struct tokio_util::codec::Framed">Framed</a><T, U></h4></section></summary><div class="docblock"><p>Provides a <a href="../../futures_core/stream/trait.Stream.html"><code>Stream</code></a> and <a href="../../futures_sink/trait.Sink.html"><code>Sink</code></a> interface for reading and writing to this |
| I/O object, using <a href="trait.Decoder.html" title="Decoder"><code>Decoder</code></a> and <a href="trait.Encoder.html"><code>Encoder</code></a> to read and write the raw data, |
| with a specific read buffer initial capacity.</p> |
| <p>Raw I/O objects work with byte sequences, but higher-level code usually |
| wants to batch these into meaningful chunks, called “frames”. This |
| method layers framing on top of an I/O object, by using the codec |
| traits to handle encoding and decoding of messages frames. Note that |
| the incoming and outgoing frame types may be distinct.</p> |
| <p>This function returns a <em>single</em> object that is both <a href="../../futures_core/stream/trait.Stream.html"><code>Stream</code></a> and |
| <a href="../../futures_sink/trait.Sink.html"><code>Sink</code></a>; grouping this into a single object is often useful for layering |
| things like gzip or TLS, which require both read and write access to the |
| underlying object.</p> |
| <p>If you want to work more directly with the streams and sink, consider |
| calling <a href="https://docs.rs/futures/0.3/futures/stream/trait.StreamExt.html#method.split"><code>split</code></a> on the <code>Framed</code> returned by this method, which will |
| break them into separate objects, allowing them to interact more easily.</p> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Framed%3CT%2C%20U%3E-1" class="impl has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#118-290">source</a><a href="#impl-Framed%3CT%2C%20U%3E-1" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="struct" href="struct.Framed.html" title="struct tokio_util::codec::Framed">Framed</a><T, U></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_parts" class="method has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#146-157">source</a><h4 class="code-header">pub fn <a href="#method.from_parts" class="fnname">from_parts</a>(parts: <a class="struct" href="struct.FramedParts.html" title="struct tokio_util::codec::FramedParts">FramedParts</a><T, U>) -> <a class="struct" href="struct.Framed.html" title="struct tokio_util::codec::Framed">Framed</a><T, U></h4></section></summary><div class="docblock"><p>Provides a <a href="../../futures_core/stream/trait.Stream.html"><code>Stream</code></a> and <a href="../../futures_sink/trait.Sink.html"><code>Sink</code></a> interface for reading and writing to this |
| I/O object, using <a href="trait.Decoder.html"><code>Decoder</code></a> and <a href="trait.Encoder.html"><code>Encoder</code></a> to read and write the raw data.</p> |
| <p>Raw I/O objects work with byte sequences, but higher-level code usually |
| wants to batch these into meaningful chunks, called “frames”. This |
| method layers framing on top of an I/O object, by using the <code>Codec</code> |
| traits to handle encoding and decoding of messages frames. Note that |
| the incoming and outgoing frame types may be distinct.</p> |
| <p>This function returns a <em>single</em> object that is both <a href="../../futures_core/stream/trait.Stream.html"><code>Stream</code></a> and |
| <a href="../../futures_sink/trait.Sink.html"><code>Sink</code></a>; grouping this into a single object is often useful for layering |
| things like gzip or TLS, which require both read and write access to the |
| underlying object.</p> |
| <p>This objects takes a stream and a readbuffer and a writebuffer. These field |
| can be obtained from an existing <code>Framed</code> with the <a href="struct.Framed.html#method.into_parts"><code>into_parts</code></a> method.</p> |
| <p>If you want to work more directly with the streams and sink, consider |
| calling <a href="https://docs.rs/futures/0.3/futures/stream/trait.StreamExt.html#method.split"><code>split</code></a> on the <code>Framed</code> returned by this method, which will |
| break them into separate objects, allowing them to interact more easily.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_ref" class="method has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#165-167">source</a><h4 class="code-header">pub fn <a href="#method.get_ref" class="fnname">get_ref</a>(&self) -> &T</h4></section></summary><div class="docblock"><p>Returns a reference to the underlying I/O stream wrapped by |
| <code>Framed</code>.</p> |
| <p>Note that care should be taken to not tamper with the underlying stream |
| of data coming in as it may corrupt the stream of frames otherwise |
| being worked with.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#175-177">source</a><h4 class="code-header">pub fn <a href="#method.get_mut" class="fnname">get_mut</a>(&mut self) -> &mut T</h4></section></summary><div class="docblock"><p>Returns a mutable reference to the underlying I/O stream wrapped by |
| <code>Framed</code>.</p> |
| <p>Note that care should be taken to not tamper with the underlying stream |
| of data coming in as it may corrupt the stream of frames otherwise |
| being worked with.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_pin_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#185-187">source</a><h4 class="code-header">pub fn <a href="#method.get_pin_mut" class="fnname">get_pin_mut</a>(self: Pin<&mut Self>) -> Pin<&mut T></h4></section></summary><div class="docblock"><p>Returns a pinned mutable reference to the underlying I/O stream wrapped by |
| <code>Framed</code>.</p> |
| <p>Note that care should be taken to not tamper with the underlying stream |
| of data coming in as it may corrupt the stream of frames otherwise |
| being worked with.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.codec" class="method has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#194-196">source</a><h4 class="code-header">pub fn <a href="#method.codec" class="fnname">codec</a>(&self) -> &U</h4></section></summary><div class="docblock"><p>Returns a reference to the underlying codec wrapped by |
| <code>Framed</code>.</p> |
| <p>Note that care should be taken to not tamper with the underlying codec |
| as it may corrupt the stream of frames otherwise being worked with.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.codec_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#203-205">source</a><h4 class="code-header">pub fn <a href="#method.codec_mut" class="fnname">codec_mut</a>(&mut self) -> &mut U</h4></section></summary><div class="docblock"><p>Returns a mutable reference to the underlying codec wrapped by |
| <code>Framed</code>.</p> |
| <p>Note that care should be taken to not tamper with the underlying codec |
| as it may corrupt the stream of frames otherwise being worked with.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map_codec" class="method has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#212-225">source</a><h4 class="code-header">pub fn <a href="#method.map_codec" class="fnname">map_codec</a><C, F>(self, map: F) -> <a class="struct" href="struct.Framed.html" title="struct tokio_util::codec::Framed">Framed</a><T, C><span class="where fmt-newline">where<br> F: FnOnce(U) -> C,</span></h4></section></summary><div class="docblock"><p>Maps the codec <code>U</code> to <code>C</code>, preserving the read and write buffers |
| wrapped by <code>Framed</code>.</p> |
| <p>Note that care should be taken to not tamper with the underlying codec |
| as it may corrupt the stream of frames otherwise being worked with.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.codec_pin_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#232-234">source</a><h4 class="code-header">pub fn <a href="#method.codec_pin_mut" class="fnname">codec_pin_mut</a>(self: Pin<&mut Self>) -> &mut U</h4></section></summary><div class="docblock"><p>Returns a mutable reference to the underlying codec wrapped by |
| <code>Framed</code>.</p> |
| <p>Note that care should be taken to not tamper with the underlying codec |
| as it may corrupt the stream of frames otherwise being worked with.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.read_buffer" class="method has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#237-239">source</a><h4 class="code-header">pub fn <a href="#method.read_buffer" class="fnname">read_buffer</a>(&self) -> &<a class="struct" href="../../bytes/bytes_mut/struct.BytesMut.html" title="struct bytes::bytes_mut::BytesMut">BytesMut</a></h4></section></summary><div class="docblock"><p>Returns a reference to the read buffer.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.read_buffer_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#242-244">source</a><h4 class="code-header">pub fn <a href="#method.read_buffer_mut" class="fnname">read_buffer_mut</a>(&mut self) -> &mut <a class="struct" href="../../bytes/bytes_mut/struct.BytesMut.html" title="struct bytes::bytes_mut::BytesMut">BytesMut</a></h4></section></summary><div class="docblock"><p>Returns a mutable reference to the read buffer.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.write_buffer" class="method has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#247-249">source</a><h4 class="code-header">pub fn <a href="#method.write_buffer" class="fnname">write_buffer</a>(&self) -> &<a class="struct" href="../../bytes/bytes_mut/struct.BytesMut.html" title="struct bytes::bytes_mut::BytesMut">BytesMut</a></h4></section></summary><div class="docblock"><p>Returns a reference to the write buffer.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.write_buffer_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#252-254">source</a><h4 class="code-header">pub fn <a href="#method.write_buffer_mut" class="fnname">write_buffer_mut</a>(&mut self) -> &mut <a class="struct" href="../../bytes/bytes_mut/struct.BytesMut.html" title="struct bytes::bytes_mut::BytesMut">BytesMut</a></h4></section></summary><div class="docblock"><p>Returns a mutable reference to the write buffer.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.backpressure_boundary" class="method has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#257-259">source</a><h4 class="code-header">pub fn <a href="#method.backpressure_boundary" class="fnname">backpressure_boundary</a>(&self) -> usize</h4></section></summary><div class="docblock"><p>Returns backpressure boundary</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_backpressure_boundary" class="method has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#262-264">source</a><h4 class="code-header">pub fn <a href="#method.set_backpressure_boundary" class="fnname">set_backpressure_boundary</a>(&mut self, boundary: usize)</h4></section></summary><div class="docblock"><p>Updates backpressure boundary</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_inner" class="method has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#271-273">source</a><h4 class="code-header">pub fn <a href="#method.into_inner" class="fnname">into_inner</a>(self) -> T</h4></section></summary><div class="docblock"><p>Consumes the <code>Framed</code>, returning its underlying I/O stream.</p> |
| <p>Note that care should be taken to not tamper with the underlying stream |
| of data coming in as it may corrupt the stream of frames otherwise |
| being worked with.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_parts" class="method has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#281-289">source</a><h4 class="code-header">pub fn <a href="#method.into_parts" class="fnname">into_parts</a>(self) -> <a class="struct" href="struct.FramedParts.html" title="struct tokio_util::codec::FramedParts">FramedParts</a><T, U></h4></section></summary><div class="docblock"><p>Consumes the <code>Framed</code>, returning its underlying I/O stream, the buffer |
| with unprocessed data, and the codec.</p> |
| <p>Note that care should be taken to not tamper with the underlying stream |
| of data coming in as it may corrupt the stream of frames otherwise |
| being worked with.</p> |
| </div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-Framed%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#331-342">source</a><a href="#impl-Debug-for-Framed%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl<T, U> Debug for <a class="struct" href="struct.Framed.html" title="struct tokio_util::codec::Framed">Framed</a><T, U><span class="where fmt-newline">where<br> T: Debug,<br> U: Debug,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#336-341">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a class="fnname">fmt</a>(&self, f: &mut Formatter<'_>) -> Result</h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Sink%3CI%3E-for-Framed%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#306-329">source</a><a href="#impl-Sink%3CI%3E-for-Framed%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl<T, I, U> <a class="trait" href="../../futures_sink/trait.Sink.html" title="trait futures_sink::Sink">Sink</a><I> for <a class="struct" href="struct.Framed.html" title="struct tokio_util::codec::Framed">Framed</a><T, U><span class="where fmt-newline">where<br> T: <a class="trait" href="../../tokio/io/async_write/trait.AsyncWrite.html" title="trait tokio::io::async_write::AsyncWrite">AsyncWrite</a>,<br> U: <a class="trait" href="trait.Encoder.html" title="trait tokio_util::codec::Encoder">Encoder</a><I>,<br> U::<a class="associatedtype" href="trait.Encoder.html#associatedtype.Error" title="type tokio_util::codec::Encoder::Error">Error</a>: From<Error>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="../../futures_sink/trait.Sink.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="trait.Encoder.html" title="trait tokio_util::codec::Encoder">Encoder</a><I>>::<a class="associatedtype" href="trait.Encoder.html#associatedtype.Error" title="type tokio_util::codec::Encoder::Error">Error</a></h4></section></summary><div class='docblock'>The type of value produced by the sink when an error occurs.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.poll_ready" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#314-316">source</a><a href="#method.poll_ready" class="anchor"></a><h4 class="code-header">fn <a href="../../futures_sink/trait.Sink.html#tymethod.poll_ready" class="fnname">poll_ready</a>(<br> self: Pin<&mut Self>,<br> cx: &mut Context<'_><br>) -> Poll<Result<(), Self::<a class="associatedtype" href="../../futures_sink/trait.Sink.html#associatedtype.Error" title="type futures_sink::Sink::Error">Error</a>>></h4></section></summary><div class='docblock'>Attempts to prepare the <code>Sink</code> to receive a value. <a href="../../futures_sink/trait.Sink.html#tymethod.poll_ready">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.start_send" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#318-320">source</a><a href="#method.start_send" class="anchor"></a><h4 class="code-header">fn <a href="../../futures_sink/trait.Sink.html#tymethod.start_send" class="fnname">start_send</a>(self: Pin<&mut Self>, item: I) -> Result<(), Self::<a class="associatedtype" href="../../futures_sink/trait.Sink.html#associatedtype.Error" title="type futures_sink::Sink::Error">Error</a>></h4></section></summary><div class='docblock'>Begin the process of sending a value to the sink. |
| Each call to this function must be preceded by a successful call to |
| <code>poll_ready</code> which returned <code>Poll::Ready(Ok(()))</code>. <a href="../../futures_sink/trait.Sink.html#tymethod.start_send">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.poll_flush" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#322-324">source</a><a href="#method.poll_flush" class="anchor"></a><h4 class="code-header">fn <a href="../../futures_sink/trait.Sink.html#tymethod.poll_flush" class="fnname">poll_flush</a>(<br> self: Pin<&mut Self>,<br> cx: &mut Context<'_><br>) -> Poll<Result<(), Self::<a class="associatedtype" href="../../futures_sink/trait.Sink.html#associatedtype.Error" title="type futures_sink::Sink::Error">Error</a>>></h4></section></summary><div class='docblock'>Flush any remaining output from this sink. <a href="../../futures_sink/trait.Sink.html#tymethod.poll_flush">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.poll_close" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#326-328">source</a><a href="#method.poll_close" class="anchor"></a><h4 class="code-header">fn <a href="../../futures_sink/trait.Sink.html#tymethod.poll_close" class="fnname">poll_close</a>(<br> self: Pin<&mut Self>,<br> cx: &mut Context<'_><br>) -> Poll<Result<(), Self::<a class="associatedtype" href="../../futures_sink/trait.Sink.html#associatedtype.Error" title="type futures_sink::Sink::Error">Error</a>>></h4></section></summary><div class='docblock'>Flush any remaining output and close this sink, if necessary. <a href="../../futures_sink/trait.Sink.html#tymethod.poll_close">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Stream-for-Framed%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#293-303">source</a><a href="#impl-Stream-for-Framed%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="../../futures_core/stream/trait.Stream.html" title="trait futures_core::stream::Stream">Stream</a> for <a class="struct" href="struct.Framed.html" title="struct tokio_util::codec::Framed">Framed</a><T, U><span class="where fmt-newline">where<br> T: <a class="trait" href="../../tokio/io/async_read/trait.AsyncRead.html" title="trait tokio::io::async_read::AsyncRead">AsyncRead</a>,<br> U: <a class="trait" href="trait.Decoder.html" title="trait tokio_util::codec::Decoder">Decoder</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Item" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item" class="anchor"></a><h4 class="code-header">type <a href="../../futures_core/stream/trait.Stream.html#associatedtype.Item" class="associatedtype">Item</a> = Result<<U as <a class="trait" href="trait.Decoder.html" title="trait tokio_util::codec::Decoder">Decoder</a>>::<a class="associatedtype" href="trait.Decoder.html#associatedtype.Item" title="type tokio_util::codec::Decoder::Item">Item</a>, <U as <a class="trait" href="trait.Decoder.html" title="trait tokio_util::codec::Decoder">Decoder</a>>::<a class="associatedtype" href="trait.Decoder.html#associatedtype.Error" title="type tokio_util::codec::Decoder::Error">Error</a>></h4></section></summary><div class='docblock'>Values yielded by the stream.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.poll_next" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#300-302">source</a><a href="#method.poll_next" class="anchor"></a><h4 class="code-header">fn <a href="../../futures_core/stream/trait.Stream.html#tymethod.poll_next" class="fnname">poll_next</a>(<br> self: Pin<&mut Self>,<br> cx: &mut Context<'_><br>) -> Poll<Option<Self::<a class="associatedtype" href="../../futures_core/stream/trait.Stream.html#associatedtype.Item" title="type futures_core::stream::Stream::Item">Item</a>>></h4></section></summary><div class='docblock'>Attempt to pull out the next value of this stream, registering the |
| current task for wakeup if the value is not yet available, and returning |
| <code>None</code> if the stream is exhausted. <a href="../../futures_core/stream/trait.Stream.html#tymethod.poll_next">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.size_hint" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/futures_core/stream.rs.html#95">source</a><a href="#method.size_hint" class="anchor"></a><h4 class="code-header">fn <a href="../../futures_core/stream/trait.Stream.html#method.size_hint" class="fnname">size_hint</a>(&self) -> (usize, Option<usize>)</h4></section></summary><div class='docblock'>Returns the bounds on the remaining length of the stream. <a href="../../futures_core/stream/trait.Stream.html#method.size_hint">Read more</a></div></details></div></details><section id="impl-Unpin-for-Framed%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/tokio_util/codec/framed.rs.html#16-31">source</a><a href="#impl-Unpin-for-Framed%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl<'__pin, T, U> Unpin for <a class="struct" href="struct.Framed.html" title="struct tokio_util::codec::Framed">Framed</a><T, U><span class="where fmt-newline">where<br> __Origin<'__pin, T, U>: Unpin,</span></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Framed%3CT%2C%20U%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-Framed%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl<T, U> RefUnwindSafe for <a class="struct" href="struct.Framed.html" title="struct tokio_util::codec::Framed">Framed</a><T, U><span class="where fmt-newline">where<br> T: RefUnwindSafe,<br> U: RefUnwindSafe,</span></h3></section><section id="impl-Send-for-Framed%3CT%2C%20U%3E" class="impl has-srclink"><a href="#impl-Send-for-Framed%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl<T, U> Send for <a class="struct" href="struct.Framed.html" title="struct tokio_util::codec::Framed">Framed</a><T, U><span class="where fmt-newline">where<br> T: Send,<br> U: Send,</span></h3></section><section id="impl-Sync-for-Framed%3CT%2C%20U%3E" class="impl has-srclink"><a href="#impl-Sync-for-Framed%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl<T, U> Sync for <a class="struct" href="struct.Framed.html" title="struct tokio_util::codec::Framed">Framed</a><T, U><span class="where fmt-newline">where<br> T: Sync,<br> U: Sync,</span></h3></section><section id="impl-UnwindSafe-for-Framed%3CT%2C%20U%3E" class="impl has-srclink"><a href="#impl-UnwindSafe-for-Framed%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl<T, U> UnwindSafe for <a class="struct" href="struct.Framed.html" title="struct tokio_util::codec::Framed">Framed</a><T, U><span class="where fmt-newline">where<br> T: UnwindSafe,<br> U: UnwindSafe,</span></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-Framed%3CT%2C%20U%3E" class="impl has-srclink"><a href="#impl-Any-for-Framed%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl<T> Any for T<span class="where fmt-newline">where<br> T: 'static + ?Sized,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a class="fnname">type_id</a>(&self) -> TypeId</h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-Framed%3CT%2C%20U%3E" class="impl has-srclink"><a href="#impl-Borrow%3CT%3E-for-Framed%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl<T> Borrow<T> for T<span class="where fmt-newline">where<br> T: ?Sized,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="since rightside" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a class="fnname">borrow</a>(&self) -> &T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-Framed%3CT%2C%20U%3E" class="impl has-srclink"><a href="#impl-BorrowMut%3CT%3E-for-Framed%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl<T> BorrowMut<T> for T<span class="where fmt-newline">where<br> T: ?Sized,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="since rightside" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a class="fnname">borrow_mut</a>(&mut self) -> &mut T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-Framed%3CT%2C%20U%3E" class="impl has-srclink"><a href="#impl-From%3CT%3E-for-Framed%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl<T> From<T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="since rightside" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Instrument-for-Framed%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/tracing/instrument.rs.html#276">source</a><a href="#impl-Instrument-for-Framed%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="../../tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.instrument" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/tracing/instrument.rs.html#82">source</a><a href="#method.instrument" class="anchor"></a><h4 class="code-header">fn <a href="../../tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="../../tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="../../tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></h4></section></summary><div class='docblock'>Instruments this type with the provided <a href="../../tracing/span/struct.Span.html" title="Span"><code>Span</code></a>, returning an |
| <code>Instrumented</code> wrapper. <a href="../../tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.in_current_span" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/tracing/instrument.rs.html#121">source</a><a href="#method.in_current_span" class="anchor"></a><h4 class="code-header">fn <a href="../../tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="../../tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></h4></section></summary><div class='docblock'>Instruments this type with the <a href="../../tracing/span/struct.Span.html#method.current">current</a> <a href="../../tracing/span/struct.Span.html"><code>Span</code></a>, returning an |
| <code>Instrumented</code> wrapper. <a href="../../tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-Framed%3CT%2C%20U%3E" class="impl has-srclink"><a href="#impl-Into%3CU%3E-for-Framed%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl<T, U> Into<U> for T<span class="where fmt-newline">where<br> U: From<T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="since rightside" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a class="fnname">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>[From]<T> for U</code> chooses to do.</p> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-Framed%3CT%2C%20U%3E" class="impl has-srclink"><a href="#impl-TryFrom%3CU%3E-for-Framed%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl<T, U> TryFrom<U> for T<span class="where fmt-newline">where<br> U: Into<T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-2" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-2" class="anchor"></a><h4 class="code-header">type <a class="associatedtype">Error</a> = Infallible</h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="since rightside" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a class="fnname">try_from</a>(value: U) -> Result<T, <T as TryFrom<U>>::Error></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-Framed%3CT%2C%20U%3E" class="impl has-srclink"><a href="#impl-TryInto%3CU%3E-for-Framed%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl<T, U> TryInto<U> for T<span class="where fmt-newline">where<br> U: TryFrom<T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a class="associatedtype">Error</a> = <U as TryFrom<T>>::Error</h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="since rightside" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a class="fnname">try_into</a>(self) -> Result<U, <U as TryFrom<T>>::Error></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryStream-for-Framed%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/futures_core/stream.rs.html#185">source</a><a href="#impl-TryStream-for-Framed%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl<S, T, E> <a class="trait" href="../../futures_core/stream/trait.TryStream.html" title="trait futures_core::stream::TryStream">TryStream</a> for S<span class="where fmt-newline">where<br> S: <a class="trait" href="../../futures_core/stream/trait.Stream.html" title="trait futures_core::stream::Stream">Stream</a><Item = Result<T, E>> + ?Sized,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Ok" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Ok" class="anchor"></a><h4 class="code-header">type <a href="../../futures_core/stream/trait.TryStream.html#associatedtype.Ok" class="associatedtype">Ok</a> = T</h4></section></summary><div class='docblock'>The type of successful values yielded by this future</div></details><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-3" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-3" class="anchor"></a><h4 class="code-header">type <a href="../../futures_core/stream/trait.TryStream.html#associatedtype.Error" class="associatedtype">Error</a> = E</h4></section></summary><div class='docblock'>The type of failures yielded by this future</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_poll_next" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/futures_core/stream.rs.html#192-195">source</a><a href="#method.try_poll_next" class="anchor"></a><h4 class="code-header">fn <a href="../../futures_core/stream/trait.TryStream.html#tymethod.try_poll_next" class="fnname">try_poll_next</a>(<br> self: Pin<&mut S>,<br> cx: &mut Context<'_><br>) -> Poll<Option<Result<<S as <a class="trait" href="../../futures_core/stream/trait.TryStream.html" title="trait futures_core::stream::TryStream">TryStream</a>>::<a class="associatedtype" href="../../futures_core/stream/trait.TryStream.html#associatedtype.Ok" title="type futures_core::stream::TryStream::Ok">Ok</a>, <S as <a class="trait" href="../../futures_core/stream/trait.TryStream.html" title="trait futures_core::stream::TryStream">TryStream</a>>::<a class="associatedtype" href="../../futures_core/stream/trait.TryStream.html#associatedtype.Error" title="type futures_core::stream::TryStream::Error">Error</a>>>></h4></section></summary><div class='docblock'>Poll this <code>TryStream</code> as if it were a <code>Stream</code>. <a href="../../futures_core/stream/trait.TryStream.html#tymethod.try_poll_next">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-WithSubscriber-for-Framed%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/tracing/instrument.rs.html#334">source</a><a href="#impl-WithSubscriber-for-Framed%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="../../tracing/instrument/trait.WithSubscriber.html" title="trait tracing::instrument::WithSubscriber">WithSubscriber</a> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_subscriber" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/tracing/instrument.rs.html#169-171">source</a><a href="#method.with_subscriber" class="anchor"></a><h4 class="code-header">fn <a href="../../tracing/instrument/trait.WithSubscriber.html#method.with_subscriber" class="fnname">with_subscriber</a><S>(self, subscriber: S) -> <a class="struct" href="../../tracing/instrument/struct.WithDispatch.html" title="struct tracing::instrument::WithDispatch">WithDispatch</a><Self><span class="where fmt-newline">where<br> S: Into<<a class="struct" href="../../tracing_core/dispatcher/struct.Dispatch.html" title="struct tracing_core::dispatcher::Dispatch">Dispatch</a>>,</span></h4></section></summary><div class='docblock'>Attaches the provided <a href="../../tracing_core/subscriber/trait.Subscriber.html"><code>Subscriber</code></a> to this type, returning a |
| <a href="../../tracing/instrument/struct.WithDispatch.html" title="WithDispatch"><code>WithDispatch</code></a> wrapper. <a href="../../tracing/instrument/trait.WithSubscriber.html#method.with_subscriber">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_current_subscriber" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/tracing/instrument.rs.html#221">source</a><a href="#method.with_current_subscriber" class="anchor"></a><h4 class="code-header">fn <a href="../../tracing/instrument/trait.WithSubscriber.html#method.with_current_subscriber" class="fnname">with_current_subscriber</a>(self) -> <a class="struct" href="../../tracing/instrument/struct.WithDispatch.html" title="struct tracing::instrument::WithDispatch">WithDispatch</a><Self></h4></section></summary><div class='docblock'>Attaches the current <a href="../../tracing/dispatcher/index.html#setting-the-default-subscriber">default</a> <a href="../../tracing_core/subscriber/trait.Subscriber.html"><code>Subscriber</code></a> to this type, returning a |
| <a href="../../tracing/instrument/struct.WithDispatch.html" title="WithDispatch"><code>WithDispatch</code></a> wrapper. <a href="../../tracing/instrument/trait.WithSubscriber.html#method.with_current_subscriber">Read more</a></div></details></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="tokio_util" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html> |