1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-24 00:01:11 +01:00
actix-net/actix_codec/trait.AsyncRead.html
2024-10-01 00:01:00 +00:00

106 lines
32 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="Reads bytes from a source."><title>AsyncRead in actix_codec - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-b778ab399e080a4b.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="actix_codec" data-themes="" data-resource-suffix="" data-rustdoc-version="1.83.0-nightly (7608018cb 2024-09-29)" data-channel="nightly" data-search-js="search-e056c65ede92db13.js" data-settings-js="settings-805db61a62df4bd2.js" ><script src="../static.files/storage-1d39b6787ed640ff.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-54bc299d2a5e4e43.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-0111fcff984fae8f.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="../actix_codec/index.html"><img src="https://actix.rs/img/logo.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../actix_codec/index.html"><img src="https://actix.rs/img/logo.png" alt="logo"></a><h2><a href="../actix_codec/index.html">actix_<wbr>codec</a><span class="version">0.5.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Async<wbr>Read</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.poll_read" title="poll_read">poll_read</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-AsyncRead-for-%26%5Bu8%5D" title="&#38;[u8]">&#38;[u8]</a></li><li><a href="#impl-AsyncRead-for-%26mut+T" title="&#38;mut T">&#38;mut T</a></li><li><a href="#impl-AsyncRead-for-Box%3CT%3E" title="Box&#60;T&#62;">Box&#60;T&#62;</a></li><li><a href="#impl-AsyncRead-for-Cursor%3CT%3E" title="Cursor&#60;T&#62;">Cursor&#60;T&#62;</a></li><li><a href="#impl-AsyncRead-for-Either%3CL,+R%3E" title="Either&#60;L, R&#62;">Either&#60;L, R&#62;</a></li><li><a href="#impl-AsyncRead-for-InspectReader%3CR,+F%3E" title="InspectReader&#60;R, F&#62;">InspectReader&#60;R, F&#62;</a></li><li><a href="#impl-AsyncRead-for-InspectWriter%3CW,+F%3E" title="InspectWriter&#60;W, F&#62;">InspectWriter&#60;W, F&#62;</a></li><li><a href="#impl-AsyncRead-for-Pin%3CP%3E" title="Pin&#60;P&#62;">Pin&#60;P&#62;</a></li><li><a href="#impl-AsyncRead-for-SinkWriter%3CS%3E" title="SinkWriter&#60;S&#62;">SinkWriter&#60;S&#62;</a></li><li><a href="#impl-AsyncRead-for-StreamReader%3CS,+B%3E" title="StreamReader&#60;S, B&#62;">StreamReader&#60;S, B&#62;</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate actix_<wbr>codec</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">actix_codec</a></span><h1>Trait <span class="trait">AsyncRead</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub trait AsyncRead {
// Required method
fn <a href="#tymethod.poll_read" class="fn">poll_read</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;&amp;mut Self&gt;,
cx: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a>&lt;'_&gt;,
buf: &amp;mut <a class="struct" href="struct.ReadBuf.html" title="struct actix_codec::ReadBuf">ReadBuf</a>&lt;'_&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/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>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;&gt;;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Reads bytes from a source.</p>
<p>This trait is analogous to the <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read"><code>std::io::Read</code></a> trait, but integrates with
the asynchronous task system. In particular, the <a href="trait.AsyncRead.html#tymethod.poll_read" title="method actix_codec::AsyncRead::poll_read"><code>poll_read</code></a> method,
unlike <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#tymethod.read" title="method std::io::Read::read"><code>Read::read</code></a>, will automatically queue the current task for wakeup
and return if data is not yet available, rather than blocking the calling
thread.</p>
<p>Specifically, this means that the <code>poll_read</code> function will return one of
the following:</p>
<ul>
<li>
<p><code>Poll::Ready(Ok(()))</code> means that data was immediately read and placed into
the output buffer. The amount of data read can be determined by the
increase in the length of the slice returned by <code>ReadBuf::filled</code>. If the
difference is 0, either EOF has been reached, or the output buffer had zero
capacity (i.e. <code>buf.remaining()</code> == 0).</p>
</li>
<li>
<p><code>Poll::Pending</code> means that no data was read into the buffer
provided. The I/O object is not currently readable but may become readable
in the future. Most importantly, <strong>the current futures task is scheduled
to get unparked when the object is readable</strong>. This means that like
<code>Future::poll</code> youll receive a notification when the I/O object is
readable again.</p>
</li>
<li>
<p><code>Poll::Ready(Err(e))</code> for other errors are standard I/O errors coming from the
underlying object.</p>
</li>
</ul>
<p>This trait importantly means that the <code>read</code> method only works in the
context of a futures task. The object may panic if used outside of a task.</p>
<p>Utilities for working with <code>AsyncRead</code> values are provided by
<a href="crate::io::AsyncReadExt"><code>AsyncReadExt</code></a>.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.poll_read" class="method"><h4 class="code-header">fn <a href="#tymethod.poll_read" class="fn">poll_read</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;&amp;mut Self&gt;,
cx: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a>&lt;'_&gt;,
buf: &amp;mut <a class="struct" href="struct.ReadBuf.html" title="struct actix_codec::ReadBuf">ReadBuf</a>&lt;'_&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/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>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;&gt;</h4></section></summary><div class="docblock"><p>Attempts to read from the <code>AsyncRead</code> into <code>buf</code>.</p>
<p>On success, returns <code>Poll::Ready(Ok(()))</code> and places data in the
unfilled portion of <code>buf</code>. If no data was read (<code>buf.filled().len()</code> is
unchanged), it implies that EOF has been reached.</p>
<p>If no data is available for reading, the method returns <code>Poll::Pending</code>
and arranges for the current task (via <code>cx.waker()</code>) to receive a
notification when the object becomes readable or is closed.</p>
</div></details></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-AsyncRead-for-%26%5Bu8%5D" class="impl"><a href="#impl-AsyncRead-for-%26%5Bu8%5D" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><section id="method.poll_read" class="method trait-impl"><a href="#method.poll_read" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_read" class="fn">poll_read</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;&amp;mut &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt;,
_cx: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a>&lt;'_&gt;,
buf: &amp;mut <a class="struct" href="struct.ReadBuf.html" title="struct actix_codec::ReadBuf">ReadBuf</a>&lt;'_&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/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>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;&gt;</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AsyncRead-for-Either%3CL,+R%3E" class="impl"><a href="#impl-AsyncRead-for-Either%3CL,+R%3E" class="anchor">§</a><h3 class="code-header">impl&lt;L, R&gt; <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for Either&lt;L, R&gt;<div class="where">where
L: <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a>,
R: <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a>,</div></h3></section></summary><div class="impl-items"><section id="method.poll_read-1" class="method trait-impl"><a href="#method.poll_read-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_read" class="fn">poll_read</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;&amp;mut Either&lt;L, R&gt;&gt;,
cx: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a>&lt;'_&gt;,
buf: &amp;mut <a class="struct" href="struct.ReadBuf.html" title="struct actix_codec::ReadBuf">ReadBuf</a>&lt;'_&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/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>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;&gt;</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AsyncRead-for-Pin%3CP%3E" class="impl"><a href="#impl-AsyncRead-for-Pin%3CP%3E" class="anchor">§</a><h3 class="code-header">impl&lt;P&gt; <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a>&lt;P&gt;<div class="where">where
P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,
&lt;P as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target" title="type core::ops::deref::Deref::Target">Target</a>: <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a>,</div></h3></section></summary><div class="impl-items"><section id="method.poll_read-2" class="method trait-impl"><a href="#method.poll_read-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_read" class="fn">poll_read</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;&amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a>&lt;P&gt;&gt;,
cx: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a>&lt;'_&gt;,
buf: &amp;mut <a class="struct" href="struct.ReadBuf.html" title="struct actix_codec::ReadBuf">ReadBuf</a>&lt;'_&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/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>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;&gt;</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AsyncRead-for-InspectReader%3CR,+F%3E" class="impl"><a href="#impl-AsyncRead-for-InspectReader%3CR,+F%3E" class="anchor">§</a><h3 class="code-header">impl&lt;R, F&gt; <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for InspectReader&lt;R, F&gt;<div class="where">where
R: <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a>,
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]),</div></h3></section></summary><div class="impl-items"><section id="method.poll_read-3" class="method trait-impl"><a href="#method.poll_read-3" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_read" class="fn">poll_read</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;&amp;mut InspectReader&lt;R, F&gt;&gt;,
cx: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a>&lt;'_&gt;,
buf: &amp;mut <a class="struct" href="struct.ReadBuf.html" title="struct actix_codec::ReadBuf">ReadBuf</a>&lt;'_&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/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>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;&gt;</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AsyncRead-for-SinkWriter%3CS%3E" class="impl"><a href="#impl-AsyncRead-for-SinkWriter%3CS%3E" class="anchor">§</a><h3 class="code-header">impl&lt;S&gt; <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for SinkWriter&lt;S&gt;<div class="where">where
S: <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a>,</div></h3></section></summary><div class="impl-items"><section id="method.poll_read-4" class="method trait-impl"><a href="#method.poll_read-4" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_read" class="fn">poll_read</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;&amp;mut SinkWriter&lt;S&gt;&gt;,
cx: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a>&lt;'_&gt;,
buf: &amp;mut <a class="struct" href="struct.ReadBuf.html" title="struct actix_codec::ReadBuf">ReadBuf</a>&lt;'_&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/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>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;&gt;</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AsyncRead-for-StreamReader%3CS,+B%3E" class="impl"><a href="#impl-AsyncRead-for-StreamReader%3CS,+B%3E" class="anchor">§</a><h3 class="code-header">impl&lt;S, B, E&gt; <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for StreamReader&lt;S, B&gt;<div class="where">where
S: Stream&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;B, E&gt;&gt;,
B: Buf,
E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;,</div></h3></section></summary><div class="impl-items"><section id="method.poll_read-5" class="method trait-impl"><a href="#method.poll_read-5" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_read" class="fn">poll_read</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;&amp;mut StreamReader&lt;S, B&gt;&gt;,
cx: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a>&lt;'_&gt;,
buf: &amp;mut <a class="struct" href="struct.ReadBuf.html" title="struct actix_codec::ReadBuf">ReadBuf</a>&lt;'_&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/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>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;&gt;</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AsyncRead-for-%26mut+T" class="impl"><a href="#impl-AsyncRead-for-%26mut+T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a><div class="where">where
T: <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><section id="method.poll_read-6" class="method trait-impl"><a href="#method.poll_read-6" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_read" class="fn">poll_read</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;&amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a>&gt;,
cx: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a>&lt;'_&gt;,
buf: &amp;mut <a class="struct" href="struct.ReadBuf.html" title="struct actix_codec::ReadBuf">ReadBuf</a>&lt;'_&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/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>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;&gt;</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AsyncRead-for-Box%3CT%3E" class="impl"><a href="#impl-AsyncRead-for-Box%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><section id="method.poll_read-7" class="method trait-impl"><a href="#method.poll_read-7" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_read" class="fn">poll_read</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;&amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;T&gt;&gt;,
cx: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a>&lt;'_&gt;,
buf: &amp;mut <a class="struct" href="struct.ReadBuf.html" title="struct actix_codec::ReadBuf">ReadBuf</a>&lt;'_&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/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>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;&gt;</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AsyncRead-for-Cursor%3CT%3E" class="impl"><a href="#impl-AsyncRead-for-Cursor%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/cursor/struct.Cursor.html" title="struct std::io::cursor::Cursor">Cursor</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h3></section></summary><div class="impl-items"><section id="method.poll_read-8" class="method trait-impl"><a href="#method.poll_read-8" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_read" class="fn">poll_read</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;&amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/cursor/struct.Cursor.html" title="struct std::io::cursor::Cursor">Cursor</a>&lt;T&gt;&gt;,
_cx: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a>&lt;'_&gt;,
buf: &amp;mut <a class="struct" href="struct.ReadBuf.html" title="struct actix_codec::ReadBuf">ReadBuf</a>&lt;'_&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/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>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;&gt;</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AsyncRead-for-InspectWriter%3CW,+F%3E" class="impl"><a href="#impl-AsyncRead-for-InspectWriter%3CW,+F%3E" class="anchor">§</a><h3 class="code-header">impl&lt;W, F&gt; <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for InspectWriter&lt;W, F&gt;<div class="where">where
W: <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a>,</div></h3></section></summary><div class="impl-items"><section id="method.poll_read-9" class="method trait-impl"><a href="#method.poll_read-9" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_read" class="fn">poll_read</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;&amp;mut InspectWriter&lt;W, F&gt;&gt;,
cx: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a>&lt;'_&gt;,
buf: &amp;mut <a class="struct" href="struct.ReadBuf.html" title="struct actix_codec::ReadBuf">ReadBuf</a>&lt;'_&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/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>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;&gt;</h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-AsyncRead-for-OwnedReadHalf" class="impl"><a href="#impl-AsyncRead-for-OwnedReadHalf" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for OwnedReadHalf</h3></section><section id="impl-AsyncRead-for-OwnedReadHalf-1" class="impl"><a href="#impl-AsyncRead-for-OwnedReadHalf-1" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for OwnedReadHalf</h3></section><section id="impl-AsyncRead-for-ReadHalf%3C'_%3E" class="impl"><a href="#impl-AsyncRead-for-ReadHalf%3C'_%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for ReadHalf&lt;'_&gt;</h3></section><section id="impl-AsyncRead-for-ReadHalf%3C'_%3E-1" class="impl"><a href="#impl-AsyncRead-for-ReadHalf%3C'_%3E-1" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for ReadHalf&lt;'_&gt;</h3></section><section id="impl-AsyncRead-for-Receiver" class="impl"><a href="#impl-AsyncRead-for-Receiver" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for Receiver</h3></section><section id="impl-AsyncRead-for-TcpStream" class="impl"><a href="#impl-AsyncRead-for-TcpStream" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for TcpStream</h3></section><section id="impl-AsyncRead-for-UnixStream" class="impl"><a href="#impl-AsyncRead-for-UnixStream" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for UnixStream</h3></section></div><script src="../trait.impl/tokio/io/async_read/trait.AsyncRead.js" data-ignore-extern-crates="alloc,core,tokio,std,tokio_util" async></script></section></div></main></body></html>