56 lines
42 KiB
HTML
56 lines
42 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="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">☰</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<I></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<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></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><script>window.sidebarCurrent = {name: "FramedRead", ty: "struct", relpath: ""};</script><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="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/tokio_util/codec/framed_read.rs.html#14-23" title="goto source code">[src]</a></span><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></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct FramedRead<T, D> { /* 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<T, D> <a class="struct" href="../../tokio_util/codec/struct.FramedRead.html" title="struct tokio_util::codec::FramedRead">FramedRead</a><T, D> <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> D: <a class="trait" href="../../tokio_util/codec/trait.Decoder.html" title="trait tokio_util::codec::Decoder">Decoder</a>, </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) -> <a class="struct" href="../../tokio_util/codec/struct.FramedRead.html" title="struct tokio_util::codec::FramedRead">FramedRead</a><T, D></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>) -> <a class="struct" href="../../tokio_util/codec/struct.FramedRead.html" title="struct tokio_util::codec::FramedRead">FramedRead</a><T, D></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<T, D> <a class="struct" href="../../tokio_util/codec/struct.FramedRead.html" title="struct tokio_util::codec::FramedRead">FramedRead</a><T, D></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>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</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>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T></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) -> 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>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</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>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&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>(&self) -> &<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>(&mut self) -> &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<T, D> <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><T, D> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>,<br> D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>, </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>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></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<T, I, D> <a class="trait" href="../../futures_sink/trait.Sink.html" title="trait futures_sink::Sink">Sink</a><I> for <a class="struct" href="../../tokio_util/codec/struct.FramedRead.html" title="struct tokio_util::codec::FramedRead">FramedRead</a><T, D> <span class="where fmt-newline">where<br> T: <a class="trait" href="../../futures_sink/trait.Sink.html" title="trait futures_sink::Sink">Sink</a><I>, </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> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self>, <br> cx: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Self::<a class="type" href="../../futures_sink/trait.Sink.html#associatedtype.Error" title="type futures_sink::Sink::Error">Error</a>>></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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self>, item: I) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Self::<a class="type" href="../../futures_sink/trait.Sink.html#associatedtype.Error" title="type futures_sink::Sink::Error">Error</a>></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> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self>, <br> cx: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Self::<a class="type" href="../../futures_sink/trait.Sink.html#associatedtype.Error" title="type futures_sink::Sink::Error">Error</a>>></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> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self>, <br> cx: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Self::<a class="type" href="../../futures_sink/trait.Sink.html#associatedtype.Error" title="type futures_sink::Sink::Error">Error</a>>></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<T, D> <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><T, D> <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> D: <a class="trait" href="../../tokio_util/codec/trait.Decoder.html" title="trait tokio_util::codec::Decoder">Decoder</a>, </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><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>></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> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self>, <br> cx: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="type" href="../../futures_core/stream/trait.Stream.html#associatedtype.Item" title="type futures_core::stream::Stream::Item">Item</a>>></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>(&self) -> <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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>><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-100" 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<'__pin, T, D> <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><T, D> <span class="where fmt-newline">where<br> __Origin<'__pin, T, D>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>, </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<T, D> <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><T, D> <span class="where fmt-newline">where<br> D: <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a>,<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a>, </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<T, D> <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><T, D> <span class="where fmt-newline">where<br> D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>, </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<T, D> <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><T, D> <span class="where fmt-newline">where<br> D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>, </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<T, D> <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><T, D> <span class="where fmt-newline">where<br> D: <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>,<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>, </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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" 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>(&self) -> <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#109-111" 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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </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#210-214" 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>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" 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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </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#217-221" 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>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" 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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</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#552-556" 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) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" 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<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </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#541-548" 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) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547" 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<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </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#589-598" 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) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#595-597" 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<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </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#575-584" 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> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="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) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#581-583" 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<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 = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, E>> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </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> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>S>, <br> cx: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<S as <a class="trait" href="../../futures_core/stream/trait.TryStream.html" title="trait futures_core::stream::TryStream">TryStream</a>>::<a class="type" 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="type" href="../../futures_core/stream/trait.TryStream.html#associatedtype.Error" title="type futures_core::stream::TryStream::Error">Error</a>>>></code><a class="srclink" href="../../src/futures_core/stream.rs.html#198-202" 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><script>window.rootPath = "../../";window.currentCrate = "tokio_util";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html> |