Auto Generated Documentation
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<!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."><meta name="keywords" content="rust, rustlang, rust-lang, AsyncReadExt"><title>tokio::io::AsyncReadExt - 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">
|
||||
<!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 `AsyncReadExt` trait in crate `tokio`."><meta name="keywords" content="rust, rustlang, rust-lang, AsyncReadExt"><title>tokio::io::AsyncReadExt - 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 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='../../tokio/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Trait AsyncReadExt</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.read_buf">read_buf</a><a href="#method.take">take</a><a href="#method.read">read</a><a href="#method.read_to_end">read_to_end</a><a href="#method.read_to_string">read_to_string</a><a href="#method.chain">chain</a><a href="#method.read_exact">read_exact</a><a href="#method.read_u8">read_u8</a><a href="#method.read_i8">read_i8</a><a href="#method.read_u16">read_u16</a><a href="#method.read_i16">read_i16</a><a href="#method.read_u32">read_u32</a><a href="#method.read_i32">read_i32</a><a href="#method.read_u64">read_u64</a><a href="#method.read_i64">read_i64</a><a href="#method.read_u128">read_u128</a><a href="#method.read_i128">read_i128</a><a href="#method.read_u16_le">read_u16_le</a><a href="#method.read_i16_le">read_i16_le</a><a href="#method.read_u32_le">read_u32_le</a><a href="#method.read_i32_le">read_i32_le</a><a href="#method.read_u64_le">read_u64_le</a><a href="#method.read_i64_le">read_i64_le</a><a href="#method.read_u128_le">read_u128_le</a><a href="#method.read_i128_le">read_i128_le</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class="location"><a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a></p><div id="sidebar-vars" data-name="AsyncReadExt" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a>::<wbr><a class="trait" href="">AsyncReadExt</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/tokio/io/util/async_read_ext.rs.html#61-1112" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait AsyncReadExt: <a class="trait" href="../../tokio/io/trait.AsyncRead.html" title="trait tokio::io::AsyncRead">AsyncRead</a> {
|
||||
<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 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='../../tokio/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Trait AsyncReadExt</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.chain">chain</a><a href="#method.read">read</a><a href="#method.read_buf">read_buf</a><a href="#method.read_exact">read_exact</a><a href="#method.read_i128">read_i128</a><a href="#method.read_i128_le">read_i128_le</a><a href="#method.read_i16">read_i16</a><a href="#method.read_i16_le">read_i16_le</a><a href="#method.read_i32">read_i32</a><a href="#method.read_i32_le">read_i32_le</a><a href="#method.read_i64">read_i64</a><a href="#method.read_i64_le">read_i64_le</a><a href="#method.read_i8">read_i8</a><a href="#method.read_to_end">read_to_end</a><a href="#method.read_to_string">read_to_string</a><a href="#method.read_u128">read_u128</a><a href="#method.read_u128_le">read_u128_le</a><a href="#method.read_u16">read_u16</a><a href="#method.read_u16_le">read_u16_le</a><a href="#method.read_u32">read_u32</a><a href="#method.read_u32_le">read_u32_le</a><a href="#method.read_u64">read_u64</a><a href="#method.read_u64_le">read_u64_le</a><a href="#method.read_u8">read_u8</a><a href="#method.take">take</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class="location"><a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a></p><script>window.sidebarCurrent = {name: "AsyncReadExt", 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!" 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/io/util/async_read_ext.rs.html#61-1112" title="goto source code">[src]</a></span><span class="in-band">Trait <a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a>::<wbr><a class="trait" href="">AsyncReadExt</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait AsyncReadExt: <a class="trait" href="../../tokio/io/trait.AsyncRead.html" title="trait tokio::io::AsyncRead">AsyncRead</a> {
|
||||
fn <a href="#method.chain" class="fnname">chain</a><R>(self, next: R) -> Chain<Self, R><br> <span class="where">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> R: <a class="trait" href="../../tokio/io/trait.AsyncRead.html" title="trait tokio::io::AsyncRead">AsyncRead</a></span>,
|
||||
{ ... }
|
||||
<div class="item-spacer"></div> fn <a href="#method.read" class="fnname">read</a><'a>(&'a mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a 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>) -> Read<'a, Self><br> <span class="where">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a></span>,
|
||||
@@ -111,7 +111,7 @@ that the buffer <code>buf</code> has been filled in with <code>n</code> bytes of
|
||||
this source. If <code>n</code> is <code>0</code>, then it can indicate one of two
|
||||
scenarios:</p>
|
||||
<ol>
|
||||
<li>This reader has reached its “end of file” and will likely no longer
|
||||
<li>This reader has reached its "end of file" and will likely no longer
|
||||
be able to produce bytes. Note that this does not mean that the
|
||||
reader will <em>always</em> no longer be able to produce bytes.</li>
|
||||
<li>The buffer specified was 0 bytes in length.</li>
|
||||
@@ -122,7 +122,7 @@ contents of <code>buf</code> being <code>true</code>. It is recommended that <em
|
||||
only write data to <code>buf</code> instead of reading its contents.</p>
|
||||
<p>Correspondingly, however, <em>callers</em> of this method may not assume
|
||||
any guarantees about how the implementation uses <code>buf</code>. It is
|
||||
possible that the code that’s supposed to write to the buffer might
|
||||
possible that the code that's supposed to write to the buffer might
|
||||
also read from it. It is your responsibility to make sure that <code>buf</code>
|
||||
is initialized before calling <code>read</code>.</p>
|
||||
<h1 id="errors" class="section-header"><a href="#errors">Errors</a></h1>
|
||||
@@ -148,7 +148,7 @@ guaranteed that no bytes were read.</p>
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}</pre></div>
|
||||
</div><h3 id="method.read_buf" class="method"><code>fn <a href="#method.read_buf" class="fnname">read_buf</a><'a, B>(&'a mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a mut </a>B) -> ReadBuf<'a, Self, B> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,<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/util/async_read_ext.rs.html#223-229" title="goto source code">[src]</a></h3><div class="docblock"><p>Pulls some bytes from this source into the specified buffer,
|
||||
advancing the buffer’s internal cursor.</p>
|
||||
advancing the buffer's internal cursor.</p>
|
||||
<p>Equivalent to:</p>
|
||||
|
||||
<div class='information'><div class='tooltip ignore'>ⓘ</div></div><div class="example-wrap"><pre class="rust rust-example-rendered ignore">
|
||||
@@ -160,7 +160,7 @@ completes immediately or asynchronously</p>
|
||||
<h1 id="return" class="section-header"><a href="#return">Return</a></h1>
|
||||
<p>On a successful read, the number of read bytes is returned. If the
|
||||
supplied buffer is not empty and the function returns <code>Ok(0)</code> then
|
||||
the source has reached an “end-of-file” event.</p>
|
||||
the source has reached an "end-of-file" event.</p>
|
||||
<h1 id="errors-1" class="section-header"><a href="#errors-1">Errors</a></h1>
|
||||
<p>If this function encounters any form of I/O or other error, an error
|
||||
variant will be returned. If an error is returned then it must be
|
||||
@@ -197,7 +197,7 @@ guaranteed that no bytes were read.</p>
|
||||
<p>This function reads as many bytes as necessary to completely fill
|
||||
the specified buffer <code>buf</code>.</p>
|
||||
<h1 id="errors-2" class="section-header"><a href="#errors-2">Errors</a></h1>
|
||||
<p>If the operation encounters an “end of file” before completely
|
||||
<p>If the operation encounters an "end of file" before completely
|
||||
filling the buffer, it returns an error of the kind
|
||||
<a href="https://doc.rust-lang.org/nightly/std/io/error/enum.ErrorKind.html#variant.UnexpectedEof"><code>ErrorKind::UnexpectedEof</code></a>. The contents of <code>buf</code> are unspecified
|
||||
in this case.</p>
|
||||
@@ -777,5 +777,4 @@ bytes read and future calls to <a href="../../tokio/io/trait.AsyncReadExt.html#m
|
||||
<span class="ident">handle</span>.<span class="ident">read</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">buffer</span>).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}</pre></div>
|
||||
</div></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"><h3 id="impl-AsyncReadExt" class="impl"><code class="in-band">impl<R: <a class="trait" href="../../tokio/io/trait.AsyncRead.html" title="trait tokio::io::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>> <a class="trait" href="../../tokio/io/trait.AsyncReadExt.html" title="trait tokio::io::AsyncReadExt">AsyncReadExt</a> for R</code><a href="#impl-AsyncReadExt" class="anchor"></a><a class="srclink" href="../../src/tokio/io/util/async_read_ext.rs.html#1115" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><span class="loading-content">Loading content...</span><script type="text/javascript" src="../../implementors/tokio/io/trait.AsyncReadExt.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="tokio"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</div></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"><h3 id="impl-AsyncReadExt" class="impl"><code class="in-band">impl<R: <a class="trait" href="../../tokio/io/trait.AsyncRead.html" title="trait tokio::io::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>> AsyncReadExt for R</code><a href="#impl-AsyncReadExt" class="anchor"></a><a class="srclink" href="../../src/tokio/io/util/async_read_ext.rs.html#1115" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><span class="loading-content">Loading content...</span><script type="text/javascript" src="../../implementors/tokio/io/trait.AsyncReadExt.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "tokio";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
Reference in New Issue
Block a user