mentat/bytes/trait.Buf.html

804 lines
185 KiB
HTML
Raw Normal View History

2018-08-22 17:04:13 +00:00
<!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 `Buf` trait in crate `bytes`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Buf">
<title>bytes::Buf - 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="../main.css" id="themeStyle">
<script src="../storage.js"></script>
</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">&#9776;</div>
<p class='location'>Trait Buf</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.remaining">remaining</a><a href="#tymethod.bytes">bytes</a><a href="#tymethod.advance">advance</a></div><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.bytes_vec">bytes_vec</a><a href="#method.has_remaining">has_remaining</a><a href="#method.copy_to_slice">copy_to_slice</a><a href="#method.get_u8">get_u8</a><a href="#method.get_i8">get_i8</a><a href="#method.get_u16_be">get_u16_be</a><a href="#method.get_u16_le">get_u16_le</a><a href="#method.get_i16_be">get_i16_be</a><a href="#method.get_i16_le">get_i16_le</a><a href="#method.get_u32_be">get_u32_be</a><a href="#method.get_u32_le">get_u32_le</a><a href="#method.get_i32_be">get_i32_be</a><a href="#method.get_i32_le">get_i32_le</a><a href="#method.get_u64_be">get_u64_be</a><a href="#method.get_u64_le">get_u64_le</a><a href="#method.get_i64_be">get_i64_be</a><a href="#method.get_i64_le">get_i64_le</a><a href="#method.get_uint_be">get_uint_be</a><a href="#method.get_uint_le">get_uint_le</a><a href="#method.get_int_be">get_int_be</a><a href="#method.get_int_le">get_int_le</a><a href="#method.get_f32_be">get_f32_be</a><a href="#method.get_f32_le">get_f32_le</a><a href="#method.get_f64_be">get_f64_be</a><a href="#method.get_f64_le">get_f64_le</a><a href="#method.collect">collect</a><a href="#method.take">take</a><a href="#method.chain">chain</a><a href="#method.by_ref">by_ref</a><a href="#method.reader">reader</a><a href="#method.iter">iter</a></div><a class="sidebar-title" href="#foreign-impls">Implementations on Foreign Types</a><div class="sidebar-links"><a href="#impl-Buf">&amp;&#39;a mut T</a><a href="#impl-Buf">Box&lt;T&gt;</a><a href="#impl-Buf">Cursor&lt;T&gt;</a><a href="#impl-Buf">Option&lt;[u8; 1]&gt;</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='index.html'>bytes</a></p><script>window.sidebarCurrent = {name: 'Buf', 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 js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content">
<h1 class='fqn'><span class='in-band'>Trait <a href='index.html'>bytes</a>::<wbr><a class="trait" href=''>Buf</a></span><span class='out-of-band'><span id='render-detail'>
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>&#x2212;</span>]
</a>
</span><a class='srclink' href='../src/bytes/buf/buf.rs.html#64-1052' title='goto source code'>[src]</a></span></h1>
<pre class='rust trait'>pub trait Buf {
fn <a href='#tymethod.remaining' class='fnname'>remaining</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>;
<div class='item-spacer'></div> fn <a href='#tymethod.bytes' class='fnname'>bytes</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</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>;
<div class='item-spacer'></div> fn <a href='#tymethod.advance' class='fnname'>advance</a>(&amp;mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>);
fn <a href='#method.bytes_vec' class='fnname'>bytes_vec</a>&lt;'a&gt;(&amp;'a self, dst: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a>&amp;'a <a class="struct" href="../iovec/struct.IoVec.html" title="struct iovec::IoVec">IoVec</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.has_remaining' class='fnname'>has_remaining</a>(&amp;self) -&gt; <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.copy_to_slice' class='fnname'>copy_to_slice</a>(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;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>) { ... }
<div class='item-spacer'></div> fn <a href='#method.get_u8' class='fnname'>get_u8</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.get_i8' class='fnname'>get_i8</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.get_u16_be' class='fnname'>get_u16_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.get_u16_le' class='fnname'>get_u16_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.get_i16_be' class='fnname'>get_i16_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.get_i16_le' class='fnname'>get_i16_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.get_u32_be' class='fnname'>get_u32_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.get_u32_le' class='fnname'>get_u32_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.get_i32_be' class='fnname'>get_i32_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.get_i32_le' class='fnname'>get_i32_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.get_u64_be' class='fnname'>get_u64_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.get_u64_le' class='fnname'>get_u64_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.get_i64_be' class='fnname'>get_i64_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.get_i64_le' class='fnname'>get_i64_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.get_uint_be' class='fnname'>get_uint_be</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.get_uint_le' class='fnname'>get_uint_le</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.get_int_be' class='fnname'>get_int_be</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.get_int_le' class='fnname'>get_int_le</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.get_f32_be' class='fnname'>get_f32_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.get_f32_le' class='fnname'>get_f32_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.get_f64_be' class='fnname'>get_f64_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.get_f64_le' class='fnname'>get_f64_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.collect' class='fnname'>collect</a>&lt;B&gt;(self) -&gt; B<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../bytes/buf/trait.FromBuf.html" title="trait bytes::buf::FromBuf">FromBuf</a></span>,
{ ... }
<div class='item-spacer'></div> fn <a href='#method.take' class='fnname'>take</a>(self, limit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="../bytes/buf/struct.Take.html" title="struct bytes::buf::Take">Take</a>&lt;Self&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
{ ... }
<div class='item-spacer'></div> fn <a href='#method.chain' class='fnname'>chain</a>&lt;U&gt;(self, next: U) -&gt; <a class="struct" href="../bytes/buf/struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;Self, U::<a class="type" href="../bytes/buf/trait.IntoBuf.html#associatedtype.Buf" title="type bytes::buf::IntoBuf::Buf">Buf</a>&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="../bytes/buf/trait.IntoBuf.html" title="trait bytes::buf::IntoBuf">IntoBuf</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
{ ... }
<div class='item-spacer'></div> fn <a href='#method.by_ref' class='fnname'>by_ref</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
{ ... }
<div class='item-spacer'></div> fn <a href='#method.reader' class='fnname'>reader</a>(self) -&gt; <a class="struct" href="../bytes/buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;Self&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
{ ... }
<div class='item-spacer'></div> fn <a href='#method.iter' class='fnname'>iter</a>(self) -&gt; <a class="struct" href="../bytes/buf/struct.Iter.html" title="struct bytes::buf::Iter">Iter</a>&lt;Self&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
{ ... }
}</pre><div class='docblock'><p>Read bytes from a buffer.</p>
<p>A buffer stores bytes in memory such that read operations are infallible.
The underlying storage may or may not be in contiguous memory. A <code>Buf</code> value
is a cursor into the buffer. Reading from <code>Buf</code> advances the cursor
position. It can be thought of as an efficient <code>Iterator</code> for collections of
bytes.</p>
<p>The simplest <code>Buf</code> is a <code>Cursor</code> wrapping a <code>[u8]</code>.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;hello world&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="string">b&#39;h&#39;</span>, <span class="ident">buf</span>.<span class="ident">get_u8</span>());
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="string">b&#39;e&#39;</span>, <span class="ident">buf</span>.<span class="ident">get_u8</span>());
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="string">b&#39;l&#39;</span>, <span class="ident">buf</span>.<span class="ident">get_u8</span>());
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rest</span> <span class="op">=</span> [<span class="number">0</span>; <span class="number">8</span>];
<span class="ident">buf</span>.<span class="ident">copy_to_slice</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">rest</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">rest</span>[..], <span class="string">b&quot;lo world&quot;</span>);</pre>
</div>
<h2 id='required-methods' class='small-section-header'>
Required Methods<a href='#required-methods' class='anchor'></a>
</h2>
<div class='methods'>
<h3 id='tymethod.remaining' class='method'><span id='remaining.v' class='invisible'><code>fn <a href='#tymethod.remaining' class='fnname'>remaining</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span></h3><div class='docblock'><p>Returns the number of bytes between the current position and the end of
the buffer.</p>
<p>This value is greater than or equal to the length of the slice returned
by <code>bytes</code>.</p>
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;hello world&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">buf</span>.<span class="ident">remaining</span>(), <span class="number">11</span>);
<span class="ident">buf</span>.<span class="ident">get_u8</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">buf</span>.<span class="ident">remaining</span>(), <span class="number">10</span>);</pre>
<h1 id="implementer-notes" class="section-header"><a href="#implementer-notes">Implementer notes</a></h1>
<p>Implementations of <code>remaining</code> should ensure that the return value does
not change unless a call is made to <code>advance</code> or any other function that
is documented to change the <code>Buf</code>'s current position.</p>
</div><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'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></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'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></h3><code class="content"><span class="where fmt-newline">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'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></span><span class="where fmt-newline">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'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></span></code></div></div><h3 id='tymethod.bytes' class='method'><span id='bytes.v' class='invisible'><code>fn <a href='#tymethod.bytes' class='fnname'>bytes</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</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></span></h3><div class='docblock'><p>Returns a slice starting at the current position and of length between 0
and <code>Buf::remaining()</code>.</p>
<p>This is a lower level function. Most operations are done with other
functions.</p>
<h1 id="examples-1" class="section-header"><a href="#examples-1">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;hello world&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">buf</span>.<span class="ident">bytes</span>(), <span class="string">b&quot;hello world&quot;</span>);
<span class="ident">buf</span>.<span class="ident">advance</span>(<span class="number">6</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">buf</span>.<span class="ident">bytes</span>(), <span class="string">b&quot;world&quot;</span>);</pre>
<h1 id="implementer-notes-1" class="section-header"><a href="#implementer-notes-1">Implementer notes</a></h1>
<p>This function should never panic. Once the end of the buffer is reached,
i.e., <code>Buf::remaining</code> returns 0, calls to <code>bytes</code> should return an
empty slice.</p>
</div><h3 id='tymethod.advance' class='method'><span id='advance.v' class='invisible'><code>fn <a href='#tymethod.advance' class='fnname'>advance</a>(&amp;mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code></span></h3><div class='docblock'><p>Advance the internal cursor of the Buf</p>
<p>The next call to <code>bytes</code> will return a slice starting <code>cnt</code> bytes
further into the underlying buffer.</p>
<h1 id="examples-2" class="section-header"><a href="#examples-2">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;hello world&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">buf</span>.<span class="ident">bytes</span>(), <span class="string">b&quot;hello world&quot;</span>);
<span class="ident">buf</span>.<span class="ident">advance</span>(<span class="number">6</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">buf</span>.<span class="ident">bytes</span>(), <span class="string">b&quot;world&quot;</span>);</pre>
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
<p>This function <strong>may</strong> panic if <code>cnt &gt; self.remaining()</code>.</p>
<h1 id="implementer-notes-2" class="section-header"><a href="#implementer-notes-2">Implementer notes</a></h1>
<p>It is recommended for implementations of <code>advance</code> to panic if <code>cnt &gt; self.remaining()</code>. If the implementation does not panic, the call must
behave as if <code>cnt == self.remaining()</code>.</p>
<p>A call with <code>cnt == 0</code> should never panic and be a no-op.</p>
</div></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.bytes_vec' class='method'><span id='bytes_vec.v' class='invisible'><code>fn <a href='#method.bytes_vec' class='fnname'>bytes_vec</a>&lt;'a&gt;(&amp;'a self, dst: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a>&amp;'a <a class="struct" href="../iovec/struct.IoVec.html" title="struct iovec::IoVec">IoVec</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span></h3><div class='docblock'><p>Fills <code>dst</code> with potentially multiple slices starting at <code>self</code>'s
current position.</p>
<p>If the <code>Buf</code> is backed by disjoint slices of bytes, <code>bytes_vec</code> enables
fetching more than one slice at once. <code>dst</code> is a slice of <code>IoVec</code>
references, enabling the slice to be directly used with <a href="http://man7.org/linux/man-pages/man2/readv.2.html"><code>writev</code></a>
without any further conversion. The sum of the lengths of all the
buffers in <code>dst</code> will be less than or equal to <code>Buf::remaining()</code>.</p>
<p>The entries in <code>dst</code> will be overwritten, but the data <strong>contained</strong> by
the slices <strong>will not</strong> be modified. If <code>bytes_vec</code> does not fill every
entry in <code>dst</code>, then <code>dst</code> is guaranteed to contain all remaining slices
in `self.</p>
<p>This is a lower level function. Most operations are done with other
functions.</p>
<h1 id="implementer-notes-3" class="section-header"><a href="#implementer-notes-3">Implementer notes</a></h1>
<p>This function should never panic. Once the end of the buffer is reached,
i.e., <code>Buf::remaining</code> returns 0, calls to <code>bytes_vec</code> must return 0
without mutating <code>dst</code>.</p>
<p>Implementations should also take care to properly handle being called
with <code>dst</code> being a zero length slice.</p>
</div><h3 id='method.has_remaining' class='method'><span id='has_remaining.v' class='invisible'><code>fn <a href='#method.has_remaining' class='fnname'>has_remaining</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></h3><div class='docblock'><p>Returns true if there are any more bytes to consume</p>
<p>This is equivalent to <code>self.remaining() != 0</code>.</p>
<h1 id="examples-3" class="section-header"><a href="#examples-3">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;a&quot;</span>);
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">buf</span>.<span class="ident">has_remaining</span>());
<span class="ident">buf</span>.<span class="ident">get_u8</span>();
<span class="macro">assert</span><span class="macro">!</span>(<span class="op">!</span><span class="ident">buf</span>.<span class="ident">has_remaining</span>());</pre>
</div><h3 id='method.copy_to_slice' class='method'><span id='copy_to_slice.v' class='invisible'><code>fn <a href='#method.copy_to_slice' class='fnname'>copy_to_slice</a>(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;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>)</code></span></h3><div class='docblock'><p>Copies bytes from <code>self</code> into <code>dst</code>.</p>
<p>The cursor is advanced by the number of bytes copied. <code>self</code> must have
enough remaining bytes to fill <code>dst</code>.</p>
<h1 id="examples-4" class="section-header"><a href="#examples-4">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;hello world&quot;</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">dst</span> <span class="op">=</span> [<span class="number">0</span>; <span class="number">5</span>];
<span class="ident">buf</span>.<span class="ident">copy_to_slice</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">dst</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="string">b&quot;hello&quot;</span>, <span class="kw-2">&amp;</span><span class="ident">dst</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">6</span>, <span class="ident">buf</span>.<span class="ident">remaining</span>());</pre>
<h1 id="panics-1" class="section-header"><a href="#panics-1">Panics</a></h1>
<p>This function panics if <code>self.remaining() &lt; dst.len()</code></p>
</div><h3 id='method.get_u8' class='method'><span id='get_u8.v' class='invisible'><code>fn <a href='#method.get_u8' class='fnname'>get_u8</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code></span></h3><div class='docblock'><p>Gets an unsigned 8 bit integer from <code>self</code>.</p>
<p>The current position is advanced by 1.</p>
<h1 id="examples-5" class="section-header"><a href="#examples-5">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;\x08 hello&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">8</span>, <span class="ident">buf</span>.<span class="ident">get_u8</span>());</pre>
<h1 id="panics-2" class="section-header"><a href="#panics-2">Panics</a></h1>
<p>This function panics if there is no more remaining data in <code>self</code>.</p>
</div><h3 id='method.get_i8' class='method'><span id='get_i8.v' class='invisible'><code>fn <a href='#method.get_i8' class='fnname'>get_i8</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a></code></span></h3><div class='docblock'><p>Gets a signed 8 bit integer from <code>self</code>.</p>
<p>The current position is advanced by 1.</p>
<h1 id="examples-6" class="section-header"><a href="#examples-6">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;\x08 hello&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">8</span>, <span class="ident">buf</span>.<span class="ident">get_i8</span>());</pre>
<h1 id="panics-3" class="section-header"><a href="#panics-3">Panics</a></h1>
<p>This function panics if there is no more remaining data in <code>self</code>.</p>
</div><h3 id='method.get_u16_be' class='method'><span id='get_u16_be.v' class='invisible'><code>fn <a href='#method.get_u16_be' class='fnname'>get_u16_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></code></span></h3><div class='docblock'><p>Gets an unsigned 16 bit integer from <code>self</code> in big-endian byte order.</p>
<p>The current position is advanced by 2.</p>
<h1 id="examples-7" class="section-header"><a href="#examples-7">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;\x08\x09 hello&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0x0809</span>, <span class="ident">buf</span>.<span class="ident">get_u16_be</span>());</pre>
<h1 id="panics-4" class="section-header"><a href="#panics-4">Panics</a></h1>
<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
</div><h3 id='method.get_u16_le' class='method'><span id='get_u16_le.v' class='invisible'><code>fn <a href='#method.get_u16_le' class='fnname'>get_u16_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></code></span></h3><div class='docblock'><p>Gets an unsigned 16 bit integer from <code>self</code> in little-endian byte order.</p>
<p>The current position is advanced by 2.</p>
<h1 id="examples-8" class="section-header"><a href="#examples-8">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;\x09\x08 hello&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0x0809</span>, <span class="ident">buf</span>.<span class="ident">get_u16_le</span>());</pre>
<h1 id="panics-5" class="section-header"><a href="#panics-5">Panics</a></h1>
<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
</div><h3 id='method.get_i16_be' class='method'><span id='get_i16_be.v' class='invisible'><code>fn <a href='#method.get_i16_be' class='fnname'>get_i16_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></code></span></h3><div class='docblock'><p>Gets a signed 16 bit integer from <code>self</code> in big-endian byte order.</p>
<p>The current position is advanced by 2.</p>
<h1 id="examples-9" class="section-header"><a href="#examples-9">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;\x08\x09 hello&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0x0809</span>, <span class="ident">buf</span>.<span class="ident">get_i16_be</span>());</pre>
<h1 id="panics-6" class="section-header"><a href="#panics-6">Panics</a></h1>
<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
</div><h3 id='method.get_i16_le' class='method'><span id='get_i16_le.v' class='invisible'><code>fn <a href='#method.get_i16_le' class='fnname'>get_i16_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></code></span></h3><div class='docblock'><p>Gets a signed 16 bit integer from <code>self</code> in little-endian byte order.</p>
<p>The current position is advanced by 2.</p>
<h1 id="examples-10" class="section-header"><a href="#examples-10">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;\x09\x08 hello&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0x0809</span>, <span class="ident">buf</span>.<span class="ident">get_i16_le</span>());</pre>
<h1 id="panics-7" class="section-header"><a href="#panics-7">Panics</a></h1>
<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
</div><h3 id='method.get_u32_be' class='method'><span id='get_u32_be.v' class='invisible'><code>fn <a href='#method.get_u32_be' class='fnname'>get_u32_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span></h3><div class='docblock'><p>Gets an unsigned 32 bit integer from <code>self</code> in the big-endian byte order.</p>
<p>The current position is advanced by 4.</p>
<h1 id="examples-11" class="section-header"><a href="#examples-11">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;\x08\x09\xA0\xA1 hello&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0x0809A0A1</span>, <span class="ident">buf</span>.<span class="ident">get_u32_be</span>());</pre>
<h1 id="panics-8" class="section-header"><a href="#panics-8">Panics</a></h1>
<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
</div><h3 id='method.get_u32_le' class='method'><span id='get_u32_le.v' class='invisible'><code>fn <a href='#method.get_u32_le' class='fnname'>get_u32_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span></h3><div class='docblock'><p>Gets an unsigned 32 bit integer from <code>self</code> in the little-endian byte order.</p>
<p>The current position is advanced by 4.</p>
<h1 id="examples-12" class="section-header"><a href="#examples-12">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;\xA1\xA0\x09\x08 hello&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0x0809A0A1</span>, <span class="ident">buf</span>.<span class="ident">get_u32_le</span>());</pre>
<h1 id="panics-9" class="section-header"><a href="#panics-9">Panics</a></h1>
<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
</div><h3 id='method.get_i32_be' class='method'><span id='get_i32_be.v' class='invisible'><code>fn <a href='#method.get_i32_be' class='fnname'>get_i32_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></code></span></h3><div class='docblock'><p>Gets a signed 32 bit integer from <code>self</code> in big-endian byte order.</p>
<p>The current position is advanced by 4.</p>
<h1 id="examples-13" class="section-header"><a href="#examples-13">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;\x08\x09\xA0\xA1 hello&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0x0809A0A1</span>, <span class="ident">buf</span>.<span class="ident">get_i32_be</span>());</pre>
<h1 id="panics-10" class="section-header"><a href="#panics-10">Panics</a></h1>
<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
</div><h3 id='method.get_i32_le' class='method'><span id='get_i32_le.v' class='invisible'><code>fn <a href='#method.get_i32_le' class='fnname'>get_i32_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></code></span></h3><div class='docblock'><p>Gets a signed 32 bit integer from <code>self</code> in little-endian byte order.</p>
<p>The current position is advanced by 4.</p>
<h1 id="examples-14" class="section-header"><a href="#examples-14">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;\xA1\xA0\x09\x08 hello&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0x0809A0A1</span>, <span class="ident">buf</span>.<span class="ident">get_i32_le</span>());</pre>
<h1 id="panics-11" class="section-header"><a href="#panics-11">Panics</a></h1>
<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
</div><h3 id='method.get_u64_be' class='method'><span id='get_u64_be.v' class='invisible'><code>fn <a href='#method.get_u64_be' class='fnname'>get_u64_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span></h3><div class='docblock'><p>Gets an unsigned 64 bit integer from <code>self</code> in big-endian byte order.</p>
<p>The current position is advanced by 8.</p>
<h1 id="examples-15" class="section-header"><a href="#examples-15">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08 hello&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0x0102030405060708</span>, <span class="ident">buf</span>.<span class="ident">get_u64_be</span>());</pre>
<h1 id="panics-12" class="section-header"><a href="#panics-12">Panics</a></h1>
<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
</div><h3 id='method.get_u64_le' class='method'><span id='get_u64_le.v' class='invisible'><code>fn <a href='#method.get_u64_le' class='fnname'>get_u64_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span></h3><div class='docblock'><p>Gets an unsigned 64 bit integer from <code>self</code> in little-endian byte order.</p>
<p>The current position is advanced by 8.</p>
<h1 id="examples-16" class="section-header"><a href="#examples-16">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;\x08\x07\x06\x05\x04\x03\x02\x01 hello&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0x0102030405060708</span>, <span class="ident">buf</span>.<span class="ident">get_u64_le</span>());</pre>
<h1 id="panics-13" class="section-header"><a href="#panics-13">Panics</a></h1>
<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
</div><h3 id='method.get_i64_be' class='method'><span id='get_i64_be.v' class='invisible'><code>fn <a href='#method.get_i64_be' class='fnname'>get_i64_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code></span></h3><div class='docblock'><p>Gets a signed 64 bit integer from <code>self</code> in big-endian byte order.</p>
<p>The current position is advanced by 8.</p>
<h1 id="examples-17" class="section-header"><a href="#examples-17">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08 hello&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0x0102030405060708</span>, <span class="ident">buf</span>.<span class="ident">get_i64_be</span>());</pre>
<h1 id="panics-14" class="section-header"><a href="#panics-14">Panics</a></h1>
<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
</div><h3 id='method.get_i64_le' class='method'><span id='get_i64_le.v' class='invisible'><code>fn <a href='#method.get_i64_le' class='fnname'>get_i64_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code></span></h3><div class='docblock'><p>Gets a signed 64 bit integer from <code>self</code> in little-endian byte order.</p>
<p>The current position is advanced by 8.</p>
<h1 id="examples-18" class="section-header"><a href="#examples-18">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;\x08\x07\x06\x05\x04\x03\x02\x01 hello&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0x0102030405060708</span>, <span class="ident">buf</span>.<span class="ident">get_i64_le</span>());</pre>
<h1 id="panics-15" class="section-header"><a href="#panics-15">Panics</a></h1>
<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
</div><h3 id='method.get_uint_be' class='method'><span id='get_uint_be.v' class='invisible'><code>fn <a href='#method.get_uint_be' class='fnname'>get_uint_be</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span></h3><div class='docblock'><p>Gets an unsigned n-byte integer from <code>self</code> in big-endian byte order.</p>
<p>The current position is advanced by <code>nbytes</code>.</p>
<h1 id="examples-19" class="section-header"><a href="#examples-19">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::{<span class="ident">Buf</span>, <span class="ident">BigEndian</span>};
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;\x01\x02\x03 hello&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0x010203</span>, <span class="ident">buf</span>.<span class="ident">get_uint_be</span>(<span class="number">3</span>));</pre>
<h1 id="panics-16" class="section-header"><a href="#panics-16">Panics</a></h1>
<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
</div><h3 id='method.get_uint_le' class='method'><span id='get_uint_le.v' class='invisible'><code>fn <a href='#method.get_uint_le' class='fnname'>get_uint_le</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span></h3><div class='docblock'><p>Gets an unsigned n-byte integer from <code>self</code> in little-endian byte order.</p>
<p>The current position is advanced by <code>nbytes</code>.</p>
<h1 id="examples-20" class="section-header"><a href="#examples-20">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;\x03\x02\x01 hello&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0x010203</span>, <span class="ident">buf</span>.<span class="ident">get_uint_le</span>(<span class="number">3</span>));</pre>
<h1 id="panics-17" class="section-header"><a href="#panics-17">Panics</a></h1>
<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
</div><h3 id='method.get_int_be' class='method'><span id='get_int_be.v' class='invisible'><code>fn <a href='#method.get_int_be' class='fnname'>get_int_be</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code></span></h3><div class='docblock'><p>Gets a signed n-byte integer from <code>self</code> in big-endian byte order.</p>
<p>The current position is advanced by <code>nbytes</code>.</p>
<h1 id="examples-21" class="section-header"><a href="#examples-21">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;\x01\x02\x03 hello&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0x010203</span>, <span class="ident">buf</span>.<span class="ident">get_int_be</span>(<span class="number">3</span>));</pre>
<h1 id="panics-18" class="section-header"><a href="#panics-18">Panics</a></h1>
<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
</div><h3 id='method.get_int_le' class='method'><span id='get_int_le.v' class='invisible'><code>fn <a href='#method.get_int_le' class='fnname'>get_int_le</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code></span></h3><div class='docblock'><p>Gets a signed n-byte integer from <code>self</code> in little-endian byte order.</p>
<p>The current position is advanced by <code>nbytes</code>.</p>
<h1 id="examples-22" class="section-header"><a href="#examples-22">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;\x03\x02\x01 hello&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0x010203</span>, <span class="ident">buf</span>.<span class="ident">get_int_le</span>(<span class="number">3</span>));</pre>
<h1 id="panics-19" class="section-header"><a href="#panics-19">Panics</a></h1>
<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
</div><h3 id='method.get_f32_be' class='method'><span id='get_f32_be.v' class='invisible'><code>fn <a href='#method.get_f32_be' class='fnname'>get_f32_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code></span></h3><div class='docblock'><p>Gets an IEEE754 single-precision (4 bytes) floating point number from
<code>self</code> in big-endian byte order.</p>
<p>The current position is advanced by 4.</p>
<h1 id="examples-23" class="section-header"><a href="#examples-23">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;\x3F\x99\x99\x9A hello&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">1.2f32</span>, <span class="ident">buf</span>.<span class="ident">get_f32_be</span>());</pre>
<h1 id="panics-20" class="section-header"><a href="#panics-20">Panics</a></h1>
<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
</div><h3 id='method.get_f32_le' class='method'><span id='get_f32_le.v' class='invisible'><code>fn <a href='#method.get_f32_le' class='fnname'>get_f32_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code></span></h3><div class='docblock'><p>Gets an IEEE754 single-precision (4 bytes) floating point number from
<code>self</code> in little-endian byte order.</p>
<p>The current position is advanced by 4.</p>
<h1 id="examples-24" class="section-header"><a href="#examples-24">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;\x9A\x99\x99\x3F hello&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">1.2f32</span>, <span class="ident">buf</span>.<span class="ident">get_f32_le</span>());</pre>
<h1 id="panics-21" class="section-header"><a href="#panics-21">Panics</a></h1>
<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
</div><h3 id='method.get_f64_be' class='method'><span id='get_f64_be.v' class='invisible'><code>fn <a href='#method.get_f64_be' class='fnname'>get_f64_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span></h3><div class='docblock'><p>Gets an IEEE754 double-precision (8 bytes) floating point number from
<code>self</code> in big-endian byte order.</p>
<p>The current position is advanced by 8.</p>
<h1 id="examples-25" class="section-header"><a href="#examples-25">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;\x3F\xF3\x33\x33\x33\x33\x33\x33 hello&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">1.2f64</span>, <span class="ident">buf</span>.<span class="ident">get_f64_be</span>());</pre>
<h1 id="panics-22" class="section-header"><a href="#panics-22">Panics</a></h1>
<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
</div><h3 id='method.get_f64_le' class='method'><span id='get_f64_le.v' class='invisible'><code>fn <a href='#method.get_f64_le' class='fnname'>get_f64_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span></h3><div class='docblock'><p>Gets an IEEE754 double-precision (8 bytes) floating point number from
<code>self</code> in little-endian byte order.</p>
<p>The current position is advanced by 8.</p>
<h1 id="examples-26" class="section-header"><a href="#examples-26">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b&quot;\x33\x33\x33\x33\x33\x33\xF3\x3F hello&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">1.2f64</span>, <span class="ident">buf</span>.<span class="ident">get_f64_le</span>());</pre>
<h1 id="panics-23" class="section-header"><a href="#panics-23">Panics</a></h1>
<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
</div><h3 id='method.collect' class='method'><span id='collect.v' class='invisible'><code>fn <a href='#method.collect' class='fnname'>collect</a>&lt;B&gt;(self) -&gt; B <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../bytes/buf/trait.FromBuf.html" title="trait bytes::buf::FromBuf">FromBuf</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Transforms a <code>Buf</code> into a concrete buffer.</p>
<p><code>collect()</code> can operate on any value that implements <code>Buf</code>, and turn it
into the relevent concrete buffer type.</p>
<h1 id="examples-27" class="section-header"><a href="#examples-27">Examples</a></h1>
<p>Collecting a buffer and loading the contents into a <code>Vec&lt;u8&gt;</code>.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::{<span class="ident">Buf</span>, <span class="ident">Bytes</span>, <span class="ident">IntoBuf</span>};
<span class="kw">let</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Bytes</span>::<span class="ident">from</span>(<span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]).<span class="ident">into_buf</span>();
<span class="kw">let</span> <span class="ident">vec</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">u8</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">buf</span>.<span class="ident">collect</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">vec</span>, <span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]);</pre>
</div><h3 id='method.take' class='method'><span id='take.v' class='invisible'><code>fn <a href='#method.take' class='fnname'>take</a>(self, limit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="../bytes/buf/struct.Take.html" title="struct bytes::buf::Take">Take</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Creates an adaptor which will read at most <code>limit</code> bytes from <code>self</code>.</p>
<p>This function returns a new instance of <code>Buf</code> which will read at most
<code>limit</code> bytes.</p>
<h1 id="examples-28" class="section-header"><a href="#examples-28">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::{<span class="ident">Buf</span>, <span class="ident">BufMut</span>};
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">&quot;hello world&quot;</span>).<span class="ident">take</span>(<span class="number">5</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">dst</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[];
<span class="ident">dst</span>.<span class="ident">put</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">buf</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">dst</span>, <span class="string">b&quot;hello&quot;</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">buf</span>.<span class="ident">into_inner</span>();
<span class="ident">dst</span>.<span class="ident">clear</span>();
<span class="ident">dst</span>.<span class="ident">put</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">buf</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">dst</span>, <span class="string">b&quot; world&quot;</span>);</pre>
</div><h3 id='method.chain' class='method'><span id='chain.v' class='invisible'><code>fn <a href='#method.chain' class='fnname'>chain</a>&lt;U&gt;(self, next: U) -&gt; <a class="struct" href="../bytes/buf/struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;Self, U::<a class="type" href="../bytes/buf/trait.IntoBuf.html#associatedtype.Buf" title="type bytes::buf::IntoBuf::Buf">Buf</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="../bytes/buf/trait.IntoBuf.html" title="trait bytes::buf::IntoBuf">IntoBuf</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Creates an adaptor which will chain this buffer with another.</p>
<p>The returned <code>Buf</code> instance will first consume all bytes from <code>self</code>.
Afterwards the output is equivalent to the output of next.</p>
<h1 id="examples-29" class="section-header"><a href="#examples-29">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::{<span class="ident">Bytes</span>, <span class="ident">Buf</span>, <span class="ident">IntoBuf</span>};
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">buf</span>::<span class="ident">Chain</span>;
<span class="kw">let</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Bytes</span>::<span class="ident">from</span>(<span class="kw-2">&amp;</span><span class="string">b&quot;hello &quot;</span>[..]).<span class="ident">into_buf</span>()
.<span class="ident">chain</span>(<span class="ident">Bytes</span>::<span class="ident">from</span>(<span class="kw-2">&amp;</span><span class="string">b&quot;world&quot;</span>[..]));
<span class="kw">let</span> <span class="ident">full</span>: <span class="ident">Bytes</span> <span class="op">=</span> <span class="ident">buf</span>.<span class="ident">collect</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">full</span>[..], <span class="string">b&quot;hello world&quot;</span>[..]);</pre>
</div><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>R</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>R</h3><code class="content"><span class="where fmt-newline">impl&lt;'a, R&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>R <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline">impl&lt;'a, W&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>W <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;W: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline">impl&lt;'a, I&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>I <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = &lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a>&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::iterator::Iterator::Item">Item</a>;</span></code></div></div><h3 id='method.by_ref' class='method'><span id='by_ref.v' class='invisible'><code>fn <a href='#method.by_ref' class='fnname'>by_ref</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Creates a &quot;by reference&quot; adaptor for this instance of <code>Buf</code>.</p>
<p>The returned adaptor also implements <code>Buf</code> and will simply borrow <code>self</code>.</p>
<h1 id="examples-30" class="section-header"><a href="#examples-30">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::{<span class="ident">Buf</span>, <span class="ident">BufMut</span>};
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">&quot;hello world&quot;</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">dst</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[];
{
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">reference</span> <span class="op">=</span> <span class="ident">buf</span>.<span class="ident">by_ref</span>();
<span class="ident">dst</span>.<span class="ident">put</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">reference</span>.<span class="ident">take</span>(<span class="number">5</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">dst</span>, <span class="string">b&quot;hello&quot;</span>);
} <span class="comment">// drop our &amp;mut reference so we can use `buf` again</span>
<span class="ident">dst</span>.<span class="ident">clear</span>();
<span class="ident">dst</span>.<span class="ident">put</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">buf</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">dst</span>, <span class="string">b&quot; world&quot;</span>);</pre>
</div><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="struct" href="../bytes/buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../bytes/buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;B:&nbsp;<a class="trait" href="../bytes/buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="struct" href="../bytes/buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;</span></code></div></div><h3 id='method.reader' class='method'><span id='reader.v' class='invisible'><code>fn <a href='#method.reader' class='fnname'>reader</a>(self) -&gt; <a class="struct" href="../bytes/buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Creates an adaptor which implements the <code>Read</code> trait for <code>self</code>.</p>
<p>This function returns a new value which implements <code>Read</code> by adapting
the <code>Read</code> trait functions to the <code>Buf</code> trait functions. Given that
<code>Buf</code> operations are infallible, none of the <code>Read</code> functions will
return with <code>Err</code>.</p>
<h1 id="examples-31" class="section-header"><a href="#examples-31">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::{<span class="ident">Buf</span>, <span class="ident">IntoBuf</span>, <span class="ident">Bytes</span>};
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Read</span>;
<span class="kw">let</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Bytes</span>::<span class="ident">from</span>(<span class="string">&quot;hello world&quot;</span>).<span class="ident">into_buf</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">reader</span> <span class="op">=</span> <span class="ident">buf</span>.<span class="ident">reader</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">dst</span> <span class="op">=</span> [<span class="number">0</span>; <span class="number">1024</span>];
<span class="kw">let</span> <span class="ident">num</span> <span class="op">=</span> <span class="ident">reader</span>.<span class="ident">read</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">dst</span>).<span class="ident">unwrap</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">11</span>, <span class="ident">num</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">dst</span>[..<span class="number">11</span>], <span class="string">b&quot;hello world&quot;</span>);</pre>
</div><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="struct" href="../bytes/buf/struct.Iter.html" title="struct bytes::buf::Iter">Iter</a>&lt;T&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../bytes/buf/struct.Iter.html" title="struct bytes::buf::Iter">Iter</a>&lt;T&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;T:&nbsp;<a class="trait" href="../bytes/buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../bytes/buf/struct.Iter.html" title="struct bytes::buf::Iter">Iter</a>&lt;T&gt;</span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>;</span></code></div></div><h3 id='method.iter' class='method'><span id='iter.v' class='invisible'><code>fn <a href='#method.iter' class='fnname'>iter</a>(self) -&gt; <a class="struct" href="../bytes/buf/struct.Iter.html" title="struct bytes::buf::Iter">Iter</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Returns an iterator over the bytes contained by the buffer.</p>
<h1 id="examples-32" class="section-header"><a href="#examples-32">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">bytes</span>::{<span class="ident">Buf</span>, <span class="ident">IntoBuf</span>, <span class="ident">Bytes</span>};
<span class="kw">let</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Bytes</span>::<span class="ident">from</span>(<span class="kw-2">&amp;</span><span class="string">b&quot;abc&quot;</span>[..]).<span class="ident">into_buf</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">iter</span> <span class="op">=</span> <span class="ident">buf</span>.<span class="ident">iter</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="string">b&#39;a&#39;</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="string">b&#39;b&#39;</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="string">b&#39;c&#39;</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">None</span>);</pre>
</div></div>
<h2 id='foreign-impls' class='small-section-header'>
Implementations on Foreign Types<a href='#foreign-impls' class='anchor'></a>
</h2>
<h3 id='impl-Buf' class='impl'><span class='in-band'><code>impl&lt;'a, T:&nbsp;<a class="trait" href="../bytes/buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt; <a class="trait" href="../bytes/buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>T</code><a href='#impl-Buf' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1054-1070' title='goto source code'>[src]</a></span></h3>
<span class='docblock autohide'><div class='impl-items'><h4 id='method.remaining' class="method"><span id='remaining.v-1' class='invisible'><code>fn <a href='#method.remaining' class='fnname'>remaining</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1055-1057' title='goto source code'>[src]</a></span></h4>
<h4 id='method.bytes' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'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></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'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></h3><code class="content"><span class="where fmt-newline">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'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></span><span class="where fmt-newline">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'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></span></code></div></div><span id='bytes.v-1' class='invisible'><code>fn <a href='#method.bytes' class='fnname'>bytes</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1059-1061' title='goto source code'>[src]</a></span></h4>
<h4 id='method.bytes_vec-1' class="method"><span id='bytes_vec.v-1' class='invisible'><code>fn <a href='#method.bytes_vec' class='fnname'>bytes_vec</a>&lt;'b&gt;(&amp;'b self, dst: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a>&amp;'b <a class="struct" href="../iovec/struct.IoVec.html" title="struct iovec::IoVec">IoVec</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1063-1065' title='goto source code'>[src]</a></span></h4>
<h4 id='method.advance' class="method"><span id='advance.v-1' class='invisible'><code>fn <a href='#method.advance' class='fnname'>advance</a>(&amp;mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1067-1069' title='goto source code'>[src]</a></span></h4>
<h4 id='method.has_remaining-1' class="method"><span id='has_remaining.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.has_remaining' class='fnname'>has_remaining</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#212-214' title='goto source code'>[src]</a></span></h4>
<h4 id='method.copy_to_slice-1' class="method"><span id='copy_to_slice.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.copy_to_slice' class='fnname'>copy_to_slice</a>(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;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>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#238-258' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u8-1' class="method"><span id='get_u8.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u8' class='fnname'>get_u8</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#277-282' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i8-1' class="method"><span id='get_i8.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i8' class='fnname'>get_i8</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#301-306' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u16_be-1' class="method"><span id='get_u16_be.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u16_be' class='fnname'>get_u16_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#333-335' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u16_le-1' class="method"><span id='get_u16_le.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u16_le' class='fnname'>get_u16_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#354-356' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i16_be-1' class="method"><span id='get_i16_be.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i16_be' class='fnname'>get_i16_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#383-385' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i16_le-1' class="method"><span id='get_i16_le.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i16_le' class='fnname'>get_i16_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#404-406' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u32_be-1' class="method"><span id='get_u32_be.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u32_be' class='fnname'>get_u32_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#433-435' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u32_le-1' class="method"><span id='get_u32_le.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u32_le' class='fnname'>get_u32_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#454-456' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i32_be-1' class="method"><span id='get_i32_be.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i32_be' class='fnname'>get_i32_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#483-485' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i32_le-1' class="method"><span id='get_i32_le.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i32_le' class='fnname'>get_i32_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#504-506' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u64_be-1' class="method"><span id='get_u64_be.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u64_be' class='fnname'>get_u64_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#533-535' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u64_le-1' class="method"><span id='get_u64_le.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u64_le' class='fnname'>get_u64_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#554-556' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i64_be-1' class="method"><span id='get_i64_be.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i64_be' class='fnname'>get_i64_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#583-585' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i64_le-1' class="method"><span id='get_i64_le.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i64_le' class='fnname'>get_i64_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#604-606' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_uint_be-1' class="method"><span id='get_uint_be.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_uint_be' class='fnname'>get_uint_be</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#725-727' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_uint_le-1' class="method"><span id='get_uint_le.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_uint_le' class='fnname'>get_uint_le</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#746-748' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_int_be-1' class="method"><span id='get_int_be.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_int_be' class='fnname'>get_int_be</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#775-777' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_int_le-1' class="method"><span id='get_int_le.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_int_le' class='fnname'>get_int_le</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#796-798' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_f32_be-1' class="method"><span id='get_f32_be.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_f32_be' class='fnname'>get_f32_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#826-828' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_f32_le-1' class="method"><span id='get_f32_le.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_f32_le' class='fnname'>get_f32_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#848-850' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_f64_be-1' class="method"><span id='get_f64_be.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_f64_be' class='fnname'>get_f64_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#878-880' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_f64_le-1' class="method"><span id='get_f64_le.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_f64_le' class='fnname'>get_f64_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#900-902' title='goto source code'>[src]</a></span></h4>
<h4 id='method.collect-1' class="method"><span id='collect.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.collect' class='fnname'>collect</a>&lt;B&gt;(self) -&gt; B <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../bytes/buf/trait.FromBuf.html" title="trait bytes::buf::FromBuf">FromBuf</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#921-926' title='goto source code'>[src]</a></span></h4>
<h4 id='method.take-1' class="method"><span id='take.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.take' class='fnname'>take</a>(self, limit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="../bytes/buf/struct.Take.html" title="struct bytes::buf::Take">Take</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#950-954' title='goto source code'>[src]</a></span></h4>
<h4 id='method.chain-1' class="method"><span id='chain.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.chain' class='fnname'>chain</a>&lt;U&gt;(self, next: U) -&gt; <a class="struct" href="../bytes/buf/struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;Self, U::<a class="type" href="../bytes/buf/trait.IntoBuf.html#associatedtype.Buf" title="type bytes::buf::IntoBuf::Buf">Buf</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="../bytes/buf/trait.IntoBuf.html" title="trait bytes::buf::IntoBuf">IntoBuf</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#973-978' title='goto source code'>[src]</a></span></h4>
<h4 id='method.by_ref-1' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>R</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>R</h3><code class="content"><span class="where fmt-newline">impl&lt;'a, R&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>R <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline">impl&lt;'a, W&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>W <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;W: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline">impl&lt;'a, I&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>I <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = &lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a>&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::iterator::Iterator::Item">Item</a>;</span></code></div></div><span id='by_ref.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.by_ref' class='fnname'>by_ref</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1003-1005' title='goto source code'>[src]</a></span></h4>
<h4 id='method.reader-1' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="struct" href="../bytes/buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../bytes/buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;B:&nbsp;<a class="trait" href="../bytes/buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="struct" href="../bytes/buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;</span></code></div></div><span id='reader.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.reader' class='fnname'>reader</a>(self) -&gt; <a class="struct" href="../bytes/buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1030-1032' title='goto source code'>[src]</a></span></h4>
<h4 id='method.iter-1' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="struct" href="../bytes/buf/struct.Iter.html" title="struct bytes::buf::Iter">Iter</a>&lt;T&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../bytes/buf/struct.Iter.html" title="struct bytes::buf::Iter">Iter</a>&lt;T&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;T:&nbsp;<a class="trait" href="../bytes/buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../bytes/buf/struct.Iter.html" title="struct bytes::buf::Iter">Iter</a>&lt;T&gt;</span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>;</span></code></div></div><span id='iter.v-1' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.iter' class='fnname'>iter</a>(self) -&gt; <a class="struct" href="../bytes/buf/struct.Iter.html" title="struct bytes::buf::Iter">Iter</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1049-1051' title='goto source code'>[src]</a></span></h4>
</div></span><h3 id='impl-Buf-1' class='impl'><span class='in-band'><code>impl&lt;T:&nbsp;<a class="trait" href="../bytes/buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt; <a class="trait" href="../bytes/buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</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;</code><a href='#impl-Buf-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1072-1088' title='goto source code'>[src]</a></span></h3>
<span class='docblock autohide'><div class='impl-items'><h4 id='method.remaining-1' class="method"><span id='remaining.v-2' class='invisible'><code>fn <a href='#method.remaining' class='fnname'>remaining</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1073-1075' title='goto source code'>[src]</a></span></h4>
<h4 id='method.bytes-1' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'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></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'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></h3><code class="content"><span class="where fmt-newline">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'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></span><span class="where fmt-newline">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'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></span></code></div></div><span id='bytes.v-2' class='invisible'><code>fn <a href='#method.bytes' class='fnname'>bytes</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1077-1079' title='goto source code'>[src]</a></span></h4>
<h4 id='method.bytes_vec-2' class="method"><span id='bytes_vec.v-2' class='invisible'><code>fn <a href='#method.bytes_vec' class='fnname'>bytes_vec</a>&lt;'b&gt;(&amp;'b self, dst: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a>&amp;'b <a class="struct" href="../iovec/struct.IoVec.html" title="struct iovec::IoVec">IoVec</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1081-1083' title='goto source code'>[src]</a></span></h4>
<h4 id='method.advance-1' class="method"><span id='advance.v-2' class='invisible'><code>fn <a href='#method.advance' class='fnname'>advance</a>(&amp;mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1085-1087' title='goto source code'>[src]</a></span></h4>
<h4 id='method.has_remaining-2' class="method"><span id='has_remaining.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.has_remaining' class='fnname'>has_remaining</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#212-214' title='goto source code'>[src]</a></span></h4>
<h4 id='method.copy_to_slice-2' class="method"><span id='copy_to_slice.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.copy_to_slice' class='fnname'>copy_to_slice</a>(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;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>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#238-258' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u8-2' class="method"><span id='get_u8.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u8' class='fnname'>get_u8</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#277-282' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i8-2' class="method"><span id='get_i8.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i8' class='fnname'>get_i8</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#301-306' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u16_be-2' class="method"><span id='get_u16_be.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u16_be' class='fnname'>get_u16_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#333-335' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u16_le-2' class="method"><span id='get_u16_le.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u16_le' class='fnname'>get_u16_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#354-356' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i16_be-2' class="method"><span id='get_i16_be.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i16_be' class='fnname'>get_i16_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#383-385' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i16_le-2' class="method"><span id='get_i16_le.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i16_le' class='fnname'>get_i16_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#404-406' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u32_be-2' class="method"><span id='get_u32_be.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u32_be' class='fnname'>get_u32_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#433-435' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u32_le-2' class="method"><span id='get_u32_le.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u32_le' class='fnname'>get_u32_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#454-456' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i32_be-2' class="method"><span id='get_i32_be.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i32_be' class='fnname'>get_i32_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#483-485' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i32_le-2' class="method"><span id='get_i32_le.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i32_le' class='fnname'>get_i32_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#504-506' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u64_be-2' class="method"><span id='get_u64_be.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u64_be' class='fnname'>get_u64_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#533-535' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u64_le-2' class="method"><span id='get_u64_le.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u64_le' class='fnname'>get_u64_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#554-556' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i64_be-2' class="method"><span id='get_i64_be.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i64_be' class='fnname'>get_i64_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#583-585' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i64_le-2' class="method"><span id='get_i64_le.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i64_le' class='fnname'>get_i64_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#604-606' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_uint_be-2' class="method"><span id='get_uint_be.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_uint_be' class='fnname'>get_uint_be</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#725-727' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_uint_le-2' class="method"><span id='get_uint_le.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_uint_le' class='fnname'>get_uint_le</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#746-748' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_int_be-2' class="method"><span id='get_int_be.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_int_be' class='fnname'>get_int_be</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#775-777' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_int_le-2' class="method"><span id='get_int_le.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_int_le' class='fnname'>get_int_le</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#796-798' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_f32_be-2' class="method"><span id='get_f32_be.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_f32_be' class='fnname'>get_f32_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#826-828' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_f32_le-2' class="method"><span id='get_f32_le.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_f32_le' class='fnname'>get_f32_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#848-850' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_f64_be-2' class="method"><span id='get_f64_be.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_f64_be' class='fnname'>get_f64_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#878-880' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_f64_le-2' class="method"><span id='get_f64_le.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_f64_le' class='fnname'>get_f64_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#900-902' title='goto source code'>[src]</a></span></h4>
<h4 id='method.collect-2' class="method"><span id='collect.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.collect' class='fnname'>collect</a>&lt;B&gt;(self) -&gt; B <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../bytes/buf/trait.FromBuf.html" title="trait bytes::buf::FromBuf">FromBuf</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#921-926' title='goto source code'>[src]</a></span></h4>
<h4 id='method.take-2' class="method"><span id='take.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.take' class='fnname'>take</a>(self, limit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="../bytes/buf/struct.Take.html" title="struct bytes::buf::Take">Take</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#950-954' title='goto source code'>[src]</a></span></h4>
<h4 id='method.chain-2' class="method"><span id='chain.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.chain' class='fnname'>chain</a>&lt;U&gt;(self, next: U) -&gt; <a class="struct" href="../bytes/buf/struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;Self, U::<a class="type" href="../bytes/buf/trait.IntoBuf.html#associatedtype.Buf" title="type bytes::buf::IntoBuf::Buf">Buf</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="../bytes/buf/trait.IntoBuf.html" title="trait bytes::buf::IntoBuf">IntoBuf</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#973-978' title='goto source code'>[src]</a></span></h4>
<h4 id='method.by_ref-2' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>R</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>R</h3><code class="content"><span class="where fmt-newline">impl&lt;'a, R&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>R <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline">impl&lt;'a, W&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>W <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;W: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline">impl&lt;'a, I&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>I <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = &lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a>&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::iterator::Iterator::Item">Item</a>;</span></code></div></div><span id='by_ref.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.by_ref' class='fnname'>by_ref</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1003-1005' title='goto source code'>[src]</a></span></h4>
<h4 id='method.reader-2' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="struct" href="../bytes/buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../bytes/buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;B:&nbsp;<a class="trait" href="../bytes/buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="struct" href="../bytes/buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;</span></code></div></div><span id='reader.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.reader' class='fnname'>reader</a>(self) -&gt; <a class="struct" href="../bytes/buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1030-1032' title='goto source code'>[src]</a></span></h4>
<h4 id='method.iter-2' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="struct" href="../bytes/buf/struct.Iter.html" title="struct bytes::buf::Iter">Iter</a>&lt;T&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../bytes/buf/struct.Iter.html" title="struct bytes::buf::Iter">Iter</a>&lt;T&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;T:&nbsp;<a class="trait" href="../bytes/buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../bytes/buf/struct.Iter.html" title="struct bytes::buf::Iter">Iter</a>&lt;T&gt;</span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>;</span></code></div></div><span id='iter.v-2' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.iter' class='fnname'>iter</a>(self) -&gt; <a class="struct" href="../bytes/buf/struct.Iter.html" title="struct bytes::buf::Iter">Iter</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1049-1051' title='goto source code'>[src]</a></span></h4>
</div></span><h3 id='impl-Buf-2' class='impl'><span class='in-band'><code>impl&lt;T:&nbsp;<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.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>&gt;&gt; <a class="trait" href="../bytes/buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</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;</code><a href='#impl-Buf-2' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1090-1121' title='goto source code'>[src]</a></span></h3>
<span class='docblock autohide'><div class='impl-items'><h4 id='method.remaining-2' class="method"><span id='remaining.v-3' class='invisible'><code>fn <a href='#method.remaining' class='fnname'>remaining</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1091-1100' title='goto source code'>[src]</a></span></h4>
<h4 id='method.bytes-2' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'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></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'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></h3><code class="content"><span class="where fmt-newline">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'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></span><span class="where fmt-newline">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'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></span></code></div></div><span id='bytes.v-3' class='invisible'><code>fn <a href='#method.bytes' class='fnname'>bytes</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1102-1111' title='goto source code'>[src]</a></span></h4>
<h4 id='method.advance-2' class="method"><span id='advance.v-3' class='invisible'><code>fn <a href='#method.advance' class='fnname'>advance</a>(&amp;mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1113-1120' title='goto source code'>[src]</a></span></h4>
<h4 id='method.bytes_vec-3' class="method"><span id='bytes_vec.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.bytes_vec' class='fnname'>bytes_vec</a>&lt;'a&gt;(&amp;'a self, dst: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a>&amp;'a <a class="struct" href="../iovec/struct.IoVec.html" title="struct iovec::IoVec">IoVec</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#148-159' title='goto source code'>[src]</a></span></h4>
<h4 id='method.has_remaining-3' class="method"><span id='has_remaining.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.has_remaining' class='fnname'>has_remaining</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#212-214' title='goto source code'>[src]</a></span></h4>
<h4 id='method.copy_to_slice-3' class="method"><span id='copy_to_slice.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.copy_to_slice' class='fnname'>copy_to_slice</a>(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;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>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#238-258' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u8-3' class="method"><span id='get_u8.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u8' class='fnname'>get_u8</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#277-282' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i8-3' class="method"><span id='get_i8.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i8' class='fnname'>get_i8</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#301-306' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u16_be-3' class="method"><span id='get_u16_be.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u16_be' class='fnname'>get_u16_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#333-335' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u16_le-3' class="method"><span id='get_u16_le.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u16_le' class='fnname'>get_u16_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#354-356' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i16_be-3' class="method"><span id='get_i16_be.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i16_be' class='fnname'>get_i16_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#383-385' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i16_le-3' class="method"><span id='get_i16_le.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i16_le' class='fnname'>get_i16_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#404-406' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u32_be-3' class="method"><span id='get_u32_be.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u32_be' class='fnname'>get_u32_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#433-435' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u32_le-3' class="method"><span id='get_u32_le.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u32_le' class='fnname'>get_u32_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#454-456' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i32_be-3' class="method"><span id='get_i32_be.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i32_be' class='fnname'>get_i32_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#483-485' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i32_le-3' class="method"><span id='get_i32_le.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i32_le' class='fnname'>get_i32_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#504-506' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u64_be-3' class="method"><span id='get_u64_be.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u64_be' class='fnname'>get_u64_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#533-535' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u64_le-3' class="method"><span id='get_u64_le.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u64_le' class='fnname'>get_u64_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#554-556' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i64_be-3' class="method"><span id='get_i64_be.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i64_be' class='fnname'>get_i64_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#583-585' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i64_le-3' class="method"><span id='get_i64_le.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i64_le' class='fnname'>get_i64_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#604-606' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_uint_be-3' class="method"><span id='get_uint_be.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_uint_be' class='fnname'>get_uint_be</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#725-727' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_uint_le-3' class="method"><span id='get_uint_le.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_uint_le' class='fnname'>get_uint_le</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#746-748' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_int_be-3' class="method"><span id='get_int_be.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_int_be' class='fnname'>get_int_be</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#775-777' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_int_le-3' class="method"><span id='get_int_le.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_int_le' class='fnname'>get_int_le</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#796-798' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_f32_be-3' class="method"><span id='get_f32_be.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_f32_be' class='fnname'>get_f32_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#826-828' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_f32_le-3' class="method"><span id='get_f32_le.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_f32_le' class='fnname'>get_f32_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#848-850' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_f64_be-3' class="method"><span id='get_f64_be.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_f64_be' class='fnname'>get_f64_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#878-880' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_f64_le-3' class="method"><span id='get_f64_le.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_f64_le' class='fnname'>get_f64_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#900-902' title='goto source code'>[src]</a></span></h4>
<h4 id='method.collect-3' class="method"><span id='collect.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.collect' class='fnname'>collect</a>&lt;B&gt;(self) -&gt; B <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../bytes/buf/trait.FromBuf.html" title="trait bytes::buf::FromBuf">FromBuf</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#921-926' title='goto source code'>[src]</a></span></h4>
<h4 id='method.take-3' class="method"><span id='take.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.take' class='fnname'>take</a>(self, limit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="../bytes/buf/struct.Take.html" title="struct bytes::buf::Take">Take</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#950-954' title='goto source code'>[src]</a></span></h4>
<h4 id='method.chain-3' class="method"><span id='chain.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.chain' class='fnname'>chain</a>&lt;U&gt;(self, next: U) -&gt; <a class="struct" href="../bytes/buf/struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;Self, U::<a class="type" href="../bytes/buf/trait.IntoBuf.html#associatedtype.Buf" title="type bytes::buf::IntoBuf::Buf">Buf</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="../bytes/buf/trait.IntoBuf.html" title="trait bytes::buf::IntoBuf">IntoBuf</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#973-978' title='goto source code'>[src]</a></span></h4>
<h4 id='method.by_ref-3' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>R</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>R</h3><code class="content"><span class="where fmt-newline">impl&lt;'a, R&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>R <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline">impl&lt;'a, W&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>W <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;W: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline">impl&lt;'a, I&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>I <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = &lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a>&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::iterator::Iterator::Item">Item</a>;</span></code></div></div><span id='by_ref.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.by_ref' class='fnname'>by_ref</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1003-1005' title='goto source code'>[src]</a></span></h4>
<h4 id='method.reader-3' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="struct" href="../bytes/buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../bytes/buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;B:&nbsp;<a class="trait" href="../bytes/buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="struct" href="../bytes/buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;</span></code></div></div><span id='reader.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.reader' class='fnname'>reader</a>(self) -&gt; <a class="struct" href="../bytes/buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1030-1032' title='goto source code'>[src]</a></span></h4>
<h4 id='method.iter-3' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="struct" href="../bytes/buf/struct.Iter.html" title="struct bytes::buf::Iter">Iter</a>&lt;T&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../bytes/buf/struct.Iter.html" title="struct bytes::buf::Iter">Iter</a>&lt;T&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;T:&nbsp;<a class="trait" href="../bytes/buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../bytes/buf/struct.Iter.html" title="struct bytes::buf::Iter">Iter</a>&lt;T&gt;</span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>;</span></code></div></div><span id='iter.v-3' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.iter' class='fnname'>iter</a>(self) -&gt; <a class="struct" href="../bytes/buf/struct.Iter.html" title="struct bytes::buf::Iter">Iter</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1049-1051' title='goto source code'>[src]</a></span></h4>
</div></span><h3 id='impl-Buf-3' class='impl'><span class='in-band'><code>impl <a class="trait" href="../bytes/buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> for <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.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.array.html">; 1]</a>&gt;</code><a href='#impl-Buf-3' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1123-1149' title='goto source code'>[src]</a></span></h3>
<span class='docblock autohide'><div class='impl-items'><h4 id='method.remaining-3' class="method"><span id='remaining.v-4' class='invisible'><code>fn <a href='#method.remaining' class='fnname'>remaining</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1124-1130' title='goto source code'>[src]</a></span></h4>
<h4 id='method.bytes-3' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'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></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'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></h3><code class="content"><span class="where fmt-newline">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'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></span><span class="where fmt-newline">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'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></span></code></div></div><span id='bytes.v-4' class='invisible'><code>fn <a href='#method.bytes' class='fnname'>bytes</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1132-1135' title='goto source code'>[src]</a></span></h4>
<h4 id='method.advance-3' class="method"><span id='advance.v-4' class='invisible'><code>fn <a href='#method.advance' class='fnname'>advance</a>(&amp;mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1137-1148' title='goto source code'>[src]</a></span></h4>
<h4 id='method.bytes_vec-4' class="method"><span id='bytes_vec.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.bytes_vec' class='fnname'>bytes_vec</a>&lt;'a&gt;(&amp;'a self, dst: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a>&amp;'a <a class="struct" href="../iovec/struct.IoVec.html" title="struct iovec::IoVec">IoVec</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#148-159' title='goto source code'>[src]</a></span></h4>
<h4 id='method.has_remaining-4' class="method"><span id='has_remaining.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.has_remaining' class='fnname'>has_remaining</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#212-214' title='goto source code'>[src]</a></span></h4>
<h4 id='method.copy_to_slice-4' class="method"><span id='copy_to_slice.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.copy_to_slice' class='fnname'>copy_to_slice</a>(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;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>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#238-258' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u8-4' class="method"><span id='get_u8.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u8' class='fnname'>get_u8</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#277-282' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i8-4' class="method"><span id='get_i8.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i8' class='fnname'>get_i8</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#301-306' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u16_be-4' class="method"><span id='get_u16_be.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u16_be' class='fnname'>get_u16_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#333-335' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u16_le-4' class="method"><span id='get_u16_le.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u16_le' class='fnname'>get_u16_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#354-356' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i16_be-4' class="method"><span id='get_i16_be.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i16_be' class='fnname'>get_i16_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#383-385' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i16_le-4' class="method"><span id='get_i16_le.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i16_le' class='fnname'>get_i16_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#404-406' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u32_be-4' class="method"><span id='get_u32_be.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u32_be' class='fnname'>get_u32_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#433-435' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u32_le-4' class="method"><span id='get_u32_le.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u32_le' class='fnname'>get_u32_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#454-456' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i32_be-4' class="method"><span id='get_i32_be.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i32_be' class='fnname'>get_i32_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#483-485' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i32_le-4' class="method"><span id='get_i32_le.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i32_le' class='fnname'>get_i32_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#504-506' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u64_be-4' class="method"><span id='get_u64_be.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u64_be' class='fnname'>get_u64_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#533-535' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_u64_le-4' class="method"><span id='get_u64_le.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_u64_le' class='fnname'>get_u64_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#554-556' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i64_be-4' class="method"><span id='get_i64_be.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i64_be' class='fnname'>get_i64_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#583-585' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_i64_le-4' class="method"><span id='get_i64_le.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_i64_le' class='fnname'>get_i64_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#604-606' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_uint_be-4' class="method"><span id='get_uint_be.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_uint_be' class='fnname'>get_uint_be</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#725-727' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_uint_le-4' class="method"><span id='get_uint_le.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_uint_le' class='fnname'>get_uint_le</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#746-748' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_int_be-4' class="method"><span id='get_int_be.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_int_be' class='fnname'>get_int_be</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#775-777' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_int_le-4' class="method"><span id='get_int_le.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_int_le' class='fnname'>get_int_le</a>(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#796-798' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_f32_be-4' class="method"><span id='get_f32_be.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_f32_be' class='fnname'>get_f32_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#826-828' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_f32_le-4' class="method"><span id='get_f32_le.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_f32_le' class='fnname'>get_f32_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#848-850' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_f64_be-4' class="method"><span id='get_f64_be.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_f64_be' class='fnname'>get_f64_be</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#878-880' title='goto source code'>[src]</a></span></h4>
<h4 id='method.get_f64_le-4' class="method"><span id='get_f64_le.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.get_f64_le' class='fnname'>get_f64_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#900-902' title='goto source code'>[src]</a></span></h4>
<h4 id='method.collect-4' class="method"><span id='collect.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.collect' class='fnname'>collect</a>&lt;B&gt;(self) -&gt; B <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="../bytes/buf/trait.FromBuf.html" title="trait bytes::buf::FromBuf">FromBuf</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#921-926' title='goto source code'>[src]</a></span></h4>
<h4 id='method.take-4' class="method"><span id='take.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.take' class='fnname'>take</a>(self, limit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="../bytes/buf/struct.Take.html" title="struct bytes::buf::Take">Take</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#950-954' title='goto source code'>[src]</a></span></h4>
<h4 id='method.chain-4' class="method"><span id='chain.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.chain' class='fnname'>chain</a>&lt;U&gt;(self, next: U) -&gt; <a class="struct" href="../bytes/buf/struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;Self, U::<a class="type" href="../bytes/buf/trait.IntoBuf.html#associatedtype.Buf" title="type bytes::buf::IntoBuf::Buf">Buf</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="../bytes/buf/trait.IntoBuf.html" title="trait bytes::buf::IntoBuf">IntoBuf</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#973-978' title='goto source code'>[src]</a></span></h4>
<h4 id='method.by_ref-4' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>R</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>R</h3><code class="content"><span class="where fmt-newline">impl&lt;'a, R&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>R <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline">impl&lt;'a, W&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>W <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;W: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline">impl&lt;'a, I&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>I <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = &lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a>&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::iterator::Iterator::Item">Item</a>;</span></code></div></div><span id='by_ref.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.by_ref' class='fnname'>by_ref</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1003-1005' title='goto source code'>[src]</a></span></h4>
<h4 id='method.reader-4' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="struct" href="../bytes/buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../bytes/buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;B:&nbsp;<a class="trait" href="../bytes/buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="struct" href="../bytes/buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;</span></code></div></div><span id='reader.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.reader' class='fnname'>reader</a>(self) -&gt; <a class="struct" href="../bytes/buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1030-1032' title='goto source code'>[src]</a></span></h4>
<h4 id='method.iter-4' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="struct" href="../bytes/buf/struct.Iter.html" title="struct bytes::buf::Iter">Iter</a>&lt;T&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../bytes/buf/struct.Iter.html" title="struct bytes::buf::Iter">Iter</a>&lt;T&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;T:&nbsp;<a class="trait" href="../bytes/buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../bytes/buf/struct.Iter.html" title="struct bytes::buf::Iter">Iter</a>&lt;T&gt;</span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>;</span></code></div></div><span id='iter.v-4' class='invisible'><code>fn <a href='../bytes/buf/trait.Buf.html#method.iter' class='fnname'>iter</a>(self) -&gt; <a class="struct" href="../bytes/buf/struct.Iter.html" title="struct bytes::buf::Iter">Iter</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bytes/buf/buf.rs.html#1049-1051' title='goto source code'>[src]</a></span></h4>
</div></span>
<h2 id='implementors' class='small-section-header'>
Implementors<a href='#implementors' class='anchor'></a>
</h2>
<ul class='item-list' id='implementors-list'>
<li><div class='out-of-band'><a class='srclink' href='../src/bytes/buf/chain.rs.html#146-185' title='goto source code'>[src]</a></div><code>impl&lt;T, U&gt; Buf for <a class="struct" href="../bytes/buf/struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;T, U&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../bytes/buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="../bytes/buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../src/bytes/buf/take.rs.html#140-155' title='goto source code'>[src]</a></div><code>impl&lt;T:&nbsp;<a class="trait" href="../bytes/buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt; Buf for <a class="struct" href="../bytes/buf/struct.Take.html" title="struct bytes::buf::Take">Take</a>&lt;T&gt;</code></li>
</ul><script type="text/javascript" async
src="../implementors/bytes/trait.Buf.js">
</script></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt><kbd>?</kbd></dt>
<dd>Show this help dialog</dd>
<dt><kbd>S</kbd></dt>
<dd>Focus the search field</dd>
<dt><kbd></kbd></dt>
<dd>Move up in search results</dd>
<dt><kbd></kbd></dt>
<dd>Move down in search results</dd>
<dt><kbd></kbd></dt>
<dd>Switch tab</dd>
<dt><kbd>&#9166;</kbd></dt>
<dd>Go to active search result</dd>
<dt><kbd>+</kbd></dt>
<dd>Expand all sections</dd>
<dt><kbd>-</kbd></dt>
<dd>Collapse all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../";
window.currentCrate = "bytes";
</script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>