Files
rapr-rs/docs/tokio_util/codec/struct.FramedRead.html
2021-03-26 19:20:48 +00:00

57 lines
42 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!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="API documentation for the Rust `FramedRead` struct in crate `tokio_util`."><meta name="keywords" content="rust, rustlang, rust-lang, FramedRead"><title>tokio_util::codec::FramedRead - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../tokio_util/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct FramedRead</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.decoder">decoder</a><a href="#method.decoder_mut">decoder_mut</a><a href="#method.get_mut">get_mut</a><a href="#method.get_pin_mut">get_pin_mut</a><a href="#method.get_ref">get_ref</a><a href="#method.into_inner">into_inner</a><a href="#method.new">new</a><a href="#method.read_buffer">read_buffer</a><a href="#method.read_buffer_mut">read_buffer_mut</a><a href="#method.with_capacity">with_capacity</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Sink%3CI%3E">Sink&lt;I&gt;</a><a href="#impl-Stream">Stream</a><a href="#impl-Unpin">Unpin</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-TryStream">TryStream</a></div></div><p class="location"><a href="../index.html">tokio_util</a>::<wbr><a href="index.html">codec</a></p><div id="sidebar-vars" data-name="FramedRead" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">tokio_util</a>::<wbr><a href="index.html">codec</a>::<wbr><a class="struct" href="">FramedRead</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#14-23" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct FramedRead&lt;T, D&gt; { /* fields omitted */ }</pre></div><div class="docblock"><p>A <a href="../../futures_core/stream/trait.Stream.html"><code>Stream</code></a> of messages decoded from an <a href="../../tokio/io/async_read/trait.AsyncRead.html"><code>AsyncRead</code></a>.</p>
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl&lt;T, D&gt; <a class="struct" href="../../tokio_util/codec/struct.FramedRead.html" title="struct tokio_util::codec::FramedRead">FramedRead</a>&lt;T, D&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../tokio/io/async_read/trait.AsyncRead.html" title="trait tokio::io::async_read::AsyncRead">AsyncRead</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="../../tokio_util/codec/trait.Decoder.html" title="trait tokio_util::codec::Decoder">Decoder</a>,&nbsp;</span></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#27-58" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(inner: T, decoder: D) -&gt; <a class="struct" href="../../tokio_util/codec/struct.FramedRead.html" title="struct tokio_util::codec::FramedRead">FramedRead</a>&lt;T, D&gt;</code><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#33-41" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates a new <code>FramedRead</code> with the given <code>decoder</code>.</p>
</div><h4 id="method.with_capacity" class="method"><code>pub fn <a href="#method.with_capacity" class="fnname">with_capacity</a>(inner: T, decoder: D, capacity: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="../../tokio_util/codec/struct.FramedRead.html" title="struct tokio_util::codec::FramedRead">FramedRead</a>&lt;T, D&gt;</code><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#45-57" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates a new <code>FramedRead</code> with the given <code>decoder</code> and a buffer of <code>capacity</code>
initial size.</p>
</div></div><h3 id="impl-1" class="impl"><code class="in-band">impl&lt;T, D&gt; <a class="struct" href="../../tokio_util/codec/struct.FramedRead.html" title="struct tokio_util::codec::FramedRead">FramedRead</a>&lt;T, D&gt;</code><a href="#impl-1" class="anchor"></a><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#60-119" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.get_ref" class="method"><code>pub fn <a href="#method.get_ref" class="fnname">get_ref</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#67-69" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns a reference to the underlying I/O stream wrapped by
<code>FramedRead</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><h4 id="method.get_mut" class="method"><code>pub fn <a href="#method.get_mut" class="fnname">get_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#77-79" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns a mutable reference to the underlying I/O stream wrapped by
<code>FramedRead</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><h4 id="method.get_pin_mut" class="method"><code>pub fn <a href="#method.get_pin_mut" class="fnname">get_pin_mut</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T&gt;</code><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#87-89" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns a pinned mutable reference to the underlying I/O stream wrapped by
<code>FramedRead</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><h4 id="method.into_inner" class="method"><code>pub fn <a href="#method.into_inner" class="fnname">into_inner</a>(self) -&gt; T</code><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#96-98" title="goto source code">[src]</a></h4><div class="docblock"><p>Consumes the <code>FramedRead</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><h4 id="method.decoder" class="method"><code>pub fn <a href="#method.decoder" class="fnname">decoder</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>D</code><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#101-103" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns a reference to the underlying decoder.</p>
</div><h4 id="method.decoder_mut" class="method"><code>pub fn <a href="#method.decoder_mut" class="fnname">decoder_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>D</code><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#106-108" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns a mutable reference to the underlying decoder.</p>
</div><h4 id="method.read_buffer" class="method"><code>pub fn <a href="#method.read_buffer" class="fnname">read_buffer</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../bytes/bytes_mut/struct.BytesMut.html" title="struct bytes::bytes_mut::BytesMut">BytesMut</a></code><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#111-113" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns a reference to the read buffer.</p>
</div><h4 id="method.read_buffer_mut" class="method"><code>pub fn <a href="#method.read_buffer_mut" class="fnname">read_buffer_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="../../bytes/bytes_mut/struct.BytesMut.html" title="struct bytes::bytes_mut::BytesMut">BytesMut</a></code><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#116-118" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns a mutable reference to the read buffer.</p>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Debug" class="impl"><code class="in-band">impl&lt;T, D&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../tokio_util/codec/struct.FramedRead.html" title="struct tokio_util::codec::FramedRead">FramedRead</a>&lt;T, D&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>,&nbsp;</span></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#158-172" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#163-171" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id="impl-Sink%3CI%3E" class="impl"><code class="in-band">impl&lt;T, I, D&gt; <a class="trait" href="../../futures_sink/trait.Sink.html" title="trait futures_sink::Sink">Sink</a>&lt;I&gt; for <a class="struct" href="../../tokio_util/codec/struct.FramedRead.html" title="struct tokio_util::codec::FramedRead">FramedRead</a>&lt;T, D&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../futures_sink/trait.Sink.html" title="trait futures_sink::Sink">Sink</a>&lt;I&gt;,&nbsp;</span></code><a href="#impl-Sink%3CI%3E" class="anchor"></a><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#135-156" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="../../futures_sink/trait.Sink.html#associatedtype.Error" class="type">Error</a> = T::<a class="type" href="../../futures_sink/trait.Sink.html#associatedtype.Error" title="type futures_sink::Sink::Error">Error</a></code></h4><div class='docblock'><p>The type of value produced by the sink when an error occurs.</p>
</div><h4 id="method.poll_ready" class="method hidden"><code>fn <a href="../../futures_sink/trait.Sink.html#tymethod.poll_ready" class="fnname">poll_ready</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;cx: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a>&lt;'_&gt;<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Self::<a class="type" href="../../futures_sink/trait.Sink.html#associatedtype.Error" title="type futures_sink::Sink::Error">Error</a>&gt;&gt;</code><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#141-143" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Attempts to prepare the <code>Sink</code> to receive a value. <a href="../../futures_sink/trait.Sink.html#tymethod.poll_ready">Read more</a></p>
</div><h4 id="method.start_send" class="method hidden"><code>fn <a href="../../futures_sink/trait.Sink.html#tymethod.start_send" class="fnname">start_send</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self&gt;, item: I) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Self::<a class="type" href="../../futures_sink/trait.Sink.html#associatedtype.Error" title="type futures_sink::Sink::Error">Error</a>&gt;</code><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#145-147" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>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></p>
</div><h4 id="method.poll_flush" class="method hidden"><code>fn <a href="../../futures_sink/trait.Sink.html#tymethod.poll_flush" class="fnname">poll_flush</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;cx: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a>&lt;'_&gt;<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Self::<a class="type" href="../../futures_sink/trait.Sink.html#associatedtype.Error" title="type futures_sink::Sink::Error">Error</a>&gt;&gt;</code><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#149-151" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Flush any remaining output from this sink. <a href="../../futures_sink/trait.Sink.html#tymethod.poll_flush">Read more</a></p>
</div><h4 id="method.poll_close" class="method hidden"><code>fn <a href="../../futures_sink/trait.Sink.html#tymethod.poll_close" class="fnname">poll_close</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;cx: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a>&lt;'_&gt;<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Self::<a class="type" href="../../futures_sink/trait.Sink.html#associatedtype.Error" title="type futures_sink::Sink::Error">Error</a>&gt;&gt;</code><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#153-155" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Flush any remaining output and close this sink, if necessary. <a href="../../futures_sink/trait.Sink.html#tymethod.poll_close">Read more</a></p>
</div></div><h3 id="impl-Stream" class="impl"><code class="in-band">impl&lt;T, D&gt; <a class="trait" href="../../futures_core/stream/trait.Stream.html" title="trait futures_core::stream::Stream">Stream</a> for <a class="struct" href="../../tokio_util/codec/struct.FramedRead.html" title="struct tokio_util::codec::FramedRead">FramedRead</a>&lt;T, D&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../tokio/io/async_read/trait.AsyncRead.html" title="trait tokio::io::async_read::AsyncRead">AsyncRead</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="../../tokio_util/codec/trait.Decoder.html" title="trait tokio_util::codec::Decoder">Decoder</a>,&nbsp;</span></code><a href="#impl-Stream" class="anchor"></a><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#122-132" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Item" class="type"><code>type <a href="../../futures_core/stream/trait.Stream.html#associatedtype.Item" class="type">Item</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;D::<a class="type" href="../../tokio_util/codec/trait.Decoder.html#associatedtype.Item" title="type tokio_util::codec::Decoder::Item">Item</a>, D::<a class="type" href="../../tokio_util/codec/trait.Decoder.html#associatedtype.Error" title="type tokio_util::codec::Decoder::Error">Error</a>&gt;</code></h4><div class='docblock'><p>Values yielded by the stream.</p>
</div><h4 id="method.poll_next" class="method hidden"><code>fn <a href="../../futures_core/stream/trait.Stream.html#tymethod.poll_next" class="fnname">poll_next</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;cx: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a>&lt;'_&gt;<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="type" href="../../futures_core/stream/trait.Stream.html#associatedtype.Item" title="type futures_core::stream::Stream::Item">Item</a>&gt;&gt;</code><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#129-131" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Attempt to pull out the next value of this stream, registering the
current task for wakeup if the value is not yet available, and returning
<code>None</code> if the stream is exhausted. <a href="../../futures_core/stream/trait.Stream.html#tymethod.poll_next">Read more</a></p>
</div><h4 id="method.size_hint" class="method hidden"><code>pub fn <a href="../../futures_core/stream/trait.Stream.html#method.size_hint" class="fnname">size_hint</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class="srclink" href="../../src/futures_core/stream.rs.html#98" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the bounds on the remaining length of the stream. <a href="../../futures_core/stream/trait.Stream.html#method.size_hint">Read more</a></p>
</div></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl&lt;'__pin, T, D&gt; <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="../../tokio_util/codec/struct.FramedRead.html" title="struct tokio_util::codec::FramedRead">FramedRead</a>&lt;T, D&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__Origin&lt;'__pin, T, D&gt;: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,&nbsp;</span></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#14-23" title="goto source code">[src]</a></h3><div class="impl-items"></div></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"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl&lt;T, D&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../tokio_util/codec/struct.FramedRead.html" title="struct tokio_util::codec::FramedRead">FramedRead</a>&lt;T, D&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a>,&nbsp;</span></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../src/tokio_util/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl&lt;T, D&gt; <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="../../tokio_util/codec/struct.FramedRead.html" title="struct tokio_util::codec::FramedRead">FramedRead</a>&lt;T, D&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,&nbsp;</span></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../src/tokio_util/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl&lt;T, D&gt; <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="../../tokio_util/codec/struct.FramedRead.html" title="struct tokio_util::codec::FramedRead">FramedRead</a>&lt;T, D&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,&nbsp;</span></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../src/tokio_util/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl&lt;T, D&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../tokio_util/codec/struct.FramedRead.html" title="struct tokio_util::codec::FramedRead">FramedRead</a>&lt;T, D&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>,&nbsp;</span></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../src/tokio_util/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>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></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#207-211" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214-218" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#215" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>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></p>
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-549" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -&gt; T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#546" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#534-541" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -&gt; U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#538" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#582-591" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#588" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#568-577" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-2" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id="method.try_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#574" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-TryStream" class="impl"><code class="in-band">impl&lt;S, T, E&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../futures_core/stream/trait.Stream.html" title="trait futures_core::stream::Stream">Stream</a>&lt;Item = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, E&gt;&gt; + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-TryStream" class="anchor"></a><a class="srclink" href="../../src/futures_core/stream.rs.html#192-203" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Ok" class="type"><code>type <a href="../../futures_core/stream/trait.TryStream.html#associatedtype.Ok" class="type">Ok</a> = T</code></h4><div class='docblock'><p>The type of successful values yielded by this future</p>
</div><h4 id="associatedtype.Error-3" class="type"><code>type <a href="../../futures_core/stream/trait.TryStream.html#associatedtype.Error" class="type">Error</a> = E</code></h4><div class='docblock'><p>The type of failures yielded by this future</p>
</div><h4 id="method.try_poll_next" class="method hidden"><code>pub fn <a href="../../futures_core/stream/trait.TryStream.html#tymethod.try_poll_next" class="fnname">try_poll_next</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>S&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;cx: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a>&lt;'_&gt;<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;&lt;S as <a class="trait" href="../../futures_core/stream/trait.TryStream.html" title="trait futures_core::stream::TryStream">TryStream</a>&gt;::<a class="type" href="../../futures_core/stream/trait.TryStream.html#associatedtype.Ok" title="type futures_core::stream::TryStream::Ok">Ok</a>, &lt;S as <a class="trait" href="../../futures_core/stream/trait.TryStream.html" title="trait futures_core::stream::TryStream">TryStream</a>&gt;::<a class="type" href="../../futures_core/stream/trait.TryStream.html#associatedtype.Error" title="type futures_core::stream::TryStream::Error">Error</a>&gt;&gt;&gt;</code><a class="srclink" href="../../src/futures_core/stream.rs.html#198-199" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>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></p>
</div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="tokio_util"></div>
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>