91 lines
31 KiB
HTML
91 lines
31 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 `AsyncRead` trait in crate `actix_codec`."><meta name="keywords" content="rust, rustlang, rust-lang, AsyncRead"><title>actix_codec::AsyncRead - 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="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[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='../actix_codec/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Trait AsyncRead</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.framed">framed</a><a href="#method.poll_read">poll_read</a><a href="#method.prepare_uninitialized_buffer">prepare_uninitialized_buffer</a><a href="#method.read_buf">read_buf</a><a href="#method.split">split</a></div><a class="sidebar-title" href="#foreign-impls">Implementations on Foreign Types</a><div class="sidebar-links"><a href="#impl-AsyncRead-for-%26%27a%20%5Bu8%5D">&'a [u8]</a><a href="#impl-AsyncRead-for-%26%27a%20mut%20T">&'a mut T</a><a href="#impl-AsyncRead-for-AllowStdIo%3CT%3E">AllowStdIo<T></a><a href="#impl-AsyncRead-for-Box%3CT%3E">Box<T></a><a href="#impl-AsyncRead-for-BufReader%3CT%3E">BufReader<T></a><a href="#impl-AsyncRead-for-Chain%3CT%2C%20U%3E">Chain<T, U></a><a href="#impl-AsyncRead-for-Cursor%3CT%3E">Cursor<T></a><a href="#impl-AsyncRead-for-ReadHalf%3CT%3E">ReadHalf<T></a><a href="#impl-AsyncRead-for-Repeat">Repeat</a><a href="#impl-AsyncRead-for-Take%3CT%3E">Take<T></a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='index.html'>actix_codec</a></p><script>window.sidebarCurrent = {name: 'AsyncRead', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></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><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_io/async_read.rs.html#35-155' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='index.html'>actix_codec</a>::<wbr><a class="trait" href=''>AsyncRead</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub trait AsyncRead: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> {
|
||
unsafe fn <a href='#method.prepare_uninitialized_buffer' class='fnname'>prepare_uninitialized_buffer</a>(&self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> { ... }
|
||
<div class='item-spacer'></div> fn <a href='#method.poll_read' class='fnname'>poll_read</a>(&mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../futures/poll/enum.Async.html" title="enum futures::poll::Async">Async</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>> { ... }
|
||
<div class='item-spacer'></div> fn <a href='#method.read_buf' class='fnname'>read_buf</a><B>(&mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>B) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../futures/poll/enum.Async.html" title="enum futures::poll::Async">Async</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>><br> <span class="where">where<br> B: <a class="trait" href="../bytes/buf/buf_mut/trait.BufMut.html" title="trait bytes::buf::buf_mut::BufMut">BufMut</a></span>,
|
||
{ ... }
|
||
<div class='item-spacer'></div> fn <a href='#method.framed' class='fnname'>framed</a><T>(self, codec: T) -> Framed<Self, T><br> <span class="where">where<br> Self: <a class="trait" href="../actix_codec/trait.AsyncWrite.html" title="trait actix_codec::AsyncWrite">AsyncWrite</a>,<br> T: <a class="trait" href="../actix_codec/trait.Decoder.html" title="trait actix_codec::Decoder">Decoder</a> + <a class="trait" href="../actix_codec/trait.Encoder.html" title="trait actix_codec::Encoder">Encoder</a></span>,
|
||
{ ... }
|
||
<div class='item-spacer'></div> fn <a href='#method.split' class='fnname'>split</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../tokio_io/split/struct.ReadHalf.html" title="struct tokio_io::split::ReadHalf">ReadHalf</a><Self>, <a class="struct" href="../tokio_io/split/struct.WriteHalf.html" title="struct tokio_io::split::WriteHalf">WriteHalf</a><Self><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a><br> <span class="where">where<br> Self: <a class="trait" href="../actix_codec/trait.AsyncWrite.html" title="trait actix_codec::AsyncWrite">AsyncWrite</a></span>,
|
||
{ ... }
|
||
}</pre></div><div class='docblock'><p>Read bytes asynchronously.</p>
|
||
<p>This trait inherits from <code>std::io::Read</code> and indicates that an I/O object is
|
||
<strong>non-blocking</strong>. All non-blocking I/O objects must return an error when
|
||
bytes are unavailable instead of blocking the current thread.</p>
|
||
<p>Specifically, this means that the <code>poll_read</code> function will return one of
|
||
the following:</p>
|
||
<ul>
|
||
<li>
|
||
<p><code>Ok(Async::Ready(n))</code> means that <code>n</code> bytes of data was immediately read
|
||
and placed into the output buffer, where <code>n</code> == 0 implies that EOF has
|
||
been reached.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>Ok(Async::NotReady)</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 future's task is scheduled
|
||
to get unparked when the object is readable</strong>. This means that like
|
||
<code>Future::poll</code> you'll receive a notification when the I/O object is
|
||
readable again.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>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 future's task. The object may panic if used outside of a task.</p>
|
||
</div>
|
||
<h2 id='provided-methods' class='small-section-header'>Provided methods<a href='#provided-methods' class='anchor'></a></h2><div class='methods'><h3 id='method.prepare_uninitialized_buffer' class='method'><code id='prepare_uninitialized_buffer.v'>unsafe fn <a href='#method.prepare_uninitialized_buffer' class='fnname'>prepare_uninitialized_buffer</a>(&self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h3><div class='docblock'><p>Prepares an uninitialized buffer to be safe to pass to <code>read</code>. Returns
|
||
<code>true</code> if the supplied buffer was zeroed out.</p>
|
||
<p>While it would be highly unusual, implementations of <a href="https://doc.rust-lang.org/std/io/trait.Read.html"><code>io::Read</code></a> are
|
||
able to read data from the buffer passed as an argument. Because of
|
||
this, the buffer passed to <a href="https://doc.rust-lang.org/std/io/trait.Read.html"><code>io::Read</code></a> must be initialized memory. In
|
||
situations where large numbers of buffers are used, constantly having to
|
||
zero out buffers can be expensive.</p>
|
||
<p>This function does any necessary work to prepare an uninitialized buffer
|
||
to be safe to pass to <code>read</code>. If <code>read</code> guarantees to never attempt to
|
||
read data out of the supplied buffer, then <code>prepare_uninitialized_buffer</code>
|
||
doesn't need to do any work.</p>
|
||
<p>If this function returns <code>true</code>, then the memory has been zeroed out.
|
||
This allows implementations of <code>AsyncRead</code> which are composed of
|
||
multiple subimplementations to efficiently implement
|
||
<code>prepare_uninitialized_buffer</code>.</p>
|
||
<p>This function isn't actually <code>unsafe</code> to call but <code>unsafe</code> to implement.
|
||
The implementer must ensure that either the whole <code>buf</code> has been zeroed
|
||
or <code>read_buf()</code> overwrites the buffer without reading it and returns
|
||
correct value.</p>
|
||
<p>This function is called from <a href="#method.read_buf"><code>read_buf</code></a>.</p>
|
||
</div><h3 id='method.poll_read' class='method'><code id='poll_read.v'>fn <a href='#method.poll_read' class='fnname'>poll_read</a>(&mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../futures/poll/enum.Async.html" title="enum futures::poll::Async">Async</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>></code></h3><div class='docblock'><p>Attempt to read from the <code>AsyncRead</code> into <code>buf</code>.</p>
|
||
<p>On success, returns <code>Ok(Async::Ready(num_bytes_read))</code>.</p>
|
||
<p>If no data is available for reading, the method returns
|
||
<code>Ok(Async::NotReady)</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><h3 id='method.read_buf' class='method'><code id='read_buf.v'>fn <a href='#method.read_buf' class='fnname'>read_buf</a><B>(&mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>B) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../futures/poll/enum.Async.html" title="enum futures::poll::Async">Async</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../bytes/buf/buf_mut/trait.BufMut.html" title="trait bytes::buf::buf_mut::BufMut">BufMut</a>, </span></code></h3><div class='docblock'><p>Pull some bytes from this source into the specified <code>BufMut</code>, returning
|
||
how many bytes were read.</p>
|
||
<p>The <code>buf</code> provided will have bytes read into it and the internal cursor
|
||
will be advanced if any bytes were read. Note that this method typically
|
||
will not reallocate the buffer provided.</p>
|
||
</div><h3 id='method.framed' class='method'><code id='framed.v'>fn <a href='#method.framed' class='fnname'>framed</a><T>(self, codec: T) -> Framed<Self, T> <span class="where fmt-newline">where<br> Self: <a class="trait" href="../actix_codec/trait.AsyncWrite.html" title="trait actix_codec::AsyncWrite">AsyncWrite</a>,<br> T: <a class="trait" href="../actix_codec/trait.Decoder.html" title="trait actix_codec::Decoder">Decoder</a> + <a class="trait" href="../actix_codec/trait.Encoder.html" title="trait actix_codec::Encoder">Encoder</a>, </span></code></h3><div class='stability'><div class='stab deprecated'>Deprecated since 0.1.7: <p>Use tokio_codec::Decoder::framed instead</p>
|
||
</div></div><div class='docblock'><p>Provides a <code>Stream</code> and <code>Sink</code> interface for reading and writing to this
|
||
I/O object, using <code>Decode</code> and <code>Encode</code> to read and write the raw data.</p>
|
||
<p>Raw I/O objects work with byte sequences, but higher-level code usually
|
||
wants to batch these into meaningful chunks, called "frames". This
|
||
method layers framing on top of an I/O object, by using the <code>Codec</code>
|
||
traits to handle encoding and decoding of messages frames. Note that
|
||
the incoming and outgoing frame types may be distinct.</p>
|
||
<p>This function returns a <em>single</em> object that is both <code>Stream</code> and
|
||
<code>Sink</code>; grouping this into a single object is often useful for layering
|
||
things like gzip or TLS, which require both read and write access to the
|
||
underlying object.</p>
|
||
<p>If you want to work more directly with the streams and sink, consider
|
||
calling <code>split</code> on the <code>Framed</code> returned by this method, which will
|
||
break them into separate objects, allowing them to interact more easily.</p>
|
||
</div><h3 id='method.split' class='method'><code id='split.v'>fn <a href='#method.split' class='fnname'>split</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../tokio_io/split/struct.ReadHalf.html" title="struct tokio_io::split::ReadHalf">ReadHalf</a><Self>, <a class="struct" href="../tokio_io/split/struct.WriteHalf.html" title="struct tokio_io::split::WriteHalf">WriteHalf</a><Self><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a> <span class="where fmt-newline">where<br> Self: <a class="trait" href="../actix_codec/trait.AsyncWrite.html" title="trait actix_codec::AsyncWrite">AsyncWrite</a>, </span></code></h3><div class='docblock'><p>Helper method for splitting this read/write object into two halves.</p>
|
||
<p>The two halves returned implement the <code>Read</code> and <code>Write</code> traits,
|
||
respectively.</p>
|
||
<p>To restore this read/write object from its <code>ReadHalf</code> and <code>WriteHalf</code>
|
||
use <code>unsplit</code>.</p>
|
||
</div></div><span class='loading-content'>Loading content...</span>
|
||
<h2 id='foreign-impls' class='small-section-header'>Implementations on Foreign Types<a href='#foreign-impls' class='anchor'></a></h2><h3 id='impl-AsyncRead-for-%26%27a%20%5Bu8%5D' class='impl'><code class='in-band'>impl<'a> <a class="trait" href="../actix_codec/trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code><a href='#impl-AsyncRead-for-%26%27a%20%5Bu8%5D' class='anchor'></a><a class='srclink' href='../src/tokio_io/async_read.rs.html#169-173' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.prepare_uninitialized_buffer-1' class="method hidden"><code id='prepare_uninitialized_buffer.v-1'>unsafe fn <a href='#method.prepare_uninitialized_buffer' class='fnname'>prepare_uninitialized_buffer</a>(&self, _buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/tokio_io/async_read.rs.html#170-172' title='goto source code'>[src]</a></h4></div><h3 id='impl-AsyncRead-for-Cursor%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="../actix_codec/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><T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>>, </span></code><a href='#impl-AsyncRead-for-Cursor%3CT%3E' class='anchor'></a><a class='srclink' href='../src/tokio_io/async_write.rs.html#204' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-AsyncRead-for-Chain%3CT%2C%20U%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="../actix_codec/trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.Chain.html" title="struct std::io::Chain">Chain</a><T, U> <span class="where fmt-newline">where<br> T: <a class="trait" href="../actix_codec/trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a>,<br> U: <a class="trait" href="../actix_codec/trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a>, </span></code><a href='#impl-AsyncRead-for-Chain%3CT%2C%20U%3E' class='anchor'></a><a class='srclink' href='../src/tokio_io/async_write.rs.html#178-189' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.prepare_uninitialized_buffer-2' class="method hidden"><code id='prepare_uninitialized_buffer.v-2'>unsafe fn <a href='#method.prepare_uninitialized_buffer' class='fnname'>prepare_uninitialized_buffer</a>(&self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/tokio_io/async_write.rs.html#183-188' title='goto source code'>[src]</a></h4></div><h3 id='impl-AsyncRead-for-ReadHalf%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="../actix_codec/trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for <a class="struct" href="../tokio_io/split/struct.ReadHalf.html" title="struct tokio_io::split::ReadHalf">ReadHalf</a><T> <span class="where fmt-newline">where<br> T: <a class="trait" href="../actix_codec/trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a>, </span></code><a href='#impl-AsyncRead-for-ReadHalf%3CT%3E' class='anchor'></a><a class='srclink' href='../src/tokio_io/split.rs.html#71-76' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.read_buf-1' class="method hidden"><code id='read_buf.v-1'>fn <a href='#method.read_buf' class='fnname'>read_buf</a><B>(&mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>B) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../futures/poll/enum.Async.html" title="enum futures::poll::Async">Async</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="../bytes/buf/buf_mut/trait.BufMut.html" title="trait bytes::buf::buf_mut::BufMut">BufMut</a>, </span></code><a class='srclink' href='../src/tokio_io/split.rs.html#72-75' title='goto source code'>[src]</a></h4></div><h3 id='impl-AsyncRead-for-AllowStdIo%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="../actix_codec/trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for <a class="struct" href="../tokio_io/allow_std/struct.AllowStdIo.html" title="struct tokio_io::allow_std::AllowStdIo">AllowStdIo</a><T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a>, </span></code><a href='#impl-AsyncRead-for-AllowStdIo%3CT%3E' class='anchor'></a><a class='srclink' href='../src/tokio_io/allow_std.rs.html#87-93' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-AsyncRead-for-Take%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="../actix_codec/trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.Take.html" title="struct std::io::Take">Take</a><T> <span class="where fmt-newline">where<br> T: <a class="trait" href="../actix_codec/trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a>, </span></code><a href='#impl-AsyncRead-for-Take%3CT%3E' class='anchor'></a><a class='srclink' href='../src/tokio_io/async_write.rs.html#172-176' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.prepare_uninitialized_buffer-3' class="method hidden"><code id='prepare_uninitialized_buffer.v-3'>unsafe fn <a href='#method.prepare_uninitialized_buffer' class='fnname'>prepare_uninitialized_buffer</a>(&self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/tokio_io/async_write.rs.html#173-175' title='goto source code'>[src]</a></h4></div><h3 id='impl-AsyncRead-for-Repeat' class='impl'><code class='in-band'>impl <a class="trait" href="../actix_codec/trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/util/struct.Repeat.html" title="struct std::io::util::Repeat">Repeat</a></code><a href='#impl-AsyncRead-for-Repeat' class='anchor'></a><a class='srclink' href='../src/tokio_io/async_write.rs.html#160-164' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.prepare_uninitialized_buffer-4' class="method hidden"><code id='prepare_uninitialized_buffer.v-4'>unsafe fn <a href='#method.prepare_uninitialized_buffer' class='fnname'>prepare_uninitialized_buffer</a>(&self, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/tokio_io/async_write.rs.html#161-163' title='goto source code'>[src]</a></h4></div><h3 id='impl-AsyncRead-for-BufReader%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="../actix_codec/trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/buffered/struct.BufReader.html" title="struct std::io::buffered::BufReader">BufReader</a><T> <span class="where fmt-newline">where<br> T: <a class="trait" href="../actix_codec/trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a>, </span></code><a href='#impl-AsyncRead-for-BufReader%3CT%3E' class='anchor'></a><a class='srclink' href='../src/tokio_io/async_write.rs.html#198-202' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.prepare_uninitialized_buffer-5' class="method hidden"><code id='prepare_uninitialized_buffer.v-5'>unsafe fn <a href='#method.prepare_uninitialized_buffer' class='fnname'>prepare_uninitialized_buffer</a>(&self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/tokio_io/async_write.rs.html#199-201' title='goto source code'>[src]</a></h4></div><h3 id='impl-AsyncRead-for-Box%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="../actix_codec/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><T> <span class="where fmt-newline">where<br> T: <a class="trait" href="../actix_codec/trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> + ?<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-AsyncRead-for-Box%3CT%3E' class='anchor'></a><a class='srclink' href='../src/tokio_io/async_read.rs.html#157-161' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.prepare_uninitialized_buffer-6' class="method hidden"><code id='prepare_uninitialized_buffer.v-6'>unsafe fn <a href='#method.prepare_uninitialized_buffer' class='fnname'>prepare_uninitialized_buffer</a>(&self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/tokio_io/async_read.rs.html#158-160' title='goto source code'>[src]</a></h4></div><h3 id='impl-AsyncRead-for-%26%27a%20mut%20T' class='impl'><code class='in-band'>impl<'a, T> <a class="trait" href="../actix_codec/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">&'a mut </a>T <span class="where fmt-newline">where<br> T: <a class="trait" href="../actix_codec/trait.AsyncRead.html" title="trait actix_codec::AsyncRead">AsyncRead</a> + ?<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-AsyncRead-for-%26%27a%20mut%20T' class='anchor'></a><a class='srclink' href='../src/tokio_io/async_read.rs.html#163-167' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.prepare_uninitialized_buffer-7' class="method hidden"><code id='prepare_uninitialized_buffer.v-7'>unsafe fn <a href='#method.prepare_uninitialized_buffer' class='fnname'>prepare_uninitialized_buffer</a>(&self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/tokio_io/async_read.rs.html#164-166' title='goto source code'>[src]</a></h4></div><span class='loading-content'>Loading content...</span>
|
||
<h2 id='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'></div><span class='loading-content'>Loading content...</span><script type="text/javascript" src="../implementors/tokio_io/async_read/trait.AsyncRead.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "actix_codec";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> |