summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar ci <ci> 2024-05-28 08:18:05 +0000
committerGravatar ci <ci> 2024-05-28 08:18:05 +0000
commitb72715079051a93004b0ad9ccc345ff006267921 (patch)
treeaa10a950c633d11a073c8e368b406bd1dcfbdcf0
downloadbytes-gh-pages.tar.gz
bytes-gh-pages.tar.zst
bytes-gh-pages.zip
Deploy Bytes API documentationgh-pages
-rw-r--r--.lock0
-rw-r--r--bytes/all.html1
-rw-r--r--bytes/buf/buf_impl/trait.Buf.html11
-rw-r--r--bytes/buf/buf_mut/trait.BufMut.html11
-rw-r--r--bytes/buf/chain/struct.Chain.html11
-rw-r--r--bytes/buf/index.html11
-rw-r--r--bytes/buf/iter/struct.IntoIter.html11
-rw-r--r--bytes/buf/limit/struct.Limit.html11
-rw-r--r--bytes/buf/reader/struct.Reader.html11
-rw-r--r--bytes/buf/sidebar-items.js1
-rw-r--r--bytes/buf/struct.Chain.html89
-rw-r--r--bytes/buf/struct.IntoIter.html96
-rw-r--r--bytes/buf/struct.Limit.html31
-rw-r--r--bytes/buf/struct.Reader.html38
-rw-r--r--bytes/buf/struct.Take.html84
-rw-r--r--bytes/buf/struct.UninitSlice.html100
-rw-r--r--bytes/buf/struct.Writer.html42
-rw-r--r--bytes/buf/take/struct.Take.html11
-rw-r--r--bytes/buf/trait.Buf.html619
-rw-r--r--bytes/buf/trait.BufMut.html732
-rw-r--r--bytes/buf/uninit_slice/struct.UninitSlice.html11
-rw-r--r--bytes/buf/writer/struct.Writer.html11
-rw-r--r--bytes/bytes/struct.Bytes.html11
-rw-r--r--bytes/bytes_mut/struct.BytesMut.html11
-rw-r--r--bytes/index.html50
-rw-r--r--bytes/sidebar-items.js1
-rw-r--r--bytes/struct.Bytes.html1202
-rw-r--r--bytes/struct.BytesMut.html2462
-rw-r--r--bytes/trait.Buf.html619
-rw-r--r--bytes/trait.BufMut.html732
-rw-r--r--crates.js1
-rw-r--r--help.html1
-rw-r--r--implementors/bytes/buf/buf_impl/trait.Buf.js3
-rw-r--r--implementors/bytes/buf/buf_mut/trait.BufMut.js3
-rw-r--r--implementors/core/borrow/trait.Borrow.js3
-rw-r--r--implementors/core/borrow/trait.BorrowMut.js3
-rw-r--r--implementors/core/clone/trait.Clone.js3
-rw-r--r--implementors/core/cmp/trait.Eq.js3
-rw-r--r--implementors/core/cmp/trait.Ord.js3
-rw-r--r--implementors/core/cmp/trait.PartialEq.js3
-rw-r--r--implementors/core/cmp/trait.PartialOrd.js3
-rw-r--r--implementors/core/convert/trait.AsMut.js3
-rw-r--r--implementors/core/convert/trait.AsRef.js3
-rw-r--r--implementors/core/convert/trait.From.js3
-rw-r--r--implementors/core/default/trait.Default.js3
-rw-r--r--implementors/core/fmt/trait.Debug.js3
-rw-r--r--implementors/core/fmt/trait.LowerHex.js3
-rw-r--r--implementors/core/fmt/trait.UpperHex.js3
-rw-r--r--implementors/core/fmt/trait.Write.js3
-rw-r--r--implementors/core/hash/trait.Hash.js3
-rw-r--r--implementors/core/iter/traits/collect/trait.Extend.js3
-rw-r--r--implementors/core/iter/traits/collect/trait.FromIterator.js3
-rw-r--r--implementors/core/iter/traits/collect/trait.IntoIterator.js3
-rw-r--r--implementors/core/iter/traits/exact_size/trait.ExactSizeIterator.js3
-rw-r--r--implementors/core/iter/traits/iterator/trait.Iterator.js3
-rw-r--r--implementors/core/marker/trait.Freeze.js3
-rw-r--r--implementors/core/marker/trait.Send.js3
-rw-r--r--implementors/core/marker/trait.Sized.js3
-rw-r--r--implementors/core/marker/trait.Sync.js3
-rw-r--r--implementors/core/marker/trait.Unpin.js3
-rw-r--r--implementors/core/ops/deref/trait.Deref.js3
-rw-r--r--implementors/core/ops/deref/trait.DerefMut.js3
-rw-r--r--implementors/core/ops/drop/trait.Drop.js3
-rw-r--r--implementors/core/ops/index/trait.Index.js3
-rw-r--r--implementors/core/ops/index/trait.IndexMut.js3
-rw-r--r--implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js3
-rw-r--r--implementors/core/panic/unwind_safe/trait.UnwindSafe.js3
-rw-r--r--implementors/serde/de/trait.Deserialize.js3
-rw-r--r--implementors/serde/ser/trait.Serialize.js3
-rw-r--r--implementors/std/io/trait.BufRead.js3
-rw-r--r--implementors/std/io/trait.Read.js3
-rw-r--r--implementors/std/io/trait.Write.js3
-rw-r--r--search-index.js5
-rw-r--r--settings.html1
-rw-r--r--source-files.js4
-rw-r--r--src/bytes/buf/buf_impl.rs.html2930
-rw-r--r--src/bytes/buf/buf_mut.rs.html3284
-rw-r--r--src/bytes/buf/chain.rs.html482
-rw-r--r--src/bytes/buf/iter.rs.html256
-rw-r--r--src/bytes/buf/limit.rs.html152
-rw-r--r--src/bytes/buf/mod.rs.html80
-rw-r--r--src/bytes/buf/reader.rs.html164
-rw-r--r--src/bytes/buf/take.rs.html312
-rw-r--r--src/bytes/buf/uninit_slice.rs.html516
-rw-r--r--src/bytes/buf/vec_deque.rs.html46
-rw-r--r--src/bytes/buf/writer.rs.html178
-rw-r--r--src/bytes/bytes.rs.html2962
-rw-r--r--src/bytes/bytes_mut.rs.html3670
-rw-r--r--src/bytes/fmt/debug.rs.html100
-rw-r--r--src/bytes/fmt/hex.rs.html76
-rw-r--r--src/bytes/fmt/mod.rs.html12
-rw-r--r--src/bytes/lib.rs.html332
-rw-r--r--src/bytes/loom.rs.html62
-rw-r--r--src/bytes/serde.rs.html180
-rw-r--r--static.files/COPYRIGHT-002d5dd09d9a4f50.txt46
-rw-r--r--static.files/FiraSans-LICENSE-1761dca11ffc8f19.txt94
-rw-r--r--static.files/FiraSans-Medium-8f9a781e4970d388.woff2bin0 -> 132780 bytes
-rw-r--r--static.files/FiraSans-Regular-018c141bf0843ffd.woff2bin0 -> 129188 bytes
-rw-r--r--static.files/LICENSE-APACHE-b91fa81cba47b86a.txt201
-rw-r--r--static.files/LICENSE-MIT-65090b722b3f6c56.txt23
-rw-r--r--static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2bin0 -> 399468 bytes
-rw-r--r--static.files/NanumBarunGothic-LICENSE-2fe9ce67ec95245d.txt99
-rw-r--r--static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2bin0 -> 44896 bytes
-rw-r--r--static.files/SourceCodePro-LICENSE-f554967dca0cf1dd.txt93
-rw-r--r--static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2bin0 -> 52228 bytes
-rw-r--r--static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2bin0 -> 52348 bytes
-rw-r--r--static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2bin0 -> 81320 bytes
-rw-r--r--static.files/SourceSerif4-It-d034fe4ef9d0fa00.ttf.woff2bin0 -> 59860 bytes
-rw-r--r--static.files/SourceSerif4-LICENSE-964d32dc04f20ca3.md93
-rw-r--r--static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2bin0 -> 76180 bytes
-rw-r--r--static.files/ayu-c360e709a65bed99.css285
-rw-r--r--static.files/clipboard-7571035ce49a181d.svg1
-rw-r--r--static.files/dark-e2f4109f2e82e3af.css182
-rw-r--r--static.files/down-arrow-927217e04c7463ac.svg1
-rw-r--r--static.files/favicon-16x16-8b506e7a72182f1c.pngbin0 -> 715 bytes
-rw-r--r--static.files/favicon-2c020d218678b618.svg24
-rw-r--r--static.files/favicon-32x32-422f7d1d52889060.pngbin0 -> 1125 bytes
-rw-r--r--static.files/light-777f3e9583f8c92d.css173
-rw-r--r--static.files/main-c2d2a5dbaed13e6b.js1150
-rw-r--r--static.files/normalize-76eba96aa4d2e634.css2
-rw-r--r--static.files/noscript-13285aec31fa243e.css30
-rw-r--r--static.files/rust-logo-151179464ae7ed46.svg61
-rw-r--r--static.files/rustdoc-eabf764633b9d7be.css2123
-rw-r--r--static.files/scrape-examples-1f45318ad6bd2a81.js106
-rw-r--r--static.files/search-39ee4160c7dc16c9.js2280
-rw-r--r--static.files/settings-3a0b9947ba1bd99a.js283
-rw-r--r--static.files/settings-a66f7524084a489a.css110
-rw-r--r--static.files/source-script-74087aa2e88f4475.js228
-rw-r--r--static.files/storage-d43fa987303ecbbb.js264
-rw-r--r--static.files/toggle-minus-31bbd6e4c77f5c96.svg1
-rw-r--r--static.files/toggle-plus-1092eb4930d581b0.svg1
-rw-r--r--static.files/wheel-5ec35bf9ca753509.svg1
132 files changed, 30912 insertions, 0 deletions
diff --git a/.lock b/.lock
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/.lock
diff --git a/bytes/all.html b/bytes/all.html
new file mode 100644
index 0000000..0848bda
--- /dev/null
+++ b/bytes/all.html
@@ -0,0 +1 @@
+<!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="List of all items in this crate"><meta name="keywords" content="rust, rustlang, rust-lang"><title>List of all items in this crate</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2 class="location">Crate bytes</h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#traits">Traits</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><h1 class="fqn">List of all items</h1><h3 id="structs">Structs</h3><ul class="all-items"><li><a href="struct.Bytes.html">Bytes</a></li><li><a href="struct.BytesMut.html">BytesMut</a></li><li><a href="buf/struct.Chain.html">buf::Chain</a></li><li><a href="buf/struct.IntoIter.html">buf::IntoIter</a></li><li><a href="buf/struct.Limit.html">buf::Limit</a></li><li><a href="buf/struct.Reader.html">buf::Reader</a></li><li><a href="buf/struct.Take.html">buf::Take</a></li><li><a href="buf/struct.UninitSlice.html">buf::UninitSlice</a></li><li><a href="buf/struct.Writer.html">buf::Writer</a></li></ul><h3 id="traits">Traits</h3><ul class="all-items"><li><a href="trait.Buf.html">Buf</a></li><li><a href="trait.BufMut.html">BufMut</a></li><li><a href="buf/trait.Buf.html">buf::Buf</a></li><li><a href="buf/trait.BufMut.html">buf::BufMut</a></li></ul></section></div></main><div id="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/bytes/buf/buf_impl/trait.Buf.html b/bytes/buf/buf_impl/trait.Buf.html
new file mode 100644
index 0000000..af95098
--- /dev/null
+++ b/bytes/buf/buf_impl/trait.Buf.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta http-equiv="refresh" content="0;URL=../../../bytes/buf/trait.Buf.html">
+ <title>Redirection</title>
+</head>
+<body>
+ <p>Redirecting to <a href="../../../bytes/buf/trait.Buf.html">../../../bytes/buf/trait.Buf.html</a>...</p>
+ <script>location.replace("../../../bytes/buf/trait.Buf.html" + location.search + location.hash);</script>
+</body>
+</html> \ No newline at end of file
diff --git a/bytes/buf/buf_mut/trait.BufMut.html b/bytes/buf/buf_mut/trait.BufMut.html
new file mode 100644
index 0000000..77242b6
--- /dev/null
+++ b/bytes/buf/buf_mut/trait.BufMut.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta http-equiv="refresh" content="0;URL=../../../bytes/buf/trait.BufMut.html">
+ <title>Redirection</title>
+</head>
+<body>
+ <p>Redirecting to <a href="../../../bytes/buf/trait.BufMut.html">../../../bytes/buf/trait.BufMut.html</a>...</p>
+ <script>location.replace("../../../bytes/buf/trait.BufMut.html" + location.search + location.hash);</script>
+</body>
+</html> \ No newline at end of file
diff --git a/bytes/buf/chain/struct.Chain.html b/bytes/buf/chain/struct.Chain.html
new file mode 100644
index 0000000..f8ecbf2
--- /dev/null
+++ b/bytes/buf/chain/struct.Chain.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta http-equiv="refresh" content="0;URL=../../../bytes/buf/struct.Chain.html">
+ <title>Redirection</title>
+</head>
+<body>
+ <p>Redirecting to <a href="../../../bytes/buf/struct.Chain.html">../../../bytes/buf/struct.Chain.html</a>...</p>
+ <script>location.replace("../../../bytes/buf/struct.Chain.html" + location.search + location.hash);</script>
+</body>
+</html> \ No newline at end of file
diff --git a/bytes/buf/index.html b/bytes/buf/index.html
new file mode 100644
index 0000000..c5a39c7
--- /dev/null
+++ b/bytes/buf/index.html
@@ -0,0 +1,11 @@
+<!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="Utilities for working with buffers."><meta name="keywords" content="rust, rustlang, rust-lang, buf"><title>bytes::buf - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2 class="location"><a href="#">Module buf</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#traits">Traits</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Module <a href="../index.html">bytes</a>::<wbr><a class="mod" href="#">buf</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/bytes/buf/mod.rs.html#1-39">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Utilities for working with buffers.</p>
+<p>A buffer is any structure that contains a sequence of bytes. The bytes may
+or may not be stored in contiguous memory. This module contains traits used
+to abstract over buffers as well as utilities for working with buffer types.</p>
+<h2 id="buf-bufmut"><a href="#buf-bufmut"><code>Buf</code>, <code>BufMut</code></a></h2>
+<p>These are the two foundational traits for abstractly working with buffers.
+They can be thought as iterators for byte structures. They offer additional
+performance over <code>Iterator</code> by providing an API optimized for byte slices.</p>
+<p>See <a href="trait.Buf.html" title="Buf"><code>Buf</code></a> and <a href="trait.BufMut.html" title="BufMut"><code>BufMut</code></a> for more details.</p>
+</div></details><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Chain.html" title="bytes::buf::Chain struct">Chain</a></div><div class="item-right docblock-short">A <code>Chain</code> sequences two buffers.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.IntoIter.html" title="bytes::buf::IntoIter struct">IntoIter</a></div><div class="item-right docblock-short">Iterator over the bytes contained by the buffer.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Limit.html" title="bytes::buf::Limit struct">Limit</a></div><div class="item-right docblock-short">A <code>BufMut</code> adapter which limits the amount of bytes that can be written
+to an underlying buffer.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Reader.html" title="bytes::buf::Reader struct">Reader</a></div><div class="item-right docblock-short">A <code>Buf</code> adapter which implements <code>io::Read</code> for the inner value.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Take.html" title="bytes::buf::Take struct">Take</a></div><div class="item-right docblock-short">A <code>Buf</code> adapter which limits the bytes read from an underlying buffer.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.UninitSlice.html" title="bytes::buf::UninitSlice struct">UninitSlice</a></div><div class="item-right docblock-short">Uninitialized byte slice.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Writer.html" title="bytes::buf::Writer struct">Writer</a></div><div class="item-right docblock-short">A <code>BufMut</code> adapter which implements <code>io::Write</code> for the inner value.</div></div></div><h2 id="traits" class="small-section-header"><a href="#traits">Traits</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.Buf.html" title="bytes::buf::Buf trait">Buf</a></div><div class="item-right docblock-short">Read bytes from a buffer.</div></div><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.BufMut.html" title="bytes::buf::BufMut trait">BufMut</a></div><div class="item-right docblock-short">A trait for values that provide sequential write access to bytes.</div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/bytes/buf/iter/struct.IntoIter.html b/bytes/buf/iter/struct.IntoIter.html
new file mode 100644
index 0000000..459f7fe
--- /dev/null
+++ b/bytes/buf/iter/struct.IntoIter.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta http-equiv="refresh" content="0;URL=../../../bytes/buf/struct.IntoIter.html">
+ <title>Redirection</title>
+</head>
+<body>
+ <p>Redirecting to <a href="../../../bytes/buf/struct.IntoIter.html">../../../bytes/buf/struct.IntoIter.html</a>...</p>
+ <script>location.replace("../../../bytes/buf/struct.IntoIter.html" + location.search + location.hash);</script>
+</body>
+</html> \ No newline at end of file
diff --git a/bytes/buf/limit/struct.Limit.html b/bytes/buf/limit/struct.Limit.html
new file mode 100644
index 0000000..7e57ce5
--- /dev/null
+++ b/bytes/buf/limit/struct.Limit.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta http-equiv="refresh" content="0;URL=../../../bytes/buf/struct.Limit.html">
+ <title>Redirection</title>
+</head>
+<body>
+ <p>Redirecting to <a href="../../../bytes/buf/struct.Limit.html">../../../bytes/buf/struct.Limit.html</a>...</p>
+ <script>location.replace("../../../bytes/buf/struct.Limit.html" + location.search + location.hash);</script>
+</body>
+</html> \ No newline at end of file
diff --git a/bytes/buf/reader/struct.Reader.html b/bytes/buf/reader/struct.Reader.html
new file mode 100644
index 0000000..8b81eb7
--- /dev/null
+++ b/bytes/buf/reader/struct.Reader.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta http-equiv="refresh" content="0;URL=../../../bytes/buf/struct.Reader.html">
+ <title>Redirection</title>
+</head>
+<body>
+ <p>Redirecting to <a href="../../../bytes/buf/struct.Reader.html">../../../bytes/buf/struct.Reader.html</a>...</p>
+ <script>location.replace("../../../bytes/buf/struct.Reader.html" + location.search + location.hash);</script>
+</body>
+</html> \ No newline at end of file
diff --git a/bytes/buf/sidebar-items.js b/bytes/buf/sidebar-items.js
new file mode 100644
index 0000000..0fcf338
--- /dev/null
+++ b/bytes/buf/sidebar-items.js
@@ -0,0 +1 @@
+window.SIDEBAR_ITEMS = {"struct":[["Chain","A `Chain` sequences two buffers."],["IntoIter","Iterator over the bytes contained by the buffer."],["Limit","A `BufMut` adapter which limits the amount of bytes that can be written to an underlying buffer."],["Reader","A `Buf` adapter which implements `io::Read` for the inner value."],["Take","A `Buf` adapter which limits the bytes read from an underlying buffer."],["UninitSlice","Uninitialized byte slice."],["Writer","A `BufMut` adapter which implements `io::Write` for the inner value."]],"trait":[["Buf","Read bytes from a buffer."],["BufMut","A trait for values that provide sequential write access to bytes."]]}; \ No newline at end of file
diff --git a/bytes/buf/struct.Chain.html b/bytes/buf/struct.Chain.html
new file mode 100644
index 0000000..b912a67
--- /dev/null
+++ b/bytes/buf/struct.Chain.html
@@ -0,0 +1,89 @@
+<!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="A `Chain` sequences two buffers."><meta name="keywords" content="rust, rustlang, rust-lang, Chain"><title>Chain in bytes::buf - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2 class="location"><a href="#">Chain</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.first_mut">first_mut</a></li><li><a href="#method.first_ref">first_ref</a></li><li><a href="#method.into_inner">into_inner</a></li><li><a href="#method.last_mut">last_mut</a></li><li><a href="#method.last_ref">last_ref</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Buf-for-Chain%3CT%2C%20U%3E">Buf</a></li><li><a href="#impl-BufMut-for-Chain%3CT%2C%20U%3E">BufMut</a></li><li><a href="#impl-Debug-for-Chain%3CT%2C%20U%3E">Debug</a></li><li><a href="#impl-IntoIterator-for-Chain%3CT%2C%20U%3E">IntoIterator</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-Chain%3CT%2C%20U%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Chain%3CT%2C%20U%3E">Send</a></li><li><a href="#impl-Sync-for-Chain%3CT%2C%20U%3E">Sync</a></li><li><a href="#impl-Unpin-for-Chain%3CT%2C%20U%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Chain%3CT%2C%20U%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-Chain%3CT%2C%20U%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-Chain%3CT%2C%20U%3E">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-Chain%3CT%2C%20U%3E">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-From%3CT%3E-for-Chain%3CT%2C%20U%3E">From&lt;T&gt;</a></li><li><a href="#impl-Into%3CU%3E-for-Chain%3CT%2C%20U%3E">Into&lt;U&gt;</a></li><li><a href="#impl-TryFrom%3CU%3E-for-Chain%3CT%2C%20U%3E">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-Chain%3CT%2C%20U%3E">TryInto&lt;U&gt;</a></li></ul></section><h2><a href="index.html">In bytes::buf</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../index.html">bytes</a>::<wbr><a href="index.html">buf</a>::<wbr><a class="struct" href="#">Chain</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/bytes/buf/chain.rs.html#30-33">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct Chain&lt;T, U&gt; { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A <code>Chain</code> sequences two buffers.</p>
+<p><code>Chain</code> is an adapter that links two underlying buffers and provides a
+continuous view across both buffers. It is able to sequence either immutable
+buffers (<a href="trait.Buf.html" title="Buf"><code>Buf</code></a> values) or mutable buffers (<a href="trait.BufMut.html" title="BufMut"><code>BufMut</code></a> values).</p>
+<p>This struct is generally created by calling <a href="trait.Buf.html#method.chain"><code>Buf::chain</code></a>. Please see that
+function’s documentation for more detail.</p>
+<h2 id="examples"><a href="#examples">Examples</a></h2>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::{Bytes, Buf};
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = (<span class="kw-2">&amp;</span><span class="string">b&quot;hello &quot;</span>[..])
+ .chain(<span class="kw-2">&amp;</span><span class="string">b&quot;world&quot;</span>[..]);
+
+<span class="kw">let </span>full: Bytes = buf.copy_to_bytes(<span class="number">11</span>);
+<span class="macro">assert_eq!</span>(full[..], <span class="string">b&quot;hello world&quot;</span>[..]);</code></pre></div>
+</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Chain%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/chain.rs.html#35-128">source</a><a href="#impl-Chain%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="struct" href="struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;T, U&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.first_ref" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/chain.rs.html#53-55">source</a><h4 class="code-header">pub fn <a href="#method.first_ref" class="fnname">first_ref</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</h4></section></summary><div class="docblock"><p>Gets a reference to the first underlying <code>Buf</code>.</p>
+<h5 id="examples-1"><a href="#examples-1">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span>buf = (<span class="kw-2">&amp;</span><span class="string">b&quot;hello&quot;</span>[..])
+ .chain(<span class="kw-2">&amp;</span><span class="string">b&quot;world&quot;</span>[..]);
+
+<span class="macro">assert_eq!</span>(buf.first_ref()[..], <span class="string">b&quot;hello&quot;</span>[..]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.first_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/chain.rs.html#72-74">source</a><h4 class="code-header">pub fn <a href="#method.first_mut" class="fnname">first_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</h4></section></summary><div class="docblock"><p>Gets a mutable reference to the first underlying <code>Buf</code>.</p>
+<h5 id="examples-2"><a href="#examples-2">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = (<span class="kw-2">&amp;</span><span class="string">b&quot;hello&quot;</span>[..])
+ .chain(<span class="kw-2">&amp;</span><span class="string">b&quot;world&quot;</span>[..]);
+
+buf.first_mut().advance(<span class="number">1</span>);
+
+<span class="kw">let </span>full = buf.copy_to_bytes(<span class="number">9</span>);
+<span class="macro">assert_eq!</span>(full, <span class="string">b&quot;elloworld&quot;</span>[..]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.last_ref" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/chain.rs.html#88-90">source</a><h4 class="code-header">pub fn <a href="#method.last_ref" class="fnname">last_ref</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>U</h4></section></summary><div class="docblock"><p>Gets a reference to the last underlying <code>Buf</code>.</p>
+<h5 id="examples-3"><a href="#examples-3">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span>buf = (<span class="kw-2">&amp;</span><span class="string">b&quot;hello&quot;</span>[..])
+ .chain(<span class="kw-2">&amp;</span><span class="string">b&quot;world&quot;</span>[..]);
+
+<span class="macro">assert_eq!</span>(buf.last_ref()[..], <span class="string">b&quot;world&quot;</span>[..]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.last_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/chain.rs.html#107-109">source</a><h4 class="code-header">pub fn <a href="#method.last_mut" class="fnname">last_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>U</h4></section></summary><div class="docblock"><p>Gets a mutable reference to the last underlying <code>Buf</code>.</p>
+<h5 id="examples-4"><a href="#examples-4">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = (<span class="kw-2">&amp;</span><span class="string">b&quot;hello &quot;</span>[..])
+ .chain(<span class="kw-2">&amp;</span><span class="string">b&quot;world&quot;</span>[..]);
+
+buf.last_mut().advance(<span class="number">1</span>);
+
+<span class="kw">let </span>full = buf.copy_to_bytes(<span class="number">10</span>);
+<span class="macro">assert_eq!</span>(full, <span class="string">b&quot;hello orld&quot;</span>[..]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_inner" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/chain.rs.html#125-127">source</a><h4 class="code-header">pub fn <a href="#method.into_inner" class="fnname">into_inner</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(T, U)</a></h4></section></summary><div class="docblock"><p>Consumes this <code>Chain</code>, returning the underlying values.</p>
+<h5 id="examples-5"><a href="#examples-5">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span>chain = (<span class="kw-2">&amp;</span><span class="string">b&quot;hello&quot;</span>[..])
+ .chain(<span class="kw-2">&amp;</span><span class="string">b&quot;world&quot;</span>[..]);
+
+<span class="kw">let </span>(first, last) = chain.into_inner();
+<span class="macro">assert_eq!</span>(first[..], <span class="string">b&quot;hello&quot;</span>[..]);
+<span class="macro">assert_eq!</span>(last[..], <span class="string">b&quot;world&quot;</span>[..]);</code></pre></div>
+</div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Buf-for-Chain%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/chain.rs.html#130-189">source</a><a href="#impl-Buf-for-Chain%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> for <a class="struct" href="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="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.remaining" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/chain.rs.html#135-137">source</a><a href="#method.remaining" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#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></h4></section></summary><div class='docblock'>Returns the number of bytes between the current position and the end of
+the buffer. <a href="trait.Buf.html#tymethod.remaining">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunk" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/chain.rs.html#139-145">source</a><a href="#method.chunk" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#tymethod.chunk" class="fnname">chunk</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section></summary><div class='docblock'>Returns a slice starting at the current position and of length between 0
+and <code>Buf::remaining()</code>. Note that this <em>can</em> return shorter slice (this allows
+non-continuous internal representation). <a href="trait.Buf.html#tymethod.chunk">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.advance" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/chain.rs.html#147-163">source</a><a href="#method.advance" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#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>)</h4></section></summary><div class='docblock'>Advance the internal cursor of the Buf <a href="trait.Buf.html#tymethod.advance">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunks_vectored" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/chain.rs.html#166-170">source</a><a href="#method.chunks_vectored" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.chunks_vectored" class="fnname">chunks_vectored</a>&lt;'a&gt;(&amp;'a self, dst: &amp;mut [<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a>&lt;'a&gt;]) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>std</code></strong> only.</div></span><div class='docblock'>Fills <code>dst</code> with potentially multiple slices starting at <code>self</code>’s
+current position. <a href="trait.Buf.html#method.chunks_vectored">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.copy_to_bytes" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/chain.rs.html#172-188">source</a><a href="#method.copy_to_bytes" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.copy_to_bytes" class="fnname">copy_to_bytes</a>(&amp;mut self, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="../struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h4></section></summary><div class='docblock'>Consumes <code>len</code> bytes inside self and returns new instance of <code>Bytes</code>
+with this data. <a href="trait.Buf.html#method.copy_to_bytes">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.has_remaining" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#243-245">source</a><a href="#method.has_remaining" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Returns true if there are any more bytes to consume <a href="trait.Buf.html#method.has_remaining">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.copy_to_slice" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#268-282">source</a><a href="#method.copy_to_slice" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.copy_to_slice" class="fnname">copy_to_slice</a>(&amp;mut self, dst: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section></summary><div class='docblock'>Copies bytes from <code>self</code> into <code>dst</code>. <a href="trait.Buf.html#method.copy_to_slice">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#300-307">source</a><a href="#method.get_u8" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an unsigned 8 bit integer from <code>self</code>. <a href="trait.Buf.html#method.get_u8">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#325-332">source</a><a href="#method.get_i8" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets a signed 8 bit integer from <code>self</code>. <a href="trait.Buf.html#method.get_i8">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u16" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#350-352">source</a><a href="#method.get_u16" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_u16" class="fnname">get_u16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h4></section></summary><div class='docblock'>Gets an unsigned 16 bit integer from <code>self</code> in big-endian byte order. <a href="trait.Buf.html#method.get_u16">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u16_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#370-372">source</a><a href="#method.get_u16_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an unsigned 16 bit integer from <code>self</code> in little-endian byte order. <a href="trait.Buf.html#method.get_u16_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u16_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#393-395">source</a><a href="#method.get_u16_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_u16_ne" class="fnname">get_u16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h4></section></summary><div class='docblock'>Gets an unsigned 16 bit integer from <code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_u16_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i16" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#413-415">source</a><a href="#method.get_i16" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_i16" class="fnname">get_i16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></h4></section></summary><div class='docblock'>Gets a signed 16 bit integer from <code>self</code> in big-endian byte order. <a href="trait.Buf.html#method.get_i16">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i16_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#433-435">source</a><a href="#method.get_i16_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets a signed 16 bit integer from <code>self</code> in little-endian byte order. <a href="trait.Buf.html#method.get_i16_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i16_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#456-458">source</a><a href="#method.get_i16_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_i16_ne" class="fnname">get_i16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></h4></section></summary><div class='docblock'>Gets a signed 16 bit integer from <code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_i16_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#476-478">source</a><a href="#method.get_u32" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_u32" class="fnname">get_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'>Gets an unsigned 32 bit integer from <code>self</code> in the big-endian byte order. <a href="trait.Buf.html#method.get_u32">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u32_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#496-498">source</a><a href="#method.get_u32_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an unsigned 32 bit integer from <code>self</code> in the little-endian byte order. <a href="trait.Buf.html#method.get_u32_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u32_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#519-521">source</a><a href="#method.get_u32_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_u32_ne" class="fnname">get_u32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'>Gets an unsigned 32 bit integer from <code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_u32_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#539-541">source</a><a href="#method.get_i32" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_i32" class="fnname">get_i32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section></summary><div class='docblock'>Gets a signed 32 bit integer from <code>self</code> in big-endian byte order. <a href="trait.Buf.html#method.get_i32">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i32_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#559-561">source</a><a href="#method.get_i32_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets a signed 32 bit integer from <code>self</code> in little-endian byte order. <a href="trait.Buf.html#method.get_i32_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i32_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#582-584">source</a><a href="#method.get_i32_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_i32_ne" class="fnname">get_i32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section></summary><div class='docblock'>Gets a signed 32 bit integer from <code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_i32_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#602-604">source</a><a href="#method.get_u64" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_u64" class="fnname">get_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section></summary><div class='docblock'>Gets an unsigned 64 bit integer from <code>self</code> in big-endian byte order. <a href="trait.Buf.html#method.get_u64">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u64_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#622-624">source</a><a href="#method.get_u64_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an unsigned 64 bit integer from <code>self</code> in little-endian byte order. <a href="trait.Buf.html#method.get_u64_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u64_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#645-647">source</a><a href="#method.get_u64_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_u64_ne" class="fnname">get_u64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section></summary><div class='docblock'>Gets an unsigned 64 bit integer from <code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_u64_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#665-667">source</a><a href="#method.get_i64" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_i64" class="fnname">get_i64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section></summary><div class='docblock'>Gets a signed 64 bit integer from <code>self</code> in big-endian byte order. <a href="trait.Buf.html#method.get_i64">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i64_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#685-687">source</a><a href="#method.get_i64_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets a signed 64 bit integer from <code>self</code> in little-endian byte order. <a href="trait.Buf.html#method.get_i64_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i64_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#708-710">source</a><a href="#method.get_i64_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_i64_ne" class="fnname">get_i64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section></summary><div class='docblock'>Gets a signed 64 bit integer from <code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_i64_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u128" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#728-730">source</a><a href="#method.get_u128" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_u128" class="fnname">get_u128</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></h4></section></summary><div class='docblock'>Gets an unsigned 128 bit integer from <code>self</code> in big-endian byte order. <a href="trait.Buf.html#method.get_u128">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u128_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#748-750">source</a><a href="#method.get_u128_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_u128_le" class="fnname">get_u128_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></h4></section></summary><div class='docblock'>Gets an unsigned 128 bit integer from <code>self</code> in little-endian byte order. <a href="trait.Buf.html#method.get_u128_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u128_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#771-773">source</a><a href="#method.get_u128_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_u128_ne" class="fnname">get_u128_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></h4></section></summary><div class='docblock'>Gets an unsigned 128 bit integer from <code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_u128_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i128" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#791-793">source</a><a href="#method.get_i128" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_i128" class="fnname">get_i128</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a></h4></section></summary><div class='docblock'>Gets a signed 128 bit integer from <code>self</code> in big-endian byte order. <a href="trait.Buf.html#method.get_i128">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i128_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#811-813">source</a><a href="#method.get_i128_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_i128_le" class="fnname">get_i128_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a></h4></section></summary><div class='docblock'>Gets a signed 128 bit integer from <code>self</code> in little-endian byte order. <a href="trait.Buf.html#method.get_i128_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i128_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#834-836">source</a><a href="#method.get_i128_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_i128_ne" class="fnname">get_i128_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a></h4></section></summary><div class='docblock'>Gets a signed 128 bit integer from <code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_i128_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_uint" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#854-856">source</a><a href="#method.get_uint" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_uint" class="fnname">get_uint</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></h4></section></summary><div class='docblock'>Gets an unsigned n-byte integer from <code>self</code> in big-endian byte order. <a href="trait.Buf.html#method.get_uint">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_uint_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#874-876">source</a><a href="#method.get_uint_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an unsigned n-byte integer from <code>self</code> in little-endian byte order. <a href="trait.Buf.html#method.get_uint_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_uint_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#898-904">source</a><a href="#method.get_uint_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_uint_ne" class="fnname">get_uint_ne</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></h4></section></summary><div class='docblock'>Gets an unsigned n-byte integer from <code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_uint_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_int" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#923-925">source</a><a href="#method.get_int" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_int" class="fnname">get_int</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></h4></section></summary><div class='docblock'>Gets a signed n-byte integer from <code>self</code> in big-endian byte order. <a href="trait.Buf.html#method.get_int">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_int_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#944-946">source</a><a href="#method.get_int_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets a signed n-byte integer from <code>self</code> in little-endian byte order. <a href="trait.Buf.html#method.get_int_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_int_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#968-974">source</a><a href="#method.get_int_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_int_ne" class="fnname">get_int_ne</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></h4></section></summary><div class='docblock'>Gets a signed n-byte integer from <code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_int_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#993-995">source</a><a href="#method.get_f32" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_f32" class="fnname">get_f32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></h4></section></summary><div class='docblock'>Gets an IEEE754 single-precision (4 bytes) floating point number from
+<code>self</code> in big-endian byte order. <a href="trait.Buf.html#method.get_f32">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f32_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1014-1016">source</a><a href="#method.get_f32_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an IEEE754 single-precision (4 bytes) floating point number from
+<code>self</code> in little-endian byte order. <a href="trait.Buf.html#method.get_f32_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f32_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1038-1040">source</a><a href="#method.get_f32_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_f32_ne" class="fnname">get_f32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></h4></section></summary><div class='docblock'>Gets an IEEE754 single-precision (4 bytes) floating point number from
+<code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_f32_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1059-1061">source</a><a href="#method.get_f64" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_f64" class="fnname">get_f64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></h4></section></summary><div class='docblock'>Gets an IEEE754 double-precision (8 bytes) floating point number from
+<code>self</code> in big-endian byte order. <a href="trait.Buf.html#method.get_f64">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f64_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1080-1082">source</a><a href="#method.get_f64_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an IEEE754 double-precision (8 bytes) floating point number from
+<code>self</code> in little-endian byte order. <a href="trait.Buf.html#method.get_f64_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f64_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1104-1106">source</a><a href="#method.get_f64_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_f64_ne" class="fnname">get_f64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></h4></section></summary><div class='docblock'>Gets an IEEE754 double-precision (8 bytes) floating point number from
+<code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_f64_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1160-1165">source</a><a href="#method.take" class="anchor"></a><h4 class="code-header">fn <a href="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="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>,</span></h4></section></summary><div class='docblock'>Creates an adaptor which will read at most <code>limit</code> bytes from <code>self</code>. <a href="trait.Buf.html#method.take">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chain" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1182-1187">source</a><a href="#method.chain" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.chain" class="fnname">chain</a>&lt;U:&nbsp;<a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt;(self, next: U) -&gt; <a class="struct" href="struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;Self, U&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>,</span></h4></section></summary><div class='docblock'>Creates an adaptor which will chain this buffer with another. <a href="trait.Buf.html#method.chain">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.reader" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1214-1219">source</a><a href="#method.reader" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.reader" class="fnname">reader</a>(self) -&gt; <a class="struct" href="struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;Self&gt;<span class="notable-traits" data-ty="Reader&lt;Self&gt;"><span class="notable-traits-tooltip">ⓘ</span></span><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>,</span></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>std</code></strong> only.</div></span><div class='docblock'>Creates an adaptor which implements the <code>Read</code> trait for <code>self</code>. <a href="trait.Buf.html#method.reader">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-BufMut-for-Chain%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/chain.rs.html#191-227">source</a><a href="#impl-BufMut-for-Chain%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a> for <a class="struct" href="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="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.remaining_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/chain.rs.html#196-200">source</a><a href="#method.remaining_mut" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#tymethod.remaining_mut" class="fnname">remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Returns the number of bytes that can be written from the current
+position until the end of the buffer is reached. <a href="trait.BufMut.html#tymethod.remaining_mut">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunk_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/chain.rs.html#202-208">source</a><a href="#method.chunk_mut" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#tymethod.chunk_mut" class="fnname">chunk_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class='docblock'>Returns a mutable slice starting at the current BufMut position and of
+length between 0 and <code>BufMut::remaining_mut()</code>. Note that this <em>can</em> be shorter than the
+whole remainder of the buffer (this allows non-continuous implementation). <a href="trait.BufMut.html#tymethod.chunk_mut">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.advance_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/chain.rs.html#210-226">source</a><a href="#method.advance_mut" class="anchor"></a><h4 class="code-header">unsafe fn <a href="trait.BufMut.html#tymethod.advance_mut" class="fnname">advance_mut</a>(&amp;mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Advance the internal cursor of the BufMut <a href="trait.BufMut.html#tymethod.advance_mut">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.has_remaining_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#128-130">source</a><a href="#method.has_remaining_mut" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.has_remaining_mut" class="fnname">has_remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Returns true if there is space in <code>self</code> for more bytes. <a href="trait.BufMut.html#method.has_remaining_mut">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#202-221">source</a><a href="#method.put" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put" class="fnname">put</a>&lt;T:&nbsp;<a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt;(&amp;mut self, src: T)<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>,</span></h4></section></summary><div class='docblock'>Transfer bytes into <code>self</code> from <code>src</code> and advance the cursor by the
+number of bytes written. <a href="trait.BufMut.html#method.put">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_slice" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#243-258">source</a><a href="#method.put_slice" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_slice" class="fnname">put_slice</a>(&amp;mut self, src: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section></summary><div class='docblock'>Transfer bytes into <code>self</code> from <code>src</code> and advance the cursor by the
+number of bytes written. <a href="trait.BufMut.html#method.put_slice">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_bytes" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#286-300">source</a><a href="#method.put_bytes" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_bytes" class="fnname">put_bytes</a>(&amp;mut self, val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Put <code>cnt</code> bytes <code>val</code> into <code>self</code>. <a href="trait.BufMut.html#method.put_bytes">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#321-324">source</a><a href="#method.put_u8" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u8" class="fnname">put_u8</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 8 bit integer to <code>self</code>. <a href="trait.BufMut.html#method.put_u8">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#345-348">source</a><a href="#method.put_i8" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i8" class="fnname">put_i8</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>)</h4></section></summary><div class='docblock'>Writes a signed 8 bit integer to <code>self</code>. <a href="trait.BufMut.html#method.put_i8">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u16" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#369-371">source</a><a href="#method.put_u16" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u16" class="fnname">put_u16</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 16 bit integer to <code>self</code> in big-endian byte order. <a href="trait.BufMut.html#method.put_u16">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u16_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#392-394">source</a><a href="#method.put_u16_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u16_le" class="fnname">put_u16_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 16 bit integer to <code>self</code> in little-endian byte order. <a href="trait.BufMut.html#method.put_u16_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u16_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#419-421">source</a><a href="#method.put_u16_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u16_ne" class="fnname">put_u16_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 16 bit integer to <code>self</code> in native-endian byte order. <a href="trait.BufMut.html#method.put_u16_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i16" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#442-444">source</a><a href="#method.put_i16" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i16" class="fnname">put_i16</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section></summary><div class='docblock'>Writes a signed 16 bit integer to <code>self</code> in big-endian byte order. <a href="trait.BufMut.html#method.put_i16">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i16_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#465-467">source</a><a href="#method.put_i16_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i16_le" class="fnname">put_i16_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section></summary><div class='docblock'>Writes a signed 16 bit integer to <code>self</code> in little-endian byte order. <a href="trait.BufMut.html#method.put_i16_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i16_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#492-494">source</a><a href="#method.put_i16_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i16_ne" class="fnname">put_i16_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section></summary><div class='docblock'>Writes a signed 16 bit integer to <code>self</code> in native-endian byte order. <a href="trait.BufMut.html#method.put_i16_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#515-517">source</a><a href="#method.put_u32" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u32" class="fnname">put_u32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 32 bit integer to <code>self</code> in big-endian byte order. <a href="trait.BufMut.html#method.put_u32">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u32_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#538-540">source</a><a href="#method.put_u32_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u32_le" class="fnname">put_u32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 32 bit integer to <code>self</code> in little-endian byte order. <a href="trait.BufMut.html#method.put_u32_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u32_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#565-567">source</a><a href="#method.put_u32_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u32_ne" class="fnname">put_u32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 32 bit integer to <code>self</code> in native-endian byte order. <a href="trait.BufMut.html#method.put_u32_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#588-590">source</a><a href="#method.put_i32" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i32" class="fnname">put_i32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section></summary><div class='docblock'>Writes a signed 32 bit integer to <code>self</code> in big-endian byte order. <a href="trait.BufMut.html#method.put_i32">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i32_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#611-613">source</a><a href="#method.put_i32_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i32_le" class="fnname">put_i32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section></summary><div class='docblock'>Writes a signed 32 bit integer to <code>self</code> in little-endian byte order. <a href="trait.BufMut.html#method.put_i32_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i32_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#638-640">source</a><a href="#method.put_i32_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i32_ne" class="fnname">put_i32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section></summary><div class='docblock'>Writes a signed 32 bit integer to <code>self</code> in native-endian byte order. <a href="trait.BufMut.html#method.put_i32_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#661-663">source</a><a href="#method.put_u64" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u64" class="fnname">put_u64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 64 bit integer to <code>self</code> in the big-endian byte order. <a href="trait.BufMut.html#method.put_u64">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u64_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#684-686">source</a><a href="#method.put_u64_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u64_le" class="fnname">put_u64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 64 bit integer to <code>self</code> in little-endian byte order. <a href="trait.BufMut.html#method.put_u64_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u64_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#711-713">source</a><a href="#method.put_u64_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u64_ne" class="fnname">put_u64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 64 bit integer to <code>self</code> in native-endian byte order. <a href="trait.BufMut.html#method.put_u64_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#734-736">source</a><a href="#method.put_i64" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i64" class="fnname">put_i64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section></summary><div class='docblock'>Writes a signed 64 bit integer to <code>self</code> in the big-endian byte order. <a href="trait.BufMut.html#method.put_i64">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i64_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#757-759">source</a><a href="#method.put_i64_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i64_le" class="fnname">put_i64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section></summary><div class='docblock'>Writes a signed 64 bit integer to <code>self</code> in little-endian byte order. <a href="trait.BufMut.html#method.put_i64_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i64_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#784-786">source</a><a href="#method.put_i64_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i64_ne" class="fnname">put_i64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section></summary><div class='docblock'>Writes a signed 64 bit integer to <code>self</code> in native-endian byte order. <a href="trait.BufMut.html#method.put_i64_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u128" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#807-809">source</a><a href="#method.put_u128" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u128" class="fnname">put_u128</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 128 bit integer to <code>self</code> in the big-endian byte order. <a href="trait.BufMut.html#method.put_u128">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u128_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#830-832">source</a><a href="#method.put_u128_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u128_le" class="fnname">put_u128_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 128 bit integer to <code>self</code> in little-endian byte order. <a href="trait.BufMut.html#method.put_u128_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u128_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#857-859">source</a><a href="#method.put_u128_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u128_ne" class="fnname">put_u128_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 128 bit integer to <code>self</code> in native-endian byte order. <a href="trait.BufMut.html#method.put_u128_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i128" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#880-882">source</a><a href="#method.put_i128" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i128" class="fnname">put_i128</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>)</h4></section></summary><div class='docblock'>Writes a signed 128 bit integer to <code>self</code> in the big-endian byte order. <a href="trait.BufMut.html#method.put_i128">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i128_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#903-905">source</a><a href="#method.put_i128_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i128_le" class="fnname">put_i128_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>)</h4></section></summary><div class='docblock'>Writes a signed 128 bit integer to <code>self</code> in little-endian byte order. <a href="trait.BufMut.html#method.put_i128_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i128_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#930-932">source</a><a href="#method.put_i128_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i128_ne" class="fnname">put_i128_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>)</h4></section></summary><div class='docblock'>Writes a signed 128 bit integer to <code>self</code> in native-endian byte order. <a href="trait.BufMut.html#method.put_i128_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_uint" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#953-960">source</a><a href="#method.put_uint" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_uint" class="fnname">put_uint</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Writes an unsigned n-byte integer to <code>self</code> in big-endian byte order. <a href="trait.BufMut.html#method.put_uint">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_uint_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#981-989">source</a><a href="#method.put_uint_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_uint_le" class="fnname">put_uint_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Writes an unsigned n-byte integer to <code>self</code> in the little-endian byte order. <a href="trait.BufMut.html#method.put_uint_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_uint_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1014-1020">source</a><a href="#method.put_uint_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_uint_ne" class="fnname">put_uint_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Writes an unsigned n-byte integer to <code>self</code> in the native-endian byte order. <a href="trait.BufMut.html#method.put_uint_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_int" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1041-1048">source</a><a href="#method.put_int" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_int" class="fnname">put_int</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Writes low <code>nbytes</code> of a signed integer to <code>self</code> in big-endian byte order. <a href="trait.BufMut.html#method.put_int">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_int_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1069-1077">source</a><a href="#method.put_int_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_int_le" class="fnname">put_int_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Writes low <code>nbytes</code> of a signed integer to <code>self</code> in little-endian byte order. <a href="trait.BufMut.html#method.put_int_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_int_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1102-1108">source</a><a href="#method.put_int_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_int_ne" class="fnname">put_int_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Writes low <code>nbytes</code> of a signed integer to <code>self</code> in native-endian byte order. <a href="trait.BufMut.html#method.put_int_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1130-1132">source</a><a href="#method.put_f32" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_f32" class="fnname">put_f32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>)</h4></section></summary><div class='docblock'>Writes an IEEE754 single-precision (4 bytes) floating point number to
+<code>self</code> in big-endian byte order. <a href="trait.BufMut.html#method.put_f32">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f32_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1154-1156">source</a><a href="#method.put_f32_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_f32_le" class="fnname">put_f32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>)</h4></section></summary><div class='docblock'>Writes an IEEE754 single-precision (4 bytes) floating point number to
+<code>self</code> in little-endian byte order. <a href="trait.BufMut.html#method.put_f32_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f32_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1182-1184">source</a><a href="#method.put_f32_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_f32_ne" class="fnname">put_f32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>)</h4></section></summary><div class='docblock'>Writes an IEEE754 single-precision (4 bytes) floating point number to
+<code>self</code> in native-endian byte order. <a href="trait.BufMut.html#method.put_f32_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1206-1208">source</a><a href="#method.put_f64" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_f64" class="fnname">put_f64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</h4></section></summary><div class='docblock'>Writes an IEEE754 double-precision (8 bytes) floating point number to
+<code>self</code> in big-endian byte order. <a href="trait.BufMut.html#method.put_f64">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f64_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1230-1232">source</a><a href="#method.put_f64_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_f64_le" class="fnname">put_f64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</h4></section></summary><div class='docblock'>Writes an IEEE754 double-precision (8 bytes) floating point number to
+<code>self</code> in little-endian byte order. <a href="trait.BufMut.html#method.put_f64_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f64_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1258-1260">source</a><a href="#method.put_f64_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_f64_ne" class="fnname">put_f64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</h4></section></summary><div class='docblock'>Writes an IEEE754 double-precision (8 bytes) floating point number to
+<code>self</code> in native-endian byte order. <a href="trait.BufMut.html#method.put_f64_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.limit" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1276-1281">source</a><a href="#method.limit" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.limit" class="fnname">limit</a>(self, limit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="struct.Limit.html" title="struct bytes::buf::Limit">Limit</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>,</span></h4></section></summary><div class='docblock'>Creates an adaptor which can write at most <code>limit</code> bytes to <code>self</code>. <a href="trait.BufMut.html#method.limit">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.writer" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1308-1313">source</a><a href="#method.writer" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.writer" class="fnname">writer</a>(self) -&gt; <a class="struct" href="struct.Writer.html" title="struct bytes::buf::Writer">Writer</a>&lt;Self&gt;<span class="notable-traits" data-ty="Writer&lt;Self&gt;"><span class="notable-traits-tooltip">ⓘ</span></span><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>,</span></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>std</code></strong> only.</div></span><div class='docblock'>Creates an adaptor which implements the <code>Write</code> trait for <code>self</code>. <a href="trait.BufMut.html#method.writer">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chain_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1336-1341">source</a><a href="#method.chain_mut" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.chain_mut" class="fnname">chain_mut</a>&lt;U:&nbsp;<a class="trait" href="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a>&gt;(self, next: U) -&gt; <a class="struct" href="struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;Self, U&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>,</span></h4></section></summary><div class='docblock'>Creates an adapter which will chain this buffer with another. <a href="trait.BufMut.html#method.chain_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-Chain%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/chain.rs.html#29">source</a><a href="#impl-Debug-for-Chain%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>, U:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;T, U&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/chain.rs.html#29">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-Chain%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/chain.rs.html#229-240">source</a><a href="#impl-IntoIterator-for-Chain%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for <a class="struct" href="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="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Item" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="rustdoc-toggle" open><summary><section id="associatedtype.IntoIter" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.IntoIter" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <a class="struct" href="struct.IntoIter.html" title="struct bytes::buf::IntoIter">IntoIter</a>&lt;<a class="struct" href="struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;T, U&gt;&gt;</h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_iter" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/chain.rs.html#237-239">source</a><a href="#method.into_iter" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fnname">into_iter</a>(self) -&gt; Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Chain%3CT%2C%20U%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-Chain%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="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="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</span></h3></section><section id="impl-Send-for-Chain%3CT%2C%20U%3E" class="impl has-srclink"><a href="#impl-Send-for-Chain%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="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="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</span></h3></section><section id="impl-Sync-for-Chain%3CT%2C%20U%3E" class="impl has-srclink"><a href="#impl-Sync-for-Chain%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="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="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</span></h3></section><section id="impl-Unpin-for-Chain%3CT%2C%20U%3E" class="impl has-srclink"><a href="#impl-Unpin-for-Chain%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="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="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</span></h3></section><section id="impl-UnwindSafe-for-Chain%3CT%2C%20U%3E" class="impl has-srclink"><a href="#impl-UnwindSafe-for-Chain%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="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="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</span></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-Chain%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-Chain%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-Chain%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-Chain%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-Chain%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-Chain%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-Chain%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-Chain%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
+</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-Chain%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-Chain%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
+<p>That is, this conversion is whatever the implementation of
+<code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
+</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-Chain%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-Chain%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-Chain%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-Chain%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div><script type="text/json" id="notable-traits-data">{"&[u8]":"<h3 class=\"notable\">Notable traits for <code>&amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for &amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span>","Reader<Self>":"<h3 class=\"notable\">Notable traits for <code><a class=\"struct\" href=\"struct.Reader.html\" title=\"struct bytes::buf::Reader\">Reader</a>&lt;B&gt;</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl&lt;B:&nbsp;<a class=\"trait\" href=\"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=\"struct.Reader.html\" title=\"struct bytes::buf::Reader\">Reader</a>&lt;B&gt;</span>","Writer<Self>":"<h3 class=\"notable\">Notable traits for <code><a class=\"struct\" href=\"struct.Writer.html\" title=\"struct bytes::buf::Writer\">Writer</a>&lt;B&gt;</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl&lt;B:&nbsp;<a class=\"trait\" href=\"trait.BufMut.html\" title=\"trait bytes::buf::BufMut\">BufMut</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.Write.html\" title=\"trait std::io::Write\">Write</a> for <a class=\"struct\" href=\"struct.Writer.html\" title=\"struct bytes::buf::Writer\">Writer</a>&lt;B&gt;</span>"}</script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/bytes/buf/struct.IntoIter.html b/bytes/buf/struct.IntoIter.html
new file mode 100644
index 0000000..eed70cd
--- /dev/null
+++ b/bytes/buf/struct.IntoIter.html
@@ -0,0 +1,96 @@
+<!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="Iterator over the bytes contained by the buffer."><meta name="keywords" content="rust, rustlang, rust-lang, IntoIter"><title>IntoIter in bytes::buf - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2 class="location"><a href="#">IntoIter</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.get_mut">get_mut</a></li><li><a href="#method.get_ref">get_ref</a></li><li><a href="#method.into_inner">into_inner</a></li><li><a href="#method.new">new</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Debug-for-IntoIter%3CT%3E">Debug</a></li><li><a href="#impl-ExactSizeIterator-for-IntoIter%3CT%3E">ExactSizeIterator</a></li><li><a href="#impl-Iterator-for-IntoIter%3CT%3E">Iterator</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-IntoIter%3CT%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-IntoIter%3CT%3E">Send</a></li><li><a href="#impl-Sync-for-IntoIter%3CT%3E">Sync</a></li><li><a href="#impl-Unpin-for-IntoIter%3CT%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-IntoIter%3CT%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-IntoIter%3CT%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-IntoIter%3CT%3E">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-IntoIter%3CT%3E">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-From%3CT%3E-for-IntoIter%3CT%3E">From&lt;T&gt;</a></li><li><a href="#impl-Into%3CU%3E-for-IntoIter%3CT%3E">Into&lt;U&gt;</a></li><li><a href="#impl-IntoIterator-for-IntoIter%3CT%3E">IntoIterator</a></li><li><a href="#impl-TryFrom%3CU%3E-for-IntoIter%3CT%3E">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-IntoIter%3CT%3E">TryInto&lt;U&gt;</a></li></ul></section><h2><a href="index.html">In bytes::buf</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../index.html">bytes</a>::<wbr><a href="index.html">buf</a>::<wbr><a class="struct" href="#">IntoIter</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/bytes/buf/iter.rs.html#21-23">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct IntoIter&lt;T&gt; { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Iterator over the bytes contained by the buffer.</p>
+<h2 id="examples"><a href="#examples">Examples</a></h2>
+<p>Basic usage:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Bytes;
+
+<span class="kw">let </span>buf = Bytes::from(<span class="kw-2">&amp;</span><span class="string">b&quot;abc&quot;</span>[..]);
+<span class="kw">let </span><span class="kw-2">mut </span>iter = buf.into_iter();
+
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="string">b&#39;a&#39;</span>));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="string">b&#39;b&#39;</span>));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="string">b&#39;c&#39;</span>));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div>
+</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-IntoIter%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/iter.rs.html#25-105">source</a><a href="#impl-IntoIter%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="struct" href="struct.IntoIter.html" title="struct bytes::buf::IntoIter">IntoIter</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/iter.rs.html#41-43">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>(inner: T) -&gt; <a class="struct" href="struct.IntoIter.html" title="struct bytes::buf::IntoIter">IntoIter</a>&lt;T&gt;<span class="notable-traits" data-ty="IntoIter&lt;T&gt;"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section></summary><div class="docblock"><p>Creates an iterator over the bytes contained by the buffer.</p>
+<h5 id="examples-1"><a href="#examples-1">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Bytes;
+
+<span class="kw">let </span>buf = Bytes::from_static(<span class="string">b&quot;abc&quot;</span>);
+<span class="kw">let </span><span class="kw-2">mut </span>iter = buf.into_iter();
+
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="string">b&#39;a&#39;</span>));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="string">b&#39;b&#39;</span>));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="string">b&#39;c&#39;</span>));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_inner" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/iter.rs.html#60-62">source</a><h4 class="code-header">pub fn <a href="#method.into_inner" class="fnname">into_inner</a>(self) -&gt; T</h4></section></summary><div class="docblock"><p>Consumes this <code>IntoIter</code>, returning the underlying value.</p>
+<h5 id="examples-2"><a href="#examples-2">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::{Buf, Bytes};
+
+<span class="kw">let </span>buf = Bytes::from(<span class="kw-2">&amp;</span><span class="string">b&quot;abc&quot;</span>[..]);
+<span class="kw">let </span><span class="kw-2">mut </span>iter = buf.into_iter();
+
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="string">b&#39;a&#39;</span>));
+
+<span class="kw">let </span>buf = iter.into_inner();
+<span class="macro">assert_eq!</span>(<span class="number">2</span>, buf.remaining());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_ref" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/iter.rs.html#80-82">source</a><h4 class="code-header">pub fn <a href="#method.get_ref" class="fnname">get_ref</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</h4></section></summary><div class="docblock"><p>Gets a reference to the underlying <code>Buf</code>.</p>
+<p>It is inadvisable to directly read from the underlying <code>Buf</code>.</p>
+<h5 id="examples-3"><a href="#examples-3">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::{Buf, Bytes};
+
+<span class="kw">let </span>buf = Bytes::from(<span class="kw-2">&amp;</span><span class="string">b&quot;abc&quot;</span>[..]);
+<span class="kw">let </span><span class="kw-2">mut </span>iter = buf.into_iter();
+
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="string">b&#39;a&#39;</span>));
+
+<span class="macro">assert_eq!</span>(<span class="number">2</span>, iter.get_ref().remaining());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/iter.rs.html#102-104">source</a><h4 class="code-header">pub fn <a href="#method.get_mut" class="fnname">get_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</h4></section></summary><div class="docblock"><p>Gets a mutable reference to the underlying <code>Buf</code>.</p>
+<p>It is inadvisable to directly read from the underlying <code>Buf</code>.</p>
+<h5 id="examples-4"><a href="#examples-4">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::{Buf, BytesMut};
+
+<span class="kw">let </span>buf = BytesMut::from(<span class="kw-2">&amp;</span><span class="string">b&quot;abc&quot;</span>[..]);
+<span class="kw">let </span><span class="kw-2">mut </span>iter = buf.into_iter();
+
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="string">b&#39;a&#39;</span>));
+
+iter.get_mut().advance(<span class="number">1</span>);
+
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="string">b&#39;c&#39;</span>));</code></pre></div>
+</div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-IntoIter%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/iter.rs.html#20">source</a><a href="#impl-Debug-for-IntoIter%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.IntoIter.html" title="struct bytes::buf::IntoIter">IntoIter</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/iter.rs.html#20">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-ExactSizeIterator-for-IntoIter%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/iter.rs.html#127">source</a><a href="#impl-ExactSizeIterator-for-IntoIter%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/exact_size/trait.ExactSizeIterator.html" title="trait core::iter::traits::exact_size::ExactSizeIterator">ExactSizeIterator</a> for <a class="struct" href="struct.IntoIter.html" title="struct bytes::buf::IntoIter">IntoIter</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.len" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/exact_size.rs.html#106">source</a></span><a href="#method.len" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/exact_size/trait.ExactSizeIterator.html#method.len" class="fnname">len</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Returns the exact remaining length of the iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/exact_size/trait.ExactSizeIterator.html#method.len">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_empty" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/exact_size.rs.html#138">source</a><a href="#method.is_empty" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/exact_size/trait.ExactSizeIterator.html#method.is_empty" class="fnname">is_empty</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>exact_size_is_empty</code>)</span></div></span><div class='docblock'>Returns <code>true</code> if the iterator is empty. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/exact_size/trait.ExactSizeIterator.html#method.is_empty">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Iterator-for-IntoIter%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/iter.rs.html#107-125">source</a><a href="#impl-Iterator-for-IntoIter%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.IntoIter.html" title="struct bytes::buf::IntoIter">IntoIter</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Item" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.next" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/iter.rs.html#110-119">source</a><a href="#method.next" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#tymethod.next" class="fnname">next</a>(&amp;mut self) -&gt; <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.u8.html">u8</a>&gt;</h4></section></summary><div class='docblock'>Advances the iterator and returns the next value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#tymethod.next">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.size_hint" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/iter.rs.html#121-124">source</a><a href="#method.size_hint" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.size_hint" class="fnname">size_hint</a>(&amp;self) -&gt; (<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;)</h4></section></summary><div class='docblock'>Returns the bounds on the remaining length of the iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.size_hint">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.next_chunk" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#138-142">source</a><a href="#method.next_chunk" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.next_chunk" class="fnname">next_chunk</a>&lt;const N:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">N</a>], <a class="struct" href="https://doc.rust-lang.org/nightly/core/array/iter/struct.IntoIter.html" title="struct core::array::iter::IntoIter">IntoIter</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, N&gt;&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>,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_next_chunk</code>)</span></div></span><div class='docblock'>Advances the iterator and returns an array containing the next <code>N</code> values. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.next_chunk">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.count" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#252-254">source</a></span><a href="#method.count" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.count" class="fnname">count</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><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>,</span></h4></section></summary><div class='docblock'>Consumes the iterator, counting the number of iterations and returning it. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.count">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.last" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#282-284">source</a></span><a href="#method.last" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.last" class="fnname">last</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&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>,</span></h4></section></summary><div class='docblock'>Consumes the iterator, returning the last element. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.last">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.advance_by" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#328">source</a><a href="#method.advance_by" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.advance_by" class="fnname">advance_by</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_advance_by</code>)</span></div></span><div class='docblock'>Advances the iterator by <code>n</code> elements. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.advance_by">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.nth" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#376">source</a></span><a href="#method.nth" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.nth" class="fnname">nth</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;</h4></section></summary><div class='docblock'>Returns the <code>n</code>th element of the iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.nth">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.step_by" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.28.0">1.28.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#428-430">source</a></span><a href="#method.step_by" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.step_by" class="fnname">step_by</a>(self, step: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/step_by/struct.StepBy.html" title="struct core::iter::adapters::step_by::StepBy">StepBy</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>,</span></h4></section></summary><div class='docblock'>Creates an iterator starting at the same point, but stepping by
+the given amount at each iteration. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.step_by">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chain" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#499-502">source</a></span><a href="#method.chain" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.chain" class="fnname">chain</a>&lt;U&gt;(self, other: U) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/chain/struct.Chain.html" title="struct core::iter::adapters::chain::Chain">Chain</a>&lt;Self, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a>&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>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;,</span></h4></section></summary><div class='docblock'>Takes two iterators and creates a new iterator over both in sequence. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.chain">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.zip" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#617-620">source</a></span><a href="#method.zip" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.zip" class="fnname">zip</a>&lt;U&gt;(self, other: U) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/zip/struct.Zip.html" title="struct core::iter::adapters::zip::Zip">Zip</a>&lt;Self, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a>&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>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,</span></h4></section></summary><div class='docblock'>‘Zips up’ two iterators into a single iterator of pairs. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.zip">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.intersperse_with" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#717-720">source</a><a href="#method.intersperse_with" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.intersperse_with" class="fnname">intersperse_with</a>&lt;G&gt;(self, separator: G) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/intersperse/struct.IntersperseWith.html" title="struct core::iter::adapters::intersperse::IntersperseWith">IntersperseWith</a>&lt;Self, G&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>,<br>&nbsp;&nbsp;&nbsp;&nbsp;G: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>() -&gt; Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_intersperse</code>)</span></div></span><div class='docblock'>Creates a new iterator which places an item generated by <code>separator</code>
+between adjacent items of the original iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.intersperse_with">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#776-779">source</a></span><a href="#method.map" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.map" class="fnname">map</a>&lt;B, F&gt;(self, f: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/map/struct.Map.html" title="struct core::iter::adapters::map::Map">Map</a>&lt;Self, F&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>,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; B,</span></h4></section></summary><div class='docblock'>Takes a closure and creates an iterator which calls that closure on each
+element. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.map">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.for_each" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#821-824">source</a></span><a href="#method.for_each" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.for_each" class="fnname">for_each</a>&lt;F&gt;(self, f: F)<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;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>),</span></h4></section></summary><div class='docblock'>Calls a closure on each element of an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.for_each">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.filter" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#896-899">source</a></span><a href="#method.filter" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.filter" class="fnname">filter</a>&lt;P&gt;(self, predicate: P) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/filter/struct.Filter.html" title="struct core::iter::adapters::filter::Filter">Filter</a>&lt;Self, P&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>,<br>&nbsp;&nbsp;&nbsp;&nbsp;P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class='docblock'>Creates an iterator which uses a closure to determine if an element
+should be yielded. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.filter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.filter_map" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#941-944">source</a></span><a href="#method.filter_map" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.filter_map" class="fnname">filter_map</a>&lt;B, F&gt;(self, f: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/filter_map/struct.FilterMap.html" title="struct core::iter::adapters::filter_map::FilterMap">FilterMap</a>&lt;Self, F&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>,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;B&gt;,</span></h4></section></summary><div class='docblock'>Creates an iterator that both filters and maps. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.filter_map">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.enumerate" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#987-989">source</a></span><a href="#method.enumerate" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.enumerate" class="fnname">enumerate</a>(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/enumerate/struct.Enumerate.html" title="struct core::iter::adapters::enumerate::Enumerate">Enumerate</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>,</span></h4></section></summary><div class='docblock'>Creates an iterator which gives the current iteration count as well as
+the next value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.enumerate">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.peekable" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1058-1060">source</a></span><a href="#method.peekable" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.peekable" class="fnname">peekable</a>(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/peekable/struct.Peekable.html" title="struct core::iter::adapters::peekable::Peekable">Peekable</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>,</span></h4></section></summary><div class='docblock'>Creates an iterator which can use the <a href="https://doc.rust-lang.org/nightly/core/iter/adapters/peekable/struct.Peekable.html#method.peek"><code>peek</code></a> and <a href="https://doc.rust-lang.org/nightly/core/iter/adapters/peekable/struct.Peekable.html#method.peek_mut"><code>peek_mut</code></a> methods
+to look at the next element of the iterator without consuming it. See
+their documentation for more information. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.peekable">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.skip_while" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1123-1126">source</a></span><a href="#method.skip_while" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.skip_while" class="fnname">skip_while</a>&lt;P&gt;(self, predicate: P) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/skip_while/struct.SkipWhile.html" title="struct core::iter::adapters::skip_while::SkipWhile">SkipWhile</a>&lt;Self, P&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>,<br>&nbsp;&nbsp;&nbsp;&nbsp;P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class='docblock'>Creates an iterator that <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.skip"><code>skip</code></a>s elements based on a predicate. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.skip_while">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take_while" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1204-1207">source</a></span><a href="#method.take_while" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.take_while" class="fnname">take_while</a>&lt;P&gt;(self, predicate: P) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/take_while/struct.TakeWhile.html" title="struct core::iter::adapters::take_while::TakeWhile">TakeWhile</a>&lt;Self, P&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>,<br>&nbsp;&nbsp;&nbsp;&nbsp;P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class='docblock'>Creates an iterator that yields elements based on a predicate. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.take_while">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map_while" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.57.0">1.57.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1292-1295">source</a></span><a href="#method.map_while" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.map_while" class="fnname">map_while</a>&lt;B, P&gt;(self, predicate: P) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/map_while/struct.MapWhile.html" title="struct core::iter::adapters::map_while::MapWhile">MapWhile</a>&lt;Self, P&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>,<br>&nbsp;&nbsp;&nbsp;&nbsp;P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;B&gt;,</span></h4></section></summary><div class='docblock'>Creates an iterator that both yields elements based on a predicate and maps. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.map_while">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.skip" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1323-1325">source</a></span><a href="#method.skip" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.skip" class="fnname">skip</a>(self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/skip/struct.Skip.html" title="struct core::iter::adapters::skip::Skip">Skip</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>,</span></h4></section></summary><div class='docblock'>Creates an iterator that skips the first <code>n</code> elements. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.skip">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1376-1378">source</a></span><a href="#method.take" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.take" class="fnname">take</a>(self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/take/struct.Take.html" title="struct core::iter::adapters::take::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>,</span></h4></section></summary><div class='docblock'>Creates an iterator that yields the first <code>n</code> elements, or fewer
+if the underlying iterator ends sooner. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.take">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.scan" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1420-1423">source</a></span><a href="#method.scan" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.scan" class="fnname">scan</a>&lt;St, B, F&gt;(self, initial_state: St, f: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/scan/struct.Scan.html" title="struct core::iter::adapters::scan::Scan">Scan</a>&lt;Self, St, F&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>,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>St, Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;B&gt;,</span></h4></section></summary><div class='docblock'>An iterator adapter similar to <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.fold"><code>fold</code></a> that holds internal state and
+produces a new iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.scan">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.flat_map" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1460-1464">source</a></span><a href="#method.flat_map" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.flat_map" class="fnname">flat_map</a>&lt;U, F&gt;(self, f: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/flatten/struct.FlatMap.html" title="struct core::iter::adapters::flatten::FlatMap">FlatMap</a>&lt;Self, U, F&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>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; U,</span></h4></section></summary><div class='docblock'>Creates an iterator that works like map, but flattens nested structure. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.flat_map">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fuse" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1600-1602">source</a></span><a href="#method.fuse" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.fuse" class="fnname">fuse</a>(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/fuse/struct.Fuse.html" title="struct core::iter::adapters::fuse::Fuse">Fuse</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>,</span></h4></section></summary><div class='docblock'>Creates an iterator which ends after the first <a href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None" title="None"><code>None</code></a>. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.fuse">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.inspect" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1684-1687">source</a></span><a href="#method.inspect" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.inspect" class="fnname">inspect</a>&lt;F&gt;(self, f: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/inspect/struct.Inspect.html" title="struct core::iter::adapters::inspect::Inspect">Inspect</a>&lt;Self, F&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>,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>),</span></h4></section></summary><div class='docblock'>Does something with each element of an iterator, passing the value on. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.inspect">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.by_ref" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1714-1716">source</a></span><a href="#method.by_ref" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.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>,</span></h4></section></summary><div class='docblock'>Borrows an iterator, rather than consuming it. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.by_ref">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.collect" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1832-1834">source</a></span><a href="#method.collect" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.collect" class="fnname">collect</a>&lt;B&gt;(self) -&gt; B<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;,<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>,</span></h4></section></summary><div class='docblock'>Transforms an iterator into a collection. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.collect">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.collect_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1983-1985">source</a><a href="#method.collect_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.collect_into" class="fnname">collect_into</a>&lt;E&gt;(self, collection: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>E) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>E<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;,<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>,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_collect_into</code>)</span></div></span><div class='docblock'>Collects all the items from an iterator into a collection. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.collect_into">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partition" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2017-2021">source</a></span><a href="#method.partition" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.partition" class="fnname">partition</a>&lt;B, F&gt;(self, f: F) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(B, B)</a><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="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class='docblock'>Consumes an iterator, creating two collections from it. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.partition">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_partitioned" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2136-2139">source</a><a href="#method.is_partitioned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.is_partitioned" class="fnname">is_partitioned</a>&lt;P&gt;(self, predicate: P) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><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;P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_is_partitioned</code>)</span></div></span><div class='docblock'>Checks if the elements of this iterator are partitioned according to the given predicate,
+such that all those that return <code>true</code> precede all those that return <code>false</code>. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.is_partitioned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_fold" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.27.0">1.27.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2230-2234">source</a></span><a href="#method.try_fold" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.try_fold" class="fnname">try_fold</a>&lt;B, F, R&gt;(&amp;mut self, init: B, f: F) -&gt; R<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;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(B, Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; R,<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>&lt;Output = B&gt;,</span></h4></section></summary><div class='docblock'>An iterator method that applies a function as long as it returns
+successfully, producing a single, final value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.try_fold">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_for_each" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.27.0">1.27.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2288-2292">source</a></span><a href="#method.try_for_each" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.try_for_each" class="fnname">try_for_each</a>&lt;F, R&gt;(&amp;mut self, f: F) -&gt; R<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;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; R,<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>&lt;Output = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;,</span></h4></section></summary><div class='docblock'>An iterator method that applies a fallible function to each item in the
+iterator, stopping at the first error and returning that error. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.try_for_each">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fold" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2407-2410">source</a></span><a href="#method.fold" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.fold" class="fnname">fold</a>&lt;B, F&gt;(self, init: B, f: F) -&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;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(B, Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; B,</span></h4></section></summary><div class='docblock'>Folds every element into an accumulator by applying an operation,
+returning the final result. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.fold">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.reduce" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2444-2447">source</a></span><a href="#method.reduce" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.reduce" class="fnname">reduce</a>&lt;F&gt;(self, f: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&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>,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>,</span></h4></section></summary><div class='docblock'>Reduces the elements to a single one, by repeatedly applying a reducing
+operation. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.reduce">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_reduce" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2515-2520">source</a><a href="#method.try_reduce" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.try_reduce" class="fnname">try_reduce</a>&lt;F, R&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;f: F<br>) -&gt; &lt;&lt;R as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/ops/try_trait/trait.Try.html#associatedtype.Residual" title="type core::ops::try_trait::Try::Residual">Residual</a> as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/try_trait/trait.Residual.html" title="trait core::ops::try_trait::Residual">Residual</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&lt;R as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/ops/try_trait/trait.Try.html#associatedtype.Output" title="type core::ops::try_trait::Try::Output">Output</a>&gt;&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/ops/try_trait/trait.Residual.html#associatedtype.TryType" title="type core::ops::try_trait::Residual::TryType">TryType</a><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;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; R,<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>&lt;Output = Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;R as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/ops/try_trait/trait.Try.html#associatedtype.Residual" title="type core::ops::try_trait::Try::Residual">Residual</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/try_trait/trait.Residual.html" title="trait core::ops::try_trait::Residual">Residual</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;&gt;,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iterator_try_reduce</code>)</span></div></span><div class='docblock'>Reduces the elements to a single one by repeatedly applying a reducing operation. If the
+closure returns a failure, the failure is propagated back to the caller immediately. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.try_reduce">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.all" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2572-2575">source</a></span><a href="#method.all" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.all" class="fnname">all</a>&lt;F&gt;(&amp;mut self, f: F) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><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;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class='docblock'>Tests if every element of the iterator matches a predicate. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.all">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.any" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2625-2628">source</a></span><a href="#method.any" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.any" class="fnname">any</a>&lt;F&gt;(&amp;mut self, f: F) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><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;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class='docblock'>Tests if any element of the iterator matches a predicate. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.any">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.find" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2685-2688">source</a></span><a href="#method.find" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.find" class="fnname">find</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&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>,<br>&nbsp;&nbsp;&nbsp;&nbsp;P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class='docblock'>Searches for an element of an iterator that satisfies a predicate. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.find">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.find_map" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.30.0">1.30.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2716-2719">source</a></span><a href="#method.find_map" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.find_map" class="fnname">find_map</a>&lt;B, F&gt;(&amp;mut self, f: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;B&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>,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;B&gt;,</span></h4></section></summary><div class='docblock'>Applies function to the elements of iterator and returns
+the first non-none result. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.find_map">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_find" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2772-2777">source</a><a href="#method.try_find" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.try_find" class="fnname">try_find</a>&lt;F, R&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;f: F<br>) -&gt; &lt;&lt;R as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/ops/try_trait/trait.Try.html#associatedtype.Residual" title="type core::ops::try_trait::Try::Residual">Residual</a> as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/try_trait/trait.Residual.html" title="trait core::ops::try_trait::Residual">Residual</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/ops/try_trait/trait.Residual.html#associatedtype.TryType" title="type core::ops::try_trait::Residual::TryType">TryType</a><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;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; R,<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>&lt;Output = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;R as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/ops/try_trait/trait.Try.html#associatedtype.Residual" title="type core::ops::try_trait::Try::Residual">Residual</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/try_trait/trait.Residual.html" title="trait core::ops::try_trait::Residual">Residual</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;&gt;,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>try_find</code>)</span></div></span><div class='docblock'>Applies function to the elements of iterator and returns
+the first true result or the first error. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.try_find">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.position" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2854-2857">source</a></span><a href="#method.position" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.position" class="fnname">position</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <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.usize.html">usize</a>&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>,<br>&nbsp;&nbsp;&nbsp;&nbsp;P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class='docblock'>Searches for an element in an iterator, returning its index. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.position">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.max_by_key" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.6.0">1.6.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3022-3025">source</a></span><a href="#method.max_by_key" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.max_by_key" class="fnname">max_by_key</a>&lt;B, F&gt;(self, f: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</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>,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; B,</span></h4></section></summary><div class='docblock'>Returns the element that gives the maximum value from the
+specified function. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.max_by_key">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.max_by" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.15.0">1.15.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3055-3058">source</a></span><a href="#method.max_by" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.max_by" class="fnname">max_by</a>&lt;F&gt;(self, compare: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&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>,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, &amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</span></h4></section></summary><div class='docblock'>Returns the element that gives the maximum value with respect to the
+specified comparison function. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.max_by">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.min_by_key" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.6.0">1.6.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3082-3085">source</a></span><a href="#method.min_by_key" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.min_by_key" class="fnname">min_by_key</a>&lt;B, F&gt;(self, f: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</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>,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; B,</span></h4></section></summary><div class='docblock'>Returns the element that gives the minimum value from the
+specified function. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.min_by_key">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.min_by" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.15.0">1.15.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3115-3118">source</a></span><a href="#method.min_by" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.min_by" class="fnname">min_by</a>&lt;F&gt;(self, compare: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&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>,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, &amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</span></h4></section></summary><div class='docblock'>Returns the element that gives the minimum value with respect to the
+specified comparison function. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.min_by">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.unzip" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3190-3194">source</a></span><a href="#method.unzip" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.unzip" class="fnname">unzip</a>&lt;A, B, FromA, FromB&gt;(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(FromA, FromB)</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;FromA: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a>&lt;A&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;FromB: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a>&lt;B&gt;,<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> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(A, B)</a>&gt;,</span></h4></section></summary><div class='docblock'>Converts an iterator of pairs into a pair of containers. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.unzip">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.copied" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.36.0">1.36.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3222-3225">source</a></span><a href="#method.copied" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.copied" class="fnname">copied</a>&lt;'a, T&gt;(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/copied/struct.Copied.html" title="struct core::iter::adapters::copied::Copied">Copied</a>&lt;Self&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'a + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</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> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>T&gt;,</span></h4></section></summary><div class='docblock'>Creates an iterator which copies all of its elements. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.copied">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cloned" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3269-3272">source</a></span><a href="#method.cloned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.cloned" class="fnname">cloned</a>&lt;'a, T&gt;(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/cloned/struct.Cloned.html" title="struct core::iter::adapters::cloned::Cloned">Cloned</a>&lt;Self&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'a + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</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> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>T&gt;,</span></h4></section></summary><div class='docblock'>Creates an iterator which <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone"><code>clone</code></a>s all of its elements. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.cloned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.array_chunks" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3346-3348">source</a><a href="#method.array_chunks" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.array_chunks" class="fnname">array_chunks</a>&lt;const N:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/array_chunks/struct.ArrayChunks.html" title="struct core::iter::adapters::array_chunks::ArrayChunks">ArrayChunks</a>&lt;Self, N&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>,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_array_chunks</code>)</span></div></span><div class='docblock'>Returns an iterator over <code>N</code> elements of the iterator at a time. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.array_chunks">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sum" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.11.0">1.11.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3376-3379">source</a></span><a href="#method.sum" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.sum" class="fnname">sum</a>&lt;S&gt;(self) -&gt; S<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;S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/accum/trait.Sum.html" title="trait core::iter::traits::accum::Sum">Sum</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;,</span></h4></section></summary><div class='docblock'>Sums the elements of an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.sum">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.product" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.11.0">1.11.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3405-3408">source</a></span><a href="#method.product" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.product" class="fnname">product</a>&lt;P&gt;(self) -&gt; P<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;P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/accum/trait.Product.html" title="trait core::iter::traits::accum::Product">Product</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;,</span></h4></section></summary><div class='docblock'>Iterates over the entire iterator, multiplying all the elements <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.product">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cmp_by" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3455-3459">source</a><a href="#method.cmp_by" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.cmp_by" class="fnname">cmp_by</a>&lt;I, F&gt;(self, other: I, cmp: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a><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;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, &lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_order_by</code>)</span></div></span><div class='docblock'><a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#lexicographical-comparison">Lexicographically</a> compares the elements of this <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> with those
+of another with respect to the specified comparison function. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.cmp_by">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3493-3497">source</a></span><a href="#method.partial_cmp" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.partial_cmp" class="fnname">partial_cmp</a>&lt;I&gt;(self, other: I) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;&lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>&gt;,<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>,</span></h4></section></summary><div class='docblock'><a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#lexicographical-comparison">Lexicographically</a> compares the elements of this <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> with those
+of another. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp_by" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3531-3535">source</a><a href="#method.partial_cmp_by" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.partial_cmp_by" class="fnname">partial_cmp_by</a>&lt;I, F&gt;(self, other: I, partial_cmp: F) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&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>,<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, &lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_order_by</code>)</span></div></span><div class='docblock'><a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#lexicographical-comparison">Lexicographically</a> compares the elements of this <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> with those
+of another with respect to the specified comparison function. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.partial_cmp_by">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3564-3568">source</a></span><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.eq" class="fnname">eq</a>&lt;I&gt;(self, other: I) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;&lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>&gt;,<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>,</span></h4></section></summary><div class='docblock'>Determines if the elements of this <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> are equal to those of
+another. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq_by" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3589-3593">source</a><a href="#method.eq_by" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.eq_by" class="fnname">eq_by</a>&lt;I, F&gt;(self, other: I, eq: F) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><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;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, &lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_order_by</code>)</span></div></span><div class='docblock'>Determines if the elements of this <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> are equal to those of
+another with respect to the specified equality function. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.eq_by">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3621-3625">source</a></span><a href="#method.ne" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.ne" class="fnname">ne</a>&lt;I&gt;(self, other: I) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;&lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>&gt;,<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>,</span></h4></section></summary><div class='docblock'>Determines if the elements of this <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> are unequal to those of
+another. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3642-3646">source</a></span><a href="#method.lt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.lt" class="fnname">lt</a>&lt;I&gt;(self, other: I) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;&lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>&gt;,<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>,</span></h4></section></summary><div class='docblock'>Determines if the elements of this <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> are <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#lexicographical-comparison">lexicographically</a>
+less than those of another. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3663-3667">source</a></span><a href="#method.le" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.le" class="fnname">le</a>&lt;I&gt;(self, other: I) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;&lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>&gt;,<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>,</span></h4></section></summary><div class='docblock'>Determines if the elements of this <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> are <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#lexicographical-comparison">lexicographically</a>
+less or equal to those of another. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3684-3688">source</a></span><a href="#method.gt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.gt" class="fnname">gt</a>&lt;I&gt;(self, other: I) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;&lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>&gt;,<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>,</span></h4></section></summary><div class='docblock'>Determines if the elements of this <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> are <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#lexicographical-comparison">lexicographically</a>
+greater than those of another. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3705-3709">source</a></span><a href="#method.ge" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.ge" class="fnname">ge</a>&lt;I&gt;(self, other: I) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;&lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>&gt;,<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>,</span></h4></section></summary><div class='docblock'>Determines if the elements of this <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> are <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#lexicographical-comparison">lexicographically</a>
+greater than or equal to those of another. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.ge">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_sorted_by" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3764-3767">source</a><a href="#method.is_sorted_by" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.is_sorted_by" class="fnname">is_sorted_by</a>&lt;F&gt;(self, compare: F) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><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;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, &amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>is_sorted</code>)</span></div></span><div class='docblock'>Checks if the elements of this iterator are sorted using the given comparator function. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.is_sorted_by">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_sorted_by_key" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3810-3814">source</a><a href="#method.is_sorted_by_key" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.is_sorted_by_key" class="fnname">is_sorted_by_key</a>&lt;F, K&gt;(self, f: F) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><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;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; K,<br>&nbsp;&nbsp;&nbsp;&nbsp;K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;K&gt;,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>is_sorted</code>)</span></div></span><div class='docblock'>Checks if the elements of this iterator are sorted using the given key extraction
+function. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.is_sorted_by_key">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-IntoIter%3CT%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-IntoIter%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.IntoIter.html" title="struct bytes::buf::IntoIter">IntoIter</a>&lt;T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</span></h3></section><section id="impl-Send-for-IntoIter%3CT%3E" class="impl has-srclink"><a href="#impl-Send-for-IntoIter%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.IntoIter.html" title="struct bytes::buf::IntoIter">IntoIter</a>&lt;T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</span></h3></section><section id="impl-Sync-for-IntoIter%3CT%3E" class="impl has-srclink"><a href="#impl-Sync-for-IntoIter%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.IntoIter.html" title="struct bytes::buf::IntoIter">IntoIter</a>&lt;T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</span></h3></section><section id="impl-Unpin-for-IntoIter%3CT%3E" class="impl has-srclink"><a href="#impl-Unpin-for-IntoIter%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.IntoIter.html" title="struct bytes::buf::IntoIter">IntoIter</a>&lt;T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</span></h3></section><section id="impl-UnwindSafe-for-IntoIter%3CT%3E" class="impl has-srclink"><a href="#impl-UnwindSafe-for-IntoIter%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.IntoIter.html" title="struct bytes::buf::IntoIter">IntoIter</a>&lt;T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</span></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-IntoIter%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-IntoIter%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-IntoIter%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-IntoIter%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-IntoIter%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-IntoIter%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-IntoIter%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-IntoIter%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
+</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-IntoIter%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-IntoIter%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
+<p>That is, this conversion is whatever the implementation of
+<code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
+</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-IntoIterator-for-IntoIter%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/collect.rs.html#267">source</a><a href="#impl-IntoIterator-for-IntoIter%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;I&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for 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/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Item-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = &lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="rustdoc-toggle" open><summary><section id="associatedtype.IntoIter" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.IntoIter" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = I</h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_iter" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/90603" title="Tracking issue for const_intoiterator_identity">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/collect.rs.html#272">source</a></span><a href="#method.into_iter" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fnname">into_iter</a>(self) -&gt; I</h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-IntoIter%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-IntoIter%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-IntoIter%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-IntoIter%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div><script type="text/json" id="notable-traits-data">{"IntoIter<T>":"<h3 class=\"notable\">Notable traits for <code><a class=\"struct\" href=\"struct.IntoIter.html\" title=\"struct bytes::buf::IntoIter\">IntoIter</a>&lt;T&gt;</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl&lt;T:&nbsp;<a class=\"trait\" href=\"trait.Buf.html\" title=\"trait bytes::buf::Buf\">Buf</a>&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.IntoIter.html\" title=\"struct bytes::buf::IntoIter\">IntoIter</a>&lt;T&gt;</span><span class=\"where fmt-newline\"> type <a href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>;</span>"}</script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/bytes/buf/struct.Limit.html b/bytes/buf/struct.Limit.html
new file mode 100644
index 0000000..1e60791
--- /dev/null
+++ b/bytes/buf/struct.Limit.html
@@ -0,0 +1,31 @@
+<!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="A `BufMut` adapter which limits the amount of bytes that can be written to an underlying buffer."><meta name="keywords" content="rust, rustlang, rust-lang, Limit"><title>Limit in bytes::buf - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2 class="location"><a href="#">Limit</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.get_mut">get_mut</a></li><li><a href="#method.get_ref">get_ref</a></li><li><a href="#method.into_inner">into_inner</a></li><li><a href="#method.limit">limit</a></li><li><a href="#method.set_limit">set_limit</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-BufMut-for-Limit%3CT%3E">BufMut</a></li><li><a href="#impl-Debug-for-Limit%3CT%3E">Debug</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-Limit%3CT%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Limit%3CT%3E">Send</a></li><li><a href="#impl-Sync-for-Limit%3CT%3E">Sync</a></li><li><a href="#impl-Unpin-for-Limit%3CT%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Limit%3CT%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-Limit%3CT%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-Limit%3CT%3E">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-Limit%3CT%3E">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-From%3CT%3E-for-Limit%3CT%3E">From&lt;T&gt;</a></li><li><a href="#impl-Into%3CU%3E-for-Limit%3CT%3E">Into&lt;U&gt;</a></li><li><a href="#impl-TryFrom%3CU%3E-for-Limit%3CT%3E">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-Limit%3CT%3E">TryInto&lt;U&gt;</a></li></ul></section><h2><a href="index.html">In bytes::buf</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../index.html">bytes</a>::<wbr><a href="index.html">buf</a>::<wbr><a class="struct" href="#">Limit</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/bytes/buf/limit.rs.html#9-12">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct Limit&lt;T&gt; { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A <code>BufMut</code> adapter which limits the amount of bytes that can be written
+to an underlying buffer.</p>
+</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Limit%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/limit.rs.html#18-57">source</a><a href="#impl-Limit%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="struct" href="struct.Limit.html" title="struct bytes::buf::Limit">Limit</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_inner" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/limit.rs.html#20-22">source</a><h4 class="code-header">pub fn <a href="#method.into_inner" class="fnname">into_inner</a>(self) -&gt; T</h4></section></summary><div class="docblock"><p>Consumes this <code>Limit</code>, returning the underlying value.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_ref" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/limit.rs.html#27-29">source</a><h4 class="code-header">pub fn <a href="#method.get_ref" class="fnname">get_ref</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</h4></section></summary><div class="docblock"><p>Gets a reference to the underlying <code>BufMut</code>.</p>
+<p>It is inadvisable to directly write to the underlying <code>BufMut</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/limit.rs.html#34-36">source</a><h4 class="code-header">pub fn <a href="#method.get_mut" class="fnname">get_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</h4></section></summary><div class="docblock"><p>Gets a mutable reference to the underlying <code>BufMut</code>.</p>
+<p>It is inadvisable to directly write to the underlying <code>BufMut</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.limit" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/limit.rs.html#44-46">source</a><h4 class="code-header">pub fn <a href="#method.limit" class="fnname">limit</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the maximum number of bytes that can be written</p>
+<h5 id="note"><a href="#note">Note</a></h5>
+<p>If the inner <code>BufMut</code> has fewer bytes than indicated by this method then
+that is the actual number of available bytes.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_limit" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/limit.rs.html#54-56">source</a><h4 class="code-header">pub fn <a href="#method.set_limit" class="fnname">set_limit</a>(&amp;mut self, lim: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Sets the maximum number of bytes that can be written.</p>
+<h5 id="note-1"><a href="#note-1">Note</a></h5>
+<p>If the inner <code>BufMut</code> has fewer bytes than <code>lim</code> then that is the actual
+number of available bytes.</p>
+</div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-BufMut-for-Limit%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/limit.rs.html#59-75">source</a><a href="#impl-BufMut-for-Limit%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a>&gt; <a class="trait" href="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a> for <a class="struct" href="struct.Limit.html" title="struct bytes::buf::Limit">Limit</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.remaining_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/limit.rs.html#60-62">source</a><a href="#method.remaining_mut" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#tymethod.remaining_mut" class="fnname">remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Returns the number of bytes that can be written from the current
+position until the end of the buffer is reached. <a href="trait.BufMut.html#tymethod.remaining_mut">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunk_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/limit.rs.html#64-68">source</a><a href="#method.chunk_mut" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#tymethod.chunk_mut" class="fnname">chunk_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class='docblock'>Returns a mutable slice starting at the current BufMut position and of
+length between 0 and <code>BufMut::remaining_mut()</code>. Note that this <em>can</em> be shorter than the
+whole remainder of the buffer (this allows non-continuous implementation). <a href="trait.BufMut.html#tymethod.chunk_mut">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.advance_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/limit.rs.html#70-74">source</a><a href="#method.advance_mut" class="anchor"></a><h4 class="code-header">unsafe fn <a href="trait.BufMut.html#tymethod.advance_mut" class="fnname">advance_mut</a>(&amp;mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Advance the internal cursor of the BufMut <a href="trait.BufMut.html#tymethod.advance_mut">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.has_remaining_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#128-130">source</a><a href="#method.has_remaining_mut" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.has_remaining_mut" class="fnname">has_remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Returns true if there is space in <code>self</code> for more bytes. <a href="trait.BufMut.html#method.has_remaining_mut">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#202-221">source</a><a href="#method.put" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put" class="fnname">put</a>&lt;T:&nbsp;<a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt;(&amp;mut self, src: T)<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>,</span></h4></section></summary><div class='docblock'>Transfer bytes into <code>self</code> from <code>src</code> and advance the cursor by the
+number of bytes written. <a href="trait.BufMut.html#method.put">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_slice" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#243-258">source</a><a href="#method.put_slice" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_slice" class="fnname">put_slice</a>(&amp;mut self, src: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section></summary><div class='docblock'>Transfer bytes into <code>self</code> from <code>src</code> and advance the cursor by the
+number of bytes written. <a href="trait.BufMut.html#method.put_slice">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_bytes" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#286-300">source</a><a href="#method.put_bytes" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_bytes" class="fnname">put_bytes</a>(&amp;mut self, val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Put <code>cnt</code> bytes <code>val</code> into <code>self</code>. <a href="trait.BufMut.html#method.put_bytes">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#321-324">source</a><a href="#method.put_u8" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u8" class="fnname">put_u8</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 8 bit integer to <code>self</code>. <a href="trait.BufMut.html#method.put_u8">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#345-348">source</a><a href="#method.put_i8" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i8" class="fnname">put_i8</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>)</h4></section></summary><div class='docblock'>Writes a signed 8 bit integer to <code>self</code>. <a href="trait.BufMut.html#method.put_i8">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u16" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#369-371">source</a><a href="#method.put_u16" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u16" class="fnname">put_u16</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 16 bit integer to <code>self</code> in big-endian byte order. <a href="trait.BufMut.html#method.put_u16">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u16_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#392-394">source</a><a href="#method.put_u16_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u16_le" class="fnname">put_u16_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 16 bit integer to <code>self</code> in little-endian byte order. <a href="trait.BufMut.html#method.put_u16_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u16_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#419-421">source</a><a href="#method.put_u16_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u16_ne" class="fnname">put_u16_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 16 bit integer to <code>self</code> in native-endian byte order. <a href="trait.BufMut.html#method.put_u16_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i16" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#442-444">source</a><a href="#method.put_i16" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i16" class="fnname">put_i16</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section></summary><div class='docblock'>Writes a signed 16 bit integer to <code>self</code> in big-endian byte order. <a href="trait.BufMut.html#method.put_i16">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i16_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#465-467">source</a><a href="#method.put_i16_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i16_le" class="fnname">put_i16_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section></summary><div class='docblock'>Writes a signed 16 bit integer to <code>self</code> in little-endian byte order. <a href="trait.BufMut.html#method.put_i16_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i16_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#492-494">source</a><a href="#method.put_i16_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i16_ne" class="fnname">put_i16_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section></summary><div class='docblock'>Writes a signed 16 bit integer to <code>self</code> in native-endian byte order. <a href="trait.BufMut.html#method.put_i16_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#515-517">source</a><a href="#method.put_u32" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u32" class="fnname">put_u32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 32 bit integer to <code>self</code> in big-endian byte order. <a href="trait.BufMut.html#method.put_u32">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u32_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#538-540">source</a><a href="#method.put_u32_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u32_le" class="fnname">put_u32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 32 bit integer to <code>self</code> in little-endian byte order. <a href="trait.BufMut.html#method.put_u32_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u32_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#565-567">source</a><a href="#method.put_u32_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u32_ne" class="fnname">put_u32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 32 bit integer to <code>self</code> in native-endian byte order. <a href="trait.BufMut.html#method.put_u32_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#588-590">source</a><a href="#method.put_i32" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i32" class="fnname">put_i32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section></summary><div class='docblock'>Writes a signed 32 bit integer to <code>self</code> in big-endian byte order. <a href="trait.BufMut.html#method.put_i32">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i32_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#611-613">source</a><a href="#method.put_i32_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i32_le" class="fnname">put_i32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section></summary><div class='docblock'>Writes a signed 32 bit integer to <code>self</code> in little-endian byte order. <a href="trait.BufMut.html#method.put_i32_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i32_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#638-640">source</a><a href="#method.put_i32_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i32_ne" class="fnname">put_i32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section></summary><div class='docblock'>Writes a signed 32 bit integer to <code>self</code> in native-endian byte order. <a href="trait.BufMut.html#method.put_i32_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#661-663">source</a><a href="#method.put_u64" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u64" class="fnname">put_u64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 64 bit integer to <code>self</code> in the big-endian byte order. <a href="trait.BufMut.html#method.put_u64">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u64_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#684-686">source</a><a href="#method.put_u64_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u64_le" class="fnname">put_u64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 64 bit integer to <code>self</code> in little-endian byte order. <a href="trait.BufMut.html#method.put_u64_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u64_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#711-713">source</a><a href="#method.put_u64_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u64_ne" class="fnname">put_u64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 64 bit integer to <code>self</code> in native-endian byte order. <a href="trait.BufMut.html#method.put_u64_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#734-736">source</a><a href="#method.put_i64" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i64" class="fnname">put_i64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section></summary><div class='docblock'>Writes a signed 64 bit integer to <code>self</code> in the big-endian byte order. <a href="trait.BufMut.html#method.put_i64">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i64_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#757-759">source</a><a href="#method.put_i64_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i64_le" class="fnname">put_i64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section></summary><div class='docblock'>Writes a signed 64 bit integer to <code>self</code> in little-endian byte order. <a href="trait.BufMut.html#method.put_i64_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i64_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#784-786">source</a><a href="#method.put_i64_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i64_ne" class="fnname">put_i64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section></summary><div class='docblock'>Writes a signed 64 bit integer to <code>self</code> in native-endian byte order. <a href="trait.BufMut.html#method.put_i64_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u128" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#807-809">source</a><a href="#method.put_u128" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u128" class="fnname">put_u128</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 128 bit integer to <code>self</code> in the big-endian byte order. <a href="trait.BufMut.html#method.put_u128">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u128_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#830-832">source</a><a href="#method.put_u128_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u128_le" class="fnname">put_u128_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 128 bit integer to <code>self</code> in little-endian byte order. <a href="trait.BufMut.html#method.put_u128_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u128_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#857-859">source</a><a href="#method.put_u128_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_u128_ne" class="fnname">put_u128_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 128 bit integer to <code>self</code> in native-endian byte order. <a href="trait.BufMut.html#method.put_u128_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i128" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#880-882">source</a><a href="#method.put_i128" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i128" class="fnname">put_i128</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>)</h4></section></summary><div class='docblock'>Writes a signed 128 bit integer to <code>self</code> in the big-endian byte order. <a href="trait.BufMut.html#method.put_i128">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i128_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#903-905">source</a><a href="#method.put_i128_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i128_le" class="fnname">put_i128_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>)</h4></section></summary><div class='docblock'>Writes a signed 128 bit integer to <code>self</code> in little-endian byte order. <a href="trait.BufMut.html#method.put_i128_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i128_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#930-932">source</a><a href="#method.put_i128_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_i128_ne" class="fnname">put_i128_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>)</h4></section></summary><div class='docblock'>Writes a signed 128 bit integer to <code>self</code> in native-endian byte order. <a href="trait.BufMut.html#method.put_i128_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_uint" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#953-960">source</a><a href="#method.put_uint" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_uint" class="fnname">put_uint</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Writes an unsigned n-byte integer to <code>self</code> in big-endian byte order. <a href="trait.BufMut.html#method.put_uint">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_uint_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#981-989">source</a><a href="#method.put_uint_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_uint_le" class="fnname">put_uint_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Writes an unsigned n-byte integer to <code>self</code> in the little-endian byte order. <a href="trait.BufMut.html#method.put_uint_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_uint_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1014-1020">source</a><a href="#method.put_uint_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_uint_ne" class="fnname">put_uint_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Writes an unsigned n-byte integer to <code>self</code> in the native-endian byte order. <a href="trait.BufMut.html#method.put_uint_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_int" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1041-1048">source</a><a href="#method.put_int" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_int" class="fnname">put_int</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Writes low <code>nbytes</code> of a signed integer to <code>self</code> in big-endian byte order. <a href="trait.BufMut.html#method.put_int">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_int_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1069-1077">source</a><a href="#method.put_int_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_int_le" class="fnname">put_int_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Writes low <code>nbytes</code> of a signed integer to <code>self</code> in little-endian byte order. <a href="trait.BufMut.html#method.put_int_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_int_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1102-1108">source</a><a href="#method.put_int_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_int_ne" class="fnname">put_int_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Writes low <code>nbytes</code> of a signed integer to <code>self</code> in native-endian byte order. <a href="trait.BufMut.html#method.put_int_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1130-1132">source</a><a href="#method.put_f32" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_f32" class="fnname">put_f32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>)</h4></section></summary><div class='docblock'>Writes an IEEE754 single-precision (4 bytes) floating point number to
+<code>self</code> in big-endian byte order. <a href="trait.BufMut.html#method.put_f32">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f32_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1154-1156">source</a><a href="#method.put_f32_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_f32_le" class="fnname">put_f32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>)</h4></section></summary><div class='docblock'>Writes an IEEE754 single-precision (4 bytes) floating point number to
+<code>self</code> in little-endian byte order. <a href="trait.BufMut.html#method.put_f32_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f32_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1182-1184">source</a><a href="#method.put_f32_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_f32_ne" class="fnname">put_f32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>)</h4></section></summary><div class='docblock'>Writes an IEEE754 single-precision (4 bytes) floating point number to
+<code>self</code> in native-endian byte order. <a href="trait.BufMut.html#method.put_f32_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1206-1208">source</a><a href="#method.put_f64" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_f64" class="fnname">put_f64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</h4></section></summary><div class='docblock'>Writes an IEEE754 double-precision (8 bytes) floating point number to
+<code>self</code> in big-endian byte order. <a href="trait.BufMut.html#method.put_f64">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f64_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1230-1232">source</a><a href="#method.put_f64_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_f64_le" class="fnname">put_f64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</h4></section></summary><div class='docblock'>Writes an IEEE754 double-precision (8 bytes) floating point number to
+<code>self</code> in little-endian byte order. <a href="trait.BufMut.html#method.put_f64_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f64_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1258-1260">source</a><a href="#method.put_f64_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.put_f64_ne" class="fnname">put_f64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</h4></section></summary><div class='docblock'>Writes an IEEE754 double-precision (8 bytes) floating point number to
+<code>self</code> in native-endian byte order. <a href="trait.BufMut.html#method.put_f64_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.limit-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1276-1281">source</a><a href="#method.limit-1" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.limit" class="fnname">limit</a>(self, limit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="struct.Limit.html" title="struct bytes::buf::Limit">Limit</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>,</span></h4></section></summary><div class='docblock'>Creates an adaptor which can write at most <code>limit</code> bytes to <code>self</code>. <a href="trait.BufMut.html#method.limit">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.writer" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1308-1313">source</a><a href="#method.writer" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.writer" class="fnname">writer</a>(self) -&gt; <a class="struct" href="struct.Writer.html" title="struct bytes::buf::Writer">Writer</a>&lt;Self&gt;<span class="notable-traits" data-ty="Writer&lt;Self&gt;"><span class="notable-traits-tooltip">ⓘ</span></span><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>,</span></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>std</code></strong> only.</div></span><div class='docblock'>Creates an adaptor which implements the <code>Write</code> trait for <code>self</code>. <a href="trait.BufMut.html#method.writer">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chain_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1336-1341">source</a><a href="#method.chain_mut" class="anchor"></a><h4 class="code-header">fn <a href="trait.BufMut.html#method.chain_mut" class="fnname">chain_mut</a>&lt;U:&nbsp;<a class="trait" href="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a>&gt;(self, next: U) -&gt; <a class="struct" href="struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;Self, U&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>,</span></h4></section></summary><div class='docblock'>Creates an adapter which will chain this buffer with another. <a href="trait.BufMut.html#method.chain_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-Limit%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/limit.rs.html#8">source</a><a href="#impl-Debug-for-Limit%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Limit.html" title="struct bytes::buf::Limit">Limit</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/limit.rs.html#8">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Limit%3CT%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-Limit%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Limit.html" title="struct bytes::buf::Limit">Limit</a>&lt;T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</span></h3></section><section id="impl-Send-for-Limit%3CT%3E" class="impl has-srclink"><a href="#impl-Send-for-Limit%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Limit.html" title="struct bytes::buf::Limit">Limit</a>&lt;T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</span></h3></section><section id="impl-Sync-for-Limit%3CT%3E" class="impl has-srclink"><a href="#impl-Sync-for-Limit%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Limit.html" title="struct bytes::buf::Limit">Limit</a>&lt;T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</span></h3></section><section id="impl-Unpin-for-Limit%3CT%3E" class="impl has-srclink"><a href="#impl-Unpin-for-Limit%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Limit.html" title="struct bytes::buf::Limit">Limit</a>&lt;T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</span></h3></section><section id="impl-UnwindSafe-for-Limit%3CT%3E" class="impl has-srclink"><a href="#impl-UnwindSafe-for-Limit%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Limit.html" title="struct bytes::buf::Limit">Limit</a>&lt;T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</span></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-Limit%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-Limit%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-Limit%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-Limit%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-Limit%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-Limit%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-Limit%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-Limit%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
+</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-Limit%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-Limit%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
+<p>That is, this conversion is whatever the implementation of
+<code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
+</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-Limit%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-Limit%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-Limit%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-Limit%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div><script type="text/json" id="notable-traits-data">{"Writer<Self>":"<h3 class=\"notable\">Notable traits for <code><a class=\"struct\" href=\"struct.Writer.html\" title=\"struct bytes::buf::Writer\">Writer</a>&lt;B&gt;</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl&lt;B:&nbsp;<a class=\"trait\" href=\"trait.BufMut.html\" title=\"trait bytes::buf::BufMut\">BufMut</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.Write.html\" title=\"trait std::io::Write\">Write</a> for <a class=\"struct\" href=\"struct.Writer.html\" title=\"struct bytes::buf::Writer\">Writer</a>&lt;B&gt;</span>"}</script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/bytes/buf/struct.Reader.html b/bytes/buf/struct.Reader.html
new file mode 100644
index 0000000..a4c4e2f
--- /dev/null
+++ b/bytes/buf/struct.Reader.html
@@ -0,0 +1,38 @@
+<!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="A `Buf` adapter which implements `io::Read` for the inner value."><meta name="keywords" content="rust, rustlang, rust-lang, Reader"><title>Reader in bytes::buf - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2 class="location"><a href="#">Reader</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.get_mut">get_mut</a></li><li><a href="#method.get_ref">get_ref</a></li><li><a href="#method.into_inner">into_inner</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-BufRead-for-Reader%3CB%3E">BufRead</a></li><li><a href="#impl-Debug-for-Reader%3CB%3E">Debug</a></li><li><a href="#impl-Read-for-Reader%3CB%3E">Read</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-Reader%3CB%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Reader%3CB%3E">Send</a></li><li><a href="#impl-Sync-for-Reader%3CB%3E">Sync</a></li><li><a href="#impl-Unpin-for-Reader%3CB%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Reader%3CB%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-Reader%3CB%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-Reader%3CB%3E">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-Reader%3CB%3E">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-From%3CT%3E-for-Reader%3CB%3E">From&lt;T&gt;</a></li><li><a href="#impl-Into%3CU%3E-for-Reader%3CB%3E">Into&lt;U&gt;</a></li><li><a href="#impl-TryFrom%3CU%3E-for-Reader%3CB%3E">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-Reader%3CB%3E">TryInto&lt;U&gt;</a></li></ul></section><h2><a href="index.html">In bytes::buf</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../index.html">bytes</a>::<wbr><a href="index.html">buf</a>::<wbr><a class="struct" href="#">Reader</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/bytes/buf/reader.rs.html#11-13">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct Reader&lt;B&gt; { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A <code>Buf</code> adapter which implements <code>io::Read</code> for the inner value.</p>
+<p>This struct is generally created by calling <code>reader()</code> on <code>Buf</code>. See
+documentation of <a href="trait.Buf.html#method.reader"><code>reader()</code></a> for more
+details.</p>
+</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Reader%3CB%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/reader.rs.html#19-63">source</a><a href="#impl-Reader%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;B:&nbsp;<a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt; <a class="struct" href="struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_ref" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/reader.rs.html#33-35">source</a><h4 class="code-header">pub fn <a href="#method.get_ref" class="fnname">get_ref</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>B</h4></section></summary><div class="docblock"><p>Gets a reference to the underlying <code>Buf</code>.</p>
+<p>It is inadvisable to directly read from the underlying <code>Buf</code>.</p>
+<h5 id="examples"><a href="#examples">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span>buf = <span class="string">b&quot;hello world&quot;</span>.reader();
+
+<span class="macro">assert_eq!</span>(<span class="string">b&quot;hello world&quot;</span>, buf.get_ref());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/reader.rs.html#40-42">source</a><h4 class="code-header">pub fn <a href="#method.get_mut" class="fnname">get_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>B</h4></section></summary><div class="docblock"><p>Gets a mutable reference to the underlying <code>Buf</code>.</p>
+<p>It is inadvisable to directly read from the underlying <code>Buf</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_inner" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/reader.rs.html#60-62">source</a><h4 class="code-header">pub fn <a href="#method.into_inner" class="fnname">into_inner</a>(self) -&gt; B</h4></section></summary><div class="docblock"><p>Consumes this <code>Reader</code>, returning the underlying value.</p>
+<h5 id="examples-1"><a href="#examples-1">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+<span class="kw">use </span>std::io;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="string">b&quot;hello world&quot;</span>.reader();
+<span class="kw">let </span><span class="kw-2">mut </span>dst = <span class="macro">vec!</span>[];
+
+io::copy(<span class="kw-2">&amp;mut </span>buf, <span class="kw-2">&amp;mut </span>dst).unwrap();
+
+<span class="kw">let </span>buf = buf.into_inner();
+<span class="macro">assert_eq!</span>(<span class="number">0</span>, buf.remaining());</code></pre></div>
+</div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-BufRead-for-Reader%3CB%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/reader.rs.html#74-81">source</a><a href="#impl-BufRead-for-Reader%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;B:&nbsp;<a class="trait" href="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.BufRead.html" title="trait std::io::BufRead">BufRead</a> for <a class="struct" href="struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fill_buf" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/reader.rs.html#75-77">source</a><a href="#method.fill_buf" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.BufRead.html#tymethod.fill_buf" class="fnname">fill_buf</a>(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;&amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt;</h4></section></summary><div class='docblock'>Returns the contents of the internal buffer, filling it with more data
+from the inner reader if it is empty. <a href="https://doc.rust-lang.org/nightly/std/io/trait.BufRead.html#tymethod.fill_buf">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.consume" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/reader.rs.html#78-80">source</a><a href="#method.consume" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.BufRead.html#tymethod.consume" class="fnname">consume</a>(&amp;mut self, amt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Tells this buffer that <code>amt</code> bytes have been consumed from the buffer,
+so they should no longer be returned in calls to <code>read</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.BufRead.html#tymethod.consume">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.has_data_left" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#2076">source</a><a href="#method.has_data_left" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.BufRead.html#method.has_data_left" class="fnname">has_data_left</a>(&amp;mut self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>buf_read_has_data_left</code>)</span></div></span><div class='docblock'>Check if the underlying <code>Read</code> has any data left to be read. <a href="https://doc.rust-lang.org/nightly/std/io/trait.BufRead.html#method.has_data_left">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.read_until" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#2135">source</a></span><a href="#method.read_until" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.BufRead.html#method.read_until" class="fnname">read_until</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;byte: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;buf: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Read all bytes into <code>buf</code> until the delimiter <code>byte</code> or EOF is reached. <a href="https://doc.rust-lang.org/nightly/std/io/trait.BufRead.html#method.read_until">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.read_line" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#2199">source</a></span><a href="#method.read_line" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.BufRead.html#method.read_line" class="fnname">read_line</a>(&amp;mut self, buf: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Read all bytes until a newline (the <code>0xA</code> byte) is reached, and append
+them to the provided buffer. You do not need to clear the buffer before
+appending. <a href="https://doc.rust-lang.org/nightly/std/io/trait.BufRead.html#method.read_line">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#2237-2239">source</a></span><a href="#method.split" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.BufRead.html#method.split" class="fnname">split</a>(self, byte: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.Split.html" title="struct std::io::Split">Split</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>,</span></h4></section></summary><div class='docblock'>Returns an iterator over the contents of this reader split on the byte
+<code>byte</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.BufRead.html#method.split">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lines" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#2274-2276">source</a></span><a href="#method.lines" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.BufRead.html#method.lines" class="fnname">lines</a>(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.Lines.html" title="struct std::io::Lines">Lines</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>,</span></h4></section></summary><div class='docblock'>Returns an iterator over the lines of this reader. <a href="https://doc.rust-lang.org/nightly/std/io/trait.BufRead.html#method.lines">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-Reader%3CB%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/reader.rs.html#10">source</a><a href="#impl-Debug-for-Reader%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;B:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/reader.rs.html#10">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Read-for-Reader%3CB%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/reader.rs.html#65-72">source</a><a href="#impl-Read-for-Reader%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;B:&nbsp;<a class="trait" href="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="struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.read" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/reader.rs.html#66-71">source</a><a href="#method.read" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#tymethod.read" class="fnname">read</a>(&amp;mut self, dst: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;</h4></section></summary><div class='docblock'>Pull some bytes from this source into the specified buffer, returning
+how many bytes were read. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#tymethod.read">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.read_vectored" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.36.0">1.36.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#645">source</a></span><a href="#method.read_vectored" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_vectored" class="fnname">read_vectored</a>(&amp;mut self, bufs: &amp;mut [<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.IoSliceMut.html" title="struct std::io::IoSliceMut">IoSliceMut</a>&lt;'_&gt;]) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Like <code>read</code>, except that it reads into a slice of buffers. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_vectored">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_read_vectored" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#658">source</a><a href="#method.is_read_vectored" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.is_read_vectored" class="fnname">is_read_vectored</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>can_vector</code>)</span></div></span><div class='docblock'>Determines if this <code>Read</code>er has an efficient <code>read_vectored</code>
+implementation. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.is_read_vectored">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.read_to_end" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#709">source</a></span><a href="#method.read_to_end" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_end" class="fnname">read_to_end</a>(&amp;mut self, buf: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Read all bytes until EOF in this source, placing them into <code>buf</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_end">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.read_to_string" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#752">source</a></span><a href="#method.read_to_string" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_string" class="fnname">read_to_string</a>(&amp;mut self, buf: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Read all bytes until EOF in this source, appending them to <code>buf</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_string">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.read_exact" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.6.0">1.6.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#807">source</a></span><a href="#method.read_exact" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_exact" class="fnname">read_exact</a>(&amp;mut self, buf: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Read the exact number of bytes required to fill <code>buf</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_exact">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.read_buf" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#818">source</a><a href="#method.read_buf" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_buf" class="fnname">read_buf</a>(&amp;mut self, buf: <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/readbuf/struct.BorrowedCursor.html" title="struct std::io::readbuf::BorrowedCursor">BorrowedCursor</a>&lt;'_&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>read_buf</code>)</span></div></span><div class='docblock'>Pull some bytes from this source into the specified buffer. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_buf">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.read_buf_exact" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#827">source</a><a href="#method.read_buf_exact" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_buf_exact" class="fnname">read_buf_exact</a>(&amp;mut self, cursor: <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/readbuf/struct.BorrowedCursor.html" title="struct std::io::readbuf::BorrowedCursor">BorrowedCursor</a>&lt;'_&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>read_buf</code>)</span></div></span><div class='docblock'>Read the exact number of bytes required to fill <code>cursor</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_buf_exact">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.by_ref" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#879-881">source</a></span><a href="#method.by_ref" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.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>,</span></h4></section></summary><div class='docblock'>Creates a “by reference” adaptor for this instance of <code>Read</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.by_ref">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.bytes" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#922-924">source</a></span><a href="#method.bytes" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.bytes" class="fnname">bytes</a>(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.Bytes.html" title="struct std::io::Bytes">Bytes</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>,</span></h4></section></summary><div class='docblock'>Transforms this <code>Read</code> instance to an <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> over its bytes. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.bytes">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chain" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#960-962">source</a></span><a href="#method.chain" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chain" class="fnname">chain</a>&lt;R&gt;(self, next: R) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.Chain.html" title="struct std::io::Chain">Chain</a>&lt;Self, R&gt;<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>,<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>,</span></h4></section></summary><div class='docblock'>Creates an adapter which will chain this stream with another. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chain">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#999-1001">source</a></span><a href="#method.take" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.take" class="fnname">take</a>(self, limit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.Take.html" title="struct std::io::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>,</span></h4></section></summary><div class='docblock'>Creates an adapter which will read at most <code>limit</code> bytes from it. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.take">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Reader%3CB%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-Reader%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;B&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</span></h3></section><section id="impl-Send-for-Reader%3CB%3E" class="impl has-srclink"><a href="#impl-Send-for-Reader%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;B&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</span></h3></section><section id="impl-Sync-for-Reader%3CB%3E" class="impl has-srclink"><a href="#impl-Sync-for-Reader%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;B&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</span></h3></section><section id="impl-Unpin-for-Reader%3CB%3E" class="impl has-srclink"><a href="#impl-Unpin-for-Reader%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;B&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</span></h3></section><section id="impl-UnwindSafe-for-Reader%3CB%3E" class="impl has-srclink"><a href="#impl-UnwindSafe-for-Reader%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;B&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;B&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</span></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-Reader%3CB%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-Reader%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-Reader%3CB%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-Reader%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-Reader%3CB%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-Reader%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-Reader%3CB%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-Reader%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
+</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-Reader%3CB%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-Reader%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
+<p>That is, this conversion is whatever the implementation of
+<code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
+</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-Reader%3CB%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-Reader%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-Reader%3CB%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-Reader%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/bytes/buf/struct.Take.html b/bytes/buf/struct.Take.html
new file mode 100644
index 0000000..de18829
--- /dev/null
+++ b/bytes/buf/struct.Take.html
@@ -0,0 +1,84 @@
+<!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="A `Buf` adapter which limits the bytes read from an underlying buffer."><meta name="keywords" content="rust, rustlang, rust-lang, Take"><title>Take in bytes::buf - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2 class="location"><a href="#">Take</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.get_mut">get_mut</a></li><li><a href="#method.get_ref">get_ref</a></li><li><a href="#method.into_inner">into_inner</a></li><li><a href="#method.limit">limit</a></li><li><a href="#method.set_limit">set_limit</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Buf-for-Take%3CT%3E">Buf</a></li><li><a href="#impl-Debug-for-Take%3CT%3E">Debug</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-Take%3CT%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Take%3CT%3E">Send</a></li><li><a href="#impl-Sync-for-Take%3CT%3E">Sync</a></li><li><a href="#impl-Unpin-for-Take%3CT%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Take%3CT%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-Take%3CT%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-Take%3CT%3E">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-Take%3CT%3E">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-From%3CT%3E-for-Take%3CT%3E">From&lt;T&gt;</a></li><li><a href="#impl-Into%3CU%3E-for-Take%3CT%3E">Into&lt;U&gt;</a></li><li><a href="#impl-TryFrom%3CU%3E-for-Take%3CT%3E">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-Take%3CT%3E">TryInto&lt;U&gt;</a></li></ul></section><h2><a href="index.html">In bytes::buf</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../index.html">bytes</a>::<wbr><a href="index.html">buf</a>::<wbr><a class="struct" href="#">Take</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/bytes/buf/take.rs.html#10-13">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct Take&lt;T&gt; { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A <code>Buf</code> adapter which limits the bytes read from an underlying buffer.</p>
+<p>This struct is generally created by calling <code>take()</code> on <code>Buf</code>. See
+documentation of <a href="trait.Buf.html#method.take"><code>take()</code></a> for more details.</p>
+</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Take%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/take.rs.html#19-130">source</a><a href="#impl-Take%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="struct" href="struct.Take.html" title="struct bytes::buf::Take">Take</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_inner" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/take.rs.html#39-41">source</a><h4 class="code-header">pub fn <a href="#method.into_inner" class="fnname">into_inner</a>(self) -&gt; T</h4></section></summary><div class="docblock"><p>Consumes this <code>Take</code>, returning the underlying value.</p>
+<h5 id="examples"><a href="#examples">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::{Buf, BufMut};
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="string">b&quot;hello world&quot;</span>.take(<span class="number">2</span>);
+<span class="kw">let </span><span class="kw-2">mut </span>dst = <span class="macro">vec!</span>[];
+
+dst.put(<span class="kw-2">&amp;mut </span>buf);
+<span class="macro">assert_eq!</span>(<span class="kw-2">*</span>dst, <span class="string">b&quot;he&quot;</span>[..]);
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = buf.into_inner();
+
+dst.clear();
+dst.put(<span class="kw-2">&amp;mut </span>buf);
+<span class="macro">assert_eq!</span>(<span class="kw-2">*</span>dst, <span class="string">b&quot;llo world&quot;</span>[..]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_ref" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/take.rs.html#56-58">source</a><h4 class="code-header">pub fn <a href="#method.get_ref" class="fnname">get_ref</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</h4></section></summary><div class="docblock"><p>Gets a reference to the underlying <code>Buf</code>.</p>
+<p>It is inadvisable to directly read from the underlying <code>Buf</code>.</p>
+<h5 id="examples-1"><a href="#examples-1">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span>buf = <span class="string">b&quot;hello world&quot;</span>.take(<span class="number">2</span>);
+
+<span class="macro">assert_eq!</span>(<span class="number">11</span>, buf.get_ref().remaining());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/take.rs.html#77-79">source</a><h4 class="code-header">pub fn <a href="#method.get_mut" class="fnname">get_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</h4></section></summary><div class="docblock"><p>Gets a mutable reference to the underlying <code>Buf</code>.</p>
+<p>It is inadvisable to directly read from the underlying <code>Buf</code>.</p>
+<h5 id="examples-2"><a href="#examples-2">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::{Buf, BufMut};
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="string">b&quot;hello world&quot;</span>.take(<span class="number">2</span>);
+<span class="kw">let </span><span class="kw-2">mut </span>dst = <span class="macro">vec!</span>[];
+
+buf.get_mut().advance(<span class="number">2</span>);
+
+dst.put(<span class="kw-2">&amp;mut </span>buf);
+<span class="macro">assert_eq!</span>(<span class="kw-2">*</span>dst, <span class="string">b&quot;ll&quot;</span>[..]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.limit" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/take.rs.html#99-101">source</a><h4 class="code-header">pub fn <a href="#method.limit" class="fnname">limit</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the maximum number of bytes that can be read.</p>
+<h5 id="note"><a href="#note">Note</a></h5>
+<p>If the inner <code>Buf</code> has fewer bytes than indicated by this method then
+that is the actual number of available bytes.</p>
+<h5 id="examples-3"><a href="#examples-3">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="string">b&quot;hello world&quot;</span>.take(<span class="number">2</span>);
+
+<span class="macro">assert_eq!</span>(<span class="number">2</span>, buf.limit());
+<span class="macro">assert_eq!</span>(<span class="string">b&#39;h&#39;</span>, buf.get_u8());
+<span class="macro">assert_eq!</span>(<span class="number">1</span>, buf.limit());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_limit" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/take.rs.html#127-129">source</a><h4 class="code-header">pub fn <a href="#method.set_limit" class="fnname">set_limit</a>(&amp;mut self, lim: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Sets the maximum number of bytes that can be read.</p>
+<h5 id="note-1"><a href="#note-1">Note</a></h5>
+<p>If the inner <code>Buf</code> has fewer bytes than <code>lim</code> then that is the actual
+number of available bytes.</p>
+<h5 id="examples-4"><a href="#examples-4">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::{Buf, BufMut};
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="string">b&quot;hello world&quot;</span>.take(<span class="number">2</span>);
+<span class="kw">let </span><span class="kw-2">mut </span>dst = <span class="macro">vec!</span>[];
+
+dst.put(<span class="kw-2">&amp;mut </span>buf);
+<span class="macro">assert_eq!</span>(<span class="kw-2">*</span>dst, <span class="string">b&quot;he&quot;</span>[..]);
+
+dst.clear();
+
+buf.set_limit(<span class="number">3</span>);
+dst.put(<span class="kw-2">&amp;mut </span>buf);
+<span class="macro">assert_eq!</span>(<span class="kw-2">*</span>dst, <span class="string">b&quot;llo&quot;</span>[..]);</code></pre></div>
+</div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Buf-for-Take%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/take.rs.html#132-155">source</a><a href="#impl-Buf-for-Take%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt; <a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> for <a class="struct" href="struct.Take.html" title="struct bytes::buf::Take">Take</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.remaining" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/take.rs.html#133-135">source</a><a href="#method.remaining" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#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></h4></section></summary><div class='docblock'>Returns the number of bytes between the current position and the end of
+the buffer. <a href="trait.Buf.html#tymethod.remaining">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunk" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/take.rs.html#137-140">source</a><a href="#method.chunk" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#tymethod.chunk" class="fnname">chunk</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section></summary><div class='docblock'>Returns a slice starting at the current position and of length between 0
+and <code>Buf::remaining()</code>. Note that this <em>can</em> return shorter slice (this allows
+non-continuous internal representation). <a href="trait.Buf.html#tymethod.chunk">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.advance" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/take.rs.html#142-146">source</a><a href="#method.advance" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#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>)</h4></section></summary><div class='docblock'>Advance the internal cursor of the Buf <a href="trait.Buf.html#tymethod.advance">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.copy_to_bytes" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/take.rs.html#148-154">source</a><a href="#method.copy_to_bytes" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.copy_to_bytes" class="fnname">copy_to_bytes</a>(&amp;mut self, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="../struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h4></section></summary><div class='docblock'>Consumes <code>len</code> bytes inside self and returns new instance of <code>Bytes</code>
+with this data. <a href="trait.Buf.html#method.copy_to_bytes">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunks_vectored" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#181-192">source</a><a href="#method.chunks_vectored" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.chunks_vectored" class="fnname">chunks_vectored</a>&lt;'a&gt;(&amp;'a self, dst: &amp;mut [<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a>&lt;'a&gt;]) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>std</code></strong> only.</div></span><div class='docblock'>Fills <code>dst</code> with potentially multiple slices starting at <code>self</code>’s
+current position. <a href="trait.Buf.html#method.chunks_vectored">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.has_remaining" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#243-245">source</a><a href="#method.has_remaining" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Returns true if there are any more bytes to consume <a href="trait.Buf.html#method.has_remaining">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.copy_to_slice" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#268-282">source</a><a href="#method.copy_to_slice" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.copy_to_slice" class="fnname">copy_to_slice</a>(&amp;mut self, dst: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section></summary><div class='docblock'>Copies bytes from <code>self</code> into <code>dst</code>. <a href="trait.Buf.html#method.copy_to_slice">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#300-307">source</a><a href="#method.get_u8" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an unsigned 8 bit integer from <code>self</code>. <a href="trait.Buf.html#method.get_u8">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#325-332">source</a><a href="#method.get_i8" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets a signed 8 bit integer from <code>self</code>. <a href="trait.Buf.html#method.get_i8">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u16" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#350-352">source</a><a href="#method.get_u16" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_u16" class="fnname">get_u16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h4></section></summary><div class='docblock'>Gets an unsigned 16 bit integer from <code>self</code> in big-endian byte order. <a href="trait.Buf.html#method.get_u16">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u16_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#370-372">source</a><a href="#method.get_u16_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an unsigned 16 bit integer from <code>self</code> in little-endian byte order. <a href="trait.Buf.html#method.get_u16_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u16_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#393-395">source</a><a href="#method.get_u16_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_u16_ne" class="fnname">get_u16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h4></section></summary><div class='docblock'>Gets an unsigned 16 bit integer from <code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_u16_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i16" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#413-415">source</a><a href="#method.get_i16" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_i16" class="fnname">get_i16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></h4></section></summary><div class='docblock'>Gets a signed 16 bit integer from <code>self</code> in big-endian byte order. <a href="trait.Buf.html#method.get_i16">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i16_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#433-435">source</a><a href="#method.get_i16_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets a signed 16 bit integer from <code>self</code> in little-endian byte order. <a href="trait.Buf.html#method.get_i16_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i16_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#456-458">source</a><a href="#method.get_i16_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_i16_ne" class="fnname">get_i16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></h4></section></summary><div class='docblock'>Gets a signed 16 bit integer from <code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_i16_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#476-478">source</a><a href="#method.get_u32" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_u32" class="fnname">get_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'>Gets an unsigned 32 bit integer from <code>self</code> in the big-endian byte order. <a href="trait.Buf.html#method.get_u32">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u32_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#496-498">source</a><a href="#method.get_u32_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an unsigned 32 bit integer from <code>self</code> in the little-endian byte order. <a href="trait.Buf.html#method.get_u32_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u32_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#519-521">source</a><a href="#method.get_u32_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_u32_ne" class="fnname">get_u32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'>Gets an unsigned 32 bit integer from <code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_u32_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#539-541">source</a><a href="#method.get_i32" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_i32" class="fnname">get_i32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section></summary><div class='docblock'>Gets a signed 32 bit integer from <code>self</code> in big-endian byte order. <a href="trait.Buf.html#method.get_i32">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i32_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#559-561">source</a><a href="#method.get_i32_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets a signed 32 bit integer from <code>self</code> in little-endian byte order. <a href="trait.Buf.html#method.get_i32_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i32_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#582-584">source</a><a href="#method.get_i32_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_i32_ne" class="fnname">get_i32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section></summary><div class='docblock'>Gets a signed 32 bit integer from <code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_i32_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#602-604">source</a><a href="#method.get_u64" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_u64" class="fnname">get_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section></summary><div class='docblock'>Gets an unsigned 64 bit integer from <code>self</code> in big-endian byte order. <a href="trait.Buf.html#method.get_u64">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u64_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#622-624">source</a><a href="#method.get_u64_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an unsigned 64 bit integer from <code>self</code> in little-endian byte order. <a href="trait.Buf.html#method.get_u64_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u64_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#645-647">source</a><a href="#method.get_u64_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_u64_ne" class="fnname">get_u64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section></summary><div class='docblock'>Gets an unsigned 64 bit integer from <code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_u64_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#665-667">source</a><a href="#method.get_i64" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_i64" class="fnname">get_i64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section></summary><div class='docblock'>Gets a signed 64 bit integer from <code>self</code> in big-endian byte order. <a href="trait.Buf.html#method.get_i64">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i64_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#685-687">source</a><a href="#method.get_i64_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets a signed 64 bit integer from <code>self</code> in little-endian byte order. <a href="trait.Buf.html#method.get_i64_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i64_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#708-710">source</a><a href="#method.get_i64_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_i64_ne" class="fnname">get_i64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section></summary><div class='docblock'>Gets a signed 64 bit integer from <code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_i64_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u128" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#728-730">source</a><a href="#method.get_u128" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_u128" class="fnname">get_u128</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></h4></section></summary><div class='docblock'>Gets an unsigned 128 bit integer from <code>self</code> in big-endian byte order. <a href="trait.Buf.html#method.get_u128">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u128_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#748-750">source</a><a href="#method.get_u128_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_u128_le" class="fnname">get_u128_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></h4></section></summary><div class='docblock'>Gets an unsigned 128 bit integer from <code>self</code> in little-endian byte order. <a href="trait.Buf.html#method.get_u128_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u128_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#771-773">source</a><a href="#method.get_u128_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_u128_ne" class="fnname">get_u128_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></h4></section></summary><div class='docblock'>Gets an unsigned 128 bit integer from <code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_u128_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i128" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#791-793">source</a><a href="#method.get_i128" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_i128" class="fnname">get_i128</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a></h4></section></summary><div class='docblock'>Gets a signed 128 bit integer from <code>self</code> in big-endian byte order. <a href="trait.Buf.html#method.get_i128">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i128_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#811-813">source</a><a href="#method.get_i128_le" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_i128_le" class="fnname">get_i128_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a></h4></section></summary><div class='docblock'>Gets a signed 128 bit integer from <code>self</code> in little-endian byte order. <a href="trait.Buf.html#method.get_i128_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i128_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#834-836">source</a><a href="#method.get_i128_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_i128_ne" class="fnname">get_i128_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a></h4></section></summary><div class='docblock'>Gets a signed 128 bit integer from <code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_i128_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_uint" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#854-856">source</a><a href="#method.get_uint" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_uint" class="fnname">get_uint</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></h4></section></summary><div class='docblock'>Gets an unsigned n-byte integer from <code>self</code> in big-endian byte order. <a href="trait.Buf.html#method.get_uint">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_uint_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#874-876">source</a><a href="#method.get_uint_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an unsigned n-byte integer from <code>self</code> in little-endian byte order. <a href="trait.Buf.html#method.get_uint_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_uint_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#898-904">source</a><a href="#method.get_uint_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_uint_ne" class="fnname">get_uint_ne</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></h4></section></summary><div class='docblock'>Gets an unsigned n-byte integer from <code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_uint_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_int" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#923-925">source</a><a href="#method.get_int" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_int" class="fnname">get_int</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></h4></section></summary><div class='docblock'>Gets a signed n-byte integer from <code>self</code> in big-endian byte order. <a href="trait.Buf.html#method.get_int">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_int_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#944-946">source</a><a href="#method.get_int_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets a signed n-byte integer from <code>self</code> in little-endian byte order. <a href="trait.Buf.html#method.get_int_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_int_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#968-974">source</a><a href="#method.get_int_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_int_ne" class="fnname">get_int_ne</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></h4></section></summary><div class='docblock'>Gets a signed n-byte integer from <code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_int_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#993-995">source</a><a href="#method.get_f32" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_f32" class="fnname">get_f32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></h4></section></summary><div class='docblock'>Gets an IEEE754 single-precision (4 bytes) floating point number from
+<code>self</code> in big-endian byte order. <a href="trait.Buf.html#method.get_f32">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f32_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1014-1016">source</a><a href="#method.get_f32_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an IEEE754 single-precision (4 bytes) floating point number from
+<code>self</code> in little-endian byte order. <a href="trait.Buf.html#method.get_f32_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f32_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1038-1040">source</a><a href="#method.get_f32_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_f32_ne" class="fnname">get_f32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></h4></section></summary><div class='docblock'>Gets an IEEE754 single-precision (4 bytes) floating point number from
+<code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_f32_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1059-1061">source</a><a href="#method.get_f64" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_f64" class="fnname">get_f64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></h4></section></summary><div class='docblock'>Gets an IEEE754 double-precision (8 bytes) floating point number from
+<code>self</code> in big-endian byte order. <a href="trait.Buf.html#method.get_f64">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f64_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1080-1082">source</a><a href="#method.get_f64_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an IEEE754 double-precision (8 bytes) floating point number from
+<code>self</code> in little-endian byte order. <a href="trait.Buf.html#method.get_f64_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f64_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1104-1106">source</a><a href="#method.get_f64_ne" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.get_f64_ne" class="fnname">get_f64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></h4></section></summary><div class='docblock'>Gets an IEEE754 double-precision (8 bytes) floating point number from
+<code>self</code> in native-endian byte order. <a href="trait.Buf.html#method.get_f64_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1160-1165">source</a><a href="#method.take" class="anchor"></a><h4 class="code-header">fn <a href="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="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>,</span></h4></section></summary><div class='docblock'>Creates an adaptor which will read at most <code>limit</code> bytes from <code>self</code>. <a href="trait.Buf.html#method.take">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chain" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1182-1187">source</a><a href="#method.chain" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.chain" class="fnname">chain</a>&lt;U:&nbsp;<a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt;(self, next: U) -&gt; <a class="struct" href="struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;Self, U&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>,</span></h4></section></summary><div class='docblock'>Creates an adaptor which will chain this buffer with another. <a href="trait.Buf.html#method.chain">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.reader" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1214-1219">source</a><a href="#method.reader" class="anchor"></a><h4 class="code-header">fn <a href="trait.Buf.html#method.reader" class="fnname">reader</a>(self) -&gt; <a class="struct" href="struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;Self&gt;<span class="notable-traits" data-ty="Reader&lt;Self&gt;"><span class="notable-traits-tooltip">ⓘ</span></span><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>,</span></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>std</code></strong> only.</div></span><div class='docblock'>Creates an adaptor which implements the <code>Read</code> trait for <code>self</code>. <a href="trait.Buf.html#method.reader">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-Take%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/take.rs.html#9">source</a><a href="#impl-Debug-for-Take%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Take.html" title="struct bytes::buf::Take">Take</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/take.rs.html#9">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Take%3CT%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-Take%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Take.html" title="struct bytes::buf::Take">Take</a>&lt;T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</span></h3></section><section id="impl-Send-for-Take%3CT%3E" class="impl has-srclink"><a href="#impl-Send-for-Take%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Take.html" title="struct bytes::buf::Take">Take</a>&lt;T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</span></h3></section><section id="impl-Sync-for-Take%3CT%3E" class="impl has-srclink"><a href="#impl-Sync-for-Take%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Take.html" title="struct bytes::buf::Take">Take</a>&lt;T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</span></h3></section><section id="impl-Unpin-for-Take%3CT%3E" class="impl has-srclink"><a href="#impl-Unpin-for-Take%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Take.html" title="struct bytes::buf::Take">Take</a>&lt;T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</span></h3></section><section id="impl-UnwindSafe-for-Take%3CT%3E" class="impl has-srclink"><a href="#impl-UnwindSafe-for-Take%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Take.html" title="struct bytes::buf::Take">Take</a>&lt;T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</span></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-Take%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-Take%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-Take%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-Take%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-Take%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-Take%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-Take%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-Take%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
+</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-Take%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-Take%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
+<p>That is, this conversion is whatever the implementation of
+<code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
+</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-Take%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-Take%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-Take%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-Take%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div><script type="text/json" id="notable-traits-data">{"&[u8]":"<h3 class=\"notable\">Notable traits for <code>&amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for &amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span>","Reader<Self>":"<h3 class=\"notable\">Notable traits for <code><a class=\"struct\" href=\"struct.Reader.html\" title=\"struct bytes::buf::Reader\">Reader</a>&lt;B&gt;</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl&lt;B:&nbsp;<a class=\"trait\" href=\"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=\"struct.Reader.html\" title=\"struct bytes::buf::Reader\">Reader</a>&lt;B&gt;</span>"}</script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/bytes/buf/struct.UninitSlice.html b/bytes/buf/struct.UninitSlice.html
new file mode 100644
index 0000000..a9f143c
--- /dev/null
+++ b/bytes/buf/struct.UninitSlice.html
@@ -0,0 +1,100 @@
+<!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="Uninitialized byte slice."><meta name="keywords" content="rust, rustlang, rust-lang, UninitSlice"><title>UninitSlice in bytes::buf - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2 class="location"><a href="#">UninitSlice</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.as_mut_ptr">as_mut_ptr</a></li><li><a href="#method.as_uninit_slice_mut">as_uninit_slice_mut</a></li><li><a href="#method.copy_from_slice">copy_from_slice</a></li><li><a href="#method.from_raw_parts_mut">from_raw_parts_mut</a></li><li><a href="#method.len">len</a></li><li><a href="#method.new">new</a></li><li><a href="#method.uninit">uninit</a></li><li><a href="#method.write_byte">write_byte</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Debug-for-UninitSlice">Debug</a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BMaybeUninit%3Cu8%3E%5D%3E-for-%26%27a%20mut%20UninitSlice">From&lt;&amp;&#39;a mut [MaybeUninit&lt;u8&gt;]&gt;</a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5Bu8%5D%3E-for-%26%27a%20mut%20UninitSlice">From&lt;&amp;&#39;a mut [u8]&gt;</a></li><li><a href="#impl-Index%3CRange%3Cusize%3E%3E-for-UninitSlice">Index&lt;Range&lt;usize&gt;&gt;</a></li><li><a href="#impl-Index%3CRangeFrom%3Cusize%3E%3E-for-UninitSlice">Index&lt;RangeFrom&lt;usize&gt;&gt;</a></li><li><a href="#impl-Index%3CRangeFull%3E-for-UninitSlice">Index&lt;RangeFull&gt;</a></li><li><a href="#impl-Index%3CRangeInclusive%3Cusize%3E%3E-for-UninitSlice">Index&lt;RangeInclusive&lt;usize&gt;&gt;</a></li><li><a href="#impl-Index%3CRangeTo%3Cusize%3E%3E-for-UninitSlice">Index&lt;RangeTo&lt;usize&gt;&gt;</a></li><li><a href="#impl-Index%3CRangeToInclusive%3Cusize%3E%3E-for-UninitSlice">Index&lt;RangeToInclusive&lt;usize&gt;&gt;</a></li><li><a href="#impl-IndexMut%3CRange%3Cusize%3E%3E-for-UninitSlice">IndexMut&lt;Range&lt;usize&gt;&gt;</a></li><li><a href="#impl-IndexMut%3CRangeFrom%3Cusize%3E%3E-for-UninitSlice">IndexMut&lt;RangeFrom&lt;usize&gt;&gt;</a></li><li><a href="#impl-IndexMut%3CRangeFull%3E-for-UninitSlice">IndexMut&lt;RangeFull&gt;</a></li><li><a href="#impl-IndexMut%3CRangeInclusive%3Cusize%3E%3E-for-UninitSlice">IndexMut&lt;RangeInclusive&lt;usize&gt;&gt;</a></li><li><a href="#impl-IndexMut%3CRangeTo%3Cusize%3E%3E-for-UninitSlice">IndexMut&lt;RangeTo&lt;usize&gt;&gt;</a></li><li><a href="#impl-IndexMut%3CRangeToInclusive%3Cusize%3E%3E-for-UninitSlice">IndexMut&lt;RangeToInclusive&lt;usize&gt;&gt;</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-UninitSlice">RefUnwindSafe</a></li><li><a href="#impl-Send-for-UninitSlice">Send</a></li><li><a href="#impl-Sized-for-UninitSlice">!Sized</a></li><li><a href="#impl-Sync-for-UninitSlice">Sync</a></li><li><a href="#impl-Unpin-for-UninitSlice">Unpin</a></li><li><a href="#impl-UnwindSafe-for-UninitSlice">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-UninitSlice">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-UninitSlice">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-UninitSlice">BorrowMut&lt;T&gt;</a></li></ul></section><h2><a href="index.html">In bytes::buf</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../index.html">bytes</a>::<wbr><a href="index.html">buf</a>::<wbr><a class="struct" href="#">UninitSlice</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/bytes/buf/uninit_slice.rs.html#22">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><div class="item-decl"><pre class="rust struct"><code><div class="code-attribute">#[repr(transparent)]</div>pub struct UninitSlice(_);</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Uninitialized byte slice.</p>
+<p>Returned by <code>BufMut::chunk_mut()</code>, the referenced byte slice may be
+uninitialized. The wrapper provides safe access without introducing
+undefined behavior.</p>
+<p>The safety invariants of this wrapper are:</p>
+<ol>
+<li>Reading from an <code>UninitSlice</code> is undefined behavior.</li>
+<li>Writing uninitialized bytes to an <code>UninitSlice</code> is undefined behavior.</li>
+</ol>
+<p>The difference between <code>&amp;mut UninitSlice</code> and <code>&amp;mut [MaybeUninit&lt;u8&gt;]</code> is
+that it is possible in safe code to write uninitialized bytes to an
+<code>&amp;mut [MaybeUninit&lt;u8&gt;]</code>, which this type prohibits.</p>
+</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-UninitSlice" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#24-208">source</a><a href="#impl-UninitSlice" class="anchor"></a><h3 class="code-header">impl <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#36-38">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>(slice: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; &amp;mut <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class="docblock"><p>Creates a <code>&amp;mut UninitSlice</code> wrapping a slice of initialised memory.</p>
+<h5 id="examples"><a href="#examples">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::buf::UninitSlice;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buffer = [<span class="number">0u8</span>; <span class="number">64</span>];
+<span class="kw">let </span>slice = UninitSlice::new(<span class="kw-2">&amp;mut </span>buffer[..]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.uninit" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#55-57">source</a><h4 class="code-header">pub fn <a href="#method.uninit" class="fnname">uninit</a>(slice: &amp;mut [<a class="union" href="https://doc.rust-lang.org/nightly/core/mem/maybe_uninit/union.MaybeUninit.html" title="union core::mem::maybe_uninit::MaybeUninit">MaybeUninit</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;]) -&gt; &amp;mut <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class="docblock"><p>Creates a <code>&amp;mut UninitSlice</code> wrapping a slice of uninitialised memory.</p>
+<h5 id="examples-1"><a href="#examples-1">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::buf::UninitSlice;
+<span class="kw">use </span>core::mem::MaybeUninit;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buffer = [MaybeUninit::uninit(); <span class="number">64</span>];
+<span class="kw">let </span>slice = UninitSlice::uninit(<span class="kw-2">&amp;mut </span>buffer[..]);
+
+<span class="kw">let </span><span class="kw-2">mut </span>vec = Vec::with_capacity(<span class="number">1024</span>);
+<span class="kw">let </span>spare: <span class="kw-2">&amp;mut </span>UninitSlice = vec.spare_capacity_mut().into();</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_raw_parts_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#82-86">source</a><h4 class="code-header">pub unsafe fn <a href="#method.from_raw_parts_mut" class="fnname">from_raw_parts_mut</a>&lt;'a&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;ptr: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -&gt; &amp;'a mut <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class="docblock"><p>Create a <code>&amp;mut UninitSlice</code> from a pointer and a length.</p>
+<h5 id="safety"><a href="#safety">Safety</a></h5>
+<p>The caller must ensure that <code>ptr</code> references a valid memory region owned
+by the caller representing a byte slice for the duration of <code>'a</code>.</p>
+<h5 id="examples-2"><a href="#examples-2">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::buf::UninitSlice;
+
+<span class="kw">let </span>bytes = <span class="string">b&quot;hello world&quot;</span>.to_vec();
+<span class="kw">let </span>ptr = bytes.as_ptr() <span class="kw">as </span><span class="kw-2">*mut </span><span class="kw">_</span>;
+<span class="kw">let </span>len = bytes.len();
+
+<span class="kw">let </span>slice = <span class="kw">unsafe </span>{ UninitSlice::from_raw_parts_mut(ptr, len) };</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.write_byte" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#107-111">source</a><h4 class="code-header">pub fn <a href="#method.write_byte" class="fnname">write_byte</a>(&amp;mut self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, byte: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>)</h4></section></summary><div class="docblock"><p>Write a single byte at the specified offset.</p>
+<h5 id="panics"><a href="#panics">Panics</a></h5>
+<p>The function panics if <code>index</code> is out of bounds.</p>
+<h5 id="examples-3"><a href="#examples-3">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::buf::UninitSlice;
+
+<span class="kw">let </span><span class="kw-2">mut </span>data = [<span class="string">b&#39;f&#39;</span>, <span class="string">b&#39;o&#39;</span>, <span class="string">b&#39;o&#39;</span>];
+<span class="kw">let </span>slice = <span class="kw">unsafe </span>{ UninitSlice::from_raw_parts_mut(data.as_mut_ptr(), <span class="number">3</span>) };
+
+slice.write_byte(<span class="number">0</span>, <span class="string">b&#39;b&#39;</span>);
+
+<span class="macro">assert_eq!</span>(<span class="string">b&quot;boo&quot;</span>, <span class="kw-2">&amp;</span>data[..]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.copy_from_slice" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#134-142">source</a><h4 class="code-header">pub fn <a href="#method.copy_from_slice" class="fnname">copy_from_slice</a>(&amp;mut self, src: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section></summary><div class="docblock"><p>Copies bytes from <code>src</code> into <code>self</code>.</p>
+<p>The length of <code>src</code> must be the same as <code>self</code>.</p>
+<h5 id="panics-1"><a href="#panics-1">Panics</a></h5>
+<p>The function panics if <code>src</code> has a different length than <code>self</code>.</p>
+<h5 id="examples-4"><a href="#examples-4">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::buf::UninitSlice;
+
+<span class="kw">let </span><span class="kw-2">mut </span>data = [<span class="string">b&#39;f&#39;</span>, <span class="string">b&#39;o&#39;</span>, <span class="string">b&#39;o&#39;</span>];
+<span class="kw">let </span>slice = <span class="kw">unsafe </span>{ UninitSlice::from_raw_parts_mut(data.as_mut_ptr(), <span class="number">3</span>) };
+
+slice.copy_from_slice(<span class="string">b&quot;bar&quot;</span>);
+
+<span class="macro">assert_eq!</span>(<span class="string">b&quot;bar&quot;</span>, <span class="kw-2">&amp;</span>data[..]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut_ptr" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#161-163">source</a><h4 class="code-header">pub fn <a href="#method.as_mut_ptr" class="fnname">as_mut_ptr</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></h4></section></summary><div class="docblock"><p>Return a raw pointer to the slice’s buffer.</p>
+<h5 id="safety-1"><a href="#safety-1">Safety</a></h5>
+<p>The caller <strong>must not</strong> read from the referenced memory and <strong>must not</strong>
+write <strong>uninitialized</strong> bytes to the slice either.</p>
+<h5 id="examples-5"><a href="#examples-5">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>data = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>slice = <span class="kw-2">&amp;mut </span>data[..];
+<span class="kw">let </span>ptr = BufMut::chunk_mut(<span class="kw-2">&amp;mut </span>slice).as_mut_ptr();</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_uninit_slice_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#187-189">source</a><h4 class="code-header">pub unsafe fn <a href="#method.as_uninit_slice_mut" class="fnname">as_uninit_slice_mut</a>(&amp;mut self) -&gt; &amp;mut [<a class="union" href="https://doc.rust-lang.org/nightly/core/mem/maybe_uninit/union.MaybeUninit.html" title="union core::mem::maybe_uninit::MaybeUninit">MaybeUninit</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;]</h4></section></summary><div class="docblock"><p>Return a <code>&amp;mut [MaybeUninit&lt;u8&gt;]</code> to this slice’s buffer.</p>
+<h5 id="safety-2"><a href="#safety-2">Safety</a></h5>
+<p>The caller <strong>must not</strong> read from the referenced memory and <strong>must not</strong> write
+<strong>uninitialized</strong> bytes to the slice either. This is because <code>BufMut</code> implementation
+that created the <code>UninitSlice</code> knows which parts are initialized. Writing uninitialized
+bytes to the slice may cause the <code>BufMut</code> to read those bytes and trigger undefined
+behavior.</p>
+<h5 id="examples-6"><a href="#examples-6">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>data = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>slice = <span class="kw-2">&amp;mut </span>data[..];
+<span class="kw">unsafe </span>{
+ <span class="kw">let </span>uninit_slice = BufMut::chunk_mut(<span class="kw-2">&amp;mut </span>slice).as_uninit_slice_mut();
+};</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.len" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#205-207">source</a><h4 class="code-header">pub fn <a href="#method.len" class="fnname">len</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the number of bytes in the slice.</p>
+<h5 id="examples-7"><a href="#examples-7">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>data = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>slice = <span class="kw-2">&amp;mut </span>data[..];
+<span class="kw">let </span>len = BufMut::chunk_mut(<span class="kw-2">&amp;mut </span>slice).len();
+
+<span class="macro">assert_eq!</span>(len, <span class="number">3</span>);</code></pre></div>
+</div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-UninitSlice" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#210-214">source</a><a href="#impl-Debug-for-UninitSlice" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#211-213">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, fmt: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BMaybeUninit%3Cu8%3E%5D%3E-for-%26%27a%20mut%20UninitSlice" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#222-226">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BMaybeUninit%3Cu8%3E%5D%3E-for-%26%27a%20mut%20UninitSlice" class="anchor"></a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;&amp;'a mut [<a class="union" href="https://doc.rust-lang.org/nightly/core/mem/maybe_uninit/union.MaybeUninit.html" title="union core::mem::maybe_uninit::MaybeUninit">MaybeUninit</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;]&gt; for &amp;'a mut <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#223-225">source</a><a href="#method.from-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(slice: &amp;'a mut [<a class="union" href="https://doc.rust-lang.org/nightly/core/mem/maybe_uninit/union.MaybeUninit.html" title="union core::mem::maybe_uninit::MaybeUninit">MaybeUninit</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;]) -&gt; Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5Bu8%5D%3E-for-%26%27a%20mut%20UninitSlice" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#216-220">source</a><a href="#impl-From%3C%26%27a%20mut%20%5Bu8%5D%3E-for-%26%27a%20mut%20UninitSlice" class="anchor"></a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;&amp;'a mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt; for &amp;'a mut <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#217-219">source</a><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(slice: &amp;'a mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Index%3CRange%3Cusize%3E%3E-for-UninitSlice" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#impl-Index%3CRange%3Cusize%3E%3E-for-UninitSlice" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;&gt; for <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class='docblock'>The returned type after indexing.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.index" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#method.index" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index" class="fnname">index</a>(&amp;self, index: <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;) -&gt; &amp;<a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class='docblock'>Performs the indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Index%3CRangeFrom%3Cusize%3E%3E-for-UninitSlice" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#impl-Index%3CRangeFrom%3Cusize%3E%3E-for-UninitSlice" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeFrom.html" title="struct core::ops::range::RangeFrom">RangeFrom</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;&gt; for <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class='docblock'>The returned type after indexing.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.index-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#method.index-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index" class="fnname">index</a>(&amp;self, index: <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeFrom.html" title="struct core::ops::range::RangeFrom">RangeFrom</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;) -&gt; &amp;<a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class='docblock'>Performs the indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Index%3CRangeFull%3E-for-UninitSlice" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#impl-Index%3CRangeFull%3E-for-UninitSlice" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeFull.html" title="struct core::ops::range::RangeFull">RangeFull</a>&gt; for <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-2" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-2" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class='docblock'>The returned type after indexing.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.index-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#method.index-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index" class="fnname">index</a>(&amp;self, index: <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeFull.html" title="struct core::ops::range::RangeFull">RangeFull</a>) -&gt; &amp;<a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class='docblock'>Performs the indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Index%3CRangeInclusive%3Cusize%3E%3E-for-UninitSlice" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#impl-Index%3CRangeInclusive%3Cusize%3E%3E-for-UninitSlice" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeInclusive.html" title="struct core::ops::range::RangeInclusive">RangeInclusive</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;&gt; for <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-3" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-3" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class='docblock'>The returned type after indexing.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.index-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#method.index-3" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index" class="fnname">index</a>(&amp;self, index: <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeInclusive.html" title="struct core::ops::range::RangeInclusive">RangeInclusive</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;) -&gt; &amp;<a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class='docblock'>Performs the indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Index%3CRangeTo%3Cusize%3E%3E-for-UninitSlice" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#impl-Index%3CRangeTo%3Cusize%3E%3E-for-UninitSlice" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeTo.html" title="struct core::ops::range::RangeTo">RangeTo</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;&gt; for <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-4" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-4" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class='docblock'>The returned type after indexing.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.index-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#method.index-4" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index" class="fnname">index</a>(&amp;self, index: <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeTo.html" title="struct core::ops::range::RangeTo">RangeTo</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;) -&gt; &amp;<a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class='docblock'>Performs the indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Index%3CRangeToInclusive%3Cusize%3E%3E-for-UninitSlice" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#impl-Index%3CRangeToInclusive%3Cusize%3E%3E-for-UninitSlice" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeToInclusive.html" title="struct core::ops::range::RangeToInclusive">RangeToInclusive</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;&gt; for <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-5" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-5" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class='docblock'>The returned type after indexing.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.index-5" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#method.index-5" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index" class="fnname">index</a>(&amp;self, index: <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeToInclusive.html" title="struct core::ops::range::RangeToInclusive">RangeToInclusive</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;) -&gt; &amp;<a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class='docblock'>Performs the indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-IndexMut%3CRange%3Cusize%3E%3E-for-UninitSlice" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#impl-IndexMut%3CRange%3Cusize%3E%3E-for-UninitSlice" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;&gt; for <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.index_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#method.index_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html#tymethod.index_mut" class="fnname">index_mut</a>(&amp;mut self, index: <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;) -&gt; &amp;mut <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class='docblock'>Performs the mutable indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html#tymethod.index_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-IndexMut%3CRangeFrom%3Cusize%3E%3E-for-UninitSlice" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#impl-IndexMut%3CRangeFrom%3Cusize%3E%3E-for-UninitSlice" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeFrom.html" title="struct core::ops::range::RangeFrom">RangeFrom</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;&gt; for <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.index_mut-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#method.index_mut-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html#tymethod.index_mut" class="fnname">index_mut</a>(&amp;mut self, index: <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeFrom.html" title="struct core::ops::range::RangeFrom">RangeFrom</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;) -&gt; &amp;mut <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class='docblock'>Performs the mutable indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html#tymethod.index_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-IndexMut%3CRangeFull%3E-for-UninitSlice" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#impl-IndexMut%3CRangeFull%3E-for-UninitSlice" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeFull.html" title="struct core::ops::range::RangeFull">RangeFull</a>&gt; for <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.index_mut-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#method.index_mut-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html#tymethod.index_mut" class="fnname">index_mut</a>(&amp;mut self, index: <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeFull.html" title="struct core::ops::range::RangeFull">RangeFull</a>) -&gt; &amp;mut <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class='docblock'>Performs the mutable indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html#tymethod.index_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-IndexMut%3CRangeInclusive%3Cusize%3E%3E-for-UninitSlice" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#impl-IndexMut%3CRangeInclusive%3Cusize%3E%3E-for-UninitSlice" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeInclusive.html" title="struct core::ops::range::RangeInclusive">RangeInclusive</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;&gt; for <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.index_mut-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#method.index_mut-3" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html#tymethod.index_mut" class="fnname">index_mut</a>(&amp;mut self, index: <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeInclusive.html" title="struct core::ops::range::RangeInclusive">RangeInclusive</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;) -&gt; &amp;mut <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class='docblock'>Performs the mutable indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html#tymethod.index_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-IndexMut%3CRangeTo%3Cusize%3E%3E-for-UninitSlice" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#impl-IndexMut%3CRangeTo%3Cusize%3E%3E-for-UninitSlice" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeTo.html" title="struct core::ops::range::RangeTo">RangeTo</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;&gt; for <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.index_mut-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#method.index_mut-4" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html#tymethod.index_mut" class="fnname">index_mut</a>(&amp;mut self, index: <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeTo.html" title="struct core::ops::range::RangeTo">RangeTo</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;) -&gt; &amp;mut <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class='docblock'>Performs the mutable indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html#tymethod.index_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-IndexMut%3CRangeToInclusive%3Cusize%3E%3E-for-UninitSlice" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#impl-IndexMut%3CRangeToInclusive%3Cusize%3E%3E-for-UninitSlice" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeToInclusive.html" title="struct core::ops::range::RangeToInclusive">RangeToInclusive</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;&gt; for <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.index_mut-5" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/uninit_slice.rs.html#250-257">source</a><a href="#method.index_mut-5" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html#tymethod.index_mut" class="fnname">index_mut</a>(&amp;mut self, index: <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeToInclusive.html" title="struct core::ops::range::RangeToInclusive">RangeToInclusive</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;) -&gt; &amp;mut <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class='docblock'>Performs the mutable indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html#tymethod.index_mut">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-UninitSlice" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-UninitSlice" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h3></section><section id="impl-Send-for-UninitSlice" class="impl has-srclink"><a href="#impl-Send-for-UninitSlice" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h3></section><section id="impl-Sized-for-UninitSlice" class="impl has-srclink"><a href="#impl-Sized-for-UninitSlice" class="anchor"></a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> for <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h3></section><section id="impl-Sync-for-UninitSlice" class="impl has-srclink"><a href="#impl-Sync-for-UninitSlice" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h3></section><section id="impl-Unpin-for-UninitSlice" class="impl has-srclink"><a href="#impl-Unpin-for-UninitSlice" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h3></section><section id="impl-UnwindSafe-for-UninitSlice" class="impl has-srclink"><a href="#impl-UnwindSafe-for-UninitSlice" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-UninitSlice" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-UninitSlice" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-UninitSlice" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-UninitSlice" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-UninitSlice" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-UninitSlice" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/bytes/buf/struct.Writer.html b/bytes/buf/struct.Writer.html
new file mode 100644
index 0000000..8e3d1e1
--- /dev/null
+++ b/bytes/buf/struct.Writer.html
@@ -0,0 +1,42 @@
+<!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="A `BufMut` adapter which implements `io::Write` for the inner value."><meta name="keywords" content="rust, rustlang, rust-lang, Writer"><title>Writer in bytes::buf - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2 class="location"><a href="#">Writer</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.get_mut">get_mut</a></li><li><a href="#method.get_ref">get_ref</a></li><li><a href="#method.into_inner">into_inner</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Debug-for-Writer%3CB%3E">Debug</a></li><li><a href="#impl-Write-for-Writer%3CB%3E">Write</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-Writer%3CB%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Writer%3CB%3E">Send</a></li><li><a href="#impl-Sync-for-Writer%3CB%3E">Sync</a></li><li><a href="#impl-Unpin-for-Writer%3CB%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Writer%3CB%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-Writer%3CB%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-Writer%3CB%3E">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-Writer%3CB%3E">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-From%3CT%3E-for-Writer%3CB%3E">From&lt;T&gt;</a></li><li><a href="#impl-Into%3CU%3E-for-Writer%3CB%3E">Into&lt;U&gt;</a></li><li><a href="#impl-TryFrom%3CU%3E-for-Writer%3CB%3E">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-Writer%3CB%3E">TryInto&lt;U&gt;</a></li></ul></section><h2><a href="index.html">In bytes::buf</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../index.html">bytes</a>::<wbr><a href="index.html">buf</a>::<wbr><a class="struct" href="#">Writer</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/bytes/buf/writer.rs.html#11-13">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct Writer&lt;B&gt; { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A <code>BufMut</code> adapter which implements <code>io::Write</code> for the inner value.</p>
+<p>This struct is generally created by calling <code>writer()</code> on <code>BufMut</code>. See
+documentation of <a href="trait.BufMut.html#method.writer"><code>writer()</code></a> for more
+details.</p>
+</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Writer%3CB%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/writer.rs.html#19-75">source</a><a href="#impl-Writer%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;B:&nbsp;<a class="trait" href="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a>&gt; <a class="struct" href="struct.Writer.html" title="struct bytes::buf::Writer">Writer</a>&lt;B&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_ref" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/writer.rs.html#33-35">source</a><h4 class="code-header">pub fn <a href="#method.get_ref" class="fnname">get_ref</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>B</h4></section></summary><div class="docblock"><p>Gets a reference to the underlying <code>BufMut</code>.</p>
+<p>It is inadvisable to directly write to the underlying <code>BufMut</code>.</p>
+<h5 id="examples"><a href="#examples">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span>buf = Vec::with_capacity(<span class="number">1024</span>).writer();
+
+<span class="macro">assert_eq!</span>(<span class="number">1024</span>, buf.get_ref().capacity());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/writer.rs.html#52-54">source</a><h4 class="code-header">pub fn <a href="#method.get_mut" class="fnname">get_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>B</h4></section></summary><div class="docblock"><p>Gets a mutable reference to the underlying <code>BufMut</code>.</p>
+<p>It is inadvisable to directly write to the underlying <code>BufMut</code>.</p>
+<h5 id="examples-1"><a href="#examples-1">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[].writer();
+
+buf.get_mut().reserve(<span class="number">1024</span>);
+
+<span class="macro">assert_eq!</span>(<span class="number">1024</span>, buf.get_ref().capacity());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_inner" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/writer.rs.html#72-74">source</a><h4 class="code-header">pub fn <a href="#method.into_inner" class="fnname">into_inner</a>(self) -&gt; B</h4></section></summary><div class="docblock"><p>Consumes this <code>Writer</code>, returning the underlying value.</p>
+<h5 id="examples-2"><a href="#examples-2">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+<span class="kw">use </span>std::io;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[].writer();
+<span class="kw">let </span><span class="kw-2">mut </span>src = <span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..];
+
+io::copy(<span class="kw-2">&amp;mut </span>src, <span class="kw-2">&amp;mut </span>buf).unwrap();
+
+<span class="kw">let </span>buf = buf.into_inner();
+<span class="macro">assert_eq!</span>(<span class="kw-2">*</span>buf, <span class="string">b&quot;hello world&quot;</span>[..]);</code></pre></div>
+</div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-Writer%3CB%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/writer.rs.html#10">source</a><a href="#impl-Debug-for-Writer%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;B:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Writer.html" title="struct bytes::buf::Writer">Writer</a>&lt;B&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/writer.rs.html#10">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Write-for-Writer%3CB%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/writer.rs.html#77-88">source</a><a href="#impl-Write-for-Writer%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;B:&nbsp;<a class="trait" href="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</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.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="struct.Writer.html" title="struct bytes::buf::Writer">Writer</a>&lt;B&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.write" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/writer.rs.html#78-83">source</a><a href="#method.write" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#tymethod.write" class="fnname">write</a>(&amp;mut self, src: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;</h4></section></summary><div class='docblock'>Write a buffer into this writer, returning how many bytes were written. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#tymethod.write">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.flush" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/writer.rs.html#85-87">source</a><a href="#method.flush" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#tymethod.flush" class="fnname">flush</a>(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</h4></section></summary><div class='docblock'>Flush this output stream, ensuring that all intermediately buffered
+contents reach their destination. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#tymethod.flush">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.write_vectored" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.36.0">1.36.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#1463">source</a></span><a href="#method.write_vectored" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_vectored" class="fnname">write_vectored</a>(&amp;mut self, bufs: &amp;[<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a>&lt;'_&gt;]) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Like <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#tymethod.write"><code>write</code></a>, except that it writes from a slice of buffers. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_vectored">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_write_vectored" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#1478">source</a><a href="#method.is_write_vectored" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.is_write_vectored" class="fnname">is_write_vectored</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>can_vector</code>)</span></div></span><div class='docblock'>Determines if this <code>Write</code>r has an efficient <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_vectored"><code>write_vectored</code></a>
+implementation. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.is_write_vectored">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.write_all" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#1540">source</a></span><a href="#method.write_all" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_all" class="fnname">write_all</a>(&amp;mut self, buf: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Attempts to write an entire buffer into this writer. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_all">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.write_all_vectored" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#1605">source</a><a href="#method.write_all_vectored" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_all_vectored" class="fnname">write_all_vectored</a>(&amp;mut self, bufs: &amp;mut [<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a>&lt;'_&gt;]) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>write_all_vectored</code>)</span></div></span><div class='docblock'>Attempts to write multiple buffers into this writer. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_all_vectored">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.write_fmt" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#1661">source</a></span><a href="#method.write_fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_fmt" class="fnname">write_fmt</a>(&amp;mut self, fmt: <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Arguments.html" title="struct core::fmt::Arguments">Arguments</a>&lt;'_&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Writes a formatted string into this writer, returning any error
+encountered. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_fmt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.by_ref" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#1717-1719">source</a></span><a href="#method.by_ref" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.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>,</span></h4></section></summary><div class='docblock'>Creates a “by reference” adapter for this instance of <code>Write</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.by_ref">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Writer%3CB%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-Writer%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;B&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Writer.html" title="struct bytes::buf::Writer">Writer</a>&lt;B&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</span></h3></section><section id="impl-Send-for-Writer%3CB%3E" class="impl has-srclink"><a href="#impl-Send-for-Writer%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;B&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Writer.html" title="struct bytes::buf::Writer">Writer</a>&lt;B&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</span></h3></section><section id="impl-Sync-for-Writer%3CB%3E" class="impl has-srclink"><a href="#impl-Sync-for-Writer%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;B&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Writer.html" title="struct bytes::buf::Writer">Writer</a>&lt;B&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</span></h3></section><section id="impl-Unpin-for-Writer%3CB%3E" class="impl has-srclink"><a href="#impl-Unpin-for-Writer%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;B&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Writer.html" title="struct bytes::buf::Writer">Writer</a>&lt;B&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</span></h3></section><section id="impl-UnwindSafe-for-Writer%3CB%3E" class="impl has-srclink"><a href="#impl-UnwindSafe-for-Writer%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;B&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Writer.html" title="struct bytes::buf::Writer">Writer</a>&lt;B&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</span></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-Writer%3CB%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-Writer%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-Writer%3CB%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-Writer%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-Writer%3CB%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-Writer%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-Writer%3CB%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-Writer%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
+</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-Writer%3CB%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-Writer%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
+<p>That is, this conversion is whatever the implementation of
+<code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
+</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-Writer%3CB%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-Writer%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-Writer%3CB%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-Writer%3CB%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/bytes/buf/take/struct.Take.html b/bytes/buf/take/struct.Take.html
new file mode 100644
index 0000000..4272e0b
--- /dev/null
+++ b/bytes/buf/take/struct.Take.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta http-equiv="refresh" content="0;URL=../../../bytes/buf/struct.Take.html">
+ <title>Redirection</title>
+</head>
+<body>
+ <p>Redirecting to <a href="../../../bytes/buf/struct.Take.html">../../../bytes/buf/struct.Take.html</a>...</p>
+ <script>location.replace("../../../bytes/buf/struct.Take.html" + location.search + location.hash);</script>
+</body>
+</html> \ No newline at end of file
diff --git a/bytes/buf/trait.Buf.html b/bytes/buf/trait.Buf.html
new file mode 100644
index 0000000..06f4075
--- /dev/null
+++ b/bytes/buf/trait.Buf.html
@@ -0,0 +1,619 @@
+<!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="Read bytes from a buffer."><meta name="keywords" content="rust, rustlang, rust-lang, Buf"><title>Buf in bytes::buf - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2 class="location"><a href="#">Buf</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.advance">advance</a></li><li><a href="#tymethod.chunk">chunk</a></li><li><a href="#tymethod.remaining">remaining</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.chain">chain</a></li><li><a href="#method.chunks_vectored">chunks_vectored</a></li><li><a href="#method.copy_to_bytes">copy_to_bytes</a></li><li><a href="#method.copy_to_slice">copy_to_slice</a></li><li><a href="#method.get_f32">get_f32</a></li><li><a href="#method.get_f32_le">get_f32_le</a></li><li><a href="#method.get_f32_ne">get_f32_ne</a></li><li><a href="#method.get_f64">get_f64</a></li><li><a href="#method.get_f64_le">get_f64_le</a></li><li><a href="#method.get_f64_ne">get_f64_ne</a></li><li><a href="#method.get_i128">get_i128</a></li><li><a href="#method.get_i128_le">get_i128_le</a></li><li><a href="#method.get_i128_ne">get_i128_ne</a></li><li><a href="#method.get_i16">get_i16</a></li><li><a href="#method.get_i16_le">get_i16_le</a></li><li><a href="#method.get_i16_ne">get_i16_ne</a></li><li><a href="#method.get_i32">get_i32</a></li><li><a href="#method.get_i32_le">get_i32_le</a></li><li><a href="#method.get_i32_ne">get_i32_ne</a></li><li><a href="#method.get_i64">get_i64</a></li><li><a href="#method.get_i64_le">get_i64_le</a></li><li><a href="#method.get_i64_ne">get_i64_ne</a></li><li><a href="#method.get_i8">get_i8</a></li><li><a href="#method.get_int">get_int</a></li><li><a href="#method.get_int_le">get_int_le</a></li><li><a href="#method.get_int_ne">get_int_ne</a></li><li><a href="#method.get_u128">get_u128</a></li><li><a href="#method.get_u128_le">get_u128_le</a></li><li><a href="#method.get_u128_ne">get_u128_ne</a></li><li><a href="#method.get_u16">get_u16</a></li><li><a href="#method.get_u16_le">get_u16_le</a></li><li><a href="#method.get_u16_ne">get_u16_ne</a></li><li><a href="#method.get_u32">get_u32</a></li><li><a href="#method.get_u32_le">get_u32_le</a></li><li><a href="#method.get_u32_ne">get_u32_ne</a></li><li><a href="#method.get_u64">get_u64</a></li><li><a href="#method.get_u64_le">get_u64_le</a></li><li><a href="#method.get_u64_ne">get_u64_ne</a></li><li><a href="#method.get_u8">get_u8</a></li><li><a href="#method.get_uint">get_uint</a></li><li><a href="#method.get_uint_le">get_uint_le</a></li><li><a href="#method.get_uint_ne">get_uint_ne</a></li><li><a href="#method.has_remaining">has_remaining</a></li><li><a href="#method.reader">reader</a></li><li><a href="#method.take">take</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-Buf-for-%26%5Bu8%5D">&amp;[u8]</a></li><li><a href="#impl-Buf-for-%26mut%20T">&amp;mut T</a></li><li><a href="#impl-Buf-for-Box%3CT%3E">Box&lt;T&gt;</a></li><li><a href="#impl-Buf-for-Cursor%3CT%3E">Cursor&lt;T&gt;</a></li><li><a href="#impl-Buf-for-VecDeque%3Cu8%3E">VecDeque&lt;u8&gt;</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In bytes::buf</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Trait <a href="../index.html">bytes</a>::<wbr><a href="index.html">buf</a>::<wbr><a class="trait" href="#">Buf</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/bytes/buf/buf_impl.rs.html#93-1220">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><div class="item-decl"><pre class="rust trait"><code>pub trait Buf {
+<details class="rustdoc-toggle type-contents-toggle"><summary class="hideme"><span>Show 48 methods</span></summary> 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>;
+<span class="item-spacer"></span> fn <a href="#tymethod.chunk" class="fnname">chunk</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span>;
+<span class="item-spacer"></span> 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.chunks_vectored" class="fnname">chunks_vectored</a>&lt;'a&gt;(&amp;'a self, dst: &amp;mut [<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a>&lt;'a&gt;]) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.copy_to_slice" class="fnname">copy_to_slice</a>(&amp;mut self, dst: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_u16" class="fnname">get_u16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_u16_ne" class="fnname">get_u16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_i16" class="fnname">get_i16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_i16_ne" class="fnname">get_i16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_u32" class="fnname">get_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_u32_ne" class="fnname">get_u32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_i32" class="fnname">get_i32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_i32_ne" class="fnname">get_i32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_u64" class="fnname">get_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_u64_ne" class="fnname">get_u64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_i64" class="fnname">get_i64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_i64_ne" class="fnname">get_i64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_u128" class="fnname">get_u128</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_u128_le" class="fnname">get_u128_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_u128_ne" class="fnname">get_u128_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_i128" class="fnname">get_i128</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_i128_le" class="fnname">get_i128_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_i128_ne" class="fnname">get_i128_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_uint" class="fnname">get_uint</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> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_uint_ne" class="fnname">get_uint_ne</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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_int" class="fnname">get_int</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> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_int_ne" class="fnname">get_int_ne</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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_f32" class="fnname">get_f32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_f32_ne" class="fnname">get_f32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_f64" class="fnname">get_f64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_f64_ne" class="fnname">get_f64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.copy_to_bytes" class="fnname">copy_to_bytes</a>(&amp;mut self, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="../struct.Bytes.html" title="struct bytes::Bytes">Bytes</a> { ... }
+<span class="item-spacer"></span> 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="struct.Take.html" title="struct bytes::buf::Take">Take</a>&lt;Self&gt;<br>&nbsp;&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>,
+ { ... }
+<span class="item-spacer"></span> fn <a href="#method.chain" class="fnname">chain</a>&lt;U:&nbsp;<a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt;(self, next: U) -&gt; <a class="struct" href="struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;Self, U&gt;<br>&nbsp;&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>,
+ { ... }
+<span class="item-spacer"></span> fn <a href="#method.reader" class="fnname">reader</a>(self) -&gt; <a class="struct" href="struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;Self&gt;<span class="notable-traits" data-ty="Reader&lt;Self&gt;"><span class="notable-traits-tooltip">ⓘ</span></span><br>&nbsp;&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>,
+ { ... }
+</details>}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><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>&amp;[u8]</code>.</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..];
+
+<span class="macro">assert_eq!</span>(<span class="string">b&#39;h&#39;</span>, buf.get_u8());
+<span class="macro">assert_eq!</span>(<span class="string">b&#39;e&#39;</span>, buf.get_u8());
+<span class="macro">assert_eq!</span>(<span class="string">b&#39;l&#39;</span>, buf.get_u8());
+
+<span class="kw">let </span><span class="kw-2">mut </span>rest = [<span class="number">0</span>; <span class="number">8</span>];
+buf.copy_to_slice(<span class="kw-2">&amp;mut </span>rest);
+
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>rest[..], <span class="kw-2">&amp;</span><span class="string">b&quot;lo world&quot;</span>[..]);</code></pre></div>
+</div></details><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.remaining" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#119">source</a><h4 class="code-header">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></h4></section></summary><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>chunk()</code>.</p>
+<h5 id="examples"><a href="#examples">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..];
+
+<span class="macro">assert_eq!</span>(buf.remaining(), <span class="number">11</span>);
+
+buf.get_u8();
+
+<span class="macro">assert_eq!</span>(buf.remaining(), <span class="number">10</span>);</code></pre></div>
+<h5 id="implementer-notes"><a href="#implementer-notes">Implementer notes</a></h5>
+<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></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.chunk" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#150">source</a><h4 class="code-header">fn <a href="#tymethod.chunk" class="fnname">chunk</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section></summary><div class="docblock"><p>Returns a slice starting at the current position and of length between 0
+and <code>Buf::remaining()</code>. Note that this <em>can</em> return shorter slice (this allows
+non-continuous internal representation).</p>
+<p>This is a lower level function. Most operations are done with other
+functions.</p>
+<h5 id="examples-1"><a href="#examples-1">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..];
+
+<span class="macro">assert_eq!</span>(buf.chunk(), <span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]);
+
+buf.advance(<span class="number">6</span>);
+
+<span class="macro">assert_eq!</span>(buf.chunk(), <span class="kw-2">&amp;</span><span class="string">b&quot;world&quot;</span>[..]);</code></pre></div>
+<h5 id="implementer-notes-1"><a href="#implementer-notes-1">Implementer notes</a></h5>
+<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>chunk()</code> should return an
+empty slice.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.advance" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#224">source</a><h4 class="code-header">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>)</h4></section></summary><div class="docblock"><p>Advance the internal cursor of the Buf</p>
+<p>The next call to <code>chunk()</code> will return a slice starting <code>cnt</code> bytes
+further into the underlying buffer.</p>
+<h5 id="examples-2"><a href="#examples-2">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..];
+
+<span class="macro">assert_eq!</span>(buf.chunk(), <span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]);
+
+buf.advance(<span class="number">6</span>);
+
+<span class="macro">assert_eq!</span>(buf.chunk(), <span class="kw-2">&amp;</span><span class="string">b&quot;world&quot;</span>[..]);</code></pre></div>
+<h5 id="panics"><a href="#panics">Panics</a></h5>
+<p>This function <strong>may</strong> panic if <code>cnt &gt; self.remaining()</code>.</p>
+<h5 id="implementer-notes-2"><a href="#implementer-notes-2">Implementer notes</a></h5>
+<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></details></div><h2 id="provided-methods" class="small-section-header">Provided Methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunks_vectored" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#181-192">source</a><h4 class="code-header">fn <a href="#method.chunks_vectored" class="fnname">chunks_vectored</a>&lt;'a&gt;(&amp;'a self, dst: &amp;mut [<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a>&lt;'a&gt;]) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>std</code></strong> only.</div></span><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>chunk_vectored</code> enables
+fetching more than one slice at once. <code>dst</code> is a slice of <code>IoSlice</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>chunk_vectored</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>
+<h5 id="implementer-notes-3"><a href="#implementer-notes-3">Implementer notes</a></h5>
+<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>chunk_vectored</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></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.has_remaining" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#243-245">source</a><h4 class="code-header">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></h4></section></summary><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>
+<h5 id="examples-3"><a href="#examples-3">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;a&quot;</span>[..];
+
+<span class="macro">assert!</span>(buf.has_remaining());
+
+buf.get_u8();
+
+<span class="macro">assert!</span>(!buf.has_remaining());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.copy_to_slice" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#268-282">source</a><h4 class="code-header">fn <a href="#method.copy_to_slice" class="fnname">copy_to_slice</a>(&amp;mut self, dst: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section></summary><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>
+<h5 id="examples-4"><a href="#examples-4">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..];
+<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0</span>; <span class="number">5</span>];
+
+buf.copy_to_slice(<span class="kw-2">&amp;mut </span>dst);
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span><span class="string">b&quot;hello&quot;</span>[..], <span class="kw-2">&amp;</span>dst);
+<span class="macro">assert_eq!</span>(<span class="number">6</span>, buf.remaining());</code></pre></div>
+<h5 id="panics-1"><a href="#panics-1">Panics</a></h5>
+<p>This function panics if <code>self.remaining() &lt; dst.len()</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u8" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#300-307">source</a><h4 class="code-header">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></h4></section></summary><div class="docblock"><p>Gets an unsigned 8 bit integer from <code>self</code>.</p>
+<p>The current position is advanced by 1.</p>
+<h5 id="examples-5"><a href="#examples-5">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x08 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">8</span>, buf.get_u8());</code></pre></div>
+<h5 id="panics-2"><a href="#panics-2">Panics</a></h5>
+<p>This function panics if there is no more remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i8" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#325-332">source</a><h4 class="code-header">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></h4></section></summary><div class="docblock"><p>Gets a signed 8 bit integer from <code>self</code>.</p>
+<p>The current position is advanced by 1.</p>
+<h5 id="examples-6"><a href="#examples-6">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x08 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">8</span>, buf.get_i8());</code></pre></div>
+<h5 id="panics-3"><a href="#panics-3">Panics</a></h5>
+<p>This function panics if there is no more remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u16" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#350-352">source</a><h4 class="code-header">fn <a href="#method.get_u16" class="fnname">get_u16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h4></section></summary><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>
+<h5 id="examples-7"><a href="#examples-7">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x08\x09 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x0809</span>, buf.get_u16());</code></pre></div>
+<h5 id="panics-4"><a href="#panics-4">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u16_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#370-372">source</a><h4 class="code-header">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></h4></section></summary><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>
+<h5 id="examples-8"><a href="#examples-8">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x09\x08 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x0809</span>, buf.get_u16_le());</code></pre></div>
+<h5 id="panics-5"><a href="#panics-5">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u16_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#393-395">source</a><h4 class="code-header">fn <a href="#method.get_u16_ne" class="fnname">get_u16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h4></section></summary><div class="docblock"><p>Gets an unsigned 16 bit integer from <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 2.</p>
+<h5 id="examples-9"><a href="#examples-9">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x08\x09 hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\x09\x08 hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">0x0809</span>, buf.get_u16_ne());</code></pre></div>
+<h5 id="panics-6"><a href="#panics-6">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i16" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#413-415">source</a><h4 class="code-header">fn <a href="#method.get_i16" class="fnname">get_i16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></h4></section></summary><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>
+<h5 id="examples-10"><a href="#examples-10">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x08\x09 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x0809</span>, buf.get_i16());</code></pre></div>
+<h5 id="panics-7"><a href="#panics-7">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i16_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#433-435">source</a><h4 class="code-header">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></h4></section></summary><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>
+<h5 id="examples-11"><a href="#examples-11">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x09\x08 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x0809</span>, buf.get_i16_le());</code></pre></div>
+<h5 id="panics-8"><a href="#panics-8">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i16_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#456-458">source</a><h4 class="code-header">fn <a href="#method.get_i16_ne" class="fnname">get_i16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></h4></section></summary><div class="docblock"><p>Gets a signed 16 bit integer from <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 2.</p>
+<h5 id="examples-12"><a href="#examples-12">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x08\x09 hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\x09\x08 hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">0x0809</span>, buf.get_i16_ne());</code></pre></div>
+<h5 id="panics-9"><a href="#panics-9">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u32" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#476-478">source</a><h4 class="code-header">fn <a href="#method.get_u32" class="fnname">get_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><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>
+<h5 id="examples-13"><a href="#examples-13">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x08\x09\xA0\xA1 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x0809A0A1</span>, buf.get_u32());</code></pre></div>
+<h5 id="panics-10"><a href="#panics-10">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u32_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#496-498">source</a><h4 class="code-header">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></h4></section></summary><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>
+<h5 id="examples-14"><a href="#examples-14">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\xA1\xA0\x09\x08 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x0809A0A1</span>, buf.get_u32_le());</code></pre></div>
+<h5 id="panics-11"><a href="#panics-11">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u32_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#519-521">source</a><h4 class="code-header">fn <a href="#method.get_u32_ne" class="fnname">get_u32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class="docblock"><p>Gets an unsigned 32 bit integer from <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-15"><a href="#examples-15">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x08\x09\xA0\xA1 hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\xA1\xA0\x09\x08 hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">0x0809A0A1</span>, buf.get_u32_ne());</code></pre></div>
+<h5 id="panics-12"><a href="#panics-12">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i32" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#539-541">source</a><h4 class="code-header">fn <a href="#method.get_i32" class="fnname">get_i32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section></summary><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>
+<h5 id="examples-16"><a href="#examples-16">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x08\x09\xA0\xA1 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x0809A0A1</span>, buf.get_i32());</code></pre></div>
+<h5 id="panics-13"><a href="#panics-13">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i32_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#559-561">source</a><h4 class="code-header">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></h4></section></summary><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>
+<h5 id="examples-17"><a href="#examples-17">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\xA1\xA0\x09\x08 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x0809A0A1</span>, buf.get_i32_le());</code></pre></div>
+<h5 id="panics-14"><a href="#panics-14">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i32_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#582-584">source</a><h4 class="code-header">fn <a href="#method.get_i32_ne" class="fnname">get_i32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section></summary><div class="docblock"><p>Gets a signed 32 bit integer from <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-18"><a href="#examples-18">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x08\x09\xA0\xA1 hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\xA1\xA0\x09\x08 hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">0x0809A0A1</span>, buf.get_i32_ne());</code></pre></div>
+<h5 id="panics-15"><a href="#panics-15">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u64" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#602-604">source</a><h4 class="code-header">fn <a href="#method.get_u64" class="fnname">get_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section></summary><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>
+<h5 id="examples-19"><a href="#examples-19">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</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="number">0x0102030405060708</span>, buf.get_u64());</code></pre></div>
+<h5 id="panics-16"><a href="#panics-16">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u64_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#622-624">source</a><h4 class="code-header">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></h4></section></summary><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>
+<h5 id="examples-20"><a href="#examples-20">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</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="number">0x0102030405060708</span>, buf.get_u64_le());</code></pre></div>
+<h5 id="panics-17"><a href="#panics-17">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u64_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#645-647">source</a><h4 class="code-header">fn <a href="#method.get_u64_ne" class="fnname">get_u64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section></summary><div class="docblock"><p>Gets an unsigned 64 bit integer from <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-21"><a href="#examples-21">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08 hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\x08\x07\x06\x05\x04\x03\x02\x01 hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">0x0102030405060708</span>, buf.get_u64_ne());</code></pre></div>
+<h5 id="panics-18"><a href="#panics-18">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i64" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#665-667">source</a><h4 class="code-header">fn <a href="#method.get_i64" class="fnname">get_i64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section></summary><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>
+<h5 id="examples-22"><a href="#examples-22">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</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="number">0x0102030405060708</span>, buf.get_i64());</code></pre></div>
+<h5 id="panics-19"><a href="#panics-19">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i64_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#685-687">source</a><h4 class="code-header">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></h4></section></summary><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>
+<h5 id="examples-23"><a href="#examples-23">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</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="number">0x0102030405060708</span>, buf.get_i64_le());</code></pre></div>
+<h5 id="panics-20"><a href="#panics-20">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i64_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#708-710">source</a><h4 class="code-header">fn <a href="#method.get_i64_ne" class="fnname">get_i64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section></summary><div class="docblock"><p>Gets a signed 64 bit integer from <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-24"><a href="#examples-24">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08 hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\x08\x07\x06\x05\x04\x03\x02\x01 hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">0x0102030405060708</span>, buf.get_i64_ne());</code></pre></div>
+<h5 id="panics-21"><a href="#panics-21">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u128" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#728-730">source</a><h4 class="code-header">fn <a href="#method.get_u128" class="fnname">get_u128</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></h4></section></summary><div class="docblock"><p>Gets an unsigned 128 bit integer from <code>self</code> in big-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-25"><a href="#examples-25">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x01020304050607080910111213141516</span>, buf.get_u128());</code></pre></div>
+<h5 id="panics-22"><a href="#panics-22">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u128_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#748-750">source</a><h4 class="code-header">fn <a href="#method.get_u128_le" class="fnname">get_u128_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></h4></section></summary><div class="docblock"><p>Gets an unsigned 128 bit integer from <code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-26"><a href="#examples-26">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x01020304050607080910111213141516</span>, buf.get_u128_le());</code></pre></div>
+<h5 id="panics-23"><a href="#panics-23">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u128_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#771-773">source</a><h4 class="code-header">fn <a href="#method.get_u128_ne" class="fnname">get_u128_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></h4></section></summary><div class="docblock"><p>Gets an unsigned 128 bit integer from <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-27"><a href="#examples-27">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">0x01020304050607080910111213141516</span>, buf.get_u128_ne());</code></pre></div>
+<h5 id="panics-24"><a href="#panics-24">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i128" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#791-793">source</a><h4 class="code-header">fn <a href="#method.get_i128" class="fnname">get_i128</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a></h4></section></summary><div class="docblock"><p>Gets a signed 128 bit integer from <code>self</code> in big-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-28"><a href="#examples-28">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x01020304050607080910111213141516</span>, buf.get_i128());</code></pre></div>
+<h5 id="panics-25"><a href="#panics-25">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i128_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#811-813">source</a><h4 class="code-header">fn <a href="#method.get_i128_le" class="fnname">get_i128_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a></h4></section></summary><div class="docblock"><p>Gets a signed 128 bit integer from <code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-29"><a href="#examples-29">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x01020304050607080910111213141516</span>, buf.get_i128_le());</code></pre></div>
+<h5 id="panics-26"><a href="#panics-26">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i128_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#834-836">source</a><h4 class="code-header">fn <a href="#method.get_i128_ne" class="fnname">get_i128_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a></h4></section></summary><div class="docblock"><p>Gets a signed 128 bit integer from <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-30"><a href="#examples-30">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">0x01020304050607080910111213141516</span>, buf.get_i128_ne());</code></pre></div>
+<h5 id="panics-27"><a href="#panics-27">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_uint" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#854-856">source</a><h4 class="code-header">fn <a href="#method.get_uint" class="fnname">get_uint</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></h4></section></summary><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>
+<h5 id="examples-31"><a href="#examples-31">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x01\x02\x03 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x010203</span>, buf.get_uint(<span class="number">3</span>));</code></pre></div>
+<h5 id="panics-28"><a href="#panics-28">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_uint_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#874-876">source</a><h4 class="code-header">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></h4></section></summary><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>
+<h5 id="examples-32"><a href="#examples-32">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x03\x02\x01 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x010203</span>, buf.get_uint_le(<span class="number">3</span>));</code></pre></div>
+<h5 id="panics-29"><a href="#panics-29">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_uint_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#898-904">source</a><h4 class="code-header">fn <a href="#method.get_uint_ne" class="fnname">get_uint_ne</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></h4></section></summary><div class="docblock"><p>Gets an unsigned n-byte integer from <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by <code>nbytes</code>.</p>
+<h5 id="examples-33"><a href="#examples-33">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x01\x02\x03 hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\x03\x02\x01 hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">0x010203</span>, buf.get_uint_ne(<span class="number">3</span>));</code></pre></div>
+<h5 id="panics-30"><a href="#panics-30">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>, or
+if <code>nbytes</code> is greater than 8.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_int" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#923-925">source</a><h4 class="code-header">fn <a href="#method.get_int" class="fnname">get_int</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></h4></section></summary><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>
+<h5 id="examples-34"><a href="#examples-34">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x01\x02\x03 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x010203</span>, buf.get_int(<span class="number">3</span>));</code></pre></div>
+<h5 id="panics-31"><a href="#panics-31">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>, or
+if <code>nbytes</code> is greater than 8.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_int_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#944-946">source</a><h4 class="code-header">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></h4></section></summary><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>
+<h5 id="examples-35"><a href="#examples-35">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x03\x02\x01 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x010203</span>, buf.get_int_le(<span class="number">3</span>));</code></pre></div>
+<h5 id="panics-32"><a href="#panics-32">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>, or
+if <code>nbytes</code> is greater than 8.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_int_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#968-974">source</a><h4 class="code-header">fn <a href="#method.get_int_ne" class="fnname">get_int_ne</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></h4></section></summary><div class="docblock"><p>Gets a signed n-byte integer from <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by <code>nbytes</code>.</p>
+<h5 id="examples-36"><a href="#examples-36">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x01\x02\x03 hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\x03\x02\x01 hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">0x010203</span>, buf.get_int_ne(<span class="number">3</span>));</code></pre></div>
+<h5 id="panics-33"><a href="#panics-33">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>, or
+if <code>nbytes</code> is greater than 8.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f32" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#993-995">source</a><h4 class="code-header">fn <a href="#method.get_f32" class="fnname">get_f32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></h4></section></summary><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>
+<h5 id="examples-37"><a href="#examples-37">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x3F\x99\x99\x9A hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">1.2f32</span>, buf.get_f32());</code></pre></div>
+<h5 id="panics-34"><a href="#panics-34">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f32_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1014-1016">source</a><h4 class="code-header">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></h4></section></summary><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>
+<h5 id="examples-38"><a href="#examples-38">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x9A\x99\x99\x3F hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">1.2f32</span>, buf.get_f32_le());</code></pre></div>
+<h5 id="panics-35"><a href="#panics-35">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f32_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1038-1040">source</a><h4 class="code-header">fn <a href="#method.get_f32_ne" class="fnname">get_f32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p>Gets an IEEE754 single-precision (4 bytes) floating point number from
+<code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-39"><a href="#examples-39">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x3F\x99\x99\x9A hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\x9A\x99\x99\x3F hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">1.2f32</span>, buf.get_f32_ne());</code></pre></div>
+<h5 id="panics-36"><a href="#panics-36">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f64" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1059-1061">source</a><h4 class="code-header">fn <a href="#method.get_f64" class="fnname">get_f64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></h4></section></summary><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>
+<h5 id="examples-40"><a href="#examples-40">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</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="number">1.2f64</span>, buf.get_f64());</code></pre></div>
+<h5 id="panics-37"><a href="#panics-37">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f64_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1080-1082">source</a><h4 class="code-header">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></h4></section></summary><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>
+<h5 id="examples-41"><a href="#examples-41">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</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="number">1.2f64</span>, buf.get_f64_le());</code></pre></div>
+<h5 id="panics-38"><a href="#panics-38">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f64_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1104-1106">source</a><h4 class="code-header">fn <a href="#method.get_f64_ne" class="fnname">get_f64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></h4></section></summary><div class="docblock"><p>Gets an IEEE754 double-precision (8 bytes) floating point number from
+<code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-42"><a href="#examples-42">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x3F\xF3\x33\x33\x33\x33\x33\x33 hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\x33\x33\x33\x33\x33\x33\xF3\x3F hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">1.2f64</span>, buf.get_f64_ne());</code></pre></div>
+<h5 id="panics-39"><a href="#panics-39">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.copy_to_bytes" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1127-1137">source</a><h4 class="code-header">fn <a href="#method.copy_to_bytes" class="fnname">copy_to_bytes</a>(&amp;mut self, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="../struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h4></section></summary><div class="docblock"><p>Consumes <code>len</code> bytes inside self and returns new instance of <code>Bytes</code>
+with this data.</p>
+<p>This function may be optimized by the underlying type to avoid actual
+copies. For example, <code>Bytes</code> implementation will do a shallow copy
+(ref-count increment).</p>
+<h5 id="examples-43"><a href="#examples-43">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span>bytes = (<span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]).copy_to_bytes(<span class="number">5</span>);
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>bytes[..], <span class="kw-2">&amp;</span><span class="string">b&quot;hello&quot;</span>[..]);</code></pre></div>
+<h5 id="panics-40"><a href="#panics-40">Panics</a></h5>
+<p>This function panics if <code>len &gt; self.remaining()</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1160-1165">source</a><h4 class="code-header">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="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>,</span></h4></section></summary><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>
+<h5 id="examples-44"><a href="#examples-44">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::{Buf, BufMut};
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="string">b&quot;hello world&quot;</span>[..].take(<span class="number">5</span>);
+<span class="kw">let </span><span class="kw-2">mut </span>dst = <span class="macro">vec!</span>[];
+
+dst.put(<span class="kw-2">&amp;mut </span>buf);
+<span class="macro">assert_eq!</span>(dst, <span class="string">b&quot;hello&quot;</span>);
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = buf.into_inner();
+dst.clear();
+dst.put(<span class="kw-2">&amp;mut </span>buf);
+<span class="macro">assert_eq!</span>(dst, <span class="string">b&quot; world&quot;</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chain" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1182-1187">source</a><h4 class="code-header">fn <a href="#method.chain" class="fnname">chain</a>&lt;U:&nbsp;<a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt;(self, next: U) -&gt; <a class="struct" href="struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;Self, U&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>,</span></h4></section></summary><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>
+<h5 id="examples-45"><a href="#examples-45">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>chain = <span class="string">b&quot;hello &quot;</span>[..].chain(<span class="kw-2">&amp;</span><span class="string">b&quot;world&quot;</span>[..]);
+
+<span class="kw">let </span>full = chain.copy_to_bytes(<span class="number">11</span>);
+<span class="macro">assert_eq!</span>(full.chunk(), <span class="string">b&quot;hello world&quot;</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.reader" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1214-1219">source</a><h4 class="code-header">fn <a href="#method.reader" class="fnname">reader</a>(self) -&gt; <a class="struct" href="struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;Self&gt;<span class="notable-traits" data-ty="Reader&lt;Self&gt;"><span class="notable-traits-tooltip">ⓘ</span></span><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>,</span></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>std</code></strong> only.</div></span><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>
+<h5 id="examples-46"><a href="#examples-46">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::{Bytes, Buf};
+<span class="kw">use </span>std::io::Read;
+
+<span class="kw">let </span>buf = Bytes::from(<span class="string">&quot;hello world&quot;</span>);
+
+<span class="kw">let </span><span class="kw-2">mut </span>reader = buf.reader();
+<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0</span>; <span class="number">1024</span>];
+
+<span class="kw">let </span>num = reader.read(<span class="kw-2">&amp;mut </span>dst).unwrap();
+
+<span class="macro">assert_eq!</span>(<span class="number">11</span>, num);
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>dst[..<span class="number">11</span>], <span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]);</code></pre></div>
+</div></details></div><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Buf-for-%26mut%20T" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1392-1394">source</a><a href="#impl-Buf-for-%26mut%20T" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="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="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;mut </a>T</h3></section></summary><div class="impl-items"><section id="method.remaining" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.remaining" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.chunk" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.chunk" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.chunk" class="fnname">chunk</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunks_vectored-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.chunks_vectored-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.chunks_vectored" class="fnname">chunks_vectored</a>&lt;'b&gt;(&amp;'b self, dst: &amp;mut [<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a>&lt;'b&gt;]) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>std</code></strong> only.</div></span></details><section id="method.advance" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.advance" class="anchor"></a><h4 class="code-header">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>)</h4></section><section id="method.has_remaining-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.has_remaining-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.copy_to_slice-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.copy_to_slice-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.copy_to_slice" class="fnname">copy_to_slice</a>(&amp;mut self, dst: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section><section id="method.get_u8-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_u8-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_i8-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_i8-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_u16-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_u16-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u16" class="fnname">get_u16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h4></section><section id="method.get_u16_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_u16_le-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_u16_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_u16_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u16_ne" class="fnname">get_u16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h4></section><section id="method.get_i16-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_i16-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i16" class="fnname">get_i16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></h4></section><section id="method.get_i16_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_i16_le-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_i16_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_i16_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i16_ne" class="fnname">get_i16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></h4></section><section id="method.get_u32-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_u32-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u32" class="fnname">get_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section><section id="method.get_u32_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_u32_le-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_u32_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_u32_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u32_ne" class="fnname">get_u32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section><section id="method.get_i32-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_i32-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i32" class="fnname">get_i32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section><section id="method.get_i32_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_i32_le-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_i32_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_i32_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i32_ne" class="fnname">get_i32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section><section id="method.get_u64-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_u64-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u64" class="fnname">get_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section><section id="method.get_u64_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_u64_le-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_u64_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_u64_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u64_ne" class="fnname">get_u64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section><section id="method.get_i64-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_i64-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i64" class="fnname">get_i64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section><section id="method.get_i64_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_i64_le-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_i64_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_i64_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i64_ne" class="fnname">get_i64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section><section id="method.get_uint-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_uint-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_uint" class="fnname">get_uint</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></h4></section><section id="method.get_uint_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_uint_le-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_uint_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_uint_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_uint_ne" class="fnname">get_uint_ne</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></h4></section><section id="method.get_int-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_int-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_int" class="fnname">get_int</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></h4></section><section id="method.get_int_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_int_le-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_int_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_int_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_int_ne" class="fnname">get_int_ne</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></h4></section><section id="method.copy_to_bytes-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.copy_to_bytes-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.copy_to_bytes" class="fnname">copy_to_bytes</a>(&amp;mut self, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="../struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Buf-for-Box%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1396-1398">source</a><a href="#impl-Buf-for-Box%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="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="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;</h3></section></summary><div class="impl-items"><section id="method.remaining-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.remaining-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.chunk-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.chunk-1" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.chunk" class="fnname">chunk</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunks_vectored-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.chunks_vectored-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.chunks_vectored" class="fnname">chunks_vectored</a>&lt;'b&gt;(&amp;'b self, dst: &amp;mut [<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a>&lt;'b&gt;]) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>std</code></strong> only.</div></span></details><section id="method.advance-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.advance-1" class="anchor"></a><h4 class="code-header">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>)</h4></section><section id="method.has_remaining-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.has_remaining-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.copy_to_slice-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.copy_to_slice-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.copy_to_slice" class="fnname">copy_to_slice</a>(&amp;mut self, dst: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section><section id="method.get_u8-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_u8-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_i8-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_i8-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_u16-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_u16-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u16" class="fnname">get_u16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h4></section><section id="method.get_u16_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_u16_le-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_u16_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_u16_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u16_ne" class="fnname">get_u16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h4></section><section id="method.get_i16-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_i16-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i16" class="fnname">get_i16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></h4></section><section id="method.get_i16_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_i16_le-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_i16_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_i16_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i16_ne" class="fnname">get_i16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></h4></section><section id="method.get_u32-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_u32-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u32" class="fnname">get_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section><section id="method.get_u32_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_u32_le-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_u32_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_u32_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u32_ne" class="fnname">get_u32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section><section id="method.get_i32-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_i32-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i32" class="fnname">get_i32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section><section id="method.get_i32_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_i32_le-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_i32_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_i32_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i32_ne" class="fnname">get_i32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section><section id="method.get_u64-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_u64-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u64" class="fnname">get_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section><section id="method.get_u64_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_u64_le-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_u64_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_u64_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u64_ne" class="fnname">get_u64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section><section id="method.get_i64-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_i64-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i64" class="fnname">get_i64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section><section id="method.get_i64_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_i64_le-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_i64_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_i64_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i64_ne" class="fnname">get_i64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section><section id="method.get_uint-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_uint-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_uint" class="fnname">get_uint</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></h4></section><section id="method.get_uint_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_uint_le-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_uint_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_uint_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_uint_ne" class="fnname">get_uint_ne</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></h4></section><section id="method.get_int-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_int-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_int" class="fnname">get_int</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></h4></section><section id="method.get_int_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_int_le-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_int_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_int_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_int_ne" class="fnname">get_int_ne</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></h4></section><section id="method.copy_to_bytes-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.copy_to_bytes-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.copy_to_bytes" class="fnname">copy_to_bytes</a>(&amp;mut self, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="../struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Buf-for-%26%5Bu8%5D" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1400-1429">source</a><a href="#impl-Buf-for-%26%5Bu8%5D" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> for &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><section id="method.remaining-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1402-1404">source</a><a href="#method.remaining-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.chunk-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1407-1409">source</a><a href="#method.chunk-2" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.chunk" class="fnname">chunk</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section><section id="method.advance-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1412-1418">source</a><a href="#method.advance-2" class="anchor"></a><h4 class="code-header">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>)</h4></section><section id="method.copy_to_slice-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1421-1428">source</a><a href="#method.copy_to_slice-3" class="anchor"></a><h4 class="code-header">fn <a href="#method.copy_to_slice" class="fnname">copy_to_slice</a>(&amp;mut self, dst: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Buf-for-Cursor%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1432-1460">source</a><a href="#impl-Buf-for-Cursor%3CT%3E" class="anchor"></a><h3 class="code-header">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.u8.html">u8</a>]&gt;&gt; <a class="trait" href="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;</h3></section></summary><div class="impl-items"><section id="method.remaining-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1434-1436">source</a><a href="#method.remaining-3" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.chunk-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1439-1443">source</a><a href="#method.chunk-3" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.chunk" class="fnname">chunk</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section><section id="method.advance-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_impl.rs.html#1446-1459">source</a><a href="#method.advance-3" class="anchor"></a><h4 class="code-header">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>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Buf-for-VecDeque%3Cu8%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/vec_deque.rs.html#5-22">source</a><a href="#impl-Buf-for-VecDeque%3Cu8%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/vec_deque/struct.VecDeque.html" title="struct alloc::collections::vec_deque::VecDeque">VecDeque</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;</h3></section></summary><div class="impl-items"><section id="method.remaining-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/vec_deque.rs.html#6-8">source</a><a href="#method.remaining-4" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.chunk-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/vec_deque.rs.html#10-17">source</a><a href="#method.chunk-4" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.chunk" class="fnname">chunk</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section><section id="method.advance-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/vec_deque.rs.html#19-21">source</a><a href="#method.advance-4" class="anchor"></a><h4 class="code-header">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>)</h4></section></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div id="implementors-list"><section id="impl-Buf-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/bytes.rs.html#583-611">source</a><a href="#impl-Buf-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> for <a class="struct" href="../struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section><section id="impl-Buf-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/bytes_mut.rs.html#1055-1091">source</a><a href="#impl-Buf-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> for <a class="struct" href="../struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section><section id="impl-Buf-for-Chain%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/chain.rs.html#130-189">source</a><a href="#impl-Buf-for-Chain%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> for <a class="struct" href="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="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>,</span></h3></section><section id="impl-Buf-for-Take%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/take.rs.html#132-155">source</a><a href="#impl-Buf-for-Take%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt; <a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> for <a class="struct" href="struct.Take.html" title="struct bytes::buf::Take">Take</a>&lt;T&gt;</h3></section></div><script src="../../implementors/bytes/buf/buf_impl/trait.Buf.js" data-ignore-extern-crates="alloc,std" async></script><script type="text/json" id="notable-traits-data">{"&[u8]":"<h3 class=\"notable\">Notable traits for <code>&amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for &amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span>","Reader<Self>":"<h3 class=\"notable\">Notable traits for <code><a class=\"struct\" href=\"struct.Reader.html\" title=\"struct bytes::buf::Reader\">Reader</a>&lt;B&gt;</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl&lt;B:&nbsp;<a class=\"trait\" href=\"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=\"struct.Reader.html\" title=\"struct bytes::buf::Reader\">Reader</a>&lt;B&gt;</span>"}</script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/bytes/buf/trait.BufMut.html b/bytes/buf/trait.BufMut.html
new file mode 100644
index 0000000..9f73e63
--- /dev/null
+++ b/bytes/buf/trait.BufMut.html
@@ -0,0 +1,732 @@
+<!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="A trait for values that provide sequential write access to bytes."><meta name="keywords" content="rust, rustlang, rust-lang, BufMut"><title>BufMut in bytes::buf - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2 class="location"><a href="#">BufMut</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.advance_mut">advance_mut</a></li><li><a href="#tymethod.chunk_mut">chunk_mut</a></li><li><a href="#tymethod.remaining_mut">remaining_mut</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.chain_mut">chain_mut</a></li><li><a href="#method.has_remaining_mut">has_remaining_mut</a></li><li><a href="#method.limit">limit</a></li><li><a href="#method.put">put</a></li><li><a href="#method.put_bytes">put_bytes</a></li><li><a href="#method.put_f32">put_f32</a></li><li><a href="#method.put_f32_le">put_f32_le</a></li><li><a href="#method.put_f32_ne">put_f32_ne</a></li><li><a href="#method.put_f64">put_f64</a></li><li><a href="#method.put_f64_le">put_f64_le</a></li><li><a href="#method.put_f64_ne">put_f64_ne</a></li><li><a href="#method.put_i128">put_i128</a></li><li><a href="#method.put_i128_le">put_i128_le</a></li><li><a href="#method.put_i128_ne">put_i128_ne</a></li><li><a href="#method.put_i16">put_i16</a></li><li><a href="#method.put_i16_le">put_i16_le</a></li><li><a href="#method.put_i16_ne">put_i16_ne</a></li><li><a href="#method.put_i32">put_i32</a></li><li><a href="#method.put_i32_le">put_i32_le</a></li><li><a href="#method.put_i32_ne">put_i32_ne</a></li><li><a href="#method.put_i64">put_i64</a></li><li><a href="#method.put_i64_le">put_i64_le</a></li><li><a href="#method.put_i64_ne">put_i64_ne</a></li><li><a href="#method.put_i8">put_i8</a></li><li><a href="#method.put_int">put_int</a></li><li><a href="#method.put_int_le">put_int_le</a></li><li><a href="#method.put_int_ne">put_int_ne</a></li><li><a href="#method.put_slice">put_slice</a></li><li><a href="#method.put_u128">put_u128</a></li><li><a href="#method.put_u128_le">put_u128_le</a></li><li><a href="#method.put_u128_ne">put_u128_ne</a></li><li><a href="#method.put_u16">put_u16</a></li><li><a href="#method.put_u16_le">put_u16_le</a></li><li><a href="#method.put_u16_ne">put_u16_ne</a></li><li><a href="#method.put_u32">put_u32</a></li><li><a href="#method.put_u32_le">put_u32_le</a></li><li><a href="#method.put_u32_ne">put_u32_ne</a></li><li><a href="#method.put_u64">put_u64</a></li><li><a href="#method.put_u64_le">put_u64_le</a></li><li><a href="#method.put_u64_ne">put_u64_ne</a></li><li><a href="#method.put_u8">put_u8</a></li><li><a href="#method.put_uint">put_uint</a></li><li><a href="#method.put_uint_le">put_uint_le</a></li><li><a href="#method.put_uint_ne">put_uint_ne</a></li><li><a href="#method.writer">writer</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-BufMut-for-%26mut%20T">&amp;mut T</a></li><li><a href="#impl-BufMut-for-%26mut%20%5BMaybeUninit%3Cu8%3E%5D">&amp;mut [MaybeUninit&lt;u8&gt;]</a></li><li><a href="#impl-BufMut-for-%26mut%20%5Bu8%5D">&amp;mut [u8]</a></li><li><a href="#impl-BufMut-for-Box%3CT%3E">Box&lt;T&gt;</a></li><li><a href="#impl-BufMut-for-Vec%3Cu8%3E">Vec&lt;u8&gt;</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In bytes::buf</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Trait <a href="../index.html">bytes</a>::<wbr><a href="index.html">buf</a>::<wbr><a class="trait" href="#">BufMut</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/bytes/buf/buf_mut.rs.html#30-1342">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><div class="item-decl"><pre class="rust trait"><code>pub unsafe trait BufMut {
+<details class="rustdoc-toggle type-contents-toggle"><summary class="hideme"><span>Show 48 methods</span></summary> fn <a href="#tymethod.remaining_mut" class="fnname">remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>;
+<span class="item-spacer"></span> unsafe fn <a href="#tymethod.advance_mut" class="fnname">advance_mut</a>(&amp;mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>);
+<span class="item-spacer"></span> fn <a href="#tymethod.chunk_mut" class="fnname">chunk_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a>;
+
+ fn <a href="#method.has_remaining_mut" class="fnname">has_remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.put" class="fnname">put</a>&lt;T:&nbsp;<a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt;(&amp;mut self, src: T)<br>&nbsp;&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>,
+ { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_slice" class="fnname">put_slice</a>(&amp;mut self, src: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_bytes" class="fnname">put_bytes</a>(&amp;mut self, val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u8" class="fnname">put_u8</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i8" class="fnname">put_i8</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u16" class="fnname">put_u16</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u16_le" class="fnname">put_u16_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u16_ne" class="fnname">put_u16_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i16" class="fnname">put_i16</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i16_le" class="fnname">put_i16_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i16_ne" class="fnname">put_i16_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u32" class="fnname">put_u32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u32_le" class="fnname">put_u32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u32_ne" class="fnname">put_u32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i32" class="fnname">put_i32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i32_le" class="fnname">put_i32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i32_ne" class="fnname">put_i32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u64" class="fnname">put_u64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u64_le" class="fnname">put_u64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u64_ne" class="fnname">put_u64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i64" class="fnname">put_i64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i64_le" class="fnname">put_i64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i64_ne" class="fnname">put_i64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u128" class="fnname">put_u128</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u128_le" class="fnname">put_u128_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u128_ne" class="fnname">put_u128_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i128" class="fnname">put_i128</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i128_le" class="fnname">put_i128_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i128_ne" class="fnname">put_i128_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_uint" class="fnname">put_uint</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_uint_le" class="fnname">put_uint_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_uint_ne" class="fnname">put_uint_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_int" class="fnname">put_int</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_int_le" class="fnname">put_int_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_int_ne" class="fnname">put_int_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_f32" class="fnname">put_f32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_f32_le" class="fnname">put_f32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_f32_ne" class="fnname">put_f32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_f64" class="fnname">put_f64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_f64_le" class="fnname">put_f64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_f64_ne" class="fnname">put_f64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.limit" class="fnname">limit</a>(self, limit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="struct.Limit.html" title="struct bytes::buf::Limit">Limit</a>&lt;Self&gt;<br>&nbsp;&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>,
+ { ... }
+<span class="item-spacer"></span> fn <a href="#method.writer" class="fnname">writer</a>(self) -&gt; <a class="struct" href="struct.Writer.html" title="struct bytes::buf::Writer">Writer</a>&lt;Self&gt;<span class="notable-traits" data-ty="Writer&lt;Self&gt;"><span class="notable-traits-tooltip">ⓘ</span></span><br>&nbsp;&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>,
+ { ... }
+<span class="item-spacer"></span> fn <a href="#method.chain_mut" class="fnname">chain_mut</a>&lt;U:&nbsp;<a class="trait" href="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a>&gt;(self, next: U) -&gt; <a class="struct" href="struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;Self, U&gt;<br>&nbsp;&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>,
+ { ... }
+</details>}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A trait for values that provide sequential write access to bytes.</p>
+<p>Write bytes to a buffer</p>
+<p>A buffer stores bytes in memory such that write operations are infallible.
+The underlying storage may or may not be in contiguous memory. A <code>BufMut</code>
+value is a cursor into the buffer. Writing to <code>BufMut</code> advances the cursor
+position.</p>
+<p>The simplest <code>BufMut</code> is a <code>Vec&lt;u8&gt;</code>.</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+
+buf.put(<span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]);
+
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;hello world&quot;</span>);</code></pre></div>
+</div></details><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.remaining_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#64">source</a><h4 class="code-header">fn <a href="#tymethod.remaining_mut" class="fnname">remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the number of bytes that can be written from the current
+position until the end of the buffer is reached.</p>
+<p>This value is greater than or equal to the length of the slice returned
+by <code>chunk_mut()</code>.</p>
+<p>Writing to a <code>BufMut</code> may involve allocating more memory on the fly.
+Implementations may fail before reaching the number of bytes indicated
+by this method if they encounter an allocation failure.</p>
+<h5 id="examples"><a href="#examples">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0</span>; <span class="number">10</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;mut </span>dst[..];
+
+<span class="kw">let </span>original_remaining = buf.remaining_mut();
+buf.put(<span class="kw-2">&amp;</span><span class="string">b&quot;hello&quot;</span>[..]);
+
+<span class="macro">assert_eq!</span>(original_remaining - <span class="number">5</span>, buf.remaining_mut());</code></pre></div>
+<h5 id="implementer-notes"><a href="#implementer-notes">Implementer notes</a></h5>
+<p>Implementations of <code>remaining_mut</code> should ensure that the return value
+does not change unless a call is made to <code>advance_mut</code> or any other
+function that is documented to change the <code>BufMut</code>’s current position.</p>
+<h5 id="note"><a href="#note">Note</a></h5>
+<p><code>remaining_mut</code> may return value smaller than actual available space.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.advance_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#107">source</a><h4 class="code-header">unsafe fn <a href="#tymethod.advance_mut" class="fnname">advance_mut</a>(&amp;mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Advance the internal cursor of the BufMut</p>
+<p>The next call to <code>chunk_mut</code> will return a slice starting <code>cnt</code> bytes
+further into the underlying buffer.</p>
+<h5 id="safety"><a href="#safety">Safety</a></h5>
+<p>The caller must ensure that the next <code>cnt</code> bytes of <code>chunk</code> are
+initialized.</p>
+<h5 id="examples-1"><a href="#examples-1">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = Vec::with_capacity(<span class="number">16</span>);
+
+<span class="comment">// Write some data
+</span>buf.chunk_mut()[<span class="number">0</span>..<span class="number">2</span>].copy_from_slice(<span class="string">b&quot;he&quot;</span>);
+<span class="kw">unsafe </span>{ buf.advance_mut(<span class="number">2</span>) };
+
+<span class="comment">// write more bytes
+</span>buf.chunk_mut()[<span class="number">0</span>..<span class="number">3</span>].copy_from_slice(<span class="string">b&quot;llo&quot;</span>);
+
+<span class="kw">unsafe </span>{ buf.advance_mut(<span class="number">3</span>); }
+
+<span class="macro">assert_eq!</span>(<span class="number">5</span>, buf.len());
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;hello&quot;</span>);</code></pre></div>
+<h5 id="panics"><a href="#panics">Panics</a></h5>
+<p>This function <strong>may</strong> panic if <code>cnt &gt; self.remaining_mut()</code>.</p>
+<h5 id="implementer-notes-1"><a href="#implementer-notes-1">Implementer notes</a></h5>
+<p>It is recommended for implementations of <code>advance_mut</code> to panic if
+<code>cnt &gt; self.remaining_mut()</code>. If the implementation does not panic,
+the call must behave as if <code>cnt == self.remaining_mut()</code>.</p>
+<p>A call with <code>cnt == 0</code> should never panic and be a no-op.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.chunk_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#179">source</a><h4 class="code-header">fn <a href="#tymethod.chunk_mut" class="fnname">chunk_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class="docblock"><p>Returns a mutable slice starting at the current BufMut position and of
+length between 0 and <code>BufMut::remaining_mut()</code>. Note that this <em>can</em> be shorter than the
+whole remainder of the buffer (this allows non-continuous implementation).</p>
+<p>This is a lower level function. Most operations are done with other
+functions.</p>
+<p>The returned byte slice may represent uninitialized memory.</p>
+<h5 id="examples-2"><a href="#examples-2">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = Vec::with_capacity(<span class="number">16</span>);
+
+<span class="kw">unsafe </span>{
+ <span class="comment">// MaybeUninit::as_mut_ptr
+ </span>buf.chunk_mut()[<span class="number">0</span>..].as_mut_ptr().write(<span class="string">b&#39;h&#39;</span>);
+ buf.chunk_mut()[<span class="number">1</span>..].as_mut_ptr().write(<span class="string">b&#39;e&#39;</span>);
+
+ buf.advance_mut(<span class="number">2</span>);
+
+ buf.chunk_mut()[<span class="number">0</span>..].as_mut_ptr().write(<span class="string">b&#39;l&#39;</span>);
+ buf.chunk_mut()[<span class="number">1</span>..].as_mut_ptr().write(<span class="string">b&#39;l&#39;</span>);
+ buf.chunk_mut()[<span class="number">2</span>..].as_mut_ptr().write(<span class="string">b&#39;o&#39;</span>);
+
+ buf.advance_mut(<span class="number">3</span>);
+}
+
+<span class="macro">assert_eq!</span>(<span class="number">5</span>, buf.len());
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;hello&quot;</span>);</code></pre></div>
+<h5 id="implementer-notes-2"><a href="#implementer-notes-2">Implementer notes</a></h5>
+<p>This function should never panic. <code>chunk_mut</code> should return an empty
+slice <strong>if and only if</strong> <code>remaining_mut()</code> returns 0. In other words,
+<code>chunk_mut()</code> returning an empty slice implies that <code>remaining_mut()</code> will
+return 0 and <code>remaining_mut()</code> returning 0 implies that <code>chunk_mut()</code> will
+return an empty slice.</p>
+<p>This function may trigger an out-of-memory abort if it tries to allocate
+memory and fails to do so.</p>
+</div></details></div><h2 id="provided-methods" class="small-section-header">Provided Methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.has_remaining_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#128-130">source</a><h4 class="code-header">fn <a href="#method.has_remaining_mut" class="fnname">has_remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if there is space in <code>self</code> for more bytes.</p>
+<p>This is equivalent to <code>self.remaining_mut() != 0</code>.</p>
+<h5 id="examples-3"><a href="#examples-3">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0</span>; <span class="number">5</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;mut </span>dst[..];
+
+<span class="macro">assert!</span>(buf.has_remaining_mut());
+
+buf.put(<span class="kw-2">&amp;</span><span class="string">b&quot;hello&quot;</span>[..]);
+
+<span class="macro">assert!</span>(!buf.has_remaining_mut());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#202-221">source</a><h4 class="code-header">fn <a href="#method.put" class="fnname">put</a>&lt;T:&nbsp;<a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt;(&amp;mut self, src: T)<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>,</span></h4></section></summary><div class="docblock"><p>Transfer bytes into <code>self</code> from <code>src</code> and advance the cursor by the
+number of bytes written.</p>
+<h5 id="examples-4"><a href="#examples-4">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+
+buf.put_u8(<span class="string">b&#39;h&#39;</span>);
+buf.put(<span class="kw-2">&amp;</span><span class="string">b&quot;ello&quot;</span>[..]);
+buf.put(<span class="kw-2">&amp;</span><span class="string">b&quot; world&quot;</span>[..]);
+
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;hello world&quot;</span>);</code></pre></div>
+<h5 id="panics-1"><a href="#panics-1">Panics</a></h5>
+<p>Panics if <code>self</code> does not have enough capacity to contain <code>src</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_slice" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#243-258">source</a><h4 class="code-header">fn <a href="#method.put_slice" class="fnname">put_slice</a>(&amp;mut self, src: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section></summary><div class="docblock"><p>Transfer bytes into <code>self</code> from <code>src</code> and advance the cursor by the
+number of bytes written.</p>
+<p><code>self</code> must have enough remaining capacity to contain all of <code>src</code>.</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0</span>; <span class="number">6</span>];
+
+{
+ <span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;mut </span>dst[..];
+ buf.put_slice(<span class="string">b&quot;hello&quot;</span>);
+
+ <span class="macro">assert_eq!</span>(<span class="number">1</span>, buf.remaining_mut());
+}
+
+<span class="macro">assert_eq!</span>(<span class="string">b&quot;hello\0&quot;</span>, <span class="kw-2">&amp;</span>dst);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_bytes" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#286-300">source</a><h4 class="code-header">fn <a href="#method.put_bytes" class="fnname">put_bytes</a>(&amp;mut self, val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Put <code>cnt</code> bytes <code>val</code> into <code>self</code>.</p>
+<p>Logically equivalent to calling <code>self.put_u8(val)</code> <code>cnt</code> times, but may work faster.</p>
+<p><code>self</code> must have at least <code>cnt</code> remaining capacity.</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0</span>; <span class="number">6</span>];
+
+{
+ <span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;mut </span>dst[..];
+ buf.put_bytes(<span class="string">b&#39;a&#39;</span>, <span class="number">4</span>);
+
+ <span class="macro">assert_eq!</span>(<span class="number">2</span>, buf.remaining_mut());
+}
+
+<span class="macro">assert_eq!</span>(<span class="string">b&quot;aaaa\0\0&quot;</span>, <span class="kw-2">&amp;</span>dst);</code></pre></div>
+<h5 id="panics-2"><a href="#panics-2">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u8" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#321-324">source</a><h4 class="code-header">fn <a href="#method.put_u8" class="fnname">put_u8</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 8 bit integer to <code>self</code>.</p>
+<p>The current position is advanced by 1.</p>
+<h5 id="examples-5"><a href="#examples-5">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u8(<span class="number">0x01</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01&quot;</span>);</code></pre></div>
+<h5 id="panics-3"><a href="#panics-3">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i8" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#345-348">source</a><h4 class="code-header">fn <a href="#method.put_i8" class="fnname">put_i8</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 8 bit integer to <code>self</code>.</p>
+<p>The current position is advanced by 1.</p>
+<h5 id="examples-6"><a href="#examples-6">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i8(<span class="number">0x01</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01&quot;</span>);</code></pre></div>
+<h5 id="panics-4"><a href="#panics-4">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u16" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#369-371">source</a><h4 class="code-header">fn <a href="#method.put_u16" class="fnname">put_u16</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 16 bit integer to <code>self</code> in big-endian byte order.</p>
+<p>The current position is advanced by 2.</p>
+<h5 id="examples-7"><a href="#examples-7">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u16(<span class="number">0x0809</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x09&quot;</span>);</code></pre></div>
+<h5 id="panics-5"><a href="#panics-5">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u16_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#392-394">source</a><h4 class="code-header">fn <a href="#method.put_u16_le" class="fnname">put_u16_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 16 bit integer to <code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 2.</p>
+<h5 id="examples-8"><a href="#examples-8">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u16_le(<span class="number">0x0809</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x09\x08&quot;</span>);</code></pre></div>
+<h5 id="panics-6"><a href="#panics-6">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u16_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#419-421">source</a><h4 class="code-header">fn <a href="#method.put_u16_ne" class="fnname">put_u16_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 16 bit integer to <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 2.</p>
+<h5 id="examples-9"><a href="#examples-9">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u16_ne(<span class="number">0x0809</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x09&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x09\x08&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-7"><a href="#panics-7">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i16" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#442-444">source</a><h4 class="code-header">fn <a href="#method.put_i16" class="fnname">put_i16</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 16 bit integer to <code>self</code> in big-endian byte order.</p>
+<p>The current position is advanced by 2.</p>
+<h5 id="examples-10"><a href="#examples-10">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i16(<span class="number">0x0809</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x09&quot;</span>);</code></pre></div>
+<h5 id="panics-8"><a href="#panics-8">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i16_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#465-467">source</a><h4 class="code-header">fn <a href="#method.put_i16_le" class="fnname">put_i16_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 16 bit integer to <code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 2.</p>
+<h5 id="examples-11"><a href="#examples-11">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i16_le(<span class="number">0x0809</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x09\x08&quot;</span>);</code></pre></div>
+<h5 id="panics-9"><a href="#panics-9">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i16_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#492-494">source</a><h4 class="code-header">fn <a href="#method.put_i16_ne" class="fnname">put_i16_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 16 bit integer to <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 2.</p>
+<h5 id="examples-12"><a href="#examples-12">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i16_ne(<span class="number">0x0809</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x09&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x09\x08&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-10"><a href="#panics-10">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u32" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#515-517">source</a><h4 class="code-header">fn <a href="#method.put_u32" class="fnname">put_u32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 32 bit integer to <code>self</code> in big-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-13"><a href="#examples-13">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u32(<span class="number">0x0809A0A1</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x09\xA0\xA1&quot;</span>);</code></pre></div>
+<h5 id="panics-11"><a href="#panics-11">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u32_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#538-540">source</a><h4 class="code-header">fn <a href="#method.put_u32_le" class="fnname">put_u32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 32 bit integer to <code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-14"><a href="#examples-14">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u32_le(<span class="number">0x0809A0A1</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\xA1\xA0\x09\x08&quot;</span>);</code></pre></div>
+<h5 id="panics-12"><a href="#panics-12">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u32_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#565-567">source</a><h4 class="code-header">fn <a href="#method.put_u32_ne" class="fnname">put_u32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 32 bit integer to <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-15"><a href="#examples-15">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u32_ne(<span class="number">0x0809A0A1</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x09\xA0\xA1&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\xA1\xA0\x09\x08&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-13"><a href="#panics-13">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i32" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#588-590">source</a><h4 class="code-header">fn <a href="#method.put_i32" class="fnname">put_i32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 32 bit integer to <code>self</code> in big-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-16"><a href="#examples-16">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i32(<span class="number">0x0809A0A1</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x09\xA0\xA1&quot;</span>);</code></pre></div>
+<h5 id="panics-14"><a href="#panics-14">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i32_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#611-613">source</a><h4 class="code-header">fn <a href="#method.put_i32_le" class="fnname">put_i32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 32 bit integer to <code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-17"><a href="#examples-17">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i32_le(<span class="number">0x0809A0A1</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\xA1\xA0\x09\x08&quot;</span>);</code></pre></div>
+<h5 id="panics-15"><a href="#panics-15">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i32_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#638-640">source</a><h4 class="code-header">fn <a href="#method.put_i32_ne" class="fnname">put_i32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 32 bit integer to <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-18"><a href="#examples-18">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i32_ne(<span class="number">0x0809A0A1</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x09\xA0\xA1&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\xA1\xA0\x09\x08&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-16"><a href="#panics-16">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u64" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#661-663">source</a><h4 class="code-header">fn <a href="#method.put_u64" class="fnname">put_u64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 64 bit integer to <code>self</code> in the big-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-19"><a href="#examples-19">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u64(<span class="number">0x0102030405060708</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08&quot;</span>);</code></pre></div>
+<h5 id="panics-17"><a href="#panics-17">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u64_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#684-686">source</a><h4 class="code-header">fn <a href="#method.put_u64_le" class="fnname">put_u64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 64 bit integer to <code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-20"><a href="#examples-20">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u64_le(<span class="number">0x0102030405060708</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x07\x06\x05\x04\x03\x02\x01&quot;</span>);</code></pre></div>
+<h5 id="panics-18"><a href="#panics-18">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u64_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#711-713">source</a><h4 class="code-header">fn <a href="#method.put_u64_ne" class="fnname">put_u64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 64 bit integer to <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-21"><a href="#examples-21">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u64_ne(<span class="number">0x0102030405060708</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x07\x06\x05\x04\x03\x02\x01&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-19"><a href="#panics-19">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i64" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#734-736">source</a><h4 class="code-header">fn <a href="#method.put_i64" class="fnname">put_i64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 64 bit integer to <code>self</code> in the big-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-22"><a href="#examples-22">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i64(<span class="number">0x0102030405060708</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08&quot;</span>);</code></pre></div>
+<h5 id="panics-20"><a href="#panics-20">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i64_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#757-759">source</a><h4 class="code-header">fn <a href="#method.put_i64_le" class="fnname">put_i64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 64 bit integer to <code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-23"><a href="#examples-23">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i64_le(<span class="number">0x0102030405060708</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x07\x06\x05\x04\x03\x02\x01&quot;</span>);</code></pre></div>
+<h5 id="panics-21"><a href="#panics-21">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i64_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#784-786">source</a><h4 class="code-header">fn <a href="#method.put_i64_ne" class="fnname">put_i64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 64 bit integer to <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-24"><a href="#examples-24">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i64_ne(<span class="number">0x0102030405060708</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x07\x06\x05\x04\x03\x02\x01&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-22"><a href="#panics-22">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u128" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#807-809">source</a><h4 class="code-header">fn <a href="#method.put_u128" class="fnname">put_u128</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 128 bit integer to <code>self</code> in the big-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-25"><a href="#examples-25">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u128(<span class="number">0x01020304050607080910111213141516</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16&quot;</span>);</code></pre></div>
+<h5 id="panics-23"><a href="#panics-23">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u128_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#830-832">source</a><h4 class="code-header">fn <a href="#method.put_u128_le" class="fnname">put_u128_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 128 bit integer to <code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-26"><a href="#examples-26">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u128_le(<span class="number">0x01020304050607080910111213141516</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01&quot;</span>);</code></pre></div>
+<h5 id="panics-24"><a href="#panics-24">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u128_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#857-859">source</a><h4 class="code-header">fn <a href="#method.put_u128_ne" class="fnname">put_u128_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 128 bit integer to <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-27"><a href="#examples-27">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u128_ne(<span class="number">0x01020304050607080910111213141516</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-25"><a href="#panics-25">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i128" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#880-882">source</a><h4 class="code-header">fn <a href="#method.put_i128" class="fnname">put_i128</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 128 bit integer to <code>self</code> in the big-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-28"><a href="#examples-28">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i128(<span class="number">0x01020304050607080910111213141516</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16&quot;</span>);</code></pre></div>
+<h5 id="panics-26"><a href="#panics-26">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i128_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#903-905">source</a><h4 class="code-header">fn <a href="#method.put_i128_le" class="fnname">put_i128_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 128 bit integer to <code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-29"><a href="#examples-29">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i128_le(<span class="number">0x01020304050607080910111213141516</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01&quot;</span>);</code></pre></div>
+<h5 id="panics-27"><a href="#panics-27">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i128_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#930-932">source</a><h4 class="code-header">fn <a href="#method.put_i128_ne" class="fnname">put_i128_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 128 bit integer to <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-30"><a href="#examples-30">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i128_ne(<span class="number">0x01020304050607080910111213141516</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-28"><a href="#panics-28">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_uint" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#953-960">source</a><h4 class="code-header">fn <a href="#method.put_uint" class="fnname">put_uint</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned n-byte integer to <code>self</code> in big-endian byte order.</p>
+<p>The current position is advanced by <code>nbytes</code>.</p>
+<h5 id="examples-31"><a href="#examples-31">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_uint(<span class="number">0x010203</span>, <span class="number">3</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03&quot;</span>);</code></pre></div>
+<h5 id="panics-29"><a href="#panics-29">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code> or if <code>nbytes</code> is greater than 8.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_uint_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#981-989">source</a><h4 class="code-header">fn <a href="#method.put_uint_le" class="fnname">put_uint_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned n-byte integer to <code>self</code> in the little-endian byte order.</p>
+<p>The current position is advanced by <code>nbytes</code>.</p>
+<h5 id="examples-32"><a href="#examples-32">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_uint_le(<span class="number">0x010203</span>, <span class="number">3</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x03\x02\x01&quot;</span>);</code></pre></div>
+<h5 id="panics-30"><a href="#panics-30">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code> or if <code>nbytes</code> is greater than 8.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_uint_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1014-1020">source</a><h4 class="code-header">fn <a href="#method.put_uint_ne" class="fnname">put_uint_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned n-byte integer to <code>self</code> in the native-endian byte order.</p>
+<p>The current position is advanced by <code>nbytes</code>.</p>
+<h5 id="examples-33"><a href="#examples-33">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_uint_ne(<span class="number">0x010203</span>, <span class="number">3</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x03\x02\x01&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-31"><a href="#panics-31">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code> or if <code>nbytes</code> is greater than 8.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_int" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1041-1048">source</a><h4 class="code-header">fn <a href="#method.put_int" class="fnname">put_int</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Writes low <code>nbytes</code> of a signed integer to <code>self</code> in big-endian byte order.</p>
+<p>The current position is advanced by <code>nbytes</code>.</p>
+<h5 id="examples-34"><a href="#examples-34">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_int(<span class="number">0x0504010203</span>, <span class="number">3</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03&quot;</span>);</code></pre></div>
+<h5 id="panics-32"><a href="#panics-32">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code> or if <code>nbytes</code> is greater than 8.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_int_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1069-1077">source</a><h4 class="code-header">fn <a href="#method.put_int_le" class="fnname">put_int_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Writes low <code>nbytes</code> of a signed integer to <code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by <code>nbytes</code>.</p>
+<h5 id="examples-35"><a href="#examples-35">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_int_le(<span class="number">0x0504010203</span>, <span class="number">3</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x03\x02\x01&quot;</span>);</code></pre></div>
+<h5 id="panics-33"><a href="#panics-33">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code> or if <code>nbytes</code> is greater than 8.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_int_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1102-1108">source</a><h4 class="code-header">fn <a href="#method.put_int_ne" class="fnname">put_int_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Writes low <code>nbytes</code> of a signed integer to <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by <code>nbytes</code>.</p>
+<h5 id="examples-36"><a href="#examples-36">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_int_ne(<span class="number">0x010203</span>, <span class="number">3</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x03\x02\x01&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-34"><a href="#panics-34">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code> or if <code>nbytes</code> is greater than 8.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f32" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1130-1132">source</a><h4 class="code-header">fn <a href="#method.put_f32" class="fnname">put_f32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>)</h4></section></summary><div class="docblock"><p>Writes an IEEE754 single-precision (4 bytes) floating point number to
+<code>self</code> in big-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-37"><a href="#examples-37">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_f32(<span class="number">1.2f32</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x3F\x99\x99\x9A&quot;</span>);</code></pre></div>
+<h5 id="panics-35"><a href="#panics-35">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f32_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1154-1156">source</a><h4 class="code-header">fn <a href="#method.put_f32_le" class="fnname">put_f32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>)</h4></section></summary><div class="docblock"><p>Writes an IEEE754 single-precision (4 bytes) floating point number to
+<code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-38"><a href="#examples-38">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_f32_le(<span class="number">1.2f32</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x9A\x99\x99\x3F&quot;</span>);</code></pre></div>
+<h5 id="panics-36"><a href="#panics-36">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f32_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1182-1184">source</a><h4 class="code-header">fn <a href="#method.put_f32_ne" class="fnname">put_f32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>)</h4></section></summary><div class="docblock"><p>Writes an IEEE754 single-precision (4 bytes) floating point number to
+<code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-39"><a href="#examples-39">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_f32_ne(<span class="number">1.2f32</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x3F\x99\x99\x9A&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x9A\x99\x99\x3F&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-37"><a href="#panics-37">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f64" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1206-1208">source</a><h4 class="code-header">fn <a href="#method.put_f64" class="fnname">put_f64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</h4></section></summary><div class="docblock"><p>Writes an IEEE754 double-precision (8 bytes) floating point number to
+<code>self</code> in big-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-40"><a href="#examples-40">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_f64(<span class="number">1.2f64</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x3F\xF3\x33\x33\x33\x33\x33\x33&quot;</span>);</code></pre></div>
+<h5 id="panics-38"><a href="#panics-38">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f64_le" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1230-1232">source</a><h4 class="code-header">fn <a href="#method.put_f64_le" class="fnname">put_f64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</h4></section></summary><div class="docblock"><p>Writes an IEEE754 double-precision (8 bytes) floating point number to
+<code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-41"><a href="#examples-41">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_f64_le(<span class="number">1.2f64</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x33\x33\x33\x33\x33\x33\xF3\x3F&quot;</span>);</code></pre></div>
+<h5 id="panics-39"><a href="#panics-39">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f64_ne" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1258-1260">source</a><h4 class="code-header">fn <a href="#method.put_f64_ne" class="fnname">put_f64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</h4></section></summary><div class="docblock"><p>Writes an IEEE754 double-precision (8 bytes) floating point number to
+<code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-42"><a href="#examples-42">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_f64_ne(<span class="number">1.2f64</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x3F\xF3\x33\x33\x33\x33\x33\x33&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x33\x33\x33\x33\x33\x33\xF3\x3F&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-40"><a href="#panics-40">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.limit" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1276-1281">source</a><h4 class="code-header">fn <a href="#method.limit" class="fnname">limit</a>(self, limit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="struct.Limit.html" title="struct bytes::buf::Limit">Limit</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>,</span></h4></section></summary><div class="docblock"><p>Creates an adaptor which can write at most <code>limit</code> bytes to <code>self</code>.</p>
+<h5 id="examples-43"><a href="#examples-43">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span>arr = <span class="kw-2">&amp;mut </span>[<span class="number">0u8</span>; <span class="number">128</span>][..];
+<span class="macro">assert_eq!</span>(arr.remaining_mut(), <span class="number">128</span>);
+
+<span class="kw">let </span>dst = arr.limit(<span class="number">10</span>);
+<span class="macro">assert_eq!</span>(dst.remaining_mut(), <span class="number">10</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.writer" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1308-1313">source</a><h4 class="code-header">fn <a href="#method.writer" class="fnname">writer</a>(self) -&gt; <a class="struct" href="struct.Writer.html" title="struct bytes::buf::Writer">Writer</a>&lt;Self&gt;<span class="notable-traits" data-ty="Writer&lt;Self&gt;"><span class="notable-traits-tooltip">ⓘ</span></span><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>,</span></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>std</code></strong> only.</div></span><div class="docblock"><p>Creates an adaptor which implements the <code>Write</code> trait for <code>self</code>.</p>
+<p>This function returns a new value which implements <code>Write</code> by adapting
+the <code>Write</code> trait functions to the <code>BufMut</code> trait functions. Given that
+<code>BufMut</code> operations are infallible, none of the <code>Write</code> functions will
+return with <code>Err</code>.</p>
+<h5 id="examples-44"><a href="#examples-44">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+<span class="kw">use </span>std::io::Write;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[].writer();
+
+<span class="kw">let </span>num = buf.write(<span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]).unwrap();
+<span class="macro">assert_eq!</span>(<span class="number">11</span>, num);
+
+<span class="kw">let </span>buf = buf.into_inner();
+
+<span class="macro">assert_eq!</span>(<span class="kw-2">*</span>buf, <span class="string">b&quot;hello world&quot;</span>[..]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chain_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1336-1341">source</a><h4 class="code-header">fn <a href="#method.chain_mut" class="fnname">chain_mut</a>&lt;U:&nbsp;<a class="trait" href="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a>&gt;(self, next: U) -&gt; <a class="struct" href="struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;Self, U&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>,</span></h4></section></summary><div class="docblock"><p>Creates an adapter which will chain this buffer with another.</p>
+<p>The returned <code>BufMut</code> instance will first write to all bytes from
+<code>self</code>. Afterwards, it will write to <code>next</code>.</p>
+<h5 id="examples-45"><a href="#examples-45">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>a = [<span class="number">0u8</span>; <span class="number">5</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>b = [<span class="number">0u8</span>; <span class="number">6</span>];
+
+<span class="kw">let </span><span class="kw-2">mut </span>chain = (<span class="kw-2">&amp;mut </span>a[..]).chain_mut(<span class="kw-2">&amp;mut </span>b[..]);
+
+chain.put_slice(<span class="string">b&quot;hello world&quot;</span>);
+
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>a[..], <span class="string">b&quot;hello&quot;</span>);
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>b[..], <span class="string">b&quot; world&quot;</span>);</code></pre></div>
+</div></details></div><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BufMut-for-%26mut%20T" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1468-1470">source</a><a href="#impl-BufMut-for-%26mut%20T" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</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="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</h3></section></summary><div class="impl-items"><section id="method.remaining_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.remaining_mut" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.remaining_mut" class="fnname">remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section><section id="method.chunk_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.chunk_mut" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.chunk_mut" class="fnname">chunk_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section><section id="method.advance_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.advance_mut" class="anchor"></a><h4 class="code-header">unsafe fn <a href="#tymethod.advance_mut" class="fnname">advance_mut</a>(&amp;mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section><section id="method.put_slice-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_slice-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_slice" class="fnname">put_slice</a>(&amp;mut self, src: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section><section id="method.put_u8-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_u8-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u8" class="fnname">put_u8</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>)</h4></section><section id="method.put_i8-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_i8-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i8" class="fnname">put_i8</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>)</h4></section><section id="method.put_u16-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_u16-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u16" class="fnname">put_u16</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section><section id="method.put_u16_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_u16_le-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u16_le" class="fnname">put_u16_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section><section id="method.put_u16_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_u16_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u16_ne" class="fnname">put_u16_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section><section id="method.put_i16-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_i16-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i16" class="fnname">put_i16</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section><section id="method.put_i16_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_i16_le-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i16_le" class="fnname">put_i16_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section><section id="method.put_i16_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_i16_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i16_ne" class="fnname">put_i16_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section><section id="method.put_u32-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_u32-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u32" class="fnname">put_u32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section><section id="method.put_u32_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_u32_le-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u32_le" class="fnname">put_u32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section><section id="method.put_u32_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_u32_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u32_ne" class="fnname">put_u32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section><section id="method.put_i32-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_i32-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i32" class="fnname">put_i32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section><section id="method.put_i32_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_i32_le-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i32_le" class="fnname">put_i32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section><section id="method.put_i32_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_i32_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i32_ne" class="fnname">put_i32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section><section id="method.put_u64-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_u64-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u64" class="fnname">put_u64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section><section id="method.put_u64_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_u64_le-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u64_le" class="fnname">put_u64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section><section id="method.put_u64_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_u64_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u64_ne" class="fnname">put_u64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section><section id="method.put_i64-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_i64-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i64" class="fnname">put_i64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section><section id="method.put_i64_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_i64_le-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i64_le" class="fnname">put_i64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section><section id="method.put_i64_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_i64_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i64_ne" class="fnname">put_i64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BufMut-for-Box%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1472-1474">source</a><a href="#impl-BufMut-for-Box%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</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="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</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;</h3></section></summary><div class="impl-items"><section id="method.remaining_mut-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.remaining_mut-1" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.remaining_mut" class="fnname">remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section><section id="method.chunk_mut-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.chunk_mut-1" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.chunk_mut" class="fnname">chunk_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section><section id="method.advance_mut-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.advance_mut-1" class="anchor"></a><h4 class="code-header">unsafe fn <a href="#tymethod.advance_mut" class="fnname">advance_mut</a>(&amp;mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section><section id="method.put_slice-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_slice-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_slice" class="fnname">put_slice</a>(&amp;mut self, src: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section><section id="method.put_u8-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_u8-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u8" class="fnname">put_u8</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>)</h4></section><section id="method.put_i8-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_i8-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i8" class="fnname">put_i8</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>)</h4></section><section id="method.put_u16-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_u16-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u16" class="fnname">put_u16</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section><section id="method.put_u16_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_u16_le-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u16_le" class="fnname">put_u16_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section><section id="method.put_u16_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_u16_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u16_ne" class="fnname">put_u16_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section><section id="method.put_i16-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_i16-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i16" class="fnname">put_i16</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section><section id="method.put_i16_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_i16_le-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i16_le" class="fnname">put_i16_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section><section id="method.put_i16_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_i16_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i16_ne" class="fnname">put_i16_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section><section id="method.put_u32-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_u32-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u32" class="fnname">put_u32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section><section id="method.put_u32_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_u32_le-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u32_le" class="fnname">put_u32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section><section id="method.put_u32_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_u32_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u32_ne" class="fnname">put_u32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section><section id="method.put_i32-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_i32-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i32" class="fnname">put_i32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section><section id="method.put_i32_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_i32_le-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i32_le" class="fnname">put_i32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section><section id="method.put_i32_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_i32_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i32_ne" class="fnname">put_i32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section><section id="method.put_u64-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_u64-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u64" class="fnname">put_u64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section><section id="method.put_u64_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_u64_le-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u64_le" class="fnname">put_u64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section><section id="method.put_u64_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_u64_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u64_ne" class="fnname">put_u64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section><section id="method.put_i64-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_i64-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i64" class="fnname">put_i64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section><section id="method.put_i64_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_i64_le-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i64_le" class="fnname">put_i64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section><section id="method.put_i64_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_i64_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i64_ne" class="fnname">put_i64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BufMut-for-%26mut%20%5Bu8%5D" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1476-1521">source</a><a href="#impl-BufMut-for-%26mut%20%5Bu8%5D" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a> for &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><section id="method.remaining_mut-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1478-1480">source</a><a href="#method.remaining_mut-2" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.remaining_mut" class="fnname">remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section><section id="method.chunk_mut-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1483-1485">source</a><a href="#method.chunk_mut-2" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.chunk_mut" class="fnname">chunk_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section><section id="method.advance_mut-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1488-1496">source</a><a href="#method.advance_mut-2" class="anchor"></a><h4 class="code-header">unsafe fn <a href="#tymethod.advance_mut" class="fnname">advance_mut</a>(&amp;mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section><section id="method.put_slice-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1499-1507">source</a><a href="#method.put_slice-3" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_slice" class="fnname">put_slice</a>(&amp;mut self, src: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section><section id="method.put_bytes-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1510-1520">source</a><a href="#method.put_bytes-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_bytes" class="fnname">put_bytes</a>(&amp;mut self, val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BufMut-for-%26mut%20%5BMaybeUninit%3Cu8%3E%5D" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1523-1570">source</a><a href="#impl-BufMut-for-%26mut%20%5BMaybeUninit%3Cu8%3E%5D" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a> for &amp;mut [<a class="union" href="https://doc.rust-lang.org/nightly/core/mem/maybe_uninit/union.MaybeUninit.html" title="union core::mem::maybe_uninit::MaybeUninit">MaybeUninit</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;]</h3></section></summary><div class="impl-items"><section id="method.remaining_mut-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1525-1527">source</a><a href="#method.remaining_mut-3" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.remaining_mut" class="fnname">remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section><section id="method.chunk_mut-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1530-1532">source</a><a href="#method.chunk_mut-3" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.chunk_mut" class="fnname">chunk_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section><section id="method.advance_mut-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1535-1543">source</a><a href="#method.advance_mut-3" class="anchor"></a><h4 class="code-header">unsafe fn <a href="#tymethod.advance_mut" class="fnname">advance_mut</a>(&amp;mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section><section id="method.put_slice-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1546-1556">source</a><a href="#method.put_slice-4" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_slice" class="fnname">put_slice</a>(&amp;mut self, src: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section><section id="method.put_bytes-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1559-1569">source</a><a href="#method.put_bytes-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_bytes" class="fnname">put_bytes</a>(&amp;mut self, val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BufMut-for-Vec%3Cu8%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1572-1637">source</a><a href="#impl-BufMut-for-Vec%3Cu8%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;</h3></section></summary><div class="impl-items"><section id="method.remaining_mut-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1574-1577">source</a><a href="#method.remaining_mut-4" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.remaining_mut" class="fnname">remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section><section id="method.advance_mut-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1580-1590">source</a><a href="#method.advance_mut-4" class="anchor"></a><h4 class="code-header">unsafe fn <a href="#tymethod.advance_mut" class="fnname">advance_mut</a>(&amp;mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section><section id="method.chunk_mut-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1593-1606">source</a><a href="#method.chunk_mut-4" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.chunk_mut" class="fnname">chunk_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section><section id="method.put-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1611-1624">source</a><a href="#method.put-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put" class="fnname">put</a>&lt;T:&nbsp;<a class="trait" href="trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt;(&amp;mut self, src: T)<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>,</span></h4></section><section id="method.put_slice-5" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1627-1629">source</a><a href="#method.put_slice-5" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_slice" class="fnname">put_slice</a>(&amp;mut self, src: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section><section id="method.put_bytes-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/buf_mut.rs.html#1632-1636">source</a><a href="#method.put_bytes-3" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_bytes" class="fnname">put_bytes</a>(&amp;mut self, val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div id="implementors-list"><section id="impl-BufMut-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/bytes_mut.rs.html#1093-1148">source</a><a href="#impl-BufMut-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a> for <a class="struct" href="../struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section><section id="impl-BufMut-for-Chain%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/chain.rs.html#191-227">source</a><a href="#impl-BufMut-for-Chain%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a> for <a class="struct" href="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="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a>,</span></h3></section><section id="impl-BufMut-for-Limit%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/bytes/buf/limit.rs.html#59-75">source</a><a href="#impl-BufMut-for-Limit%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a>&gt; <a class="trait" href="trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a> for <a class="struct" href="struct.Limit.html" title="struct bytes::buf::Limit">Limit</a>&lt;T&gt;</h3></section></div><script src="../../implementors/bytes/buf/buf_mut/trait.BufMut.js" data-ignore-extern-crates="alloc,std" async></script><script type="text/json" id="notable-traits-data">{"Writer<Self>":"<h3 class=\"notable\">Notable traits for <code><a class=\"struct\" href=\"struct.Writer.html\" title=\"struct bytes::buf::Writer\">Writer</a>&lt;B&gt;</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl&lt;B:&nbsp;<a class=\"trait\" href=\"trait.BufMut.html\" title=\"trait bytes::buf::BufMut\">BufMut</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.Write.html\" title=\"trait std::io::Write\">Write</a> for <a class=\"struct\" href=\"struct.Writer.html\" title=\"struct bytes::buf::Writer\">Writer</a>&lt;B&gt;</span>"}</script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/bytes/buf/uninit_slice/struct.UninitSlice.html b/bytes/buf/uninit_slice/struct.UninitSlice.html
new file mode 100644
index 0000000..576f5ff
--- /dev/null
+++ b/bytes/buf/uninit_slice/struct.UninitSlice.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta http-equiv="refresh" content="0;URL=../../../bytes/buf/struct.UninitSlice.html">
+ <title>Redirection</title>
+</head>
+<body>
+ <p>Redirecting to <a href="../../../bytes/buf/struct.UninitSlice.html">../../../bytes/buf/struct.UninitSlice.html</a>...</p>
+ <script>location.replace("../../../bytes/buf/struct.UninitSlice.html" + location.search + location.hash);</script>
+</body>
+</html> \ No newline at end of file
diff --git a/bytes/buf/writer/struct.Writer.html b/bytes/buf/writer/struct.Writer.html
new file mode 100644
index 0000000..3a3ba29
--- /dev/null
+++ b/bytes/buf/writer/struct.Writer.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta http-equiv="refresh" content="0;URL=../../../bytes/buf/struct.Writer.html">
+ <title>Redirection</title>
+</head>
+<body>
+ <p>Redirecting to <a href="../../../bytes/buf/struct.Writer.html">../../../bytes/buf/struct.Writer.html</a>...</p>
+ <script>location.replace("../../../bytes/buf/struct.Writer.html" + location.search + location.hash);</script>
+</body>
+</html> \ No newline at end of file
diff --git a/bytes/bytes/struct.Bytes.html b/bytes/bytes/struct.Bytes.html
new file mode 100644
index 0000000..4b3bc3a
--- /dev/null
+++ b/bytes/bytes/struct.Bytes.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta http-equiv="refresh" content="0;URL=../../bytes/struct.Bytes.html">
+ <title>Redirection</title>
+</head>
+<body>
+ <p>Redirecting to <a href="../../bytes/struct.Bytes.html">../../bytes/struct.Bytes.html</a>...</p>
+ <script>location.replace("../../bytes/struct.Bytes.html" + location.search + location.hash);</script>
+</body>
+</html> \ No newline at end of file
diff --git a/bytes/bytes_mut/struct.BytesMut.html b/bytes/bytes_mut/struct.BytesMut.html
new file mode 100644
index 0000000..45ba8f3
--- /dev/null
+++ b/bytes/bytes_mut/struct.BytesMut.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta http-equiv="refresh" content="0;URL=../../bytes/struct.BytesMut.html">
+ <title>Redirection</title>
+</head>
+<body>
+ <p>Redirecting to <a href="../../bytes/struct.BytesMut.html">../../bytes/struct.BytesMut.html</a>...</p>
+ <script>location.replace("../../bytes/struct.BytesMut.html" + location.search + location.hash);</script>
+</body>
+</html> \ No newline at end of file
diff --git a/bytes/index.html b/bytes/index.html
new file mode 100644
index 0000000..362bffb
--- /dev/null
+++ b/bytes/index.html
@@ -0,0 +1,50 @@
+<!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="Provides abstractions for working with bytes."><meta name="keywords" content="rust, rustlang, rust-lang, bytes"><title>bytes - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2 class="location"><a href="#">Crate bytes</a></h2><div class="sidebar-elems"><ul class="block"><li class="version">Version 1.6.0</li><li><a id="all-types" href="all.html">All Items</a></li></ul><section><ul class="block"><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#traits">Traits</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Crate <a class="mod" href="#">bytes</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../src/bytes/lib.rs.html#1-165">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Provides abstractions for working with bytes.</p>
+<p>The <code>bytes</code> crate provides an efficient byte buffer structure
+(<a href="struct.Bytes.html" title="Bytes"><code>Bytes</code></a>) and traits for working with buffer
+implementations (<a href="buf/trait.Buf.html" title="Buf"><code>Buf</code></a>, <a href="buf/trait.BufMut.html" title="BufMut"><code>BufMut</code></a>).</p>
+<h2 id="bytes"><a href="#bytes"><code>Bytes</code></a></h2>
+<p><code>Bytes</code> is an efficient container for storing and operating on contiguous
+slices of memory. It is intended for use primarily in networking code, but
+could have applications elsewhere as well.</p>
+<p><code>Bytes</code> values facilitate zero-copy network programming by allowing multiple
+<code>Bytes</code> objects to point to the same underlying memory. This is managed by
+using a reference count to track when the memory is no longer needed and can
+be freed.</p>
+<p>A <code>Bytes</code> handle can be created directly from an existing byte store (such as <code>&amp;[u8]</code>
+or <code>Vec&lt;u8&gt;</code>), but usually a <code>BytesMut</code> is used first and written to. For
+example:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::{BytesMut, BufMut};
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = BytesMut::with_capacity(<span class="number">1024</span>);
+buf.put(<span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]);
+buf.put_u16(<span class="number">1234</span>);
+
+<span class="kw">let </span>a = buf.split();
+<span class="macro">assert_eq!</span>(a, <span class="string">b&quot;hello world\x04\xD2&quot;</span>[..]);
+
+buf.put(<span class="kw-2">&amp;</span><span class="string">b&quot;goodbye world&quot;</span>[..]);
+
+<span class="kw">let </span>b = buf.split();
+<span class="macro">assert_eq!</span>(b, <span class="string">b&quot;goodbye world&quot;</span>[..]);
+
+<span class="macro">assert_eq!</span>(buf.capacity(), <span class="number">998</span>);</code></pre></div>
+<p>In the above example, only a single buffer of 1024 is allocated. The handles
+<code>a</code> and <code>b</code> will share the underlying buffer and maintain indices tracking
+the view into the buffer represented by the handle.</p>
+<p>See the <a href="struct.Bytes.html">struct docs</a> for more details.</p>
+<h2 id="buf-bufmut"><a href="#buf-bufmut"><code>Buf</code>, <code>BufMut</code></a></h2>
+<p>These two traits provide read and write access to buffers. The underlying
+storage may or may not be in contiguous memory. For example, <code>Bytes</code> is a
+buffer that guarantees contiguous memory, but a <a href="https://en.wikipedia.org/wiki/Rope_(data_structure)">rope</a> stores the bytes in
+disjoint chunks. <code>Buf</code> and <code>BufMut</code> maintain cursors tracking the current
+position in the underlying byte storage. When bytes are read or written, the
+cursor is advanced.</p>
+<h3 id="relation-with-read-and-write"><a href="#relation-with-read-and-write">Relation with <code>Read</code> and <code>Write</code></a></h3>
+<p>At first glance, it may seem that <code>Buf</code> and <code>BufMut</code> overlap in
+functionality with <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="std::io::Read"><code>std::io::Read</code></a> and <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="std::io::Write"><code>std::io::Write</code></a>. However, they
+serve different purposes. A buffer is the value that is provided as an
+argument to <code>Read::read</code> and <code>Write::write</code>. <code>Read</code> and <code>Write</code> may then
+perform a syscall, which has the potential of failing. Operations on <code>Buf</code>
+and <code>BufMut</code> are infallible.</p>
+</div></details><h2 id="modules" class="small-section-header"><a href="#modules">Modules</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="mod" href="buf/index.html" title="bytes::buf mod">buf</a></div><div class="item-right docblock-short">Utilities for working with buffers.</div></div></div><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Bytes.html" title="bytes::Bytes struct">Bytes</a></div><div class="item-right docblock-short">A cheaply cloneable and sliceable chunk of contiguous memory.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.BytesMut.html" title="bytes::BytesMut struct">BytesMut</a></div><div class="item-right docblock-short">A unique reference to a contiguous slice of memory.</div></div></div><h2 id="traits" class="small-section-header"><a href="#traits">Traits</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.Buf.html" title="bytes::Buf trait">Buf</a></div><div class="item-right docblock-short">Read bytes from a buffer.</div></div><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.BufMut.html" title="bytes::BufMut trait">BufMut</a></div><div class="item-right docblock-short">A trait for values that provide sequential write access to bytes.</div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/bytes/sidebar-items.js b/bytes/sidebar-items.js
new file mode 100644
index 0000000..fbfe2cf
--- /dev/null
+++ b/bytes/sidebar-items.js
@@ -0,0 +1 @@
+window.SIDEBAR_ITEMS = {"mod":[["buf","Utilities for working with buffers."]],"struct":[["Bytes","A cheaply cloneable and sliceable chunk of contiguous memory."],["BytesMut","A unique reference to a contiguous slice of memory."]],"trait":[["Buf","Read bytes from a buffer."],["BufMut","A trait for values that provide sequential write access to bytes."]]}; \ No newline at end of file
diff --git a/bytes/struct.Bytes.html b/bytes/struct.Bytes.html
new file mode 100644
index 0000000..5af4774
--- /dev/null
+++ b/bytes/struct.Bytes.html
@@ -0,0 +1,1202 @@
+<!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="A cheaply cloneable and sliceable chunk of contiguous memory."><meta name="keywords" content="rust, rustlang, rust-lang, Bytes"><title>Bytes in bytes - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2 class="location"><a href="#">Bytes</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.clear">clear</a></li><li><a href="#method.copy_from_slice">copy_from_slice</a></li><li><a href="#method.from_static">from_static</a></li><li><a href="#method.is_empty">is_empty</a></li><li><a href="#method.is_unique">is_unique</a></li><li><a href="#method.len">len</a></li><li><a href="#method.new">new</a></li><li><a href="#method.slice">slice</a></li><li><a href="#method.slice_ref">slice_ref</a></li><li><a href="#method.split_off">split_off</a></li><li><a href="#method.split_to">split_to</a></li><li><a href="#method.truncate">truncate</a></li><li><a href="#method.try_into_mut">try_into_mut</a></li></ul><h3><a href="#deref-methods-%5Bu8%5D">Methods from Deref&lt;Target=[u8]&gt;</a></h3><ul class="block"><li><a href="#method.align_to">align_to</a></li><li><a href="#method.array_chunks">array_chunks</a></li><li><a href="#method.array_windows">array_windows</a></li><li><a href="#method.as_chunks">as_chunks</a></li><li><a href="#method.as_chunks_unchecked">as_chunks_unchecked</a></li><li><a href="#method.as_ptr">as_ptr</a></li><li><a href="#method.as_ptr_range">as_ptr_range</a></li><li><a href="#method.as_rchunks">as_rchunks</a></li><li><a href="#method.as_simd">as_simd</a></li><li><a href="#method.binary_search">binary_search</a></li><li><a href="#method.binary_search_by">binary_search_by</a></li><li><a href="#method.binary_search_by_key">binary_search_by_key</a></li><li><a href="#method.chunks">chunks</a></li><li><a href="#method.chunks_exact">chunks_exact</a></li><li><a href="#method.concat">concat</a></li><li><a href="#method.connect">connect</a></li><li><a href="#method.contains">contains</a></li><li><a href="#method.ends_with">ends_with</a></li><li><a href="#method.eq_ignore_ascii_case">eq_ignore_ascii_case</a></li><li><a href="#method.escape_ascii">escape_ascii</a></li><li><a href="#method.first">first</a></li><li><a href="#method.flatten">flatten</a></li><li><a href="#method.get">get</a></li><li><a href="#method.get_unchecked">get_unchecked</a></li><li><a href="#method.group_by">group_by</a></li><li><a href="#method.is_ascii">is_ascii</a></li><li><a href="#method.is_empty-1">is_empty</a></li><li><a href="#method.is_sorted">is_sorted</a></li><li><a href="#method.is_sorted_by">is_sorted_by</a></li><li><a href="#method.is_sorted_by_key">is_sorted_by_key</a></li><li><a href="#method.iter">iter</a></li><li><a href="#method.join">join</a></li><li><a href="#method.last">last</a></li><li><a href="#method.len-1">len</a></li><li><a href="#method.partition_point">partition_point</a></li><li><a href="#method.rchunks">rchunks</a></li><li><a href="#method.rchunks_exact">rchunks_exact</a></li><li><a href="#method.repeat">repeat</a></li><li><a href="#method.rsplit">rsplit</a></li><li><a href="#method.rsplit_array_ref">rsplit_array_ref</a></li><li><a href="#method.rsplitn">rsplitn</a></li><li><a href="#method.split">split</a></li><li><a href="#method.split_array_ref">split_array_ref</a></li><li><a href="#method.split_at">split_at</a></li><li><a href="#method.split_at_unchecked">split_at_unchecked</a></li><li><a href="#method.split_first">split_first</a></li><li><a href="#method.split_inclusive">split_inclusive</a></li><li><a href="#method.split_last">split_last</a></li><li><a href="#method.splitn">splitn</a></li><li><a href="#method.starts_with">starts_with</a></li><li><a href="#method.strip_prefix">strip_prefix</a></li><li><a href="#method.strip_suffix">strip_suffix</a></li><li><a href="#method.to_ascii_lowercase">to_ascii_lowercase</a></li><li><a href="#method.to_ascii_uppercase">to_ascii_uppercase</a></li><li><a href="#method.to_vec">to_vec</a></li><li><a href="#method.to_vec_in">to_vec_in</a></li><li><a href="#method.trim_ascii">trim_ascii</a></li><li><a href="#method.trim_ascii_end">trim_ascii_end</a></li><li><a href="#method.trim_ascii_start">trim_ascii_start</a></li><li><a href="#method.windows">windows</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-AsRef%3C%5Bu8%5D%3E-for-Bytes">AsRef&lt;[u8]&gt;</a></li><li><a href="#impl-Borrow%3C%5Bu8%5D%3E-for-Bytes">Borrow&lt;[u8]&gt;</a></li><li><a href="#impl-Buf-for-Bytes">Buf</a></li><li><a href="#impl-Clone-for-Bytes">Clone</a></li><li><a href="#impl-Debug-for-Bytes">Debug</a></li><li><a href="#impl-Default-for-Bytes">Default</a></li><li><a href="#impl-Deref-for-Bytes">Deref</a></li><li><a href="#impl-Deserialize%3C%27de%3E-for-Bytes">Deserialize&lt;&#39;de&gt;</a></li><li><a href="#impl-Drop-for-Bytes">Drop</a></li><li><a href="#impl-Eq-for-Bytes">Eq</a></li><li><a href="#impl-Extend%3CBytes%3E-for-BytesMut">Extend&lt;Bytes&gt;</a></li><li><a href="#impl-From%3C%26%27static%20%5Bu8%5D%3E-for-Bytes">From&lt;&amp;&#39;static [u8]&gt;</a></li><li><a href="#impl-From%3C%26%27static%20str%3E-for-Bytes">From&lt;&amp;&#39;static str&gt;</a></li><li><a href="#impl-From%3CBox%3C%5Bu8%5D%2C%20Global%3E%3E-for-Bytes">From&lt;Box&lt;[u8], Global&gt;&gt;</a></li><li><a href="#impl-From%3CBytes%3E-for-BytesMut">From&lt;Bytes&gt;</a></li><li><a href="#impl-From%3CBytes%3E-for-Vec%3Cu8%3E">From&lt;Bytes&gt;</a></li><li><a href="#impl-From%3CBytesMut%3E-for-Bytes">From&lt;BytesMut&gt;</a></li><li><a href="#impl-From%3CString%3E-for-Bytes">From&lt;String&gt;</a></li><li><a href="#impl-From%3CVec%3Cu8%2C%20Global%3E%3E-for-Bytes">From&lt;Vec&lt;u8, Global&gt;&gt;</a></li><li><a href="#impl-FromIterator%3Cu8%3E-for-Bytes">FromIterator&lt;u8&gt;</a></li><li><a href="#impl-Hash-for-Bytes">Hash</a></li><li><a href="#impl-IntoIterator-for-%26%27a%20Bytes">IntoIterator</a></li><li><a href="#impl-IntoIterator-for-Bytes">IntoIterator</a></li><li><a href="#impl-LowerHex-for-Bytes">LowerHex</a></li><li><a href="#impl-Ord-for-Bytes">Ord</a></li><li><a href="#impl-PartialEq%3C%26%27a%20T%3E-for-Bytes">PartialEq&lt;&amp;&#39;a T&gt;</a></li><li><a href="#impl-PartialEq%3C%5Bu8%5D%3E-for-Bytes">PartialEq&lt;[u8]&gt;</a></li><li><a href="#impl-PartialEq%3CBytes%3E-for-%26%5Bu8%5D">PartialEq&lt;Bytes&gt;</a></li><li><a href="#impl-PartialEq%3CBytes%3E-for-%26str">PartialEq&lt;Bytes&gt;</a></li><li><a href="#impl-PartialEq%3CBytes%3E-for-%5Bu8%5D">PartialEq&lt;Bytes&gt;</a></li><li><a href="#impl-PartialEq%3CBytes%3E-for-Bytes">PartialEq&lt;Bytes&gt;</a></li><li><a href="#impl-PartialEq%3CBytes%3E-for-BytesMut">PartialEq&lt;Bytes&gt;</a></li><li><a href="#impl-PartialEq%3CBytes%3E-for-String">PartialEq&lt;Bytes&gt;</a></li><li><a href="#impl-PartialEq%3CBytes%3E-for-Vec%3Cu8%3E">PartialEq&lt;Bytes&gt;</a></li><li><a href="#impl-PartialEq%3CBytes%3E-for-str">PartialEq&lt;Bytes&gt;</a></li><li><a href="#impl-PartialEq%3CBytesMut%3E-for-Bytes">PartialEq&lt;BytesMut&gt;</a></li><li><a href="#impl-PartialEq%3CString%3E-for-Bytes">PartialEq&lt;String&gt;</a></li><li><a href="#impl-PartialEq%3CVec%3Cu8%2C%20Global%3E%3E-for-Bytes">PartialEq&lt;Vec&lt;u8, Global&gt;&gt;</a></li><li><a href="#impl-PartialEq%3Cstr%3E-for-Bytes">PartialEq&lt;str&gt;</a></li><li><a href="#impl-PartialOrd%3C%26%27a%20T%3E-for-Bytes">PartialOrd&lt;&amp;&#39;a T&gt;</a></li><li><a href="#impl-PartialOrd%3C%5Bu8%5D%3E-for-Bytes">PartialOrd&lt;[u8]&gt;</a></li><li><a href="#impl-PartialOrd%3CBytes%3E-for-%26%5Bu8%5D">PartialOrd&lt;Bytes&gt;</a></li><li><a href="#impl-PartialOrd%3CBytes%3E-for-%26str">PartialOrd&lt;Bytes&gt;</a></li><li><a href="#impl-PartialOrd%3CBytes%3E-for-%5Bu8%5D">PartialOrd&lt;Bytes&gt;</a></li><li><a href="#impl-PartialOrd%3CBytes%3E-for-Bytes">PartialOrd&lt;Bytes&gt;</a></li><li><a href="#impl-PartialOrd%3CBytes%3E-for-String">PartialOrd&lt;Bytes&gt;</a></li><li><a href="#impl-PartialOrd%3CBytes%3E-for-Vec%3Cu8%3E">PartialOrd&lt;Bytes&gt;</a></li><li><a href="#impl-PartialOrd%3CBytes%3E-for-str">PartialOrd&lt;Bytes&gt;</a></li><li><a href="#impl-PartialOrd%3CString%3E-for-Bytes">PartialOrd&lt;String&gt;</a></li><li><a href="#impl-PartialOrd%3CVec%3Cu8%2C%20Global%3E%3E-for-Bytes">PartialOrd&lt;Vec&lt;u8, Global&gt;&gt;</a></li><li><a href="#impl-PartialOrd%3Cstr%3E-for-Bytes">PartialOrd&lt;str&gt;</a></li><li><a href="#impl-Send-for-Bytes">Send</a></li><li><a href="#impl-Serialize-for-Bytes">Serialize</a></li><li><a href="#impl-Sync-for-Bytes">Sync</a></li><li><a href="#impl-UpperHex-for-Bytes">UpperHex</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-Bytes">RefUnwindSafe</a></li><li><a href="#impl-Unpin-for-Bytes">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Bytes">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-Bytes">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-Bytes">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-Bytes">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-DeserializeOwned-for-Bytes">DeserializeOwned</a></li><li><a href="#impl-From%3CT%3E-for-Bytes">From&lt;T&gt;</a></li><li><a href="#impl-Into%3CU%3E-for-Bytes">Into&lt;U&gt;</a></li><li><a href="#impl-ToOwned-for-Bytes">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-Bytes">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-Bytes">TryInto&lt;U&gt;</a></li></ul></section><h2><a href="index.html">In bytes</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="index.html">bytes</a>::<wbr><a class="struct" href="#">Bytes</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../src/bytes/bytes.rs.html#101-107">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct Bytes { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A cheaply cloneable and sliceable chunk of contiguous memory.</p>
+<p><code>Bytes</code> is an efficient container for storing and operating on contiguous
+slices of memory. It is intended for use primarily in networking code, but
+could have applications elsewhere as well.</p>
+<p><code>Bytes</code> values facilitate zero-copy network programming by allowing multiple
+<code>Bytes</code> objects to point to the same underlying memory.</p>
+<p><code>Bytes</code> does not have a single implementation. It is an interface, whose
+exact behavior is implemented through dynamic dispatch in several underlying
+implementations of <code>Bytes</code>.</p>
+<p>All <code>Bytes</code> implementations must fulfill the following requirements:</p>
+<ul>
+<li>They are cheaply cloneable and thereby shareable between an unlimited amount
+of components, for example by modifying a reference count.</li>
+<li>Instances can be sliced to refer to a subset of the original buffer.</li>
+</ul>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Bytes;
+
+<span class="kw">let </span><span class="kw-2">mut </span>mem = Bytes::from(<span class="string">&quot;Hello world&quot;</span>);
+<span class="kw">let </span>a = mem.slice(<span class="number">0</span>..<span class="number">5</span>);
+
+<span class="macro">assert_eq!</span>(a, <span class="string">&quot;Hello&quot;</span>);
+
+<span class="kw">let </span>b = mem.split_to(<span class="number">6</span>);
+
+<span class="macro">assert_eq!</span>(mem, <span class="string">&quot;world&quot;</span>);
+<span class="macro">assert_eq!</span>(b, <span class="string">&quot;Hello &quot;</span>);</code></pre></div>
+<h2 id="memory-layout"><a href="#memory-layout">Memory layout</a></h2>
+<p>The <code>Bytes</code> struct itself is fairly small, limited to 4 <code>usize</code> fields used
+to track information about which segment of the underlying memory the
+<code>Bytes</code> handle has access to.</p>
+<p><code>Bytes</code> keeps both a pointer to the shared state containing the full memory
+slice and a pointer to the start of the region visible by the handle.
+<code>Bytes</code> also tracks the length of its view into the memory.</p>
+<h2 id="sharing"><a href="#sharing">Sharing</a></h2>
+<p><code>Bytes</code> contains a vtable, which allows implementations of <code>Bytes</code> to define
+how sharing/cloning is implemented in detail.
+When <code>Bytes::clone()</code> is called, <code>Bytes</code> will call the vtable function for
+cloning the backing storage in order to share it behind multiple <code>Bytes</code>
+instances.</p>
+<p>For <code>Bytes</code> implementations which refer to constant memory (e.g. created
+via <code>Bytes::from_static()</code>) the cloning implementation will be a no-op.</p>
+<p>For <code>Bytes</code> implementations which point to a reference counted shared storage
+(e.g. an <code>Arc&lt;[u8]&gt;</code>), sharing will be implemented by increasing the
+reference count.</p>
+<p>Due to this mechanism, multiple <code>Bytes</code> instances may point to the same
+shared memory region.
+Each <code>Bytes</code> instance can point to different sections within that
+memory region, and <code>Bytes</code> instances may or may not have overlapping views
+into the memory.</p>
+<p>The following diagram visualizes a scenario where 2 <code>Bytes</code> instances make
+use of an <code>Arc</code>-based backing storage, and provide access to different views:</p>
+<div class="example-wrap"><pre class="language-text"><code>
+ Arc ptrs ┌─────────┐
+ ________________________ / │ Bytes 2 │
+ / └─────────┘
+ / ┌───────────┐ | |
+|_________/ │ Bytes 1 │ | |
+| └───────────┘ | |
+| | | ___/ data | tail
+| data | tail |/ |
+v v v v
+┌─────┬─────┬───────────┬───────────────┬─────┐
+│ Arc │ │ │ │ │
+└─────┴─────┴───────────┴───────────────┴─────┘</code></pre></div></div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#123-563">source</a><a href="#impl-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#138-143">source</a><h4 class="code-header">pub const fn <a href="#method.new" class="fnname">new</a>() -&gt; Self</h4></section></summary><div class="docblock"><p>Creates a new empty <code>Bytes</code>.</p>
+<p>This will not allocate and the returned <code>Bytes</code> handle will be empty.</p>
+<h5 id="examples"><a href="#examples">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Bytes;
+
+<span class="kw">let </span>b = Bytes::new();
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>b[..], <span class="string">b&quot;&quot;</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_static" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#166-173">source</a><h4 class="code-header">pub const fn <a href="#method.from_static" class="fnname">from_static</a>(bytes: &amp;'static [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; Self</h4></section></summary><div class="docblock"><p>Creates a new <code>Bytes</code> from a static slice.</p>
+<p>The returned <code>Bytes</code> will point directly to the static slice. There is
+no allocating or copying.</p>
+<h5 id="examples-1"><a href="#examples-1">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Bytes;
+
+<span class="kw">let </span>b = Bytes::from_static(<span class="string">b&quot;hello&quot;</span>);
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>b[..], <span class="string">b&quot;hello&quot;</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.len" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#196-198">source</a><h4 class="code-header">pub const fn <a href="#method.len" class="fnname">len</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the number of bytes contained in this <code>Bytes</code>.</p>
+<h5 id="examples-2"><a href="#examples-2">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Bytes;
+
+<span class="kw">let </span>b = Bytes::from(<span class="kw-2">&amp;</span><span class="string">b&quot;hello&quot;</span>[..]);
+<span class="macro">assert_eq!</span>(b.len(), <span class="number">5</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_empty" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#211-213">source</a><h4 class="code-header">pub const fn <a href="#method.is_empty" class="fnname">is_empty</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if the <code>Bytes</code> has a length of 0.</p>
+<h5 id="examples-3"><a href="#examples-3">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Bytes;
+
+<span class="kw">let </span>b = Bytes::new();
+<span class="macro">assert!</span>(b.is_empty());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_unique" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#233-235">source</a><h4 class="code-header">pub fn <a href="#method.is_unique" class="fnname">is_unique</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if this is the only reference to the data.</p>
+<p>Always returns false if the data is backed by a static slice.</p>
+<p>The result of this method may be invalidated immediately if another
+thread clones this value while this is being called. Ensure you have
+unique access to this value (<code>&amp;mut Bytes</code>) first if you need to be
+certain the result is valid (i.e. for safety reasons)</p>
+<h5 id="examples-4"><a href="#examples-4">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Bytes;
+
+<span class="kw">let </span>a = Bytes::from(<span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
+<span class="macro">assert!</span>(a.is_unique());
+<span class="kw">let </span>b = a.clone();
+<span class="macro">assert!</span>(!a.is_unique());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.copy_from_slice" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#238-240">source</a><h4 class="code-header">pub fn <a href="#method.copy_from_slice" class="fnname">copy_from_slice</a>(data: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; Self</h4></section></summary><div class="docblock"><p>Creates <code>Bytes</code> instance from slice, by copying it.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.slice" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#264-304">source</a><h4 class="code-header">pub fn <a href="#method.slice" class="fnname">slice</a>(&amp;self, range: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/range/trait.RangeBounds.html" title="trait core::ops::range::RangeBounds">RangeBounds</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;) -&gt; Self</h4></section></summary><div class="docblock"><p>Returns a slice of self for the provided range.</p>
+<p>This will increment the reference count for the underlying memory and
+return a new <code>Bytes</code> handle set to the slice.</p>
+<p>This operation is <code>O(1)</code>.</p>
+<h5 id="examples-5"><a href="#examples-5">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Bytes;
+
+<span class="kw">let </span>a = Bytes::from(<span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]);
+<span class="kw">let </span>b = a.slice(<span class="number">2</span>..<span class="number">5</span>);
+
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>b[..], <span class="string">b&quot;llo&quot;</span>);</code></pre></div>
+<h5 id="panics"><a href="#panics">Panics</a></h5>
+<p>Requires that <code>begin &lt;= end</code> and <code>end &lt;= self.len()</code>, otherwise slicing
+will panic.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.slice_ref" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#331-362">source</a><h4 class="code-header">pub fn <a href="#method.slice_ref" class="fnname">slice_ref</a>(&amp;self, subset: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; Self</h4></section></summary><div class="docblock"><p>Returns a slice of self that is equivalent to the given <code>subset</code>.</p>
+<p>When processing a <code>Bytes</code> buffer with other tools, one often gets a
+<code>&amp;[u8]</code> which is in fact a slice of the <code>Bytes</code>, i.e. a subset of it.
+This function turns that <code>&amp;[u8]</code> into another <code>Bytes</code>, as if one had
+called <code>self.slice()</code> with the offsets that correspond to <code>subset</code>.</p>
+<p>This operation is <code>O(1)</code>.</p>
+<h5 id="examples-6"><a href="#examples-6">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Bytes;
+
+<span class="kw">let </span>bytes = Bytes::from(<span class="kw-2">&amp;</span><span class="string">b&quot;012345678&quot;</span>[..]);
+<span class="kw">let </span>as_slice = bytes.as_ref();
+<span class="kw">let </span>subset = <span class="kw-2">&amp;</span>as_slice[<span class="number">2</span>..<span class="number">6</span>];
+<span class="kw">let </span>subslice = bytes.slice_ref(<span class="kw-2">&amp;</span>subset);
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>subslice[..], <span class="string">b&quot;2345&quot;</span>);</code></pre></div>
+<h5 id="panics-1"><a href="#panics-1">Panics</a></h5>
+<p>Requires that the given <code>sub</code> slice is in fact contained within the
+<code>Bytes</code> buffer; otherwise this function will panic.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_off" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#388-411">source</a><h4 class="code-header">pub fn <a href="#method.split_off" class="fnname">split_off</a>(&amp;mut self, at: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>Splits the bytes into two at the given index.</p>
+<p>Afterwards <code>self</code> contains elements <code>[0, at)</code>, and the returned <code>Bytes</code>
+contains elements <code>[at, len)</code>.</p>
+<p>This is an <code>O(1)</code> operation that just increases the reference count and
+sets a few indices.</p>
+<h5 id="examples-7"><a href="#examples-7">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Bytes;
+
+<span class="kw">let </span><span class="kw-2">mut </span>a = Bytes::from(<span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]);
+<span class="kw">let </span>b = a.split_off(<span class="number">5</span>);
+
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>a[..], <span class="string">b&quot;hello&quot;</span>);
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>b[..], <span class="string">b&quot; world&quot;</span>);</code></pre></div>
+<h5 id="panics-2"><a href="#panics-2">Panics</a></h5>
+<p>Panics if <code>at &gt; len</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_to" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#437-459">source</a><h4 class="code-header">pub fn <a href="#method.split_to" class="fnname">split_to</a>(&amp;mut self, at: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>Splits the bytes into two at the given index.</p>
+<p>Afterwards <code>self</code> contains elements <code>[at, len)</code>, and the returned
+<code>Bytes</code> contains elements <code>[0, at)</code>.</p>
+<p>This is an <code>O(1)</code> operation that just increases the reference count and
+sets a few indices.</p>
+<h5 id="examples-8"><a href="#examples-8">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Bytes;
+
+<span class="kw">let </span><span class="kw-2">mut </span>a = Bytes::from(<span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]);
+<span class="kw">let </span>b = a.split_to(<span class="number">5</span>);
+
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>a[..], <span class="string">b&quot; world&quot;</span>);
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>b[..], <span class="string">b&quot;hello&quot;</span>);</code></pre></div>
+<h5 id="panics-3"><a href="#panics-3">Panics</a></h5>
+<p>Panics if <code>at &gt; len</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.truncate" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#480-493">source</a><h4 class="code-header">pub fn <a href="#method.truncate" class="fnname">truncate</a>(&amp;mut self, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Shortens the buffer, keeping the first <code>len</code> bytes and dropping the
+rest.</p>
+<p>If <code>len</code> is greater than the buffer’s current length, this has no
+effect.</p>
+<p>The <a href="struct.Bytes.html#method.split_off">split_off</a> method can emulate <code>truncate</code>, but this causes the
+excess bytes to be returned instead of dropped.</p>
+<h5 id="examples-9"><a href="#examples-9">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Bytes;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = Bytes::from(<span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]);
+buf.truncate(<span class="number">5</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;hello&quot;</span>[..]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clear" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#507-509">source</a><h4 class="code-header">pub fn <a href="#method.clear" class="fnname">clear</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Clears the buffer, removing all data.</p>
+<h5 id="examples-10"><a href="#examples-10">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Bytes;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = Bytes::from(<span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]);
+buf.clear();
+<span class="macro">assert!</span>(buf.is_empty());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into_mut" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#526-532">source</a><h4 class="code-header">pub fn <a href="#method.try_into_mut" class="fnname">try_into_mut</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>, <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt;</h4></section></summary><div class="docblock"><p>Try to convert self into <code>BytesMut</code>.</p>
+<p>If <code>self</code> is unique for the entire original buffer, this will succeed
+and return a <code>BytesMut</code> with the contents of <code>self</code> without copying.
+If <code>self</code> is not unique for the entire original buffer, this will fail
+and return self.</p>
+<h5 id="examples-11"><a href="#examples-11">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::{Bytes, BytesMut};
+
+<span class="kw">let </span>bytes = Bytes::from(<span class="string">b&quot;hello&quot;</span>.to_vec());
+<span class="macro">assert_eq!</span>(bytes.try_into_mut(), <span class="prelude-val">Ok</span>(BytesMut::from(<span class="kw-2">&amp;</span><span class="string">b&quot;hello&quot;</span>[..])));</code></pre></div>
+</div></details></div></details></div><h2 id="deref-methods-%5Bu8%5D" class="small-section-header"><span>Methods from <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>&lt;Target = [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt;</span><a href="#deref-methods-%5Bu8%5D" class="anchor"></a></h2><div id="deref-methods-%5Bu8%5D-1"><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_ascii" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/ascii.rs.html#15">source</a></span><h4 class="code-header">pub fn <a href="#method.is_ascii" class="fnname">is_ascii</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks if all bytes in this slice are within the ASCII range.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq_ignore_ascii_case" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/ascii.rs.html#26">source</a></span><h4 class="code-header">pub fn <a href="#method.eq_ignore_ascii_case" class="fnname">eq_ignore_ascii_case</a>(&amp;self, other: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks that two slices are an ASCII case-insensitive match.</p>
+<p>Same as <code>to_ascii_lowercase(a) == to_ascii_lowercase(b)</code>,
+but without allocating and copying temporaries.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.escape_ascii" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.60.0">1.60.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/ascii.rs.html#78">source</a></span><h4 class="code-header">pub fn <a href="#method.escape_ascii" class="fnname">escape_ascii</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/ascii/struct.EscapeAscii.html" title="struct core::slice::ascii::EscapeAscii">EscapeAscii</a>&lt;'_&gt;</h4></section></summary><div class="docblock"><p>Returns an iterator that produces an escaped version of this slice,
+treating it as an ASCII string.</p>
+<h5 id="examples-12"><a href="#examples-12">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code>
+<span class="kw">let </span>s = <span class="string">b&quot;0\t\r\n&#39;\&quot;\\\x9d&quot;</span>;
+<span class="kw">let </span>escaped = s.escape_ascii().to_string();
+<span class="macro">assert_eq!</span>(escaped, <span class="string">&quot;0\\t\\r\\n\\&#39;\\\&quot;\\\\\\x9d&quot;</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.trim_ascii_start" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/ascii.rs.html#97">source</a><h4 class="code-header">pub fn <a href="#method.trim_ascii_start" class="fnname">trim_ascii_start</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>byte_slice_trim_ascii</code>)</span></div></span></summary><div class="docblock"><p>Returns a byte slice with leading ASCII whitespace bytes removed.</p>
+<p>‘Whitespace’ refers to the definition used by
+<code>u8::is_ascii_whitespace</code>.</p>
+<h5 id="examples-13"><a href="#examples-13">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(byte_slice_trim_ascii)]
+
+</span><span class="macro">assert_eq!</span>(<span class="string">b&quot; \t hello world\n&quot;</span>.trim_ascii_start(), <span class="string">b&quot;hello world\n&quot;</span>);
+<span class="macro">assert_eq!</span>(<span class="string">b&quot; &quot;</span>.trim_ascii_start(), <span class="string">b&quot;&quot;</span>);
+<span class="macro">assert_eq!</span>(<span class="string">b&quot;&quot;</span>.trim_ascii_start(), <span class="string">b&quot;&quot;</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.trim_ascii_end" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/ascii.rs.html#126">source</a><h4 class="code-header">pub fn <a href="#method.trim_ascii_end" class="fnname">trim_ascii_end</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>byte_slice_trim_ascii</code>)</span></div></span></summary><div class="docblock"><p>Returns a byte slice with trailing ASCII whitespace bytes removed.</p>
+<p>‘Whitespace’ refers to the definition used by
+<code>u8::is_ascii_whitespace</code>.</p>
+<h5 id="examples-14"><a href="#examples-14">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(byte_slice_trim_ascii)]
+
+</span><span class="macro">assert_eq!</span>(<span class="string">b&quot;\r hello world\n &quot;</span>.trim_ascii_end(), <span class="string">b&quot;\r hello world&quot;</span>);
+<span class="macro">assert_eq!</span>(<span class="string">b&quot; &quot;</span>.trim_ascii_end(), <span class="string">b&quot;&quot;</span>);
+<span class="macro">assert_eq!</span>(<span class="string">b&quot;&quot;</span>.trim_ascii_end(), <span class="string">b&quot;&quot;</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.trim_ascii" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/ascii.rs.html#156">source</a><h4 class="code-header">pub fn <a href="#method.trim_ascii" class="fnname">trim_ascii</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>byte_slice_trim_ascii</code>)</span></div></span></summary><div class="docblock"><p>Returns a byte slice with leading and trailing ASCII whitespace bytes
+removed.</p>
+<p>‘Whitespace’ refers to the definition used by
+<code>u8::is_ascii_whitespace</code>.</p>
+<h5 id="examples-15"><a href="#examples-15">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(byte_slice_trim_ascii)]
+
+</span><span class="macro">assert_eq!</span>(<span class="string">b&quot;\r hello world\n &quot;</span>.trim_ascii(), <span class="string">b&quot;hello world&quot;</span>);
+<span class="macro">assert_eq!</span>(<span class="string">b&quot; &quot;</span>.trim_ascii(), <span class="string">b&quot;&quot;</span>);
+<span class="macro">assert_eq!</span>(<span class="string">b&quot;&quot;</span>.trim_ascii(), <span class="string">b&quot;&quot;</span>);</code></pre></div>
+</div></details></div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.len-1" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#129">source</a></span><h4 class="code-header">pub fn <a href="#method.len-1" class="fnname">len</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the number of elements in the slice.</p>
+<h5 id="examples-16"><a href="#examples-16">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>a = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>];
+<span class="macro">assert_eq!</span>(a.len(), <span class="number">3</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_empty-1" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#145">source</a></span><h4 class="code-header">pub fn <a href="#method.is_empty-1" class="fnname">is_empty</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if the slice has a length of 0.</p>
+<h5 id="examples-17"><a href="#examples-17">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>a = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>];
+<span class="macro">assert!</span>(!a.is_empty());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.first" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#164">source</a></span><h4 class="code-header">pub fn <a href="#method.first" class="fnname">first</a>(&amp;self) -&gt; <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.reference.html">&amp;</a>T&gt;</h4></section></summary><div class="docblock"><p>Returns the first element of the slice, or <code>None</code> if it is empty.</p>
+<h5 id="examples-18"><a href="#examples-18">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">10</span>), v.first());
+
+<span class="kw">let </span>w: <span class="kw-2">&amp;</span>[i32] = <span class="kw-2">&amp;</span>[];
+<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, w.first());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_first" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#204">source</a></span><h4 class="code-header">pub fn <a href="#method.split_first" class="fnname">split_first</a>(&amp;self) -&gt; <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.reference.html">&amp;</a>T, &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)&gt;</h4></section></summary><div class="docblock"><p>Returns the first and all the rest of the elements of the slice, or <code>None</code> if it is empty.</p>
+<h5 id="examples-19"><a href="#examples-19">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&amp;</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>];
+
+<span class="kw">if let </span><span class="prelude-val">Some</span>((first, elements)) = x.split_first() {
+ <span class="macro">assert_eq!</span>(first, <span class="kw-2">&amp;</span><span class="number">0</span>);
+ <span class="macro">assert_eq!</span>(elements, <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>]);
+}</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_last" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#246">source</a></span><h4 class="code-header">pub fn <a href="#method.split_last" class="fnname">split_last</a>(&amp;self) -&gt; <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.reference.html">&amp;</a>T, &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)&gt;</h4></section></summary><div class="docblock"><p>Returns the last and all the rest of the elements of the slice, or <code>None</code> if it is empty.</p>
+<h5 id="examples-20"><a href="#examples-20">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&amp;</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>];
+
+<span class="kw">if let </span><span class="prelude-val">Some</span>((last, elements)) = x.split_last() {
+ <span class="macro">assert_eq!</span>(last, <span class="kw-2">&amp;</span><span class="number">2</span>);
+ <span class="macro">assert_eq!</span>(elements, <span class="kw-2">&amp;</span>[<span class="number">0</span>, <span class="number">1</span>]);
+}</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.last" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#287">source</a></span><h4 class="code-header">pub fn <a href="#method.last" class="fnname">last</a>(&amp;self) -&gt; <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.reference.html">&amp;</a>T&gt;</h4></section></summary><div class="docblock"><p>Returns the last element of the slice, or <code>None</code> if it is empty.</p>
+<h5 id="examples-21"><a href="#examples-21">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">30</span>), v.last());
+
+<span class="kw">let </span>w: <span class="kw-2">&amp;</span>[i32] = <span class="kw-2">&amp;</span>[];
+<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, w.last());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#332-334">source</a></span><h4 class="code-header">pub fn <a href="#method.get" class="fnname">get</a>&lt;I&gt;(&amp;self, index: I) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;&lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/slice/index/trait.SliceIndex.html#associatedtype.Output" title="type core::slice::index::SliceIndex::Output">Output</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;,</span></h4></section></summary><div class="docblock"><p>Returns a reference to an element or subslice depending on the type of
+index.</p>
+<ul>
+<li>If given a position, returns a reference to the element at that
+position or <code>None</code> if out of bounds.</li>
+<li>If given a range, returns the subslice corresponding to that range,
+or <code>None</code> if out of bounds.</li>
+</ul>
+<h5 id="examples-22"><a href="#examples-22">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">40</span>), v.get(<span class="number">1</span>));
+<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>][..]), v.get(<span class="number">0</span>..<span class="number">2</span>));
+<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, v.get(<span class="number">3</span>));
+<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, v.get(<span class="number">0</span>..<span class="number">4</span>));</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_unchecked" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#391-393">source</a></span><h4 class="code-header">pub unsafe fn <a href="#method.get_unchecked" class="fnname">get_unchecked</a>&lt;I&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self,<br>&nbsp;&nbsp;&nbsp;&nbsp;index: I<br>) -&gt; &amp;&lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/slice/index/trait.SliceIndex.html#associatedtype.Output" title="type core::slice::index::SliceIndex::Output">Output</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;,</span></h4></section></summary><div class="docblock"><p>Returns a reference to an element or subslice, without doing bounds
+checking.</p>
+<p>For a safe alternative see <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.get"><code>get</code></a>.</p>
+<h5 id="safety"><a href="#safety">Safety</a></h5>
+<p>Calling this method with an out-of-bounds index is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em>
+even if the resulting reference is not used.</p>
+<h5 id="examples-23"><a href="#examples-23">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>];
+
+<span class="kw">unsafe </span>{
+ <span class="macro">assert_eq!</span>(x.get_unchecked(<span class="number">1</span>), <span class="kw-2">&amp;</span><span class="number">2</span>);
+}</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ptr" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#469">source</a></span><h4 class="code-header">pub fn <a href="#method.as_ptr" class="fnname">as_ptr</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*const T</a></h4></section></summary><div class="docblock"><p>Returns a raw pointer to the slice’s buffer.</p>
+<p>The caller must ensure that the slice outlives the pointer this
+function returns, or else it will end up pointing to garbage.</p>
+<p>The caller must also ensure that the memory the pointer (non-transitively) points to
+is never written to (except inside an <code>UnsafeCell</code>) using this pointer or any pointer
+derived from it. If you need to mutate the contents of the slice, use <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.as_mut_ptr"><code>as_mut_ptr</code></a>.</p>
+<p>Modifying the container referenced by this slice may cause its buffer
+to be reallocated, which would also make any pointers to it invalid.</p>
+<h5 id="examples-24"><a href="#examples-24">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>];
+<span class="kw">let </span>x_ptr = x.as_ptr();
+
+<span class="kw">unsafe </span>{
+ <span class="kw">for </span>i <span class="kw">in </span><span class="number">0</span>..x.len() {
+ <span class="macro">assert_eq!</span>(x.get_unchecked(i), <span class="kw-2">&amp;*</span>x_ptr.add(i));
+ }
+}</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ptr_range" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.48.0">1.48.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#535">source</a></span><h4 class="code-header">pub fn <a href="#method.as_ptr_range" class="fnname">as_ptr_range</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*const T</a>&gt;</h4></section></summary><div class="docblock"><p>Returns the two raw pointers spanning the slice.</p>
+<p>The returned range is half-open, which means that the end pointer
+points <em>one past</em> the last element of the slice. This way, an empty
+slice is represented by two equal pointers, and the difference between
+the two pointers represents the size of the slice.</p>
+<p>See <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.as_ptr"><code>as_ptr</code></a> for warnings on using these pointers. The end pointer
+requires extra caution, as it does not point to a valid element in the
+slice.</p>
+<p>This function is useful for interacting with foreign interfaces which
+use two pointers to refer to a range of elements in memory, as is
+common in C++.</p>
+<p>It can also be useful to check if a pointer to an element refers to an
+element of this slice:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>a = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>];
+<span class="kw">let </span>x = <span class="kw-2">&amp;</span>a[<span class="number">1</span>] <span class="kw">as </span><span class="kw-2">*const </span><span class="kw">_</span>;
+<span class="kw">let </span>y = <span class="kw-2">&amp;</span><span class="number">5 </span><span class="kw">as </span><span class="kw-2">*const </span><span class="kw">_</span>;
+
+<span class="macro">assert!</span>(a.as_ptr_range().contains(<span class="kw-2">&amp;</span>x));
+<span class="macro">assert!</span>(!a.as_ptr_range().contains(<span class="kw-2">&amp;</span>y));</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.iter" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#734">source</a></span><h4 class="code-header">pub fn <a href="#method.iter" class="fnname">iter</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.Iter.html" title="struct core::slice::iter::Iter">Iter</a>&lt;'_, T&gt;</h4></section></summary><div class="docblock"><p>Returns an iterator over the slice.</p>
+<p>The iterator yields all items from start to end.</p>
+<h5 id="examples-25"><a href="#examples-25">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iterator = x.iter();
+
+<span class="macro">assert_eq!</span>(iterator.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">1</span>));
+<span class="macro">assert_eq!</span>(iterator.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">2</span>));
+<span class="macro">assert_eq!</span>(iterator.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">4</span>));
+<span class="macro">assert_eq!</span>(iterator.next(), <span class="prelude-val">None</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.windows" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#785">source</a></span><h4 class="code-header">pub fn <a href="#method.windows" class="fnname">windows</a>(&amp;self, size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.Windows.html" title="struct core::slice::iter::Windows">Windows</a>&lt;'_, T&gt;</h4></section></summary><div class="docblock"><p>Returns an iterator over all contiguous windows of length
+<code>size</code>. The windows overlap. If the slice is shorter than
+<code>size</code>, the iterator returns no values.</p>
+<h5 id="panics-4"><a href="#panics-4">Panics</a></h5>
+<p>Panics if <code>size</code> is 0.</p>
+<h5 id="examples-26"><a href="#examples-26">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">&#39;r&#39;</span>, <span class="string">&#39;u&#39;</span>, <span class="string">&#39;s&#39;</span>, <span class="string">&#39;t&#39;</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.windows(<span class="number">2</span>);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;r&#39;</span>, <span class="string">&#39;u&#39;</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;u&#39;</span>, <span class="string">&#39;s&#39;</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;s&#39;</span>, <span class="string">&#39;t&#39;</span>]);
+<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
+<p>If the slice is shorter than <code>size</code>:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">&#39;f&#39;</span>, <span class="string">&#39;o&#39;</span>, <span class="string">&#39;o&#39;</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.windows(<span class="number">4</span>);
+<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunks" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#819">source</a></span><h4 class="code-header">pub fn <a href="#method.chunks" class="fnname">chunks</a>(&amp;self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.Chunks.html" title="struct core::slice::iter::Chunks">Chunks</a>&lt;'_, T&gt;</h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the
+beginning of the slice.</p>
+<p>The chunks are slices and do not overlap. If <code>chunk_size</code> does not divide the length of the
+slice, then the last chunk will not have length <code>chunk_size</code>.</p>
+<p>See <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.chunks_exact"><code>chunks_exact</code></a> for a variant of this iterator that returns chunks of always exactly
+<code>chunk_size</code> elements, and <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.rchunks"><code>rchunks</code></a> for the same iterator but starting at the end of the
+slice.</p>
+<h5 id="panics-5"><a href="#panics-5">Panics</a></h5>
+<p>Panics if <code>chunk_size</code> is 0.</p>
+<h5 id="examples-27"><a href="#examples-27">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.chunks(<span class="number">2</span>);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;m&#39;</span>]);
+<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunks_exact" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#894">source</a></span><h4 class="code-header">pub fn <a href="#method.chunks_exact" class="fnname">chunks_exact</a>(&amp;self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.ChunksExact.html" title="struct core::slice::iter::ChunksExact">ChunksExact</a>&lt;'_, T&gt;</h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the
+beginning of the slice.</p>
+<p>The chunks are slices and do not overlap. If <code>chunk_size</code> does not divide the length of the
+slice, then the last up to <code>chunk_size-1</code> elements will be omitted and can be retrieved
+from the <code>remainder</code> function of the iterator.</p>
+<p>Due to each chunk having exactly <code>chunk_size</code> elements, the compiler can often optimize the
+resulting code better than in the case of <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.chunks"><code>chunks</code></a>.</p>
+<p>See <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.chunks"><code>chunks</code></a> for a variant of this iterator that also returns the remainder as a smaller
+chunk, and <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.rchunks_exact"><code>rchunks_exact</code></a> for the same iterator but starting at the end of the slice.</p>
+<h5 id="panics-6"><a href="#panics-6">Panics</a></h5>
+<p>Panics if <code>chunk_size</code> is 0.</p>
+<h5 id="examples-28"><a href="#examples-28">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.chunks_exact(<span class="number">2</span>);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>]);
+<span class="macro">assert!</span>(iter.next().is_none());
+<span class="macro">assert_eq!</span>(iter.remainder(), <span class="kw-2">&amp;</span>[<span class="string">&#39;m&#39;</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_chunks_unchecked" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#971">source</a><h4 class="code-header">pub unsafe fn <a href="#method.as_chunks_unchecked" class="fnname">as_chunks_unchecked</a>&lt;const N:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[T; N]</a>]</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays,
+assuming that there’s no remainder.</p>
+<h5 id="safety-1"><a href="#safety-1">Safety</a></h5>
+<p>This may only be called when</p>
+<ul>
+<li>The slice splits exactly into <code>N</code>-element chunks (aka <code>self.len() % N == 0</code>).</li>
+<li><code>N != 0</code>.</li>
+</ul>
+<h5 id="examples-29"><a href="#examples-29">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)]
+</span><span class="kw">let </span>slice: <span class="kw-2">&amp;</span>[char] = <span class="kw-2">&amp;</span>[<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>, <span class="string">&#39;!&#39;</span>];
+<span class="kw">let </span>chunks: <span class="kw-2">&amp;</span>[[char; <span class="number">1</span>]] =
+ <span class="comment">// SAFETY: 1-element chunks never have remainder
+ </span><span class="kw">unsafe </span>{ slice.as_chunks_unchecked() };
+<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&amp;</span>[[<span class="string">&#39;l&#39;</span>], [<span class="string">&#39;o&#39;</span>], [<span class="string">&#39;r&#39;</span>], [<span class="string">&#39;e&#39;</span>], [<span class="string">&#39;m&#39;</span>], [<span class="string">&#39;!&#39;</span>]]);
+<span class="kw">let </span>chunks: <span class="kw-2">&amp;</span>[[char; <span class="number">3</span>]] =
+ <span class="comment">// SAFETY: The slice length (6) is a multiple of 3
+ </span><span class="kw">unsafe </span>{ slice.as_chunks_unchecked() };
+<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&amp;</span>[[<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>], [<span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>, <span class="string">&#39;!&#39;</span>]]);
+
+<span class="comment">// These would be unsound:
+// let chunks: &amp;[[_; 5]] = slice.as_chunks_unchecked() // The slice length is not a multiple of 5
+// let chunks: &amp;[[_; 0]] = slice.as_chunks_unchecked() // Zero-length chunks are never allowed</span></code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_chunks" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1007">source</a><h4 class="code-header">pub fn <a href="#method.as_chunks" class="fnname">as_chunks</a>&lt;const N:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(&amp;self) -&gt; (&amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[T; N]</a>], &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays,
+starting at the beginning of the slice,
+and a remainder slice with length strictly less than <code>N</code>.</p>
+<h5 id="panics-7"><a href="#panics-7">Panics</a></h5>
+<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time
+error before this method gets stabilized.</p>
+<h5 id="examples-30"><a href="#examples-30">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)]
+</span><span class="kw">let </span>slice = [<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>];
+<span class="kw">let </span>(chunks, remainder) = slice.as_chunks();
+<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&amp;</span>[[<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>], [<span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>]]);
+<span class="macro">assert_eq!</span>(remainder, <span class="kw-2">&amp;</span>[<span class="string">&#39;m&#39;</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_rchunks" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1038">source</a><h4 class="code-header">pub fn <a href="#method.as_rchunks" class="fnname">as_rchunks</a>&lt;const N:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(&amp;self) -&gt; (&amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[T; N]</a>])</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays,
+starting at the end of the slice,
+and a remainder slice with length strictly less than <code>N</code>.</p>
+<h5 id="panics-8"><a href="#panics-8">Panics</a></h5>
+<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time
+error before this method gets stabilized.</p>
+<h5 id="examples-31"><a href="#examples-31">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)]
+</span><span class="kw">let </span>slice = [<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>];
+<span class="kw">let </span>(remainder, chunks) = slice.as_rchunks();
+<span class="macro">assert_eq!</span>(remainder, <span class="kw-2">&amp;</span>[<span class="string">&#39;l&#39;</span>]);
+<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&amp;</span>[[<span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>], [<span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>]]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.array_chunks" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1077">source</a><h4 class="code-header">pub fn <a href="#method.array_chunks" class="fnname">array_chunks</a>&lt;const N:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.ArrayChunks.html" title="struct core::slice::iter::ArrayChunks">ArrayChunks</a>&lt;'_, T, N&gt;</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>array_chunks</code>)</span></div></span></summary><div class="docblock"><p>Returns an iterator over <code>N</code> elements of the slice at a time, starting at the
+beginning of the slice.</p>
+<p>The chunks are array references and do not overlap. If <code>N</code> does not divide the
+length of the slice, then the last up to <code>N-1</code> elements will be omitted and can be
+retrieved from the <code>remainder</code> function of the iterator.</p>
+<p>This method is the const generic equivalent of <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.chunks_exact"><code>chunks_exact</code></a>.</p>
+<h5 id="panics-9"><a href="#panics-9">Panics</a></h5>
+<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time
+error before this method gets stabilized.</p>
+<h5 id="examples-32"><a href="#examples-32">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(array_chunks)]
+</span><span class="kw">let </span>slice = [<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.array_chunks();
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>]);
+<span class="macro">assert!</span>(iter.next().is_none());
+<span class="macro">assert_eq!</span>(iter.remainder(), <span class="kw-2">&amp;</span>[<span class="string">&#39;m&#39;</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.array_windows" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1266">source</a><h4 class="code-header">pub fn <a href="#method.array_windows" class="fnname">array_windows</a>&lt;const N:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.ArrayWindows.html" title="struct core::slice::iter::ArrayWindows">ArrayWindows</a>&lt;'_, T, N&gt;</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>array_windows</code>)</span></div></span></summary><div class="docblock"><p>Returns an iterator over overlapping windows of <code>N</code> elements of a slice,
+starting at the beginning of the slice.</p>
+<p>This is the const generic equivalent of <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.windows"><code>windows</code></a>.</p>
+<p>If <code>N</code> is greater than the size of the slice, it will return no windows.</p>
+<h5 id="panics-10"><a href="#panics-10">Panics</a></h5>
+<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time
+error before this method gets stabilized.</p>
+<h5 id="examples-33"><a href="#examples-33">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(array_windows)]
+</span><span class="kw">let </span>slice = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.array_windows();
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">0</span>, <span class="number">1</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">2</span>, <span class="number">3</span>]);
+<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rchunks" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1300">source</a></span><h4 class="code-header">pub fn <a href="#method.rchunks" class="fnname">rchunks</a>(&amp;self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.RChunks.html" title="struct core::slice::iter::RChunks">RChunks</a>&lt;'_, T&gt;</h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the end
+of the slice.</p>
+<p>The chunks are slices and do not overlap. If <code>chunk_size</code> does not divide the length of the
+slice, then the last chunk will not have length <code>chunk_size</code>.</p>
+<p>See <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.rchunks_exact"><code>rchunks_exact</code></a> for a variant of this iterator that returns chunks of always exactly
+<code>chunk_size</code> elements, and <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.chunks"><code>chunks</code></a> for the same iterator but starting at the beginning
+of the slice.</p>
+<h5 id="panics-11"><a href="#panics-11">Panics</a></h5>
+<p>Panics if <code>chunk_size</code> is 0.</p>
+<h5 id="examples-34"><a href="#examples-34">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.rchunks(<span class="number">2</span>);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;l&#39;</span>]);
+<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rchunks_exact" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1377">source</a></span><h4 class="code-header">pub fn <a href="#method.rchunks_exact" class="fnname">rchunks_exact</a>(&amp;self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.RChunksExact.html" title="struct core::slice::iter::RChunksExact">RChunksExact</a>&lt;'_, T&gt;</h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the
+end of the slice.</p>
+<p>The chunks are slices and do not overlap. If <code>chunk_size</code> does not divide the length of the
+slice, then the last up to <code>chunk_size-1</code> elements will be omitted and can be retrieved
+from the <code>remainder</code> function of the iterator.</p>
+<p>Due to each chunk having exactly <code>chunk_size</code> elements, the compiler can often optimize the
+resulting code better than in the case of <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.rchunks"><code>rchunks</code></a>.</p>
+<p>See <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.rchunks"><code>rchunks</code></a> for a variant of this iterator that also returns the remainder as a smaller
+chunk, and <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.chunks_exact"><code>chunks_exact</code></a> for the same iterator but starting at the beginning of the
+slice.</p>
+<h5 id="panics-12"><a href="#panics-12">Panics</a></h5>
+<p>Panics if <code>chunk_size</code> is 0.</p>
+<h5 id="examples-35"><a href="#examples-35">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.rchunks_exact(<span class="number">2</span>);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>]);
+<span class="macro">assert!</span>(iter.next().is_none());
+<span class="macro">assert_eq!</span>(iter.remainder(), <span class="kw-2">&amp;</span>[<span class="string">&#39;l&#39;</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.group_by" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1463-1465">source</a><h4 class="code-header">pub fn <a href="#method.group_by" class="fnname">group_by</a>&lt;F&gt;(&amp;self, pred: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.GroupBy.html" title="struct core::slice::iter::GroupBy">GroupBy</a>&lt;'_, T, F&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_group_by</code>)</span></div></span></summary><div class="docblock"><p>Returns an iterator over the slice producing non-overlapping runs
+of elements using the predicate to separate them.</p>
+<p>The predicate is called on two elements following themselves,
+it means the predicate is called on <code>slice[0]</code> and <code>slice[1]</code>
+then on <code>slice[1]</code> and <code>slice[2]</code> and so on.</p>
+<h5 id="examples-36"><a href="#examples-36">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_group_by)]
+
+</span><span class="kw">let </span>slice = <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">3</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">2</span>];
+
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.group_by(|a, b| a == b);
+
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>][..]));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span>[<span class="number">3</span>, <span class="number">3</span>][..]));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span>[<span class="number">2</span>, <span class="number">2</span>, <span class="number">2</span>][..]));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div>
+<p>This method can be used to extract the sorted subslices:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_group_by)]
+
+</span><span class="kw">let </span>slice = <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>];
+
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.group_by(|a, b| a &lt;= b);
+
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>][..]));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span>[<span class="number">2</span>, <span class="number">3</span>][..]));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span>[<span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>][..]));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_at" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1553">source</a></span><h4 class="code-header">pub fn <a href="#method.split_at" class="fnname">split_at</a>(&amp;self, mid: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; (&amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Divides one slice into two at an index.</p>
+<p>The first will contain all indices from <code>[0, mid)</code> (excluding
+the index <code>mid</code> itself) and the second will contain all
+indices from <code>[mid, len)</code> (excluding the index <code>len</code> itself).</p>
+<h5 id="panics-13"><a href="#panics-13">Panics</a></h5>
+<p>Panics if <code>mid &gt; len</code>.</p>
+<h5 id="examples-37"><a href="#examples-37">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>];
+
+{
+ <span class="kw">let </span>(left, right) = v.split_at(<span class="number">0</span>);
+ <span class="macro">assert_eq!</span>(left, []);
+ <span class="macro">assert_eq!</span>(right, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+}
+
+{
+ <span class="kw">let </span>(left, right) = v.split_at(<span class="number">2</span>);
+ <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>]);
+ <span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+}
+
+{
+ <span class="kw">let </span>(left, right) = v.split_at(<span class="number">6</span>);
+ <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+ <span class="macro">assert_eq!</span>(right, []);
+}</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_at_unchecked" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1639">source</a><h4 class="code-header">pub unsafe fn <a href="#method.split_at_unchecked" class="fnname">split_at_unchecked</a>(&amp;self, mid: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; (&amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_split_at_unchecked</code>)</span></div></span></summary><div class="docblock"><p>Divides one slice into two at an index, without doing bounds checking.</p>
+<p>The first will contain all indices from <code>[0, mid)</code> (excluding
+the index <code>mid</code> itself) and the second will contain all
+indices from <code>[mid, len)</code> (excluding the index <code>len</code> itself).</p>
+<p>For a safe alternative see <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_at"><code>split_at</code></a>.</p>
+<h5 id="safety-2"><a href="#safety-2">Safety</a></h5>
+<p>Calling this method with an out-of-bounds index is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em>
+even if the resulting reference is not used. The caller has to ensure that
+<code>0 &lt;= mid &lt;= self.len()</code>.</p>
+<h5 id="examples-38"><a href="#examples-38">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_split_at_unchecked)]
+
+</span><span class="kw">let </span>v = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>];
+
+<span class="kw">unsafe </span>{
+ <span class="kw">let </span>(left, right) = v.split_at_unchecked(<span class="number">0</span>);
+ <span class="macro">assert_eq!</span>(left, []);
+ <span class="macro">assert_eq!</span>(right, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+}
+
+<span class="kw">unsafe </span>{
+ <span class="kw">let </span>(left, right) = v.split_at_unchecked(<span class="number">2</span>);
+ <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>]);
+ <span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+}
+
+<span class="kw">unsafe </span>{
+ <span class="kw">let </span>(left, right) = v.split_at_unchecked(<span class="number">6</span>);
+ <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+ <span class="macro">assert_eq!</span>(right, []);
+}</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_array_ref" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1744">source</a><h4 class="code-header">pub fn <a href="#method.split_array_ref" class="fnname">split_array_ref</a>&lt;const N:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(&amp;self) -&gt; (&amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[T; N]</a>, &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>split_array</code>)</span></div></span></summary><div class="docblock"><p>Divides one slice into an array and a remainder slice at an index.</p>
+<p>The array will contain all indices from <code>[0, N)</code> (excluding
+the index <code>N</code> itself) and the slice will contain all
+indices from <code>[N, len)</code> (excluding the index <code>len</code> itself).</p>
+<h5 id="panics-14"><a href="#panics-14">Panics</a></h5>
+<p>Panics if <code>N &gt; len</code>.</p>
+<h5 id="examples-39"><a href="#examples-39">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(split_array)]
+
+</span><span class="kw">let </span>v = <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>][..];
+
+{
+ <span class="kw">let </span>(left, right) = v.split_array_ref::&lt;<span class="number">0</span>&gt;();
+ <span class="macro">assert_eq!</span>(left, <span class="kw-2">&amp;</span>[]);
+ <span class="macro">assert_eq!</span>(right, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+}
+
+{
+ <span class="kw">let </span>(left, right) = v.split_array_ref::&lt;<span class="number">2</span>&gt;();
+ <span class="macro">assert_eq!</span>(left, <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>]);
+ <span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+}
+
+{
+ <span class="kw">let </span>(left, right) = v.split_array_ref::&lt;<span class="number">6</span>&gt;();
+ <span class="macro">assert_eq!</span>(left, <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+ <span class="macro">assert_eq!</span>(right, []);
+}</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rsplit_array_ref" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1822">source</a><h4 class="code-header">pub fn <a href="#method.rsplit_array_ref" class="fnname">rsplit_array_ref</a>&lt;const N:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(&amp;self) -&gt; (&amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[T; N]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>split_array</code>)</span></div></span></summary><div class="docblock"><p>Divides one slice into an array and a remainder slice at an index from
+the end.</p>
+<p>The slice will contain all indices from <code>[0, len - N)</code> (excluding
+the index <code>len - N</code> itself) and the array will contain all
+indices from <code>[len - N, len)</code> (excluding the index <code>len</code> itself).</p>
+<h5 id="panics-15"><a href="#panics-15">Panics</a></h5>
+<p>Panics if <code>N &gt; len</code>.</p>
+<h5 id="examples-40"><a href="#examples-40">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(split_array)]
+
+</span><span class="kw">let </span>v = <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>][..];
+
+{
+ <span class="kw">let </span>(left, right) = v.rsplit_array_ref::&lt;<span class="number">0</span>&gt;();
+ <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+ <span class="macro">assert_eq!</span>(right, <span class="kw-2">&amp;</span>[]);
+}
+
+{
+ <span class="kw">let </span>(left, right) = v.rsplit_array_ref::&lt;<span class="number">2</span>&gt;();
+ <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);
+ <span class="macro">assert_eq!</span>(right, <span class="kw-2">&amp;</span>[<span class="number">5</span>, <span class="number">6</span>]);
+}
+
+{
+ <span class="kw">let </span>(left, right) = v.rsplit_array_ref::&lt;<span class="number">6</span>&gt;();
+ <span class="macro">assert_eq!</span>(left, []);
+ <span class="macro">assert_eq!</span>(right, <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+}</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1905-1907">source</a></span><h4 class="code-header">pub fn <a href="#method.split" class="fnname">split</a>&lt;F&gt;(&amp;self, pred: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.Split.html" title="struct core::slice::iter::Split">Split</a>&lt;'_, T, F&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match
+<code>pred</code>. The matched element is not contained in the subslices.</p>
+<h5 id="examples-41"><a href="#examples-41">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>, <span class="number">20</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split(|num| num % <span class="number">3 </span>== <span class="number">0</span>);
+
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">20</span>]);
+<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
+<p>If the first element is matched, an empty slice will be the first item
+returned by the iterator. Similarly, if the last element in the slice
+is matched, an empty slice will be the last item returned by the
+iterator:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split(|num| num % <span class="number">3 </span>== <span class="number">0</span>);
+
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[]);
+<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
+<p>If two matched elements are directly adjacent, an empty slice will be
+present between them:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">10</span>, <span class="number">6</span>, <span class="number">33</span>, <span class="number">20</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split(|num| num % <span class="number">3 </span>== <span class="number">0</span>);
+
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">10</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">20</span>]);
+<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_inclusive" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1963-1965">source</a></span><h4 class="code-header">pub fn <a href="#method.split_inclusive" class="fnname">split_inclusive</a>&lt;F&gt;(&amp;self, pred: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.SplitInclusive.html" title="struct core::slice::iter::SplitInclusive">SplitInclusive</a>&lt;'_, T, F&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match
+<code>pred</code>. The matched element is contained in the end of the previous
+subslice as a terminator.</p>
+<h5 id="examples-42"><a href="#examples-42">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>, <span class="number">20</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split_inclusive(|num| num % <span class="number">3 </span>== <span class="number">0</span>);
+
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">20</span>]);
+<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
+<p>If the last element of the slice is matched,
+that element will be considered the terminator of the preceding slice.
+That slice will be the last item returned by the iterator.</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">3</span>, <span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split_inclusive(|num| num % <span class="number">3 </span>== <span class="number">0</span>);
+
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">3</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>]);
+<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rsplit" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.27.0">1.27.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2023-2025">source</a></span><h4 class="code-header">pub fn <a href="#method.rsplit" class="fnname">rsplit</a>&lt;F&gt;(&amp;self, pred: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.RSplit.html" title="struct core::slice::iter::RSplit">RSplit</a>&lt;'_, T, F&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match
+<code>pred</code>, starting at the end of the slice and working backwards.
+The matched element is not contained in the subslices.</p>
+<h5 id="examples-43"><a href="#examples-43">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">11</span>, <span class="number">22</span>, <span class="number">33</span>, <span class="number">0</span>, <span class="number">44</span>, <span class="number">55</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.rsplit(|num| <span class="kw-2">*</span>num == <span class="number">0</span>);
+
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">44</span>, <span class="number">55</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">11</span>, <span class="number">22</span>, <span class="number">33</span>]);
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div>
+<p>As with <code>split()</code>, if the first or last element is matched, an empty
+slice will be the first (or last) item returned by the iterator.</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&amp;</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>it = v.rsplit(|n| <span class="kw-2">*</span>n % <span class="number">2 </span>== <span class="number">0</span>);
+<span class="macro">assert_eq!</span>(it.next().unwrap(), <span class="kw-2">&amp;</span>[]);
+<span class="macro">assert_eq!</span>(it.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">3</span>, <span class="number">5</span>]);
+<span class="macro">assert_eq!</span>(it.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">1</span>]);
+<span class="macro">assert_eq!</span>(it.next().unwrap(), <span class="kw-2">&amp;</span>[]);
+<span class="macro">assert_eq!</span>(it.next(), <span class="prelude-val">None</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.splitn" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2077-2079">source</a></span><h4 class="code-header">pub fn <a href="#method.splitn" class="fnname">splitn</a>&lt;F&gt;(&amp;self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, pred: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.SplitN.html" title="struct core::slice::iter::SplitN">SplitN</a>&lt;'_, T, F&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match
+<code>pred</code>, limited to returning at most <code>n</code> items. The matched element is
+not contained in the subslices.</p>
+<p>The last element returned, if any, will contain the remainder of the
+slice.</p>
+<h5 id="examples-44"><a href="#examples-44">Examples</a></h5>
+<p>Print the slice split once by numbers divisible by 3 (i.e., <code>[10, 40]</code>,
+<code>[20, 60, 50]</code>):</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>];
+
+<span class="kw">for </span>group <span class="kw">in </span>v.splitn(<span class="number">2</span>, |num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) {
+ <span class="macro">println!</span>(<span class="string">&quot;{group:?}&quot;</span>);
+}</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rsplitn" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2132-2134">source</a></span><h4 class="code-header">pub fn <a href="#method.rsplitn" class="fnname">rsplitn</a>&lt;F&gt;(&amp;self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, pred: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.RSplitN.html" title="struct core::slice::iter::RSplitN">RSplitN</a>&lt;'_, T, F&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match
+<code>pred</code> limited to returning at most <code>n</code> items. This starts at the end of
+the slice and works backwards. The matched element is not contained in
+the subslices.</p>
+<p>The last element returned, if any, will contain the remainder of the
+slice.</p>
+<h5 id="examples-45"><a href="#examples-45">Examples</a></h5>
+<p>Print the slice split once, starting from the end, by numbers divisible
+by 3 (i.e., <code>[50]</code>, <code>[10, 40, 30, 20]</code>):</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>];
+
+<span class="kw">for </span>group <span class="kw">in </span>v.rsplitn(<span class="number">2</span>, |num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) {
+ <span class="macro">println!</span>(<span class="string">&quot;{group:?}&quot;</span>);
+}</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.contains" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2194-2196">source</a></span><h4 class="code-header">pub fn <a href="#method.contains" class="fnname">contains</a>(&amp;self, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;T&gt;,</span></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if the slice contains an element with the given value.</p>
+<p>This operation is <em>O</em>(<em>n</em>).</p>
+<p>Note that if you have a sorted slice, <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.binary_search"><code>binary_search</code></a> may be faster.</p>
+<h5 id="examples-46"><a href="#examples-46">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="macro">assert!</span>(v.contains(<span class="kw-2">&amp;</span><span class="number">30</span>));
+<span class="macro">assert!</span>(!v.contains(<span class="kw-2">&amp;</span><span class="number">50</span>));</code></pre></div>
+<p>If you do not have a <code>&amp;T</code>, but some other value that you can compare
+with one (for example, <code>String</code> implements <code>PartialEq&lt;str&gt;</code>), you can
+use <code>iter().any</code>:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [String::from(<span class="string">&quot;hello&quot;</span>), String::from(<span class="string">&quot;world&quot;</span>)]; <span class="comment">// slice of `String`
+</span><span class="macro">assert!</span>(v.iter().any(|e| e == <span class="string">&quot;hello&quot;</span>)); <span class="comment">// search with `&amp;str`
+</span><span class="macro">assert!</span>(!v.iter().any(|e| e == <span class="string">&quot;hi&quot;</span>));</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.starts_with" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2223-2225">source</a></span><h4 class="code-header">pub fn <a href="#method.starts_with" class="fnname">starts_with</a>(&amp;self, needle: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;T&gt;,</span></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if <code>needle</code> is a prefix of the slice.</p>
+<h5 id="examples-47"><a href="#examples-47">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="macro">assert!</span>(v.starts_with(<span class="kw-2">&amp;</span>[<span class="number">10</span>]));
+<span class="macro">assert!</span>(v.starts_with(<span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>]));
+<span class="macro">assert!</span>(!v.starts_with(<span class="kw-2">&amp;</span>[<span class="number">50</span>]));
+<span class="macro">assert!</span>(!v.starts_with(<span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">50</span>]));</code></pre></div>
+<p>Always returns <code>true</code> if <code>needle</code> is an empty slice:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="macro">assert!</span>(v.starts_with(<span class="kw-2">&amp;</span>[]));
+<span class="kw">let </span>v: <span class="kw-2">&amp;</span>[u8] = <span class="kw-2">&amp;</span>[];
+<span class="macro">assert!</span>(v.starts_with(<span class="kw-2">&amp;</span>[]));</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ends_with" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2253-2255">source</a></span><h4 class="code-header">pub fn <a href="#method.ends_with" class="fnname">ends_with</a>(&amp;self, needle: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;T&gt;,</span></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if <code>needle</code> is a suffix of the slice.</p>
+<h5 id="examples-48"><a href="#examples-48">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="macro">assert!</span>(v.ends_with(<span class="kw-2">&amp;</span>[<span class="number">30</span>]));
+<span class="macro">assert!</span>(v.ends_with(<span class="kw-2">&amp;</span>[<span class="number">40</span>, <span class="number">30</span>]));
+<span class="macro">assert!</span>(!v.ends_with(<span class="kw-2">&amp;</span>[<span class="number">50</span>]));
+<span class="macro">assert!</span>(!v.ends_with(<span class="kw-2">&amp;</span>[<span class="number">50</span>, <span class="number">30</span>]));</code></pre></div>
+<p>Always returns <code>true</code> if <code>needle</code> is an empty slice:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="macro">assert!</span>(v.ends_with(<span class="kw-2">&amp;</span>[]));
+<span class="kw">let </span>v: <span class="kw-2">&amp;</span>[u8] = <span class="kw-2">&amp;</span>[];
+<span class="macro">assert!</span>(v.ends_with(<span class="kw-2">&amp;</span>[]));</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.strip_prefix" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2283-2285">source</a></span><h4 class="code-header">pub fn <a href="#method.strip_prefix" class="fnname">strip_prefix</a>&lt;P&gt;(&amp;self, prefix: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>P) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/slice/trait.SlicePattern.html" title="trait core::slice::SlicePattern">SlicePattern</a>&lt;Item = T&gt; + ?<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;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;T&gt;,</span></h4></section></summary><div class="docblock"><p>Returns a subslice with the prefix removed.</p>
+<p>If the slice starts with <code>prefix</code>, returns the subslice after the prefix, wrapped in <code>Some</code>.
+If <code>prefix</code> is empty, simply returns the original slice.</p>
+<p>If the slice does not start with <code>prefix</code>, returns <code>None</code>.</p>
+<h5 id="examples-49"><a href="#examples-49">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="macro">assert_eq!</span>(v.strip_prefix(<span class="kw-2">&amp;</span>[<span class="number">10</span>]), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span>[<span class="number">40</span>, <span class="number">30</span>][..]));
+<span class="macro">assert_eq!</span>(v.strip_prefix(<span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>]), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span>[<span class="number">30</span>][..]));
+<span class="macro">assert_eq!</span>(v.strip_prefix(<span class="kw-2">&amp;</span>[<span class="number">50</span>]), <span class="prelude-val">None</span>);
+<span class="macro">assert_eq!</span>(v.strip_prefix(<span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">50</span>]), <span class="prelude-val">None</span>);
+
+<span class="kw">let </span>prefix : <span class="kw-2">&amp;</span>str = <span class="string">&quot;he&quot;</span>;
+<span class="macro">assert_eq!</span>(<span class="string">b&quot;hello&quot;</span>.strip_prefix(prefix.as_bytes()),
+ <span class="prelude-val">Some</span>(<span class="string">b&quot;llo&quot;</span>.as_ref()));</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.strip_suffix" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2317-2319">source</a></span><h4 class="code-header">pub fn <a href="#method.strip_suffix" class="fnname">strip_suffix</a>&lt;P&gt;(&amp;self, suffix: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>P) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/slice/trait.SlicePattern.html" title="trait core::slice::SlicePattern">SlicePattern</a>&lt;Item = T&gt; + ?<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;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;T&gt;,</span></h4></section></summary><div class="docblock"><p>Returns a subslice with the suffix removed.</p>
+<p>If the slice ends with <code>suffix</code>, returns the subslice before the suffix, wrapped in <code>Some</code>.
+If <code>suffix</code> is empty, simply returns the original slice.</p>
+<p>If the slice does not end with <code>suffix</code>, returns <code>None</code>.</p>
+<h5 id="examples-50"><a href="#examples-50">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="macro">assert_eq!</span>(v.strip_suffix(<span class="kw-2">&amp;</span>[<span class="number">30</span>]), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>][..]));
+<span class="macro">assert_eq!</span>(v.strip_suffix(<span class="kw-2">&amp;</span>[<span class="number">40</span>, <span class="number">30</span>]), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span>[<span class="number">10</span>][..]));
+<span class="macro">assert_eq!</span>(v.strip_suffix(<span class="kw-2">&amp;</span>[<span class="number">50</span>]), <span class="prelude-val">None</span>);
+<span class="macro">assert_eq!</span>(v.strip_suffix(<span class="kw-2">&amp;</span>[<span class="number">50</span>, <span class="number">30</span>]), <span class="prelude-val">None</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.binary_search" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2401-2403">source</a></span><h4 class="code-header">pub fn <a href="#method.binary_search" class="fnname">binary_search</a>(&amp;self, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Binary searches this slice for a given element.
+This behaves similarly to <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.contains"><code>contains</code></a> if this slice is sorted.</p>
+<p>If the value is found then <a href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html#variant.Ok" title="Result::Ok"><code>Result::Ok</code></a> is returned, containing the
+index of the matching element. If there are multiple matches, then any
+one of the matches could be returned. The index is chosen
+deterministically, but is subject to change in future versions of Rust.
+If the value is not found then <a href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html#variant.Err" title="Result::Err"><code>Result::Err</code></a> is returned, containing
+the index where a matching element could be inserted while maintaining
+sorted order.</p>
+<p>See also <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.binary_search_by"><code>binary_search_by</code></a>, <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.binary_search_by_key"><code>binary_search_by_key</code></a>, and <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.partition_point"><code>partition_point</code></a>.</p>
+<h5 id="examples-51"><a href="#examples-51">Examples</a></h5>
+<p>Looks up a series of four elements. The first is found, with a
+uniquely determined position; the second and third are not
+found; the fourth could match any position in <code>[1, 4]</code>.</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>];
+
+<span class="macro">assert_eq!</span>(s.binary_search(<span class="kw-2">&amp;</span><span class="number">13</span>), <span class="prelude-val">Ok</span>(<span class="number">9</span>));
+<span class="macro">assert_eq!</span>(s.binary_search(<span class="kw-2">&amp;</span><span class="number">4</span>), <span class="prelude-val">Err</span>(<span class="number">7</span>));
+<span class="macro">assert_eq!</span>(s.binary_search(<span class="kw-2">&amp;</span><span class="number">100</span>), <span class="prelude-val">Err</span>(<span class="number">13</span>));
+<span class="kw">let </span>r = s.binary_search(<span class="kw-2">&amp;</span><span class="number">1</span>);
+<span class="macro">assert!</span>(<span class="kw">match </span>r { <span class="prelude-val">Ok</span>(<span class="number">1</span>..=<span class="number">4</span>) =&gt; <span class="bool-val">true</span>, <span class="kw">_ </span>=&gt; <span class="bool-val">false</span>, });</code></pre></div>
+<p>If you want to find that whole <em>range</em> of matching items, rather than
+an arbitrary matching one, that can be done using <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.partition_point"><code>partition_point</code></a>:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>];
+
+<span class="kw">let </span>low = s.partition_point(|x| x &lt; <span class="kw-2">&amp;</span><span class="number">1</span>);
+<span class="macro">assert_eq!</span>(low, <span class="number">1</span>);
+<span class="kw">let </span>high = s.partition_point(|x| x &lt;= <span class="kw-2">&amp;</span><span class="number">1</span>);
+<span class="macro">assert_eq!</span>(high, <span class="number">5</span>);
+<span class="kw">let </span>r = s.binary_search(<span class="kw-2">&amp;</span><span class="number">1</span>);
+<span class="macro">assert!</span>((low..high).contains(<span class="kw-2">&amp;</span>r.unwrap()));
+
+<span class="macro">assert!</span>(s[..low].iter().all(|<span class="kw-2">&amp;</span>x| x &lt; <span class="number">1</span>));
+<span class="macro">assert!</span>(s[low..high].iter().all(|<span class="kw-2">&amp;</span>x| x == <span class="number">1</span>));
+<span class="macro">assert!</span>(s[high..].iter().all(|<span class="kw-2">&amp;</span>x| x &gt; <span class="number">1</span>));
+
+<span class="comment">// For something not found, the &quot;range&quot; of equal items is empty
+</span><span class="macro">assert_eq!</span>(s.partition_point(|x| x &lt; <span class="kw-2">&amp;</span><span class="number">11</span>), <span class="number">9</span>);
+<span class="macro">assert_eq!</span>(s.partition_point(|x| x &lt;= <span class="kw-2">&amp;</span><span class="number">11</span>), <span class="number">9</span>);
+<span class="macro">assert_eq!</span>(s.binary_search(<span class="kw-2">&amp;</span><span class="number">11</span>), <span class="prelude-val">Err</span>(<span class="number">9</span>));</code></pre></div>
+<p>If you want to insert an item to a sorted vector, while maintaining
+sort order, consider using <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.partition_point"><code>partition_point</code></a>:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>s = <span class="macro">vec!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>];
+<span class="kw">let </span>num = <span class="number">42</span>;
+<span class="kw">let </span>idx = s.partition_point(|<span class="kw-2">&amp;</span>x| x &lt; num);
+<span class="comment">// The above is equivalent to `let idx = s.binary_search(&amp;num).unwrap_or_else(|x| x);`
+</span>s.insert(idx, num);
+<span class="macro">assert_eq!</span>(s, [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">42</span>, <span class="number">55</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.binary_search_by" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2452-2454">source</a></span><h4 class="code-header">pub fn <a href="#method.binary_search_by" class="fnname">binary_search_by</a>&lt;'a, F&gt;(&amp;'a self, f: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>T) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</span></h4></section></summary><div class="docblock"><p>Binary searches this slice with a comparator function.
+This behaves similarly to <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.contains"><code>contains</code></a> if this slice is sorted.</p>
+<p>The comparator function should implement an order consistent
+with the sort order of the underlying slice, returning an
+order code that indicates whether its argument is <code>Less</code>,
+<code>Equal</code> or <code>Greater</code> the desired target.</p>
+<p>If the value is found then <a href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html#variant.Ok" title="Result::Ok"><code>Result::Ok</code></a> is returned, containing the
+index of the matching element. If there are multiple matches, then any
+one of the matches could be returned. The index is chosen
+deterministically, but is subject to change in future versions of Rust.
+If the value is not found then <a href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html#variant.Err" title="Result::Err"><code>Result::Err</code></a> is returned, containing
+the index where a matching element could be inserted while maintaining
+sorted order.</p>
+<p>See also <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.binary_search"><code>binary_search</code></a>, <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.binary_search_by_key"><code>binary_search_by_key</code></a>, and <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.partition_point"><code>partition_point</code></a>.</p>
+<h5 id="examples-52"><a href="#examples-52">Examples</a></h5>
+<p>Looks up a series of four elements. The first is found, with a
+uniquely determined position; the second and third are not
+found; the fourth could match any position in <code>[1, 4]</code>.</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>];
+
+<span class="kw">let </span>seek = <span class="number">13</span>;
+<span class="macro">assert_eq!</span>(s.binary_search_by(|probe| probe.cmp(<span class="kw-2">&amp;</span>seek)), <span class="prelude-val">Ok</span>(<span class="number">9</span>));
+<span class="kw">let </span>seek = <span class="number">4</span>;
+<span class="macro">assert_eq!</span>(s.binary_search_by(|probe| probe.cmp(<span class="kw-2">&amp;</span>seek)), <span class="prelude-val">Err</span>(<span class="number">7</span>));
+<span class="kw">let </span>seek = <span class="number">100</span>;
+<span class="macro">assert_eq!</span>(s.binary_search_by(|probe| probe.cmp(<span class="kw-2">&amp;</span>seek)), <span class="prelude-val">Err</span>(<span class="number">13</span>));
+<span class="kw">let </span>seek = <span class="number">1</span>;
+<span class="kw">let </span>r = s.binary_search_by(|probe| probe.cmp(<span class="kw-2">&amp;</span>seek));
+<span class="macro">assert!</span>(<span class="kw">match </span>r { <span class="prelude-val">Ok</span>(<span class="number">1</span>..=<span class="number">4</span>) =&gt; <span class="bool-val">true</span>, <span class="kw">_ </span>=&gt; <span class="bool-val">false</span>, });</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.binary_search_by_key" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.10.0">1.10.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2541-2544">source</a></span><h4 class="code-header">pub fn <a href="#method.binary_search_by_key" class="fnname">binary_search_by_key</a>&lt;'a, B, F&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;'a self,<br>&nbsp;&nbsp;&nbsp;&nbsp;b: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>B,<br>&nbsp;&nbsp;&nbsp;&nbsp;f: F<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>T) -&gt; B,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Binary searches this slice with a key extraction function.
+This behaves similarly to <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.contains"><code>contains</code></a> if this slice is sorted.</p>
+<p>Assumes that the slice is sorted by the key, for instance with
+<a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.sort_by_key"><code>sort_by_key</code></a> using the same key extraction function.</p>
+<p>If the value is found then <a href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html#variant.Ok" title="Result::Ok"><code>Result::Ok</code></a> is returned, containing the
+index of the matching element. If there are multiple matches, then any
+one of the matches could be returned. The index is chosen
+deterministically, but is subject to change in future versions of Rust.
+If the value is not found then <a href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html#variant.Err" title="Result::Err"><code>Result::Err</code></a> is returned, containing
+the index where a matching element could be inserted while maintaining
+sorted order.</p>
+<p>See also <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.binary_search"><code>binary_search</code></a>, <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.binary_search_by"><code>binary_search_by</code></a>, and <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.partition_point"><code>partition_point</code></a>.</p>
+<h5 id="examples-53"><a href="#examples-53">Examples</a></h5>
+<p>Looks up a series of four elements in a slice of pairs sorted by
+their second elements. The first is found, with a uniquely
+determined position; the second and third are not found; the
+fourth could match any position in <code>[1, 4]</code>.</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [(<span class="number">0</span>, <span class="number">0</span>), (<span class="number">2</span>, <span class="number">1</span>), (<span class="number">4</span>, <span class="number">1</span>), (<span class="number">5</span>, <span class="number">1</span>), (<span class="number">3</span>, <span class="number">1</span>),
+ (<span class="number">1</span>, <span class="number">2</span>), (<span class="number">2</span>, <span class="number">3</span>), (<span class="number">4</span>, <span class="number">5</span>), (<span class="number">5</span>, <span class="number">8</span>), (<span class="number">3</span>, <span class="number">13</span>),
+ (<span class="number">1</span>, <span class="number">21</span>), (<span class="number">2</span>, <span class="number">34</span>), (<span class="number">4</span>, <span class="number">55</span>)];
+
+<span class="macro">assert_eq!</span>(s.binary_search_by_key(<span class="kw-2">&amp;</span><span class="number">13</span>, |<span class="kw-2">&amp;</span>(a, b)| b), <span class="prelude-val">Ok</span>(<span class="number">9</span>));
+<span class="macro">assert_eq!</span>(s.binary_search_by_key(<span class="kw-2">&amp;</span><span class="number">4</span>, |<span class="kw-2">&amp;</span>(a, b)| b), <span class="prelude-val">Err</span>(<span class="number">7</span>));
+<span class="macro">assert_eq!</span>(s.binary_search_by_key(<span class="kw-2">&amp;</span><span class="number">100</span>, |<span class="kw-2">&amp;</span>(a, b)| b), <span class="prelude-val">Err</span>(<span class="number">13</span>));
+<span class="kw">let </span>r = s.binary_search_by_key(<span class="kw-2">&amp;</span><span class="number">1</span>, |<span class="kw-2">&amp;</span>(a, b)| b);
+<span class="macro">assert!</span>(<span class="kw">match </span>r { <span class="prelude-val">Ok</span>(<span class="number">1</span>..=<span class="number">4</span>) =&gt; <span class="bool-val">true</span>, <span class="kw">_ </span>=&gt; <span class="bool-val">false</span>, });</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.align_to" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.30.0">1.30.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3498">source</a></span><h4 class="code-header">pub unsafe fn <a href="#method.align_to" class="fnname">align_to</a>&lt;U&gt;(&amp;self) -&gt; (&amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[U]</a>, &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Transmute the slice to a slice of another type, ensuring alignment of the types is
+maintained.</p>
+<p>This method splits the slice into three distinct slices: prefix, correctly aligned middle
+slice of a new type, and the suffix slice. The method may make the middle slice the greatest
+length possible for a given type and input slice, but only your algorithm’s performance
+should depend on that, not its correctness. It is permissible for all of the input data to
+be returned as the prefix or suffix slice.</p>
+<p>This method has no purpose when either input element <code>T</code> or output element <code>U</code> are
+zero-sized and will return the original slice without splitting anything.</p>
+<h5 id="safety-3"><a href="#safety-3">Safety</a></h5>
+<p>This method is essentially a <code>transmute</code> with respect to the elements in the returned
+middle slice, so all the usual caveats pertaining to <code>transmute::&lt;T, U&gt;</code> also apply here.</p>
+<h5 id="examples-54"><a href="#examples-54">Examples</a></h5>
+<p>Basic usage:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">unsafe </span>{
+ <span class="kw">let </span>bytes: [u8; <span class="number">7</span>] = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>, <span class="number">7</span>];
+ <span class="kw">let </span>(prefix, shorts, suffix) = bytes.align_to::&lt;u16&gt;();
+ <span class="comment">// less_efficient_algorithm_for_bytes(prefix);
+ // more_efficient_algorithm_for_aligned_shorts(shorts);
+ // less_efficient_algorithm_for_bytes(suffix);
+</span>}</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_simd" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3654-3658">source</a><h4 class="code-header">pub fn <a href="#method.as_simd" class="fnname">as_simd</a>&lt;const LANES:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(&amp;self) -&gt; (&amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, &amp;[<a class="struct" href="https://doc.rust-lang.org/nightly/core/core_simd/vector/struct.Simd.html" title="struct core::core_simd::vector::Simd">Simd</a>&lt;T, LANES&gt;], &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="struct" href="https://doc.rust-lang.org/nightly/core/core_simd/vector/struct.Simd.html" title="struct core::core_simd::vector::Simd">Simd</a>&lt;T, LANES&gt;: <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.array.html">[T; LANES]</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/core_simd/vector/trait.SimdElement.html" title="trait core::core_simd::vector::SimdElement">SimdElement</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="struct" href="https://doc.rust-lang.org/nightly/core/core_simd/lane_count/struct.LaneCount.html" title="struct core::core_simd::lane_count::LaneCount">LaneCount</a>&lt;LANES&gt;: <a class="trait" href="https://doc.rust-lang.org/nightly/core/core_simd/lane_count/trait.SupportedLaneCount.html" title="trait core::core_simd::lane_count::SupportedLaneCount">SupportedLaneCount</a>,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>portable_simd</code>)</span></div></span></summary><div class="docblock"><p>Split a slice into a prefix, a middle of aligned SIMD types, and a suffix.</p>
+<p>This is a safe wrapper around <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.align_to" title="slice::align_to"><code>slice::align_to</code></a>, so has the same weak
+postconditions as that method. You’re only assured that
+<code>self.len() == prefix.len() + middle.len() * LANES + suffix.len()</code>.</p>
+<p>Notably, all of the following are possible:</p>
+<ul>
+<li><code>prefix.len() &gt;= LANES</code>.</li>
+<li><code>middle.is_empty()</code> despite <code>self.len() &gt;= 3 * LANES</code>.</li>
+<li><code>suffix.len() &gt;= LANES</code>.</li>
+</ul>
+<p>That said, this is a safe method, so if you’re only writing safe code,
+then this can at most cause incorrect logic, not unsoundness.</p>
+<h5 id="panics-16"><a href="#panics-16">Panics</a></h5>
+<p>This will panic if the size of the SIMD type is different from
+<code>LANES</code> times that of the scalar.</p>
+<p>At the time of writing, the trait restrictions on <code>Simd&lt;T, LANES&gt;</code> keeps
+that from ever happening, as only power-of-two numbers of lanes are
+supported. It’s possible that, in the future, those restrictions might
+be lifted in a way that would make it possible to see panics from this
+method for something like <code>LANES == 3</code>.</p>
+<h5 id="examples-55"><a href="#examples-55">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(portable_simd)]
+</span><span class="kw">use </span>core::simd::SimdFloat;
+
+<span class="kw">let </span>short = <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>];
+<span class="kw">let </span>(prefix, middle, suffix) = short.as_simd::&lt;<span class="number">4</span>&gt;();
+<span class="macro">assert_eq!</span>(middle, []); <span class="comment">// Not enough elements for anything in the middle
+
+// They might be split in any possible way between prefix and suffix
+</span><span class="kw">let </span>it = prefix.iter().chain(suffix).copied();
+<span class="macro">assert_eq!</span>(it.collect::&lt;Vec&lt;<span class="kw">_</span>&gt;&gt;(), <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
+
+<span class="kw">fn </span>basic_simd_sum(x: <span class="kw-2">&amp;</span>[f32]) -&gt; f32 {
+ <span class="kw">use </span>std::ops::Add;
+ <span class="kw">use </span>std::simd::f32x4;
+ <span class="kw">let </span>(prefix, middle, suffix) = x.as_simd();
+ <span class="kw">let </span>sums = f32x4::from_array([
+ prefix.iter().copied().sum(),
+ <span class="number">0.0</span>,
+ <span class="number">0.0</span>,
+ suffix.iter().copied().sum(),
+ ]);
+ <span class="kw">let </span>sums = middle.iter().copied().fold(sums, f32x4::add);
+ sums.reduce_sum()
+}
+
+<span class="kw">let </span>numbers: Vec&lt;f32&gt; = (<span class="number">1</span>..<span class="number">101</span>).map(|x| x <span class="kw">as _</span>).collect();
+<span class="macro">assert_eq!</span>(basic_simd_sum(<span class="kw-2">&amp;</span>numbers[<span class="number">1</span>..<span class="number">99</span>]), <span class="number">4949.0</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_sorted" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3739-3741">source</a><h4 class="code-header">pub fn <a href="#method.is_sorted" class="fnname">is_sorted</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;T&gt;,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>is_sorted</code>)</span></div></span></summary><div class="docblock"><p>Checks if the elements of this slice are sorted.</p>
+<p>That is, for each element <code>a</code> and its following element <code>b</code>, <code>a &lt;= b</code> must hold. If the
+slice yields exactly zero or one element, <code>true</code> is returned.</p>
+<p>Note that if <code>Self::Item</code> is only <code>PartialOrd</code>, but not <code>Ord</code>, the above definition
+implies that this function returns <code>false</code> if any two consecutive items are not
+comparable.</p>
+<h5 id="examples-56"><a href="#examples-56">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(is_sorted)]
+</span><span class="kw">let </span>empty: [i32; <span class="number">0</span>] = [];
+
+<span class="macro">assert!</span>([<span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">9</span>].is_sorted());
+<span class="macro">assert!</span>(![<span class="number">1</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">4</span>].is_sorted());
+<span class="macro">assert!</span>([<span class="number">0</span>].is_sorted());
+<span class="macro">assert!</span>(empty.is_sorted());
+<span class="macro">assert!</span>(![<span class="number">0.0</span>, <span class="number">1.0</span>, f32::NAN].is_sorted());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_sorted_by" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3755-3757">source</a><h4 class="code-header">pub fn <a href="#method.is_sorted_by" class="fnname">is_sorted_by</a>&lt;F&gt;(&amp;self, compare: F) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>is_sorted</code>)</span></div></span></summary><div class="docblock"><p>Checks if the elements of this slice are sorted using the given comparator function.</p>
+<p>Instead of using <code>PartialOrd::partial_cmp</code>, this function uses the given <code>compare</code>
+function to determine the ordering of two elements. Apart from that, it’s equivalent to
+<a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.is_sorted"><code>is_sorted</code></a>; see its documentation for more information.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_sorted_by_key" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3781-3784">source</a><h4 class="code-header">pub fn <a href="#method.is_sorted_by_key" class="fnname">is_sorted_by_key</a>&lt;F, K&gt;(&amp;self, f: F) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; K,<br>&nbsp;&nbsp;&nbsp;&nbsp;K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;K&gt;,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>is_sorted</code>)</span></div></span></summary><div class="docblock"><p>Checks if the elements of this slice are sorted using the given key extraction function.</p>
+<p>Instead of comparing the slice’s elements directly, this function compares the keys of the
+elements, as determined by <code>f</code>. Apart from that, it’s equivalent to <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.is_sorted"><code>is_sorted</code></a>; see its
+documentation for more information.</p>
+<h5 id="examples-57"><a href="#examples-57">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(is_sorted)]
+
+</span><span class="macro">assert!</span>([<span class="string">&quot;c&quot;</span>, <span class="string">&quot;bb&quot;</span>, <span class="string">&quot;aaa&quot;</span>].is_sorted_by_key(|s| s.len()));
+<span class="macro">assert!</span>(![-<span class="number">2i32</span>, -<span class="number">1</span>, <span class="number">0</span>, <span class="number">3</span>].is_sorted_by_key(|n| n.abs()));</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partition_point" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.52.0">1.52.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3840-3842">source</a></span><h4 class="code-header">pub fn <a href="#method.partition_point" class="fnname">partition_point</a>&lt;P&gt;(&amp;self, pred: P) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns the index of the partition point according to the given predicate
+(the index of the first element of the second partition).</p>
+<p>The slice is assumed to be partitioned according to the given predicate.
+This means that all elements for which the predicate returns true are at the start of the slice
+and all elements for which the predicate returns false are at the end.
+For example, [7, 15, 3, 5, 4, 12, 6] is a partitioned under the predicate x % 2 != 0
+(all odd numbers are at the start, all even at the end).</p>
+<p>If this slice is not partitioned, the returned result is unspecified and meaningless,
+as this method performs a kind of binary search.</p>
+<p>See also <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.binary_search"><code>binary_search</code></a>, <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.binary_search_by"><code>binary_search_by</code></a>, and <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.binary_search_by_key"><code>binary_search_by_key</code></a>.</p>
+<h5 id="examples-58"><a href="#examples-58">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">6</span>, <span class="number">7</span>];
+<span class="kw">let </span>i = v.partition_point(|<span class="kw-2">&amp;</span>x| x &lt; <span class="number">5</span>);
+
+<span class="macro">assert_eq!</span>(i, <span class="number">4</span>);
+<span class="macro">assert!</span>(v[..i].iter().all(|<span class="kw-2">&amp;</span>x| x &lt; <span class="number">5</span>));
+<span class="macro">assert!</span>(v[i..].iter().all(|<span class="kw-2">&amp;</span>x| !(x &lt; <span class="number">5</span>)));</code></pre></div>
+<p>If all elements of the slice match the predicate, including if the slice
+is empty, then the length of the slice will be returned:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>a = [<span class="number">2</span>, <span class="number">4</span>, <span class="number">8</span>];
+<span class="macro">assert_eq!</span>(a.partition_point(|x| x &lt; <span class="kw-2">&amp;</span><span class="number">100</span>), a.len());
+<span class="kw">let </span>a: [i32; <span class="number">0</span>] = [];
+<span class="macro">assert_eq!</span>(a.partition_point(|x| x &lt; <span class="kw-2">&amp;</span><span class="number">100</span>), <span class="number">0</span>);</code></pre></div>
+<p>If you want to insert an item to a sorted vector, while maintaining
+sort order:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>s = <span class="macro">vec!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>];
+<span class="kw">let </span>num = <span class="number">42</span>;
+<span class="kw">let </span>idx = s.partition_point(|<span class="kw-2">&amp;</span>x| x &lt; num);
+s.insert(idx, num);
+<span class="macro">assert_eq!</span>(s, [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">42</span>, <span class="number">55</span>]);</code></pre></div>
+</div></details></div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.flatten" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#4117">source</a><h4 class="code-header">pub fn <a href="#method.flatten" class="fnname">flatten</a>(&amp;self) -&gt; &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a><span class="notable-traits" data-ty="&amp;[T]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_flatten</code>)</span></div></span></summary><div class="docblock"><p>Takes a <code>&amp;[[T; N]]</code>, and flattens it to a <code>&amp;[T]</code>.</p>
+<h5 id="panics-17"><a href="#panics-17">Panics</a></h5>
+<p>This panics if the length of the resulting slice would overflow a <code>usize</code>.</p>
+<p>This is only possible when flattening a slice of arrays of zero-sized
+types, and thus tends to be irrelevant in practice. If
+<code>size_of::&lt;T&gt;() &gt; 0</code>, this will never panic.</p>
+<h5 id="examples-59"><a href="#examples-59">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_flatten)]
+
+</span><span class="macro">assert_eq!</span>([[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>], [<span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]].flatten(), <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+
+<span class="macro">assert_eq!</span>(
+ [[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>], [<span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]].flatten(),
+ [[<span class="number">1</span>, <span class="number">2</span>], [<span class="number">3</span>, <span class="number">4</span>], [<span class="number">5</span>, <span class="number">6</span>]].flatten(),
+);
+
+<span class="kw">let </span>slice_of_empty_arrays: <span class="kw-2">&amp;</span>[[i32; <span class="number">0</span>]] = <span class="kw-2">&amp;</span>[[], [], [], [], []];
+<span class="macro">assert!</span>(slice_of_empty_arrays.flatten().is_empty());
+
+<span class="kw">let </span>empty_slice_of_arrays: <span class="kw-2">&amp;</span>[[u32; <span class="number">10</span>]] = <span class="kw-2">&amp;</span>[];
+<span class="macro">assert!</span>(empty_slice_of_arrays.flatten().is_empty());</code></pre></div>
+</div></details></div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_vec" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/slice.rs.html#407-409">source</a></span><h4 class="code-header">pub fn <a href="#method.to_vec" class="fnname">to_vec</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h4></section></summary><div class="docblock"><p>Copies <code>self</code> into a new <code>Vec</code>.</p>
+<h5 id="examples-60"><a href="#examples-60">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="kw">let </span>x = s.to_vec();
+<span class="comment">// Here, `s` and `x` can be modified independently.</span></code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_vec_in" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/alloc/slice.rs.html#431-433">source</a><h4 class="code-header">pub fn <a href="#method.to_vec_in" class="fnname">to_vec_in</a>&lt;A&gt;(&amp;self, alloc: A) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;T, A&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/nightly/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>allocator_api</code>)</span></div></span></summary><div class="docblock"><p>Copies <code>self</code> into a new <code>Vec</code> with an allocator.</p>
+<h5 id="examples-61"><a href="#examples-61">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(allocator_api)]
+
+</span><span class="kw">use </span>std::alloc::System;
+
+<span class="kw">let </span>s = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="kw">let </span>x = s.to_vec_in(System);
+<span class="comment">// Here, `s` and `x` can be modified independently.</span></code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.repeat" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.40.0">1.40.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/slice.rs.html#484-486">source</a></span><h4 class="code-header">pub fn <a href="#method.repeat" class="fnname">repeat</a>(&amp;self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>,</span></h4></section></summary><div class="docblock"><p>Creates a vector by repeating a slice <code>n</code> times.</p>
+<h5 id="panics-18"><a href="#panics-18">Panics</a></h5>
+<p>This function will panic if the capacity would overflow.</p>
+<h5 id="examples-62"><a href="#examples-62">Examples</a></h5>
+<p>Basic usage:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="macro">assert_eq!</span>([<span class="number">1</span>, <span class="number">2</span>].repeat(<span class="number">3</span>), <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">1</span>, <span class="number">2</span>]);</code></pre></div>
+<p>A panic upon overflow:</p>
+
+<div class="example-wrap should_panic"><div class='tooltip'>ⓘ</div><pre class="rust rust-example-rendered"><code><span class="comment">// this will panic at runtime
+</span><span class="string">b&quot;0123456789abcdef&quot;</span>.repeat(usize::MAX);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.concat" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/slice.rs.html#552-554">source</a></span><h4 class="code-header">pub fn <a href="#method.concat" class="fnname">concat</a>&lt;Item&gt;(&amp;self) -&gt; &lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a> as <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/slice/trait.Concat.html" title="trait alloc::slice::Concat">Concat</a>&lt;Item&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/alloc/slice/trait.Concat.html#associatedtype.Output" title="type alloc::slice::Concat::Output">Output</a><span class="notable-traits" data-ty="&lt;[T] as Concat&lt;Item&gt;&gt;::Output"><span class="notable-traits-tooltip">ⓘ</span></span><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/slice/trait.Concat.html" title="trait alloc::slice::Concat">Concat</a>&lt;Item&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Item: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class="docblock"><p>Flattens a slice of <code>T</code> into a single value <code>Self::Output</code>.</p>
+<h5 id="examples-63"><a href="#examples-63">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="macro">assert_eq!</span>([<span class="string">&quot;hello&quot;</span>, <span class="string">&quot;world&quot;</span>].concat(), <span class="string">&quot;helloworld&quot;</span>);
+<span class="macro">assert_eq!</span>([[<span class="number">1</span>, <span class="number">2</span>], [<span class="number">3</span>, <span class="number">4</span>]].concat(), [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.join" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.3.0">1.3.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/slice.rs.html#571-573">source</a></span><h4 class="code-header">pub fn <a href="#method.join" class="fnname">join</a>&lt;Separator&gt;(&amp;self, sep: Separator) -&gt; &lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a> as <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/slice/trait.Join.html" title="trait alloc::slice::Join">Join</a>&lt;Separator&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/alloc/slice/trait.Join.html#associatedtype.Output" title="type alloc::slice::Join::Output">Output</a><span class="notable-traits" data-ty="&lt;[T] as Join&lt;Separator&gt;&gt;::Output"><span class="notable-traits-tooltip">ⓘ</span></span><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/slice/trait.Join.html" title="trait alloc::slice::Join">Join</a>&lt;Separator&gt;,</span></h4></section></summary><div class="docblock"><p>Flattens a slice of <code>T</code> into a single value <code>Self::Output</code>, placing a
+given separator between each.</p>
+<h5 id="examples-64"><a href="#examples-64">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="macro">assert_eq!</span>([<span class="string">&quot;hello&quot;</span>, <span class="string">&quot;world&quot;</span>].join(<span class="string">&quot; &quot;</span>), <span class="string">&quot;hello world&quot;</span>);
+<span class="macro">assert_eq!</span>([[<span class="number">1</span>, <span class="number">2</span>], [<span class="number">3</span>, <span class="number">4</span>]].join(<span class="kw-2">&amp;</span><span class="number">0</span>), [<span class="number">1</span>, <span class="number">2</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">4</span>]);
+<span class="macro">assert_eq!</span>([[<span class="number">1</span>, <span class="number">2</span>], [<span class="number">3</span>, <span class="number">4</span>]].join(<span class="kw-2">&amp;</span>[<span class="number">0</span>, <span class="number">0</span>][..]), [<span class="number">1</span>, <span class="number">2</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">4</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.connect" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/slice.rs.html#591-593">source</a></span><h4 class="code-header">pub fn <a href="#method.connect" class="fnname">connect</a>&lt;Separator&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self,<br>&nbsp;&nbsp;&nbsp;&nbsp;sep: Separator<br>) -&gt; &lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a> as <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/slice/trait.Join.html" title="trait alloc::slice::Join">Join</a>&lt;Separator&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/alloc/slice/trait.Join.html#associatedtype.Output" title="type alloc::slice::Join::Output">Output</a><span class="notable-traits" data-ty="&lt;[T] as Join&lt;Separator&gt;&gt;::Output"><span class="notable-traits-tooltip">ⓘ</span></span><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/slice/trait.Join.html" title="trait alloc::slice::Join">Join</a>&lt;Separator&gt;,</span></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 1.3.0: renamed to join</span></div></span></summary><div class="docblock"><p>Flattens a slice of <code>T</code> into a single value <code>Self::Output</code>, placing a
+given separator between each.</p>
+<h5 id="examples-65"><a href="#examples-65">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="macro">assert_eq!</span>([<span class="string">&quot;hello&quot;</span>, <span class="string">&quot;world&quot;</span>].connect(<span class="string">&quot; &quot;</span>), <span class="string">&quot;hello world&quot;</span>);
+<span class="macro">assert_eq!</span>([[<span class="number">1</span>, <span class="number">2</span>], [<span class="number">3</span>, <span class="number">4</span>]].connect(<span class="kw-2">&amp;</span><span class="number">0</span>), [<span class="number">1</span>, <span class="number">2</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">4</span>]);</code></pre></div>
+</div></details></div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_ascii_uppercase" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/slice.rs.html#616">source</a></span><h4 class="code-header">pub fn <a href="#method.to_ascii_uppercase" class="fnname">to_ascii_uppercase</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a vector containing a copy of this slice where each byte
+is mapped to its ASCII upper case equivalent.</p>
+<p>ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’,
+but non-ASCII letters are unchanged.</p>
+<p>To uppercase the value in-place, use <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.make_ascii_uppercase"><code>make_ascii_uppercase</code></a>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_ascii_lowercase" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/slice.rs.html#637">source</a></span><h4 class="code-header">pub fn <a href="#method.to_ascii_lowercase" class="fnname">to_ascii_lowercase</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a vector containing a copy of this slice where each byte
+is mapped to its ASCII lower case equivalent.</p>
+<p>ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’,
+but non-ASCII letters are unchanged.</p>
+<p>To lowercase the value in-place, use <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.make_ascii_lowercase"><code>make_ascii_lowercase</code></a>.</p>
+</div></details></div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5Bu8%5D%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#622-627">source</a><a href="#impl-AsRef%3C%5Bu8%5D%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#624-626">source</a><a href="#method.as_ref" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html#tymethod.as_ref" class="fnname">as_ref</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Borrow%3C%5Bu8%5D%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#638-642">source</a><a href="#impl-Borrow%3C%5Bu8%5D%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#639-641">source</a><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Buf-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#583-611">source</a><a href="#impl-Buf-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.remaining" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#585-587">source</a><a href="#method.remaining" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#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></h4></section></summary><div class='docblock'>Returns the number of bytes between the current position and the end of
+the buffer. <a href="buf/trait.Buf.html#tymethod.remaining">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunk" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#590-592">source</a><a href="#method.chunk" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#tymethod.chunk" class="fnname">chunk</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section></summary><div class='docblock'>Returns a slice starting at the current position and of length between 0
+and <code>Buf::remaining()</code>. Note that this <em>can</em> return shorter slice (this allows
+non-continuous internal representation). <a href="buf/trait.Buf.html#tymethod.chunk">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.advance" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#595-606">source</a><a href="#method.advance" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#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>)</h4></section></summary><div class='docblock'>Advance the internal cursor of the Buf <a href="buf/trait.Buf.html#tymethod.advance">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.copy_to_bytes" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#608-610">source</a><a href="#method.copy_to_bytes" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.copy_to_bytes" class="fnname">copy_to_bytes</a>(&amp;mut self, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; Self</h4></section></summary><div class='docblock'>Consumes <code>len</code> bytes inside self and returns new instance of <code>Bytes</code>
+with this data. <a href="buf/trait.Buf.html#method.copy_to_bytes">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunks_vectored" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#181-192">source</a><a href="#method.chunks_vectored" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.chunks_vectored" class="fnname">chunks_vectored</a>&lt;'a&gt;(&amp;'a self, dst: &amp;mut [<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a>&lt;'a&gt;]) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>std</code></strong> only.</div></span><div class='docblock'>Fills <code>dst</code> with potentially multiple slices starting at <code>self</code>’s
+current position. <a href="buf/trait.Buf.html#method.chunks_vectored">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.has_remaining" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#243-245">source</a><a href="#method.has_remaining" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Returns true if there are any more bytes to consume <a href="buf/trait.Buf.html#method.has_remaining">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.copy_to_slice" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#268-282">source</a><a href="#method.copy_to_slice" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.copy_to_slice" class="fnname">copy_to_slice</a>(&amp;mut self, dst: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section></summary><div class='docblock'>Copies bytes from <code>self</code> into <code>dst</code>. <a href="buf/trait.Buf.html#method.copy_to_slice">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#300-307">source</a><a href="#method.get_u8" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an unsigned 8 bit integer from <code>self</code>. <a href="buf/trait.Buf.html#method.get_u8">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#325-332">source</a><a href="#method.get_i8" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets a signed 8 bit integer from <code>self</code>. <a href="buf/trait.Buf.html#method.get_i8">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u16" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#350-352">source</a><a href="#method.get_u16" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_u16" class="fnname">get_u16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h4></section></summary><div class='docblock'>Gets an unsigned 16 bit integer from <code>self</code> in big-endian byte order. <a href="buf/trait.Buf.html#method.get_u16">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u16_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#370-372">source</a><a href="#method.get_u16_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an unsigned 16 bit integer from <code>self</code> in little-endian byte order. <a href="buf/trait.Buf.html#method.get_u16_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u16_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#393-395">source</a><a href="#method.get_u16_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_u16_ne" class="fnname">get_u16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h4></section></summary><div class='docblock'>Gets an unsigned 16 bit integer from <code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_u16_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i16" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#413-415">source</a><a href="#method.get_i16" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_i16" class="fnname">get_i16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></h4></section></summary><div class='docblock'>Gets a signed 16 bit integer from <code>self</code> in big-endian byte order. <a href="buf/trait.Buf.html#method.get_i16">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i16_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#433-435">source</a><a href="#method.get_i16_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets a signed 16 bit integer from <code>self</code> in little-endian byte order. <a href="buf/trait.Buf.html#method.get_i16_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i16_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#456-458">source</a><a href="#method.get_i16_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_i16_ne" class="fnname">get_i16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></h4></section></summary><div class='docblock'>Gets a signed 16 bit integer from <code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_i16_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#476-478">source</a><a href="#method.get_u32" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_u32" class="fnname">get_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'>Gets an unsigned 32 bit integer from <code>self</code> in the big-endian byte order. <a href="buf/trait.Buf.html#method.get_u32">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u32_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#496-498">source</a><a href="#method.get_u32_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an unsigned 32 bit integer from <code>self</code> in the little-endian byte order. <a href="buf/trait.Buf.html#method.get_u32_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u32_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#519-521">source</a><a href="#method.get_u32_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_u32_ne" class="fnname">get_u32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'>Gets an unsigned 32 bit integer from <code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_u32_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#539-541">source</a><a href="#method.get_i32" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_i32" class="fnname">get_i32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section></summary><div class='docblock'>Gets a signed 32 bit integer from <code>self</code> in big-endian byte order. <a href="buf/trait.Buf.html#method.get_i32">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i32_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#559-561">source</a><a href="#method.get_i32_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets a signed 32 bit integer from <code>self</code> in little-endian byte order. <a href="buf/trait.Buf.html#method.get_i32_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i32_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#582-584">source</a><a href="#method.get_i32_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_i32_ne" class="fnname">get_i32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section></summary><div class='docblock'>Gets a signed 32 bit integer from <code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_i32_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#602-604">source</a><a href="#method.get_u64" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_u64" class="fnname">get_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section></summary><div class='docblock'>Gets an unsigned 64 bit integer from <code>self</code> in big-endian byte order. <a href="buf/trait.Buf.html#method.get_u64">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u64_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#622-624">source</a><a href="#method.get_u64_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an unsigned 64 bit integer from <code>self</code> in little-endian byte order. <a href="buf/trait.Buf.html#method.get_u64_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u64_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#645-647">source</a><a href="#method.get_u64_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_u64_ne" class="fnname">get_u64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section></summary><div class='docblock'>Gets an unsigned 64 bit integer from <code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_u64_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#665-667">source</a><a href="#method.get_i64" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_i64" class="fnname">get_i64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section></summary><div class='docblock'>Gets a signed 64 bit integer from <code>self</code> in big-endian byte order. <a href="buf/trait.Buf.html#method.get_i64">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i64_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#685-687">source</a><a href="#method.get_i64_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets a signed 64 bit integer from <code>self</code> in little-endian byte order. <a href="buf/trait.Buf.html#method.get_i64_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i64_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#708-710">source</a><a href="#method.get_i64_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_i64_ne" class="fnname">get_i64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section></summary><div class='docblock'>Gets a signed 64 bit integer from <code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_i64_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u128" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#728-730">source</a><a href="#method.get_u128" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_u128" class="fnname">get_u128</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></h4></section></summary><div class='docblock'>Gets an unsigned 128 bit integer from <code>self</code> in big-endian byte order. <a href="buf/trait.Buf.html#method.get_u128">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u128_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#748-750">source</a><a href="#method.get_u128_le" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_u128_le" class="fnname">get_u128_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></h4></section></summary><div class='docblock'>Gets an unsigned 128 bit integer from <code>self</code> in little-endian byte order. <a href="buf/trait.Buf.html#method.get_u128_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u128_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#771-773">source</a><a href="#method.get_u128_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_u128_ne" class="fnname">get_u128_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></h4></section></summary><div class='docblock'>Gets an unsigned 128 bit integer from <code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_u128_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i128" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#791-793">source</a><a href="#method.get_i128" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_i128" class="fnname">get_i128</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a></h4></section></summary><div class='docblock'>Gets a signed 128 bit integer from <code>self</code> in big-endian byte order. <a href="buf/trait.Buf.html#method.get_i128">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i128_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#811-813">source</a><a href="#method.get_i128_le" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_i128_le" class="fnname">get_i128_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a></h4></section></summary><div class='docblock'>Gets a signed 128 bit integer from <code>self</code> in little-endian byte order. <a href="buf/trait.Buf.html#method.get_i128_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i128_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#834-836">source</a><a href="#method.get_i128_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_i128_ne" class="fnname">get_i128_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a></h4></section></summary><div class='docblock'>Gets a signed 128 bit integer from <code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_i128_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_uint" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#854-856">source</a><a href="#method.get_uint" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_uint" class="fnname">get_uint</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></h4></section></summary><div class='docblock'>Gets an unsigned n-byte integer from <code>self</code> in big-endian byte order. <a href="buf/trait.Buf.html#method.get_uint">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_uint_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#874-876">source</a><a href="#method.get_uint_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an unsigned n-byte integer from <code>self</code> in little-endian byte order. <a href="buf/trait.Buf.html#method.get_uint_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_uint_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#898-904">source</a><a href="#method.get_uint_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_uint_ne" class="fnname">get_uint_ne</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></h4></section></summary><div class='docblock'>Gets an unsigned n-byte integer from <code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_uint_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_int" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#923-925">source</a><a href="#method.get_int" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_int" class="fnname">get_int</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></h4></section></summary><div class='docblock'>Gets a signed n-byte integer from <code>self</code> in big-endian byte order. <a href="buf/trait.Buf.html#method.get_int">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_int_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#944-946">source</a><a href="#method.get_int_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets a signed n-byte integer from <code>self</code> in little-endian byte order. <a href="buf/trait.Buf.html#method.get_int_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_int_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#968-974">source</a><a href="#method.get_int_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_int_ne" class="fnname">get_int_ne</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></h4></section></summary><div class='docblock'>Gets a signed n-byte integer from <code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_int_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#993-995">source</a><a href="#method.get_f32" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_f32" class="fnname">get_f32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></h4></section></summary><div class='docblock'>Gets an IEEE754 single-precision (4 bytes) floating point number from
+<code>self</code> in big-endian byte order. <a href="buf/trait.Buf.html#method.get_f32">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f32_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1014-1016">source</a><a href="#method.get_f32_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an IEEE754 single-precision (4 bytes) floating point number from
+<code>self</code> in little-endian byte order. <a href="buf/trait.Buf.html#method.get_f32_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f32_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1038-1040">source</a><a href="#method.get_f32_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_f32_ne" class="fnname">get_f32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></h4></section></summary><div class='docblock'>Gets an IEEE754 single-precision (4 bytes) floating point number from
+<code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_f32_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1059-1061">source</a><a href="#method.get_f64" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_f64" class="fnname">get_f64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></h4></section></summary><div class='docblock'>Gets an IEEE754 double-precision (8 bytes) floating point number from
+<code>self</code> in big-endian byte order. <a href="buf/trait.Buf.html#method.get_f64">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f64_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1080-1082">source</a><a href="#method.get_f64_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an IEEE754 double-precision (8 bytes) floating point number from
+<code>self</code> in little-endian byte order. <a href="buf/trait.Buf.html#method.get_f64_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f64_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1104-1106">source</a><a href="#method.get_f64_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_f64_ne" class="fnname">get_f64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></h4></section></summary><div class='docblock'>Gets an IEEE754 double-precision (8 bytes) floating point number from
+<code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_f64_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1160-1165">source</a><a href="#method.take" class="anchor"></a><h4 class="code-header">fn <a href="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="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>,</span></h4></section></summary><div class='docblock'>Creates an adaptor which will read at most <code>limit</code> bytes from <code>self</code>. <a href="buf/trait.Buf.html#method.take">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chain" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1182-1187">source</a><a href="#method.chain" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.chain" class="fnname">chain</a>&lt;U:&nbsp;<a class="trait" href="buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt;(self, next: U) -&gt; <a class="struct" href="buf/struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;Self, U&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>,</span></h4></section></summary><div class='docblock'>Creates an adaptor which will chain this buffer with another. <a href="buf/trait.Buf.html#method.chain">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.reader" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1214-1219">source</a><a href="#method.reader" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.reader" class="fnname">reader</a>(self) -&gt; <a class="struct" href="buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;Self&gt;<span class="notable-traits" data-ty="Reader&lt;Self&gt;"><span class="notable-traits-tooltip">ⓘ</span></span><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>,</span></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>std</code></strong> only.</div></span><div class='docblock'>Creates an adaptor which implements the <code>Read</code> trait for <code>self</code>. <a href="buf/trait.Buf.html#method.reader">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#576-581">source</a><a href="#impl-Clone-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#578-580">source</a><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/fmt/debug.rs.html#39-43">source</a><a href="#impl-Debug-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/fmt/debug.rs.html#40-42">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Default-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#830-835">source</a><a href="#impl-Default-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.default" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#832-834">source</a><a href="#method.default" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -&gt; <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Deref-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#613-620">source</a><a href="#impl-Deref-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a> for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Target" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Target" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target" class="associatedtype">Target</a> = [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]</h4></section></summary><div class='docblock'>The resulting type after dereferencing.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.deref" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#617-619">source</a><a href="#method.deref" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#tymethod.deref" class="fnname">deref</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section></summary><div class='docblock'>Dereferences the value.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Deserialize%3C%27de%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/serde.rs.html#88">source</a><a href="#impl-Deserialize%3C%27de%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.203/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.deserialize" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/serde.rs.html#88">source</a><a href="#method.deserialize" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.203/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a>&lt;D&gt;(deserializer: D) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>, D::<a class="associatedtype" href="https://docs.rs/serde/1.0.203/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="https://docs.rs/serde/1.0.203/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,</span></h4></section></summary><div class='docblock'>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.203/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Drop-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#569-574">source</a><a href="#impl-Drop-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html" title="trait core::ops::drop::Drop">Drop</a> for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.drop" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#571-573">source</a><a href="#method.drop" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop" class="fnname">drop</a>(&amp;mut self)</h4></section></summary><div class='docblock'>Executes the destructor for this type. <a href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Extend%3CBytes%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1315-1324">source</a><a href="#impl-Extend%3CBytes%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a>&lt;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.extend" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1316-1323">source</a><a href="#method.extend" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#tymethod.extend" class="fnname">extend</a>&lt;T&gt;(&amp;mut self, iter: T)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt;,</span></h4></section></summary><div class='docblock'>Extends a collection with the contents of an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#tymethod.extend">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.extend_one" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/collect.rs.html#372">source</a><a href="#method.extend_one" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#method.extend_one" class="fnname">extend_one</a>(&amp;mut self, item: A)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><div class='docblock'>Extends a collection with exactly one element.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.extend_reserve" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/collect.rs.html#380">source</a><a href="#method.extend_reserve" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#method.extend_reserve" class="fnname">extend_reserve</a>(&amp;mut self, additional: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><div class='docblock'>Reserves capacity in a collection for the given number of additional elements. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#method.extend_reserve">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27static%20%5Bu8%5D%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#837-841">source</a><a href="#impl-From%3C%26%27static%20%5Bu8%5D%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;&amp;'static [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#838-840">source</a><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(slice: &amp;'static [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27static%20str%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#843-847">source</a><a href="#impl-From%3C%26%27static%20str%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;&amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#844-846">source</a><a href="#method.from-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(slice: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CBox%3C%5Bu8%5D%2C%20Global%3E%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#884-913">source</a><a href="#impl-From%3CBox%3C%5Bu8%5D%2C%20Global%3E%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>], <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#885-912">source</a><a href="#method.from-3" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(slice: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt;) -&gt; <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CBytes%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#915-935">source</a><a href="#impl-From%3CBytes%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#931-934">source</a><a href="#method.from-4" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(bytes: <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>Convert self into <code>BytesMut</code>.</p>
+<p>If <code>bytes</code> is unique for the entire original buffer, this will return a
+<code>BytesMut</code> with the contents of <code>bytes</code> without copying.
+If <code>bytes</code> is not unique for the entire original buffer, this will make
+a copy of <code>bytes</code> subset of the original buffer in a new <code>BytesMut</code>.</p>
+<h5 id="examples-66"><a href="#examples-66">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::{Bytes, BytesMut};
+
+<span class="kw">let </span>bytes = Bytes::from(<span class="string">b&quot;hello&quot;</span>.to_vec());
+<span class="macro">assert_eq!</span>(BytesMut::from(bytes), BytesMut::from(<span class="kw-2">&amp;</span><span class="string">b&quot;hello&quot;</span>[..]));</code></pre></div>
+</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CBytes%3E-for-Vec%3Cu8%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#943-948">source</a><a href="#impl-From%3CBytes%3E-for-Vec%3Cu8%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt; for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-6" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#944-947">source</a><a href="#method.from-6" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(bytes: <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CBytesMut%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1192-1196">source</a><a href="#impl-From%3CBytesMut%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-7" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1193-1195">source</a><a href="#method.from-7" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(src: <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>) -&gt; <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CString%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#937-941">source</a><a href="#impl-From%3CString%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-5" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#938-940">source</a><a href="#method.from-5" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(s: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CVec%3Cu8%2C%20Global%3E%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#849-882">source</a><a href="#impl-From%3CVec%3Cu8%2C%20Global%3E%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#850-881">source</a><a href="#method.from-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(vec: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;) -&gt; <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-FromIterator%3Cu8%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#662-666">source</a><a href="#impl-FromIterator%3Cu8%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_iter" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#663-665">source</a><a href="#method.from_iter" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter" class="fnname">from_iter</a>&lt;T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;&gt;(into_iter: T) -&gt; Self</h4></section></summary><div class='docblock'>Creates a value from an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Hash-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#629-636">source</a><a href="#impl-Hash-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.hash" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#630-635">source</a><a href="#method.hash" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash" class="fnname">hash</a>&lt;H&gt;(&amp;self, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>H)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,</span></h4></section></summary><div class='docblock'>Feeds this value into the given <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.hash_slice" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.3.0">1.3.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/hash/mod.rs.html#239-241">source</a></span><a href="#method.hash_slice" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice" class="fnname">hash_slice</a>&lt;H&gt;(data: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[Self]</a>, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>H)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</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>,</span></h4></section></summary><div class='docblock'>Feeds a slice of this type into the given <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-%26%27a%20Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#653-660">source</a><a href="#impl-IntoIterator-for-%26%27a%20Bytes" class="anchor"></a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &amp;'a <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Item-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = &amp;'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="rustdoc-toggle" open><summary><section id="associatedtype.IntoIter-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.IntoIter-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.Iter.html" title="struct core::slice::iter::Iter">Iter</a>&lt;'a, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;</h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_iter-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#657-659">source</a><a href="#method.into_iter-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fnname">into_iter</a>(self) -&gt; Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#644-651">source</a><a href="#impl-IntoIterator-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Item" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="rustdoc-toggle" open><summary><section id="associatedtype.IntoIter" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.IntoIter" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <a class="struct" href="buf/struct.IntoIter.html" title="struct bytes::buf::IntoIter">IntoIter</a>&lt;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt;</h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_iter" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#648-650">source</a><a href="#method.into_iter" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fnname">into_iter</a>(self) -&gt; Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-LowerHex-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/fmt/hex.rs.html#34">source</a><a href="#impl-LowerHex-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.LowerHex.html" title="trait core::fmt::LowerHex">LowerHex</a> for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/fmt/hex.rs.html#34">source</a><a href="#method.fmt-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.LowerHex.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Ord-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#682-686">source</a><a href="#impl-Ord-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#683-685">source</a><a href="#method.cmp" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp" class="fnname">cmp</a>(&amp;self, other: &amp;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.max" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#795-798">source</a></span><a href="#method.max" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max" class="fnname">max</a>(self, other: Self) -&gt; 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>,</span></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.min" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#822-825">source</a></span><a href="#method.min" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min" class="fnname">min</a>(self, other: Self) -&gt; 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>,</span></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#854-858">source</a></span><a href="#method.clamp" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp" class="fnname">clamp</a>(self, min: Self, max: Self) -&gt; 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> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;Self&gt;,</span></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3C%26%27a%20T%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#810-817">source</a><a href="#impl-PartialEq%3C%26%27a%20T%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl&lt;'a, T:&nbsp;?<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/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>T&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-11" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#814-816">source</a><a href="#method.eq-11" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-11" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-11" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3C%5Bu8%5D%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#690-694">source</a><a href="#impl-PartialEq%3C%5Bu8%5D%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#691-693">source</a><a href="#method.eq-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBytes%3E-for-%26%5Bu8%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#786-790">source</a><a href="#impl-PartialEq%3CBytes%3E-for-%26%5Bu8%5D" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt; for &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-9" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#787-789">source</a><a href="#method.eq-9" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-9" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-9" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBytes%3E-for-%26str" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#798-802">source</a><a href="#impl-PartialEq%3CBytes%3E-for-%26str" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt; for &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-10" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#799-801">source</a><a href="#method.eq-10" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-10" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-10" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBytes%3E-for-%5Bu8%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#702-706">source</a><a href="#impl-PartialEq%3CBytes%3E-for-%5Bu8%5D" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt; for [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#703-705">source</a><a href="#method.eq-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-2" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBytes%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#670-674">source</a><a href="#impl-PartialEq%3CBytes%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#671-673">source</a><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBytes%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1624-1628">source</a><a href="#impl-PartialEq%3CBytes%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-13" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1625-1627">source</a><a href="#method.eq-13" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-13" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-13" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBytes%3E-for-String" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#774-778">source</a><a href="#impl-PartialEq%3CBytes%3E-for-String" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt; for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#775-777">source</a><a href="#method.eq-8" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-8" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-8" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBytes%3E-for-Vec%3Cu8%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#750-754">source</a><a href="#impl-PartialEq%3CBytes%3E-for-Vec%3Cu8%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt; for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-6" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#751-753">source</a><a href="#method.eq-6" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-6" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-6" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBytes%3E-for-str" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#726-730">source</a><a href="#impl-PartialEq%3CBytes%3E-for-str" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt; for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#727-729">source</a><a href="#method.eq-4" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-4" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-4" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBytesMut%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1618-1622">source</a><a href="#impl-PartialEq%3CBytesMut%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-12" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1619-1621">source</a><a href="#method.eq-12" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-12" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-12" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CString%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#762-766">source</a><a href="#impl-PartialEq%3CString%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-7" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#763-765">source</a><a href="#method.eq-7" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-7" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-7" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CVec%3Cu8%2C%20Global%3E%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#738-742">source</a><a href="#impl-PartialEq%3CVec%3Cu8%2C%20Global%3E%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-5" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#739-741">source</a><a href="#method.eq-5" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-5" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-5" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3Cstr%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#714-718">source</a><a href="#impl-PartialEq%3Cstr%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#715-717">source</a><a href="#method.eq-3" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-3" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-3" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3C%26%27a%20T%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#819-826">source</a><a href="#impl-PartialOrd%3C%26%27a%20T%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl&lt;'a, T:&nbsp;?<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/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>T&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-11" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#823-825">source</a><a href="#method.partial_cmp-11" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>T) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-11" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-11" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-11" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-11" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-11" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-11" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-11" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-11" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3C%5Bu8%5D%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#696-700">source</a><a href="#impl-PartialOrd%3C%5Bu8%5D%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#697-699">source</a><a href="#method.partial_cmp-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBytes%3E-for-%26%5Bu8%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#792-796">source</a><a href="#impl-PartialOrd%3CBytes%3E-for-%26%5Bu8%5D" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt; for &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-9" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#793-795">source</a><a href="#method.partial_cmp-9" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-9" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-9" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-9" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-9" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-9" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-9" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-9" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-9" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBytes%3E-for-%26str" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#804-808">source</a><a href="#impl-PartialOrd%3CBytes%3E-for-%26str" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt; for &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-10" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#805-807">source</a><a href="#method.partial_cmp-10" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-10" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-10" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-10" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-10" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-10" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-10" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-10" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-10" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBytes%3E-for-%5Bu8%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#708-712">source</a><a href="#impl-PartialOrd%3CBytes%3E-for-%5Bu8%5D" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt; for [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#709-711">source</a><a href="#method.partial_cmp-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-2" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-2" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-2" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-2" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBytes%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#676-680">source</a><a href="#impl-PartialOrd%3CBytes%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#677-679">source</a><a href="#method.partial_cmp" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBytes%3E-for-String" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#780-784">source</a><a href="#impl-PartialOrd%3CBytes%3E-for-String" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt; for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#781-783">source</a><a href="#method.partial_cmp-8" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-8" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-8" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-8" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-8" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-8" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-8" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-8" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-8" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBytes%3E-for-Vec%3Cu8%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#756-760">source</a><a href="#impl-PartialOrd%3CBytes%3E-for-Vec%3Cu8%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt; for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-6" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#757-759">source</a><a href="#method.partial_cmp-6" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-6" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-6" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-6" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-6" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-6" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-6" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-6" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-6" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBytes%3E-for-str" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#732-736">source</a><a href="#impl-PartialOrd%3CBytes%3E-for-str" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt; for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#733-735">source</a><a href="#method.partial_cmp-4" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-4" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-4" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-4" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-4" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-4" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-4" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-4" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-4" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CString%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#768-772">source</a><a href="#impl-PartialOrd%3CString%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-7" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#769-771">source</a><a href="#method.partial_cmp-7" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-7" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-7" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-7" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-7" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-7" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-7" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-7" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-7" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CVec%3Cu8%2C%20Global%3E%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#744-748">source</a><a href="#impl-PartialOrd%3CVec%3Cu8%2C%20Global%3E%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-5" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#745-747">source</a><a href="#method.partial_cmp-5" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-5" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-5" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-5" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-5" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-5" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-5" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-5" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-5" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3Cstr%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#720-724">source</a><a href="#impl-PartialOrd%3Cstr%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#721-723">source</a><a href="#method.partial_cmp-3" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-3" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-3" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-3" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-3" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-3" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-3" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-3" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-3" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Serialize-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/serde.rs.html#88">source</a><a href="#impl-Serialize-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://docs.rs/serde/1.0.203/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.serialize" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/serde.rs.html#88">source</a><a href="#method.serialize" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.203/serde/ser/trait.Serialize.html#tymethod.serialize" class="fnname">serialize</a>&lt;S&gt;(&amp;self, serializer: S) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;S::<a class="associatedtype" href="https://docs.rs/serde/1.0.203/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, S::<a class="associatedtype" href="https://docs.rs/serde/1.0.203/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="https://docs.rs/serde/1.0.203/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>,</span></h4></section></summary><div class='docblock'>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.203/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-UpperHex-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/fmt/hex.rs.html#36">source</a><a href="#impl-UpperHex-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.UpperHex.html" title="trait core::fmt::UpperHex">UpperHex</a> for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/fmt/hex.rs.html#36">source</a><a href="#method.fmt-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.UpperHex.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter.</div></details></div></details><section id="impl-Eq-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#688">source</a><a href="#impl-Eq-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section><section id="impl-Send-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#566">source</a><a href="#impl-Send-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section><section id="impl-Sync-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#567">source</a><a href="#impl-Sync-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Bytes" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section><section id="impl-Unpin-for-Bytes" class="impl has-srclink"><a href="#impl-Unpin-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section><section id="impl-UnwindSafe-for-Bytes" class="impl has-srclink"><a href="#impl-UnwindSafe-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-Bytes" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-8" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from-8" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
+</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
+<p>That is, this conversion is whatever the implementation of
+<code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
+</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#82">source</a><a href="#impl-ToOwned-for-Bytes" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#87">source</a><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&amp;self) -&gt; T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#91">source</a><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&amp;self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><section id="impl-DeserializeOwned-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="https://docs.rs/serde/1.0.203/src/serde/de/mod.rs.html#608">source</a><a href="#impl-DeserializeOwned-for-Bytes" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://docs.rs/serde/1.0.203/serde/de/trait.DeserializeOwned.html" title="trait serde::de::DeserializeOwned">DeserializeOwned</a> for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: for&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.203/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt;,</span></h3></section></div><script type="text/json" id="notable-traits-data">{"&[T]":"<h3 class=\"notable\">Notable traits for <code>&amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for &amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span>","&[u8]":"<h3 class=\"notable\">Notable traits for <code>&amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for &amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span>","<[T] as Concat<Item>>::Output":"<h3 class=\"notable\">Notable traits for <code>&amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for &amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span>","<[T] as Join<Separator>>::Output":"<h3 class=\"notable\">Notable traits for <code>&amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for &amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span>","Reader<Self>":"<h3 class=\"notable\">Notable traits for <code><a class=\"struct\" href=\"buf/struct.Reader.html\" title=\"struct bytes::buf::Reader\">Reader</a>&lt;B&gt;</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl&lt;B:&nbsp;<a class=\"trait\" href=\"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=\"buf/struct.Reader.html\" title=\"struct bytes::buf::Reader\">Reader</a>&lt;B&gt;</span>"}</script></section></div></main><div id="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/bytes/struct.BytesMut.html b/bytes/struct.BytesMut.html
new file mode 100644
index 0000000..fd3f3fe
--- /dev/null
+++ b/bytes/struct.BytesMut.html
@@ -0,0 +1,2462 @@
+<!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="A unique reference to a contiguous slice of memory."><meta name="keywords" content="rust, rustlang, rust-lang, BytesMut"><title>BytesMut in bytes - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2 class="location"><a href="#">BytesMut</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.capacity">capacity</a></li><li><a href="#method.clear">clear</a></li><li><a href="#method.extend_from_slice">extend_from_slice</a></li><li><a href="#method.freeze">freeze</a></li><li><a href="#method.is_empty">is_empty</a></li><li><a href="#method.len">len</a></li><li><a href="#method.new">new</a></li><li><a href="#method.reserve">reserve</a></li><li><a href="#method.resize">resize</a></li><li><a href="#method.set_len">set_len</a></li><li><a href="#method.spare_capacity_mut">spare_capacity_mut</a></li><li><a href="#method.split">split</a></li><li><a href="#method.split_off">split_off</a></li><li><a href="#method.split_to">split_to</a></li><li><a href="#method.truncate">truncate</a></li><li><a href="#method.unsplit">unsplit</a></li><li><a href="#method.with_capacity">with_capacity</a></li><li><a href="#method.zeroed">zeroed</a></li></ul><h3><a href="#deref-methods-%5Bu8%5D">Methods from Deref&lt;Target=[u8]&gt;</a></h3><ul class="block"><li><a href="#method.align_to">align_to</a></li><li><a href="#method.align_to_mut">align_to_mut</a></li><li><a href="#method.array_chunks">array_chunks</a></li><li><a href="#method.array_chunks_mut">array_chunks_mut</a></li><li><a href="#method.array_windows">array_windows</a></li><li><a href="#method.as_chunks">as_chunks</a></li><li><a href="#method.as_chunks_mut">as_chunks_mut</a></li><li><a href="#method.as_chunks_unchecked">as_chunks_unchecked</a></li><li><a href="#method.as_chunks_unchecked_mut">as_chunks_unchecked_mut</a></li><li><a href="#method.as_mut_ptr">as_mut_ptr</a></li><li><a href="#method.as_mut_ptr_range">as_mut_ptr_range</a></li><li><a href="#method.as_ptr">as_ptr</a></li><li><a href="#method.as_ptr_range">as_ptr_range</a></li><li><a href="#method.as_rchunks">as_rchunks</a></li><li><a href="#method.as_rchunks_mut">as_rchunks_mut</a></li><li><a href="#method.as_simd">as_simd</a></li><li><a href="#method.as_simd_mut">as_simd_mut</a></li><li><a href="#method.binary_search">binary_search</a></li><li><a href="#method.binary_search_by">binary_search_by</a></li><li><a href="#method.binary_search_by_key">binary_search_by_key</a></li><li><a href="#method.chunks">chunks</a></li><li><a href="#method.chunks_exact">chunks_exact</a></li><li><a href="#method.chunks_exact_mut">chunks_exact_mut</a></li><li><a href="#method.chunks_mut">chunks_mut</a></li><li><a href="#method.clone_from_slice">clone_from_slice</a></li><li><a href="#method.concat">concat</a></li><li><a href="#method.connect">connect</a></li><li><a href="#method.contains">contains</a></li><li><a href="#method.copy_from_slice">copy_from_slice</a></li><li><a href="#method.copy_within">copy_within</a></li><li><a href="#method.ends_with">ends_with</a></li><li><a href="#method.eq_ignore_ascii_case">eq_ignore_ascii_case</a></li><li><a href="#method.escape_ascii">escape_ascii</a></li><li><a href="#method.fill">fill</a></li><li><a href="#method.fill_with">fill_with</a></li><li><a href="#method.first">first</a></li><li><a href="#method.first_mut">first_mut</a></li><li><a href="#method.flatten">flatten</a></li><li><a href="#method.flatten_mut">flatten_mut</a></li><li><a href="#method.get">get</a></li><li><a href="#method.get_mut">get_mut</a></li><li><a href="#method.get_unchecked">get_unchecked</a></li><li><a href="#method.get_unchecked_mut">get_unchecked_mut</a></li><li><a href="#method.group_by">group_by</a></li><li><a href="#method.group_by_mut">group_by_mut</a></li><li><a href="#method.is_ascii">is_ascii</a></li><li><a href="#method.is_empty-1">is_empty</a></li><li><a href="#method.is_sorted">is_sorted</a></li><li><a href="#method.is_sorted_by">is_sorted_by</a></li><li><a href="#method.is_sorted_by_key">is_sorted_by_key</a></li><li><a href="#method.iter">iter</a></li><li><a href="#method.iter_mut">iter_mut</a></li><li><a href="#method.join">join</a></li><li><a href="#method.last">last</a></li><li><a href="#method.last_mut">last_mut</a></li><li><a href="#method.len-1">len</a></li><li><a href="#method.make_ascii_lowercase">make_ascii_lowercase</a></li><li><a href="#method.make_ascii_uppercase">make_ascii_uppercase</a></li><li><a href="#method.partition_dedup">partition_dedup</a></li><li><a href="#method.partition_dedup_by">partition_dedup_by</a></li><li><a href="#method.partition_dedup_by_key">partition_dedup_by_key</a></li><li><a href="#method.partition_point">partition_point</a></li><li><a href="#method.rchunks">rchunks</a></li><li><a href="#method.rchunks_exact">rchunks_exact</a></li><li><a href="#method.rchunks_exact_mut">rchunks_exact_mut</a></li><li><a href="#method.rchunks_mut">rchunks_mut</a></li><li><a href="#method.repeat">repeat</a></li><li><a href="#method.reverse">reverse</a></li><li><a href="#method.rotate_left">rotate_left</a></li><li><a href="#method.rotate_right">rotate_right</a></li><li><a href="#method.rsplit">rsplit</a></li><li><a href="#method.rsplit_array_mut">rsplit_array_mut</a></li><li><a href="#method.rsplit_array_ref">rsplit_array_ref</a></li><li><a href="#method.rsplit_mut">rsplit_mut</a></li><li><a href="#method.rsplitn">rsplitn</a></li><li><a href="#method.rsplitn_mut">rsplitn_mut</a></li><li><a href="#method.select_nth_unstable">select_nth_unstable</a></li><li><a href="#method.select_nth_unstable_by">select_nth_unstable_by</a></li><li><a href="#method.select_nth_unstable_by_key">select_nth_unstable_by_key</a></li><li><a href="#method.sort">sort</a></li><li><a href="#method.sort_by">sort_by</a></li><li><a href="#method.sort_by_cached_key">sort_by_cached_key</a></li><li><a href="#method.sort_by_key">sort_by_key</a></li><li><a href="#method.sort_floats">sort_floats</a></li><li><a href="#method.sort_floats-1">sort_floats</a></li><li><a href="#method.sort_unstable">sort_unstable</a></li><li><a href="#method.sort_unstable_by">sort_unstable_by</a></li><li><a href="#method.sort_unstable_by_key">sort_unstable_by_key</a></li><li><a href="#method.split-1">split</a></li><li><a href="#method.split_array_mut">split_array_mut</a></li><li><a href="#method.split_array_ref">split_array_ref</a></li><li><a href="#method.split_at">split_at</a></li><li><a href="#method.split_at_mut">split_at_mut</a></li><li><a href="#method.split_at_mut_unchecked">split_at_mut_unchecked</a></li><li><a href="#method.split_at_unchecked">split_at_unchecked</a></li><li><a href="#method.split_first">split_first</a></li><li><a href="#method.split_first_mut">split_first_mut</a></li><li><a href="#method.split_inclusive">split_inclusive</a></li><li><a href="#method.split_inclusive_mut">split_inclusive_mut</a></li><li><a href="#method.split_last">split_last</a></li><li><a href="#method.split_last_mut">split_last_mut</a></li><li><a href="#method.split_mut">split_mut</a></li><li><a href="#method.splitn">splitn</a></li><li><a href="#method.splitn_mut">splitn_mut</a></li><li><a href="#method.starts_with">starts_with</a></li><li><a href="#method.strip_prefix">strip_prefix</a></li><li><a href="#method.strip_suffix">strip_suffix</a></li><li><a href="#method.swap">swap</a></li><li><a href="#method.swap_unchecked">swap_unchecked</a></li><li><a href="#method.swap_with_slice">swap_with_slice</a></li><li><a href="#method.take">take</a></li><li><a href="#method.take_first">take_first</a></li><li><a href="#method.take_first_mut">take_first_mut</a></li><li><a href="#method.take_last">take_last</a></li><li><a href="#method.take_last_mut">take_last_mut</a></li><li><a href="#method.take_mut">take_mut</a></li><li><a href="#method.to_ascii_lowercase">to_ascii_lowercase</a></li><li><a href="#method.to_ascii_uppercase">to_ascii_uppercase</a></li><li><a href="#method.to_vec">to_vec</a></li><li><a href="#method.to_vec_in">to_vec_in</a></li><li><a href="#method.trim_ascii">trim_ascii</a></li><li><a href="#method.trim_ascii_end">trim_ascii_end</a></li><li><a href="#method.trim_ascii_start">trim_ascii_start</a></li><li><a href="#method.windows">windows</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-AsMut%3C%5Bu8%5D%3E-for-BytesMut">AsMut&lt;[u8]&gt;</a></li><li><a href="#impl-AsRef%3C%5Bu8%5D%3E-for-BytesMut">AsRef&lt;[u8]&gt;</a></li><li><a href="#impl-Borrow%3C%5Bu8%5D%3E-for-BytesMut">Borrow&lt;[u8]&gt;</a></li><li><a href="#impl-BorrowMut%3C%5Bu8%5D%3E-for-BytesMut">BorrowMut&lt;[u8]&gt;</a></li><li><a href="#impl-Buf-for-BytesMut">Buf</a></li><li><a href="#impl-BufMut-for-BytesMut">BufMut</a></li><li><a href="#impl-Clone-for-BytesMut">Clone</a></li><li><a href="#impl-Debug-for-BytesMut">Debug</a></li><li><a href="#impl-Default-for-BytesMut">Default</a></li><li><a href="#impl-Deref-for-BytesMut">Deref</a></li><li><a href="#impl-DerefMut-for-BytesMut">DerefMut</a></li><li><a href="#impl-Deserialize%3C%27de%3E-for-BytesMut">Deserialize&lt;&#39;de&gt;</a></li><li><a href="#impl-Drop-for-BytesMut">Drop</a></li><li><a href="#impl-Eq-for-BytesMut">Eq</a></li><li><a href="#impl-Extend%3C%26%27a%20u8%3E-for-BytesMut">Extend&lt;&amp;&#39;a u8&gt;</a></li><li><a href="#impl-Extend%3CBytes%3E-for-BytesMut">Extend&lt;Bytes&gt;</a></li><li><a href="#impl-Extend%3Cu8%3E-for-BytesMut">Extend&lt;u8&gt;</a></li><li><a href="#impl-From%3C%26%27a%20%5Bu8%5D%3E-for-BytesMut">From&lt;&amp;&#39;a [u8]&gt;</a></li><li><a href="#impl-From%3C%26%27a%20str%3E-for-BytesMut">From&lt;&amp;&#39;a str&gt;</a></li><li><a href="#impl-From%3CBytes%3E-for-BytesMut">From&lt;Bytes&gt;</a></li><li><a href="#impl-From%3CBytesMut%3E-for-Bytes">From&lt;BytesMut&gt;</a></li><li><a href="#impl-From%3CBytesMut%3E-for-Vec%3Cu8%3E">From&lt;BytesMut&gt;</a></li><li><a href="#impl-FromIterator%3C%26%27a%20u8%3E-for-BytesMut">FromIterator&lt;&amp;&#39;a u8&gt;</a></li><li><a href="#impl-FromIterator%3Cu8%3E-for-BytesMut">FromIterator&lt;u8&gt;</a></li><li><a href="#impl-Hash-for-BytesMut">Hash</a></li><li><a href="#impl-IntoIterator-for-%26%27a%20BytesMut">IntoIterator</a></li><li><a href="#impl-IntoIterator-for-BytesMut">IntoIterator</a></li><li><a href="#impl-LowerHex-for-BytesMut">LowerHex</a></li><li><a href="#impl-Ord-for-BytesMut">Ord</a></li><li><a href="#impl-PartialEq%3C%26%27a%20T%3E-for-BytesMut">PartialEq&lt;&amp;&#39;a T&gt;</a></li><li><a href="#impl-PartialEq%3C%5Bu8%5D%3E-for-BytesMut">PartialEq&lt;[u8]&gt;</a></li><li><a href="#impl-PartialEq%3CBytes%3E-for-BytesMut">PartialEq&lt;Bytes&gt;</a></li><li><a href="#impl-PartialEq%3CBytesMut%3E-for-%26%5Bu8%5D">PartialEq&lt;BytesMut&gt;</a></li><li><a href="#impl-PartialEq%3CBytesMut%3E-for-%26str">PartialEq&lt;BytesMut&gt;</a></li><li><a href="#impl-PartialEq%3CBytesMut%3E-for-%5Bu8%5D">PartialEq&lt;BytesMut&gt;</a></li><li><a href="#impl-PartialEq%3CBytesMut%3E-for-Bytes">PartialEq&lt;BytesMut&gt;</a></li><li><a href="#impl-PartialEq%3CBytesMut%3E-for-BytesMut">PartialEq&lt;BytesMut&gt;</a></li><li><a href="#impl-PartialEq%3CBytesMut%3E-for-String">PartialEq&lt;BytesMut&gt;</a></li><li><a href="#impl-PartialEq%3CBytesMut%3E-for-Vec%3Cu8%3E">PartialEq&lt;BytesMut&gt;</a></li><li><a href="#impl-PartialEq%3CBytesMut%3E-for-str">PartialEq&lt;BytesMut&gt;</a></li><li><a href="#impl-PartialEq%3CString%3E-for-BytesMut">PartialEq&lt;String&gt;</a></li><li><a href="#impl-PartialEq%3CVec%3Cu8%2C%20Global%3E%3E-for-BytesMut">PartialEq&lt;Vec&lt;u8, Global&gt;&gt;</a></li><li><a href="#impl-PartialEq%3Cstr%3E-for-BytesMut">PartialEq&lt;str&gt;</a></li><li><a href="#impl-PartialOrd%3C%26%27a%20T%3E-for-BytesMut">PartialOrd&lt;&amp;&#39;a T&gt;</a></li><li><a href="#impl-PartialOrd%3C%5Bu8%5D%3E-for-BytesMut">PartialOrd&lt;[u8]&gt;</a></li><li><a href="#impl-PartialOrd%3CBytesMut%3E-for-%26%5Bu8%5D">PartialOrd&lt;BytesMut&gt;</a></li><li><a href="#impl-PartialOrd%3CBytesMut%3E-for-%26str">PartialOrd&lt;BytesMut&gt;</a></li><li><a href="#impl-PartialOrd%3CBytesMut%3E-for-%5Bu8%5D">PartialOrd&lt;BytesMut&gt;</a></li><li><a href="#impl-PartialOrd%3CBytesMut%3E-for-BytesMut">PartialOrd&lt;BytesMut&gt;</a></li><li><a href="#impl-PartialOrd%3CBytesMut%3E-for-String">PartialOrd&lt;BytesMut&gt;</a></li><li><a href="#impl-PartialOrd%3CBytesMut%3E-for-Vec%3Cu8%3E">PartialOrd&lt;BytesMut&gt;</a></li><li><a href="#impl-PartialOrd%3CBytesMut%3E-for-str">PartialOrd&lt;BytesMut&gt;</a></li><li><a href="#impl-PartialOrd%3CString%3E-for-BytesMut">PartialOrd&lt;String&gt;</a></li><li><a href="#impl-PartialOrd%3CVec%3Cu8%2C%20Global%3E%3E-for-BytesMut">PartialOrd&lt;Vec&lt;u8, Global&gt;&gt;</a></li><li><a href="#impl-PartialOrd%3Cstr%3E-for-BytesMut">PartialOrd&lt;str&gt;</a></li><li><a href="#impl-Send-for-BytesMut">Send</a></li><li><a href="#impl-Serialize-for-BytesMut">Serialize</a></li><li><a href="#impl-Sync-for-BytesMut">Sync</a></li><li><a href="#impl-UpperHex-for-BytesMut">UpperHex</a></li><li><a href="#impl-Write-for-BytesMut">Write</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-BytesMut">RefUnwindSafe</a></li><li><a href="#impl-Unpin-for-BytesMut">Unpin</a></li><li><a href="#impl-UnwindSafe-for-BytesMut">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-BytesMut">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-BytesMut">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-BytesMut">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-DeserializeOwned-for-BytesMut">DeserializeOwned</a></li><li><a href="#impl-From%3CT%3E-for-BytesMut">From&lt;T&gt;</a></li><li><a href="#impl-Into%3CU%3E-for-BytesMut">Into&lt;U&gt;</a></li><li><a href="#impl-ToOwned-for-BytesMut">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-BytesMut">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-BytesMut">TryInto&lt;U&gt;</a></li></ul></section><h2><a href="index.html">In bytes</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="index.html">bytes</a>::<wbr><a class="struct" href="#">BytesMut</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../src/bytes/bytes_mut.rs.html#61-66">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct BytesMut { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A unique reference to a contiguous slice of memory.</p>
+<p><code>BytesMut</code> represents a unique view into a potentially shared memory region.
+Given the uniqueness guarantee, owners of <code>BytesMut</code> handles are able to
+mutate the memory.</p>
+<p><code>BytesMut</code> can be thought of as containing a <code>buf: Arc&lt;Vec&lt;u8&gt;&gt;</code>, an offset
+into <code>buf</code>, a slice length, and a guarantee that no other <code>BytesMut</code> for the
+same <code>buf</code> overlaps with its slice. That guarantee means that a write lock
+is not required.</p>
+<h2 id="growth"><a href="#growth">Growth</a></h2>
+<p><code>BytesMut</code>’s <code>BufMut</code> implementation will implicitly grow its buffer as
+necessary. However, explicitly reserving the required space up-front before
+a series of inserts will be more efficient.</p>
+<h2 id="examples"><a href="#examples">Examples</a></h2>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::{BytesMut, BufMut};
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = BytesMut::with_capacity(<span class="number">64</span>);
+
+buf.put_u8(<span class="string">b&#39;h&#39;</span>);
+buf.put_u8(<span class="string">b&#39;e&#39;</span>);
+buf.put(<span class="kw-2">&amp;</span><span class="string">b&quot;llo&quot;</span>[..]);
+
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>buf[..], <span class="string">b&quot;hello&quot;</span>);
+
+<span class="comment">// Freeze the buffer so that it can be shared
+</span><span class="kw">let </span>a = buf.freeze();
+
+<span class="comment">// This does not allocate, instead `b` points to the same memory.
+</span><span class="kw">let </span>b = a.clone();
+
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>a[..], <span class="string">b&quot;hello&quot;</span>);
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>b[..], <span class="string">b&quot;hello&quot;</span>);</code></pre></div>
+</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#124-1036">source</a><a href="#impl-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_capacity" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#148-150">source</a><h4 class="code-header">pub fn <a href="#method.with_capacity" class="fnname">with_capacity</a>(capacity: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h4></section></summary><div class="docblock"><p>Creates a new <code>BytesMut</code> with the specified capacity.</p>
+<p>The returned <code>BytesMut</code> will be able to hold at least <code>capacity</code> bytes
+without reallocating.</p>
+<p>It is important to note that this function does not specify the length
+of the returned <code>BytesMut</code>, but only the capacity.</p>
+<h5 id="examples-1"><a href="#examples-1">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::{BytesMut, BufMut};
+
+<span class="kw">let </span><span class="kw-2">mut </span>bytes = BytesMut::with_capacity(<span class="number">64</span>);
+
+<span class="comment">// `bytes` contains no data, even though there is capacity
+</span><span class="macro">assert_eq!</span>(bytes.len(), <span class="number">0</span>);
+
+bytes.put(<span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]);
+
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>bytes[..], <span class="string">b&quot;hello world&quot;</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#172-174">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>() -&gt; <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h4></section></summary><div class="docblock"><p>Creates a new <code>BytesMut</code> with default capacity.</p>
+<p>Resulting object has length 0 and unspecified capacity.
+This function does not allocate.</p>
+<h5 id="examples-2"><a href="#examples-2">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::{BytesMut, BufMut};
+
+<span class="kw">let </span><span class="kw-2">mut </span>bytes = BytesMut::new();
+
+<span class="macro">assert_eq!</span>(<span class="number">0</span>, bytes.len());
+
+bytes.reserve(<span class="number">2</span>);
+bytes.put_slice(<span class="string">b&quot;xy&quot;</span>);
+
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span><span class="string">b&quot;xy&quot;</span>[..], <span class="kw-2">&amp;</span>bytes[..]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.len" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#187-189">source</a><h4 class="code-header">pub fn <a href="#method.len" class="fnname">len</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the number of bytes contained in this <code>BytesMut</code>.</p>
+<h5 id="examples-3"><a href="#examples-3">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BytesMut;
+
+<span class="kw">let </span>b = BytesMut::from(<span class="kw-2">&amp;</span><span class="string">b&quot;hello&quot;</span>[..]);
+<span class="macro">assert_eq!</span>(b.len(), <span class="number">5</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_empty" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#202-204">source</a><h4 class="code-header">pub fn <a href="#method.is_empty" class="fnname">is_empty</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if the <code>BytesMut</code> has a length of 0.</p>
+<h5 id="examples-4"><a href="#examples-4">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BytesMut;
+
+<span class="kw">let </span>b = BytesMut::with_capacity(<span class="number">64</span>);
+<span class="macro">assert!</span>(b.is_empty());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.capacity" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#217-219">source</a><h4 class="code-header">pub fn <a href="#method.capacity" class="fnname">capacity</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the number of bytes the <code>BytesMut</code> can hold without reallocating.</p>
+<h5 id="examples-5"><a href="#examples-5">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BytesMut;
+
+<span class="kw">let </span>b = BytesMut::with_capacity(<span class="number">64</span>);
+<span class="macro">assert_eq!</span>(b.capacity(), <span class="number">64</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.freeze" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#246-265">source</a><h4 class="code-header">pub fn <a href="#method.freeze" class="fnname">freeze</a>(self) -&gt; <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h4></section></summary><div class="docblock"><p>Converts <code>self</code> into an immutable <code>Bytes</code>.</p>
+<p>The conversion is zero cost and is used to indicate that the slice
+referenced by the handle will no longer be mutated. Once the conversion
+is done, the handle can be cloned and shared across threads.</p>
+<h5 id="examples-6"><a href="#examples-6">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::{BytesMut, BufMut};
+<span class="kw">use </span>std::thread;
+
+<span class="kw">let </span><span class="kw-2">mut </span>b = BytesMut::with_capacity(<span class="number">64</span>);
+b.put(<span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]);
+<span class="kw">let </span>b1 = b.freeze();
+<span class="kw">let </span>b2 = b1.clone();
+
+<span class="kw">let </span>th = thread::spawn(<span class="kw">move </span>|| {
+ <span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>b1[..], <span class="string">b&quot;hello world&quot;</span>);
+});
+
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>b2[..], <span class="string">b&quot;hello world&quot;</span>);
+th.join().unwrap();</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.zeroed" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#279-281">source</a><h4 class="code-header">pub fn <a href="#method.zeroed" class="fnname">zeroed</a>(len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h4></section></summary><div class="docblock"><p>Creates a new <code>BytesMut</code>, which is initialized with zero.</p>
+<h5 id="examples-7"><a href="#examples-7">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BytesMut;
+
+<span class="kw">let </span>zeros = BytesMut::zeroed(<span class="number">42</span>);
+
+<span class="macro">assert_eq!</span>(zeros.len(), <span class="number">42</span>);
+zeros.into_iter().for_each(|x| <span class="macro">assert_eq!</span>(x, <span class="number">0</span>));</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_off" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#310-325">source</a><h4 class="code-header">pub fn <a href="#method.split_off" class="fnname">split_off</a>(&amp;mut self, at: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h4></section></summary><div class="docblock"><p>Splits the bytes into two at the given index.</p>
+<p>Afterwards <code>self</code> contains elements <code>[0, at)</code>, and the returned
+<code>BytesMut</code> contains elements <code>[at, capacity)</code>.</p>
+<p>This is an <code>O(1)</code> operation that just increases the reference count
+and sets a few indices.</p>
+<h5 id="examples-8"><a href="#examples-8">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BytesMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>a = BytesMut::from(<span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]);
+<span class="kw">let </span><span class="kw-2">mut </span>b = a.split_off(<span class="number">5</span>);
+
+a[<span class="number">0</span>] = <span class="string">b&#39;j&#39;</span>;
+b[<span class="number">0</span>] = <span class="string">b&#39;!&#39;</span>;
+
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>a[..], <span class="string">b&quot;jello&quot;</span>);
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>b[..], <span class="string">b&quot;!world&quot;</span>);</code></pre></div>
+<h5 id="panics"><a href="#panics">Panics</a></h5>
+<p>Panics if <code>at &gt; capacity</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#353-356">source</a><h4 class="code-header">pub fn <a href="#method.split" class="fnname">split</a>(&amp;mut self) -&gt; <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h4></section></summary><div class="docblock"><p>Removes the bytes from the current view, returning them in a new
+<code>BytesMut</code> handle.</p>
+<p>Afterwards, <code>self</code> will be empty, but will retain any additional
+capacity that it had before the operation. This is identical to
+<code>self.split_to(self.len())</code>.</p>
+<p>This is an <code>O(1)</code> operation that just increases the reference count and
+sets a few indices.</p>
+<h5 id="examples-9"><a href="#examples-9">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::{BytesMut, BufMut};
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = BytesMut::with_capacity(<span class="number">1024</span>);
+buf.put(<span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]);
+
+<span class="kw">let </span>other = buf.split();
+
+<span class="macro">assert!</span>(buf.is_empty());
+<span class="macro">assert_eq!</span>(<span class="number">1013</span>, buf.capacity());
+
+<span class="macro">assert_eq!</span>(other, <span class="string">b&quot;hello world&quot;</span>[..]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_to" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#385-402">source</a><h4 class="code-header">pub fn <a href="#method.split_to" class="fnname">split_to</a>(&amp;mut self, at: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h4></section></summary><div class="docblock"><p>Splits the buffer into two at the given index.</p>
+<p>Afterwards <code>self</code> contains elements <code>[at, len)</code>, and the returned <code>BytesMut</code>
+contains elements <code>[0, at)</code>.</p>
+<p>This is an <code>O(1)</code> operation that just increases the reference count and
+sets a few indices.</p>
+<h5 id="examples-10"><a href="#examples-10">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BytesMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>a = BytesMut::from(<span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]);
+<span class="kw">let </span><span class="kw-2">mut </span>b = a.split_to(<span class="number">5</span>);
+
+a[<span class="number">0</span>] = <span class="string">b&#39;!&#39;</span>;
+b[<span class="number">0</span>] = <span class="string">b&#39;j&#39;</span>;
+
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>a[..], <span class="string">b&quot;!world&quot;</span>);
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>b[..], <span class="string">b&quot;jello&quot;</span>);</code></pre></div>
+<h5 id="panics-1"><a href="#panics-1">Panics</a></h5>
+<p>Panics if <code>at &gt; len</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.truncate" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#424-429">source</a><h4 class="code-header">pub fn <a href="#method.truncate" class="fnname">truncate</a>(&amp;mut self, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Shortens the buffer, keeping the first <code>len</code> bytes and dropping the
+rest.</p>
+<p>If <code>len</code> is greater than the buffer’s current length, this has no
+effect.</p>
+<p>Existing underlying capacity is preserved.</p>
+<p>The <a href="struct.BytesMut.html#method.split_off">split_off</a> method can emulate <code>truncate</code>, but this causes the
+excess bytes to be returned instead of dropped.</p>
+<h5 id="examples-11"><a href="#examples-11">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BytesMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = BytesMut::from(<span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]);
+buf.truncate(<span class="number">5</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;hello&quot;</span>[..]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clear" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#442-445">source</a><h4 class="code-header">pub fn <a href="#method.clear" class="fnname">clear</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Clears the buffer, removing all data. Existing capacity is preserved.</p>
+<h5 id="examples-12"><a href="#examples-12">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BytesMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = BytesMut::from(<span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]);
+buf.clear();
+<span class="macro">assert!</span>(buf.is_empty());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.resize" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#469-490">source</a><h4 class="code-header">pub fn <a href="#method.resize" class="fnname">resize</a>(&amp;mut self, new_len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>)</h4></section></summary><div class="docblock"><p>Resizes the buffer so that <code>len</code> is equal to <code>new_len</code>.</p>
+<p>If <code>new_len</code> is greater than <code>len</code>, the buffer is extended by the
+difference with each additional byte set to <code>value</code>. If <code>new_len</code> is
+less than <code>len</code>, the buffer is simply truncated.</p>
+<h5 id="examples-13"><a href="#examples-13">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BytesMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = BytesMut::new();
+
+buf.resize(<span class="number">3</span>, <span class="number">0x1</span>);
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>buf[..], <span class="kw-2">&amp;</span>[<span class="number">0x1</span>, <span class="number">0x1</span>, <span class="number">0x1</span>]);
+
+buf.resize(<span class="number">2</span>, <span class="number">0x2</span>);
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>buf[..], <span class="kw-2">&amp;</span>[<span class="number">0x1</span>, <span class="number">0x1</span>]);
+
+buf.resize(<span class="number">4</span>, <span class="number">0x3</span>);
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>buf[..], <span class="kw-2">&amp;</span>[<span class="number">0x1</span>, <span class="number">0x1</span>, <span class="number">0x3</span>, <span class="number">0x3</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_len" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#518-521">source</a><h4 class="code-header">pub unsafe fn <a href="#method.set_len" class="fnname">set_len</a>(&amp;mut self, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Sets the length of the buffer.</p>
+<p>This will explicitly set the size of the buffer without actually
+modifying the data, so it is up to the caller to ensure that the data
+has been initialized.</p>
+<h5 id="examples-14"><a href="#examples-14">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BytesMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>b = BytesMut::from(<span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]);
+
+<span class="kw">unsafe </span>{
+ b.set_len(<span class="number">5</span>);
+}
+
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>b[..], <span class="string">b&quot;hello&quot;</span>);
+
+<span class="kw">unsafe </span>{
+ b.set_len(<span class="number">11</span>);
+}
+
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>b[..], <span class="string">b&quot;hello world&quot;</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.reserve" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#582-593">source</a><h4 class="code-header">pub fn <a href="#method.reserve" class="fnname">reserve</a>(&amp;mut self, additional: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Reserves capacity for at least <code>additional</code> more bytes to be inserted
+into the given <code>BytesMut</code>.</p>
+<p>More than <code>additional</code> bytes may be reserved in order to avoid frequent
+reallocations. A call to <code>reserve</code> may result in an allocation.</p>
+<p>Before allocating new buffer space, the function will attempt to reclaim
+space in the existing buffer. If the current handle references a view
+into a larger original buffer, and all other handles referencing part
+of the same original buffer have been dropped, then the current view
+can be copied/shifted to the front of the buffer and the handle can take
+ownership of the full buffer, provided that the full buffer is large
+enough to fit the requested additional capacity.</p>
+<p>This optimization will only happen if shifting the data from the current
+view to the front of the buffer is not too expensive in terms of the
+(amortized) time required. The precise condition is subject to change;
+as of now, the length of the data being shifted needs to be at least as
+large as the distance that it’s shifted by. If the current view is empty
+and the original buffer is large enough to fit the requested additional
+capacity, then reallocations will never happen.</p>
+<h5 id="examples-15"><a href="#examples-15">Examples</a></h5>
+<p>In the following example, a new buffer is allocated.</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BytesMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = BytesMut::from(<span class="kw-2">&amp;</span><span class="string">b&quot;hello&quot;</span>[..]);
+buf.reserve(<span class="number">64</span>);
+<span class="macro">assert!</span>(buf.capacity() &gt;= <span class="number">69</span>);</code></pre></div>
+<p>In the following example, the existing buffer is reclaimed.</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::{BytesMut, BufMut};
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = BytesMut::with_capacity(<span class="number">128</span>);
+buf.put(<span class="kw-2">&amp;</span>[<span class="number">0</span>; <span class="number">64</span>][..]);
+
+<span class="kw">let </span>ptr = buf.as_ptr();
+<span class="kw">let </span>other = buf.split();
+
+<span class="macro">assert!</span>(buf.is_empty());
+<span class="macro">assert_eq!</span>(buf.capacity(), <span class="number">64</span>);
+
+drop(other);
+buf.reserve(<span class="number">128</span>);
+
+<span class="macro">assert_eq!</span>(buf.capacity(), <span class="number">128</span>);
+<span class="macro">assert_eq!</span>(buf.as_ptr(), ptr);</code></pre></div>
+<h5 id="panics-2"><a href="#panics-2">Panics</a></h5>
+<p>Panics if the new capacity overflows <code>usize</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.extend_from_slice" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#778-793">source</a><h4 class="code-header">pub fn <a href="#method.extend_from_slice" class="fnname">extend_from_slice</a>(&amp;mut self, extend: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section></summary><div class="docblock"><p>Appends given bytes to this <code>BytesMut</code>.</p>
+<p>If this <code>BytesMut</code> object does not have enough capacity, it is resized
+first.</p>
+<h5 id="examples-16"><a href="#examples-16">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BytesMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = BytesMut::with_capacity(<span class="number">0</span>);
+buf.extend_from_slice(<span class="string">b&quot;aaabbb&quot;</span>);
+buf.extend_from_slice(<span class="string">b&quot;cccddd&quot;</span>);
+
+<span class="macro">assert_eq!</span>(<span class="string">b&quot;aaabbbcccddd&quot;</span>, <span class="kw-2">&amp;</span>buf[..]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.unsplit" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#819-828">source</a><h4 class="code-header">pub fn <a href="#method.unsplit" class="fnname">unsplit</a>(&amp;mut self, other: <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>)</h4></section></summary><div class="docblock"><p>Absorbs a <code>BytesMut</code> that was previously split off.</p>
+<p>If the two <code>BytesMut</code> objects were previously contiguous and not mutated
+in a way that causes re-allocation i.e., if <code>other</code> was created by
+calling <code>split_off</code> on this <code>BytesMut</code>, then this is an <code>O(1)</code> operation
+that just decreases a reference count and sets a few indices.
+Otherwise this method degenerates to
+<code>self.extend_from_slice(other.as_ref())</code>.</p>
+<h5 id="examples-17"><a href="#examples-17">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BytesMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = BytesMut::with_capacity(<span class="number">64</span>);
+buf.extend_from_slice(<span class="string">b&quot;aaabbbcccddd&quot;</span>);
+
+<span class="kw">let </span>split = buf.split_off(<span class="number">6</span>);
+<span class="macro">assert_eq!</span>(<span class="string">b&quot;aaabbb&quot;</span>, <span class="kw-2">&amp;</span>buf[..]);
+<span class="macro">assert_eq!</span>(<span class="string">b&quot;cccddd&quot;</span>, <span class="kw-2">&amp;</span>split[..]);
+
+buf.unsplit(split);
+<span class="macro">assert_eq!</span>(<span class="string">b&quot;aaabbbcccddd&quot;</span>, <span class="kw-2">&amp;</span>buf[..]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.spare_capacity_mut" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1028-1035">source</a><h4 class="code-header">pub fn <a href="#method.spare_capacity_mut" class="fnname">spare_capacity_mut</a>(&amp;mut self) -&gt; &amp;mut [<a class="union" href="https://doc.rust-lang.org/nightly/core/mem/maybe_uninit/union.MaybeUninit.html" title="union core::mem::maybe_uninit::MaybeUninit">MaybeUninit</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;]</h4></section></summary><div class="docblock"><p>Returns the remaining spare capacity of the buffer as a slice of <code>MaybeUninit&lt;u8&gt;</code>.</p>
+<p>The returned slice can be used to fill the buffer with data (e.g. by
+reading from a file) before marking the data as initialized using the
+<a href="struct.BytesMut.html#method.set_len"><code>set_len</code></a> method.</p>
+<h5 id="examples-18"><a href="#examples-18">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BytesMut;
+
+<span class="comment">// Allocate buffer big enough for 10 bytes.
+</span><span class="kw">let </span><span class="kw-2">mut </span>buf = BytesMut::with_capacity(<span class="number">10</span>);
+
+<span class="comment">// Fill in the first 3 elements.
+</span><span class="kw">let </span>uninit = buf.spare_capacity_mut();
+uninit[<span class="number">0</span>].write(<span class="number">0</span>);
+uninit[<span class="number">1</span>].write(<span class="number">1</span>);
+uninit[<span class="number">2</span>].write(<span class="number">2</span>);
+
+<span class="comment">// Mark the first 3 bytes of the buffer as being initialized.
+</span><span class="kw">unsafe </span>{
+ buf.set_len(<span class="number">3</span>);
+}
+
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>buf[..], <span class="kw-2">&amp;</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]);</code></pre></div>
+</div></details></div></details></div><h2 id="deref-methods-%5Bu8%5D" class="small-section-header"><span>Methods from <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>&lt;Target = [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt;</span><a href="#deref-methods-%5Bu8%5D" class="anchor"></a></h2><div id="deref-methods-%5Bu8%5D-1"><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_ascii" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/ascii.rs.html#15">source</a></span><h4 class="code-header">pub fn <a href="#method.is_ascii" class="fnname">is_ascii</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks if all bytes in this slice are within the ASCII range.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq_ignore_ascii_case" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/ascii.rs.html#26">source</a></span><h4 class="code-header">pub fn <a href="#method.eq_ignore_ascii_case" class="fnname">eq_ignore_ascii_case</a>(&amp;self, other: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks that two slices are an ASCII case-insensitive match.</p>
+<p>Same as <code>to_ascii_lowercase(a) == to_ascii_lowercase(b)</code>,
+but without allocating and copying temporaries.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.make_ascii_uppercase" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/ascii.rs.html#41">source</a></span><h4 class="code-header">pub fn <a href="#method.make_ascii_uppercase" class="fnname">make_ascii_uppercase</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Converts this slice to its ASCII upper case equivalent in-place.</p>
+<p>ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’,
+but non-ASCII letters are unchanged.</p>
+<p>To return a new uppercased value without modifying the existing one, use
+<a href="#method.to_ascii_uppercase"><code>to_ascii_uppercase</code></a>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.make_ascii_lowercase" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/ascii.rs.html#58">source</a></span><h4 class="code-header">pub fn <a href="#method.make_ascii_lowercase" class="fnname">make_ascii_lowercase</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Converts this slice to its ASCII lower case equivalent in-place.</p>
+<p>ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’,
+but non-ASCII letters are unchanged.</p>
+<p>To return a new lowercased value without modifying the existing one, use
+<a href="#method.to_ascii_lowercase"><code>to_ascii_lowercase</code></a>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.escape_ascii" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.60.0">1.60.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/ascii.rs.html#78">source</a></span><h4 class="code-header">pub fn <a href="#method.escape_ascii" class="fnname">escape_ascii</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/ascii/struct.EscapeAscii.html" title="struct core::slice::ascii::EscapeAscii">EscapeAscii</a>&lt;'_&gt;</h4></section></summary><div class="docblock"><p>Returns an iterator that produces an escaped version of this slice,
+treating it as an ASCII string.</p>
+<h5 id="examples-19"><a href="#examples-19">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code>
+<span class="kw">let </span>s = <span class="string">b&quot;0\t\r\n&#39;\&quot;\\\x9d&quot;</span>;
+<span class="kw">let </span>escaped = s.escape_ascii().to_string();
+<span class="macro">assert_eq!</span>(escaped, <span class="string">&quot;0\\t\\r\\n\\&#39;\\\&quot;\\\\\\x9d&quot;</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.trim_ascii_start" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/ascii.rs.html#97">source</a><h4 class="code-header">pub fn <a href="#method.trim_ascii_start" class="fnname">trim_ascii_start</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>byte_slice_trim_ascii</code>)</span></div></span></summary><div class="docblock"><p>Returns a byte slice with leading ASCII whitespace bytes removed.</p>
+<p>‘Whitespace’ refers to the definition used by
+<code>u8::is_ascii_whitespace</code>.</p>
+<h5 id="examples-20"><a href="#examples-20">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(byte_slice_trim_ascii)]
+
+</span><span class="macro">assert_eq!</span>(<span class="string">b&quot; \t hello world\n&quot;</span>.trim_ascii_start(), <span class="string">b&quot;hello world\n&quot;</span>);
+<span class="macro">assert_eq!</span>(<span class="string">b&quot; &quot;</span>.trim_ascii_start(), <span class="string">b&quot;&quot;</span>);
+<span class="macro">assert_eq!</span>(<span class="string">b&quot;&quot;</span>.trim_ascii_start(), <span class="string">b&quot;&quot;</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.trim_ascii_end" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/ascii.rs.html#126">source</a><h4 class="code-header">pub fn <a href="#method.trim_ascii_end" class="fnname">trim_ascii_end</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>byte_slice_trim_ascii</code>)</span></div></span></summary><div class="docblock"><p>Returns a byte slice with trailing ASCII whitespace bytes removed.</p>
+<p>‘Whitespace’ refers to the definition used by
+<code>u8::is_ascii_whitespace</code>.</p>
+<h5 id="examples-21"><a href="#examples-21">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(byte_slice_trim_ascii)]
+
+</span><span class="macro">assert_eq!</span>(<span class="string">b&quot;\r hello world\n &quot;</span>.trim_ascii_end(), <span class="string">b&quot;\r hello world&quot;</span>);
+<span class="macro">assert_eq!</span>(<span class="string">b&quot; &quot;</span>.trim_ascii_end(), <span class="string">b&quot;&quot;</span>);
+<span class="macro">assert_eq!</span>(<span class="string">b&quot;&quot;</span>.trim_ascii_end(), <span class="string">b&quot;&quot;</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.trim_ascii" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/ascii.rs.html#156">source</a><h4 class="code-header">pub fn <a href="#method.trim_ascii" class="fnname">trim_ascii</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>byte_slice_trim_ascii</code>)</span></div></span></summary><div class="docblock"><p>Returns a byte slice with leading and trailing ASCII whitespace bytes
+removed.</p>
+<p>‘Whitespace’ refers to the definition used by
+<code>u8::is_ascii_whitespace</code>.</p>
+<h5 id="examples-22"><a href="#examples-22">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(byte_slice_trim_ascii)]
+
+</span><span class="macro">assert_eq!</span>(<span class="string">b&quot;\r hello world\n &quot;</span>.trim_ascii(), <span class="string">b&quot;hello world&quot;</span>);
+<span class="macro">assert_eq!</span>(<span class="string">b&quot; &quot;</span>.trim_ascii(), <span class="string">b&quot;&quot;</span>);
+<span class="macro">assert_eq!</span>(<span class="string">b&quot;&quot;</span>.trim_ascii(), <span class="string">b&quot;&quot;</span>);</code></pre></div>
+</div></details></div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sort_floats" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#4221">source</a><h4 class="code-header">pub fn <a href="#method.sort_floats" class="fnname">sort_floats</a>(&amp;mut self)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>sort_floats</code>)</span></div></span></summary><div class="docblock"><p>Sorts the slice of floats.</p>
+<p>This sort is in-place (i.e. does not allocate), <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case, and uses
+the ordering defined by <a href="https://doc.rust-lang.org/nightly/std/primitive.f64.html#method.total_cmp" title="f64::total_cmp"><code>f64::total_cmp</code></a>.</p>
+<h5 id="current-implementation"><a href="#current-implementation">Current implementation</a></h5>
+<p>This uses the same sorting algorithm as <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.sort_unstable_by"><code>sort_unstable_by</code></a>.</p>
+<h5 id="examples-23"><a href="#examples-23">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(sort_floats)]
+</span><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">2.6</span>, -<span class="number">5e-8</span>, f64::NAN, <span class="number">8.29</span>, f64::INFINITY, -<span class="number">1.0</span>, <span class="number">0.0</span>, -f64::INFINITY, -<span class="number">0.0</span>];
+
+v.sort_floats();
+<span class="kw">let </span>sorted = [-f64::INFINITY, -<span class="number">1.0</span>, -<span class="number">5e-8</span>, -<span class="number">0.0</span>, <span class="number">0.0</span>, <span class="number">2.6</span>, <span class="number">8.29</span>, f64::INFINITY, f64::NAN];
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>v[..<span class="number">8</span>], <span class="kw-2">&amp;</span>sorted[..<span class="number">8</span>]);
+<span class="macro">assert!</span>(v[<span class="number">8</span>].is_nan());</code></pre></div>
+</div></details></div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sort_floats-1" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#4192">source</a><h4 class="code-header">pub fn <a href="#method.sort_floats-1" class="fnname">sort_floats</a>(&amp;mut self)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>sort_floats</code>)</span></div></span></summary><div class="docblock"><p>Sorts the slice of floats.</p>
+<p>This sort is in-place (i.e. does not allocate), <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case, and uses
+the ordering defined by <a href="https://doc.rust-lang.org/nightly/std/primitive.f32.html#method.total_cmp" title="f32::total_cmp"><code>f32::total_cmp</code></a>.</p>
+<h5 id="current-implementation-1"><a href="#current-implementation-1">Current implementation</a></h5>
+<p>This uses the same sorting algorithm as <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.sort_unstable_by"><code>sort_unstable_by</code></a>.</p>
+<h5 id="examples-24"><a href="#examples-24">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(sort_floats)]
+</span><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">2.6</span>, -<span class="number">5e-8</span>, f32::NAN, <span class="number">8.29</span>, f32::INFINITY, -<span class="number">1.0</span>, <span class="number">0.0</span>, -f32::INFINITY, -<span class="number">0.0</span>];
+
+v.sort_floats();
+<span class="kw">let </span>sorted = [-f32::INFINITY, -<span class="number">1.0</span>, -<span class="number">5e-8</span>, -<span class="number">0.0</span>, <span class="number">0.0</span>, <span class="number">2.6</span>, <span class="number">8.29</span>, f32::INFINITY, f32::NAN];
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>v[..<span class="number">8</span>], <span class="kw-2">&amp;</span>sorted[..<span class="number">8</span>]);
+<span class="macro">assert!</span>(v[<span class="number">8</span>].is_nan());</code></pre></div>
+</div></details></div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.len-1" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#129">source</a></span><h4 class="code-header">pub fn <a href="#method.len-1" class="fnname">len</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the number of elements in the slice.</p>
+<h5 id="examples-25"><a href="#examples-25">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>a = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>];
+<span class="macro">assert_eq!</span>(a.len(), <span class="number">3</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_empty-1" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#145">source</a></span><h4 class="code-header">pub fn <a href="#method.is_empty-1" class="fnname">is_empty</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if the slice has a length of 0.</p>
+<h5 id="examples-26"><a href="#examples-26">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>a = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>];
+<span class="macro">assert!</span>(!a.is_empty());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.first" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#164">source</a></span><h4 class="code-header">pub fn <a href="#method.first" class="fnname">first</a>(&amp;self) -&gt; <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.reference.html">&amp;</a>T&gt;</h4></section></summary><div class="docblock"><p>Returns the first element of the slice, or <code>None</code> if it is empty.</p>
+<h5 id="examples-27"><a href="#examples-27">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">10</span>), v.first());
+
+<span class="kw">let </span>w: <span class="kw-2">&amp;</span>[i32] = <span class="kw-2">&amp;</span>[];
+<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, w.first());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.first_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#184">source</a></span><h4 class="code-header">pub fn <a href="#method.first_mut" class="fnname">first_mut</a>(&amp;mut self) -&gt; <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.reference.html">&amp;mut </a>T&gt;</h4></section></summary><div class="docblock"><p>Returns a mutable pointer to the first element of the slice, or <code>None</code> if it is empty.</p>
+<h5 id="examples-28"><a href="#examples-28">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&amp;mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>];
+
+<span class="kw">if let </span><span class="prelude-val">Some</span>(first) = x.first_mut() {
+ <span class="kw-2">*</span>first = <span class="number">5</span>;
+}
+<span class="macro">assert_eq!</span>(x, <span class="kw-2">&amp;</span>[<span class="number">5</span>, <span class="number">1</span>, <span class="number">2</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_first" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#204">source</a></span><h4 class="code-header">pub fn <a href="#method.split_first" class="fnname">split_first</a>(&amp;self) -&gt; <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.reference.html">&amp;</a>T, &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)&gt;</h4></section></summary><div class="docblock"><p>Returns the first and all the rest of the elements of the slice, or <code>None</code> if it is empty.</p>
+<h5 id="examples-29"><a href="#examples-29">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&amp;</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>];
+
+<span class="kw">if let </span><span class="prelude-val">Some</span>((first, elements)) = x.split_first() {
+ <span class="macro">assert_eq!</span>(first, <span class="kw-2">&amp;</span><span class="number">0</span>);
+ <span class="macro">assert_eq!</span>(elements, <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>]);
+}</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_first_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#226">source</a></span><h4 class="code-header">pub fn <a href="#method.split_first_mut" class="fnname">split_first_mut</a>(&amp;mut self) -&gt; <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.reference.html">&amp;mut </a>T, &amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)&gt;</h4></section></summary><div class="docblock"><p>Returns the first and all the rest of the elements of the slice, or <code>None</code> if it is empty.</p>
+<h5 id="examples-30"><a href="#examples-30">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&amp;mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>];
+
+<span class="kw">if let </span><span class="prelude-val">Some</span>((first, elements)) = x.split_first_mut() {
+ <span class="kw-2">*</span>first = <span class="number">3</span>;
+ elements[<span class="number">0</span>] = <span class="number">4</span>;
+ elements[<span class="number">1</span>] = <span class="number">5</span>;
+}
+<span class="macro">assert_eq!</span>(x, <span class="kw-2">&amp;</span>[<span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_last" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#246">source</a></span><h4 class="code-header">pub fn <a href="#method.split_last" class="fnname">split_last</a>(&amp;self) -&gt; <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.reference.html">&amp;</a>T, &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)&gt;</h4></section></summary><div class="docblock"><p>Returns the last and all the rest of the elements of the slice, or <code>None</code> if it is empty.</p>
+<h5 id="examples-31"><a href="#examples-31">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&amp;</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>];
+
+<span class="kw">if let </span><span class="prelude-val">Some</span>((last, elements)) = x.split_last() {
+ <span class="macro">assert_eq!</span>(last, <span class="kw-2">&amp;</span><span class="number">2</span>);
+ <span class="macro">assert_eq!</span>(elements, <span class="kw-2">&amp;</span>[<span class="number">0</span>, <span class="number">1</span>]);
+}</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_last_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#268">source</a></span><h4 class="code-header">pub fn <a href="#method.split_last_mut" class="fnname">split_last_mut</a>(&amp;mut self) -&gt; <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.reference.html">&amp;mut </a>T, &amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)&gt;</h4></section></summary><div class="docblock"><p>Returns the last and all the rest of the elements of the slice, or <code>None</code> if it is empty.</p>
+<h5 id="examples-32"><a href="#examples-32">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&amp;mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>];
+
+<span class="kw">if let </span><span class="prelude-val">Some</span>((last, elements)) = x.split_last_mut() {
+ <span class="kw-2">*</span>last = <span class="number">3</span>;
+ elements[<span class="number">0</span>] = <span class="number">4</span>;
+ elements[<span class="number">1</span>] = <span class="number">5</span>;
+}
+<span class="macro">assert_eq!</span>(x, <span class="kw-2">&amp;</span>[<span class="number">4</span>, <span class="number">5</span>, <span class="number">3</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.last" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#287">source</a></span><h4 class="code-header">pub fn <a href="#method.last" class="fnname">last</a>(&amp;self) -&gt; <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.reference.html">&amp;</a>T&gt;</h4></section></summary><div class="docblock"><p>Returns the last element of the slice, or <code>None</code> if it is empty.</p>
+<h5 id="examples-33"><a href="#examples-33">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">30</span>), v.last());
+
+<span class="kw">let </span>w: <span class="kw-2">&amp;</span>[i32] = <span class="kw-2">&amp;</span>[];
+<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, w.last());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.last_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#307">source</a></span><h4 class="code-header">pub fn <a href="#method.last_mut" class="fnname">last_mut</a>(&amp;mut self) -&gt; <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.reference.html">&amp;mut </a>T&gt;</h4></section></summary><div class="docblock"><p>Returns a mutable pointer to the last item in the slice.</p>
+<h5 id="examples-34"><a href="#examples-34">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&amp;mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>];
+
+<span class="kw">if let </span><span class="prelude-val">Some</span>(last) = x.last_mut() {
+ <span class="kw-2">*</span>last = <span class="number">10</span>;
+}
+<span class="macro">assert_eq!</span>(x, <span class="kw-2">&amp;</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">10</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#332-334">source</a></span><h4 class="code-header">pub fn <a href="#method.get" class="fnname">get</a>&lt;I&gt;(&amp;self, index: I) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;&lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/slice/index/trait.SliceIndex.html#associatedtype.Output" title="type core::slice::index::SliceIndex::Output">Output</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;,</span></h4></section></summary><div class="docblock"><p>Returns a reference to an element or subslice depending on the type of
+index.</p>
+<ul>
+<li>If given a position, returns a reference to the element at that
+position or <code>None</code> if out of bounds.</li>
+<li>If given a range, returns the subslice corresponding to that range,
+or <code>None</code> if out of bounds.</li>
+</ul>
+<h5 id="examples-35"><a href="#examples-35">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">40</span>), v.get(<span class="number">1</span>));
+<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>][..]), v.get(<span class="number">0</span>..<span class="number">2</span>));
+<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, v.get(<span class="number">3</span>));
+<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, v.get(<span class="number">0</span>..<span class="number">4</span>));</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#358-360">source</a></span><h4 class="code-header">pub fn <a href="#method.get_mut" class="fnname">get_mut</a>&lt;I&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;index: I<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut &lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/slice/index/trait.SliceIndex.html#associatedtype.Output" title="type core::slice::index::SliceIndex::Output">Output</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;,</span></h4></section></summary><div class="docblock"><p>Returns a mutable reference to an element or subslice depending on the
+type of index (see <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.get"><code>get</code></a>) or <code>None</code> if the index is out of bounds.</p>
+<h5 id="examples-36"><a href="#examples-36">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&amp;mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>];
+
+<span class="kw">if let </span><span class="prelude-val">Some</span>(elem) = x.get_mut(<span class="number">1</span>) {
+ <span class="kw-2">*</span>elem = <span class="number">42</span>;
+}
+<span class="macro">assert_eq!</span>(x, <span class="kw-2">&amp;</span>[<span class="number">0</span>, <span class="number">42</span>, <span class="number">2</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_unchecked" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#391-393">source</a></span><h4 class="code-header">pub unsafe fn <a href="#method.get_unchecked" class="fnname">get_unchecked</a>&lt;I&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self,<br>&nbsp;&nbsp;&nbsp;&nbsp;index: I<br>) -&gt; &amp;&lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/slice/index/trait.SliceIndex.html#associatedtype.Output" title="type core::slice::index::SliceIndex::Output">Output</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;,</span></h4></section></summary><div class="docblock"><p>Returns a reference to an element or subslice, without doing bounds
+checking.</p>
+<p>For a safe alternative see <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.get"><code>get</code></a>.</p>
+<h5 id="safety"><a href="#safety">Safety</a></h5>
+<p>Calling this method with an out-of-bounds index is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em>
+even if the resulting reference is not used.</p>
+<h5 id="examples-37"><a href="#examples-37">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>];
+
+<span class="kw">unsafe </span>{
+ <span class="macro">assert_eq!</span>(x.get_unchecked(<span class="number">1</span>), <span class="kw-2">&amp;</span><span class="number">2</span>);
+}</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_unchecked_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#429-431">source</a></span><h4 class="code-header">pub unsafe fn <a href="#method.get_unchecked_mut" class="fnname">get_unchecked_mut</a>&lt;I&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;index: I<br>) -&gt; &amp;mut &lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/slice/index/trait.SliceIndex.html#associatedtype.Output" title="type core::slice::index::SliceIndex::Output">Output</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;,</span></h4></section></summary><div class="docblock"><p>Returns a mutable reference to an element or subslice, without doing
+bounds checking.</p>
+<p>For a safe alternative see <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.get_mut"><code>get_mut</code></a>.</p>
+<h5 id="safety-1"><a href="#safety-1">Safety</a></h5>
+<p>Calling this method with an out-of-bounds index is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em>
+even if the resulting reference is not used.</p>
+<h5 id="examples-38"><a href="#examples-38">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&amp;mut </span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>];
+
+<span class="kw">unsafe </span>{
+ <span class="kw">let </span>elem = x.get_unchecked_mut(<span class="number">1</span>);
+ <span class="kw-2">*</span>elem = <span class="number">13</span>;
+}
+<span class="macro">assert_eq!</span>(x, <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">13</span>, <span class="number">4</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ptr" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#469">source</a></span><h4 class="code-header">pub fn <a href="#method.as_ptr" class="fnname">as_ptr</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*const T</a></h4></section></summary><div class="docblock"><p>Returns a raw pointer to the slice’s buffer.</p>
+<p>The caller must ensure that the slice outlives the pointer this
+function returns, or else it will end up pointing to garbage.</p>
+<p>The caller must also ensure that the memory the pointer (non-transitively) points to
+is never written to (except inside an <code>UnsafeCell</code>) using this pointer or any pointer
+derived from it. If you need to mutate the contents of the slice, use <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.as_mut_ptr"><code>as_mut_ptr</code></a>.</p>
+<p>Modifying the container referenced by this slice may cause its buffer
+to be reallocated, which would also make any pointers to it invalid.</p>
+<h5 id="examples-39"><a href="#examples-39">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>];
+<span class="kw">let </span>x_ptr = x.as_ptr();
+
+<span class="kw">unsafe </span>{
+ <span class="kw">for </span>i <span class="kw">in </span><span class="number">0</span>..x.len() {
+ <span class="macro">assert_eq!</span>(x.get_unchecked(i), <span class="kw-2">&amp;*</span>x_ptr.add(i));
+ }
+}</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut_ptr" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#499">source</a></span><h4 class="code-header">pub fn <a href="#method.as_mut_ptr" class="fnname">as_mut_ptr</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut T</a></h4></section></summary><div class="docblock"><p>Returns an unsafe mutable pointer to the slice’s buffer.</p>
+<p>The caller must ensure that the slice outlives the pointer this
+function returns, or else it will end up pointing to garbage.</p>
+<p>Modifying the container referenced by this slice may cause its buffer
+to be reallocated, which would also make any pointers to it invalid.</p>
+<h5 id="examples-40"><a href="#examples-40">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&amp;mut </span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>];
+<span class="kw">let </span>x_ptr = x.as_mut_ptr();
+
+<span class="kw">unsafe </span>{
+ <span class="kw">for </span>i <span class="kw">in </span><span class="number">0</span>..x.len() {
+ <span class="kw-2">*</span>x_ptr.add(i) += <span class="number">2</span>;
+ }
+}
+<span class="macro">assert_eq!</span>(x, <span class="kw-2">&amp;</span>[<span class="number">3</span>, <span class="number">4</span>, <span class="number">6</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ptr_range" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.48.0">1.48.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#535">source</a></span><h4 class="code-header">pub fn <a href="#method.as_ptr_range" class="fnname">as_ptr_range</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*const T</a>&gt;</h4></section></summary><div class="docblock"><p>Returns the two raw pointers spanning the slice.</p>
+<p>The returned range is half-open, which means that the end pointer
+points <em>one past</em> the last element of the slice. This way, an empty
+slice is represented by two equal pointers, and the difference between
+the two pointers represents the size of the slice.</p>
+<p>See <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.as_ptr"><code>as_ptr</code></a> for warnings on using these pointers. The end pointer
+requires extra caution, as it does not point to a valid element in the
+slice.</p>
+<p>This function is useful for interacting with foreign interfaces which
+use two pointers to refer to a range of elements in memory, as is
+common in C++.</p>
+<p>It can also be useful to check if a pointer to an element refers to an
+element of this slice:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>a = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>];
+<span class="kw">let </span>x = <span class="kw-2">&amp;</span>a[<span class="number">1</span>] <span class="kw">as </span><span class="kw-2">*const </span><span class="kw">_</span>;
+<span class="kw">let </span>y = <span class="kw-2">&amp;</span><span class="number">5 </span><span class="kw">as </span><span class="kw-2">*const </span><span class="kw">_</span>;
+
+<span class="macro">assert!</span>(a.as_ptr_range().contains(<span class="kw-2">&amp;</span>x));
+<span class="macro">assert!</span>(!a.as_ptr_range().contains(<span class="kw-2">&amp;</span>y));</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut_ptr_range" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.48.0">1.48.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#579">source</a></span><h4 class="code-header">pub fn <a href="#method.as_mut_ptr_range" class="fnname">as_mut_ptr_range</a>(&amp;mut self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut T</a>&gt;</h4></section></summary><div class="docblock"><p>Returns the two unsafe mutable pointers spanning the slice.</p>
+<p>The returned range is half-open, which means that the end pointer
+points <em>one past</em> the last element of the slice. This way, an empty
+slice is represented by two equal pointers, and the difference between
+the two pointers represents the size of the slice.</p>
+<p>See <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.as_mut_ptr"><code>as_mut_ptr</code></a> for warnings on using these pointers. The end
+pointer requires extra caution, as it does not point to a valid element
+in the slice.</p>
+<p>This function is useful for interacting with foreign interfaces which
+use two pointers to refer to a range of elements in memory, as is
+common in C++.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.swap" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#608">source</a></span><h4 class="code-header">pub fn <a href="#method.swap" class="fnname">swap</a>(&amp;mut self, a: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, b: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Swaps two elements in the slice.</p>
+<h5 id="arguments"><a href="#arguments">Arguments</a></h5>
+<ul>
+<li>a - The index of the first element</li>
+<li>b - The index of the second element</li>
+</ul>
+<h5 id="panics-3"><a href="#panics-3">Panics</a></h5>
+<p>Panics if <code>a</code> or <code>b</code> are out of bounds.</p>
+<h5 id="examples-41"><a href="#examples-41">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="string">&quot;a&quot;</span>, <span class="string">&quot;b&quot;</span>, <span class="string">&quot;c&quot;</span>, <span class="string">&quot;d&quot;</span>, <span class="string">&quot;e&quot;</span>];
+v.swap(<span class="number">2</span>, <span class="number">4</span>);
+<span class="macro">assert!</span>(v == [<span class="string">&quot;a&quot;</span>, <span class="string">&quot;b&quot;</span>, <span class="string">&quot;e&quot;</span>, <span class="string">&quot;d&quot;</span>, <span class="string">&quot;c&quot;</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.swap_unchecked" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#651">source</a><h4 class="code-header">pub unsafe fn <a href="#method.swap_unchecked" class="fnname">swap_unchecked</a>(&amp;mut self, a: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, b: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_swap_unchecked</code>)</span></div></span></summary><div class="docblock"><p>Swaps two elements in the slice, without doing bounds checking.</p>
+<p>For a safe alternative see <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.swap"><code>swap</code></a>.</p>
+<h5 id="arguments-1"><a href="#arguments-1">Arguments</a></h5>
+<ul>
+<li>a - The index of the first element</li>
+<li>b - The index of the second element</li>
+</ul>
+<h5 id="safety-2"><a href="#safety-2">Safety</a></h5>
+<p>Calling this method with an out-of-bounds index is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em>.
+The caller has to ensure that <code>a &lt; self.len()</code> and <code>b &lt; self.len()</code>.</p>
+<h5 id="examples-42"><a href="#examples-42">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_swap_unchecked)]
+
+</span><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="string">&quot;a&quot;</span>, <span class="string">&quot;b&quot;</span>, <span class="string">&quot;c&quot;</span>, <span class="string">&quot;d&quot;</span>];
+<span class="comment">// SAFETY: we know that 1 and 3 are both indices of the slice
+</span><span class="kw">unsafe </span>{ v.swap_unchecked(<span class="number">1</span>, <span class="number">3</span>) };
+<span class="macro">assert!</span>(v == [<span class="string">&quot;a&quot;</span>, <span class="string">&quot;d&quot;</span>, <span class="string">&quot;c&quot;</span>, <span class="string">&quot;b&quot;</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.reverse" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#676">source</a></span><h4 class="code-header">pub fn <a href="#method.reverse" class="fnname">reverse</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Reverses the order of elements in the slice, in place.</p>
+<h5 id="examples-43"><a href="#examples-43">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>];
+v.reverse();
+<span class="macro">assert!</span>(v == [<span class="number">3</span>, <span class="number">2</span>, <span class="number">1</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.iter" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#734">source</a></span><h4 class="code-header">pub fn <a href="#method.iter" class="fnname">iter</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.Iter.html" title="struct core::slice::iter::Iter">Iter</a>&lt;'_, T&gt;</h4></section></summary><div class="docblock"><p>Returns an iterator over the slice.</p>
+<p>The iterator yields all items from start to end.</p>
+<h5 id="examples-44"><a href="#examples-44">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iterator = x.iter();
+
+<span class="macro">assert_eq!</span>(iterator.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">1</span>));
+<span class="macro">assert_eq!</span>(iterator.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">2</span>));
+<span class="macro">assert_eq!</span>(iterator.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">4</span>));
+<span class="macro">assert_eq!</span>(iterator.next(), <span class="prelude-val">None</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.iter_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#753">source</a></span><h4 class="code-header">pub fn <a href="#method.iter_mut" class="fnname">iter_mut</a>(&amp;mut self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.IterMut.html" title="struct core::slice::iter::IterMut">IterMut</a>&lt;'_, T&gt;</h4></section></summary><div class="docblock"><p>Returns an iterator that allows modifying each value.</p>
+<p>The iterator yields all items from start to end.</p>
+<h5 id="examples-45"><a href="#examples-45">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&amp;mut </span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>];
+<span class="kw">for </span>elem <span class="kw">in </span>x.iter_mut() {
+ <span class="kw-2">*</span>elem += <span class="number">2</span>;
+}
+<span class="macro">assert_eq!</span>(x, <span class="kw-2">&amp;</span>[<span class="number">3</span>, <span class="number">4</span>, <span class="number">6</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.windows" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#785">source</a></span><h4 class="code-header">pub fn <a href="#method.windows" class="fnname">windows</a>(&amp;self, size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.Windows.html" title="struct core::slice::iter::Windows">Windows</a>&lt;'_, T&gt;</h4></section></summary><div class="docblock"><p>Returns an iterator over all contiguous windows of length
+<code>size</code>. The windows overlap. If the slice is shorter than
+<code>size</code>, the iterator returns no values.</p>
+<h5 id="panics-4"><a href="#panics-4">Panics</a></h5>
+<p>Panics if <code>size</code> is 0.</p>
+<h5 id="examples-46"><a href="#examples-46">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">&#39;r&#39;</span>, <span class="string">&#39;u&#39;</span>, <span class="string">&#39;s&#39;</span>, <span class="string">&#39;t&#39;</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.windows(<span class="number">2</span>);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;r&#39;</span>, <span class="string">&#39;u&#39;</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;u&#39;</span>, <span class="string">&#39;s&#39;</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;s&#39;</span>, <span class="string">&#39;t&#39;</span>]);
+<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
+<p>If the slice is shorter than <code>size</code>:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">&#39;f&#39;</span>, <span class="string">&#39;o&#39;</span>, <span class="string">&#39;o&#39;</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.windows(<span class="number">4</span>);
+<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunks" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#819">source</a></span><h4 class="code-header">pub fn <a href="#method.chunks" class="fnname">chunks</a>(&amp;self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.Chunks.html" title="struct core::slice::iter::Chunks">Chunks</a>&lt;'_, T&gt;</h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the
+beginning of the slice.</p>
+<p>The chunks are slices and do not overlap. If <code>chunk_size</code> does not divide the length of the
+slice, then the last chunk will not have length <code>chunk_size</code>.</p>
+<p>See <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.chunks_exact"><code>chunks_exact</code></a> for a variant of this iterator that returns chunks of always exactly
+<code>chunk_size</code> elements, and <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.rchunks"><code>rchunks</code></a> for the same iterator but starting at the end of the
+slice.</p>
+<h5 id="panics-5"><a href="#panics-5">Panics</a></h5>
+<p>Panics if <code>chunk_size</code> is 0.</p>
+<h5 id="examples-47"><a href="#examples-47">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.chunks(<span class="number">2</span>);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;m&#39;</span>]);
+<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunks_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#857">source</a></span><h4 class="code-header">pub fn <a href="#method.chunks_mut" class="fnname">chunks_mut</a>(&amp;mut self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.ChunksMut.html" title="struct core::slice::iter::ChunksMut">ChunksMut</a>&lt;'_, T&gt;</h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the
+beginning of the slice.</p>
+<p>The chunks are mutable slices, and do not overlap. If <code>chunk_size</code> does not divide the
+length of the slice, then the last chunk will not have length <code>chunk_size</code>.</p>
+<p>See <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.chunks_exact_mut"><code>chunks_exact_mut</code></a> for a variant of this iterator that returns chunks of always
+exactly <code>chunk_size</code> elements, and <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.rchunks_mut"><code>rchunks_mut</code></a> for the same iterator but starting at
+the end of the slice.</p>
+<h5 id="panics-6"><a href="#panics-6">Panics</a></h5>
+<p>Panics if <code>chunk_size</code> is 0.</p>
+<h5 id="examples-48"><a href="#examples-48">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&amp;mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>;
+
+<span class="kw">for </span>chunk <span class="kw">in </span>v.chunks_mut(<span class="number">2</span>) {
+ <span class="kw">for </span>elem <span class="kw">in </span>chunk.iter_mut() {
+ <span class="kw-2">*</span>elem += count;
+ }
+ count += <span class="number">1</span>;
+}
+<span class="macro">assert_eq!</span>(v, <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">3</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunks_exact" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#894">source</a></span><h4 class="code-header">pub fn <a href="#method.chunks_exact" class="fnname">chunks_exact</a>(&amp;self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.ChunksExact.html" title="struct core::slice::iter::ChunksExact">ChunksExact</a>&lt;'_, T&gt;</h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the
+beginning of the slice.</p>
+<p>The chunks are slices and do not overlap. If <code>chunk_size</code> does not divide the length of the
+slice, then the last up to <code>chunk_size-1</code> elements will be omitted and can be retrieved
+from the <code>remainder</code> function of the iterator.</p>
+<p>Due to each chunk having exactly <code>chunk_size</code> elements, the compiler can often optimize the
+resulting code better than in the case of <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.chunks"><code>chunks</code></a>.</p>
+<p>See <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.chunks"><code>chunks</code></a> for a variant of this iterator that also returns the remainder as a smaller
+chunk, and <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.rchunks_exact"><code>rchunks_exact</code></a> for the same iterator but starting at the end of the slice.</p>
+<h5 id="panics-7"><a href="#panics-7">Panics</a></h5>
+<p>Panics if <code>chunk_size</code> is 0.</p>
+<h5 id="examples-49"><a href="#examples-49">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.chunks_exact(<span class="number">2</span>);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>]);
+<span class="macro">assert!</span>(iter.next().is_none());
+<span class="macro">assert_eq!</span>(iter.remainder(), <span class="kw-2">&amp;</span>[<span class="string">&#39;m&#39;</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunks_exact_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#936">source</a></span><h4 class="code-header">pub fn <a href="#method.chunks_exact_mut" class="fnname">chunks_exact_mut</a>(&amp;mut self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.ChunksExactMut.html" title="struct core::slice::iter::ChunksExactMut">ChunksExactMut</a>&lt;'_, T&gt;</h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the
+beginning of the slice.</p>
+<p>The chunks are mutable slices, and do not overlap. If <code>chunk_size</code> does not divide the
+length of the slice, then the last up to <code>chunk_size-1</code> elements will be omitted and can be
+retrieved from the <code>into_remainder</code> function of the iterator.</p>
+<p>Due to each chunk having exactly <code>chunk_size</code> elements, the compiler can often optimize the
+resulting code better than in the case of <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.chunks_mut"><code>chunks_mut</code></a>.</p>
+<p>See <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.chunks_mut"><code>chunks_mut</code></a> for a variant of this iterator that also returns the remainder as a
+smaller chunk, and <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.rchunks_exact_mut"><code>rchunks_exact_mut</code></a> for the same iterator but starting at the end of
+the slice.</p>
+<h5 id="panics-8"><a href="#panics-8">Panics</a></h5>
+<p>Panics if <code>chunk_size</code> is 0.</p>
+<h5 id="examples-50"><a href="#examples-50">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&amp;mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>;
+
+<span class="kw">for </span>chunk <span class="kw">in </span>v.chunks_exact_mut(<span class="number">2</span>) {
+ <span class="kw">for </span>elem <span class="kw">in </span>chunk.iter_mut() {
+ <span class="kw-2">*</span>elem += count;
+ }
+ count += <span class="number">1</span>;
+}
+<span class="macro">assert_eq!</span>(v, <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">0</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_chunks_unchecked" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#971">source</a><h4 class="code-header">pub unsafe fn <a href="#method.as_chunks_unchecked" class="fnname">as_chunks_unchecked</a>&lt;const N:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[T; N]</a>]</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays,
+assuming that there’s no remainder.</p>
+<h5 id="safety-3"><a href="#safety-3">Safety</a></h5>
+<p>This may only be called when</p>
+<ul>
+<li>The slice splits exactly into <code>N</code>-element chunks (aka <code>self.len() % N == 0</code>).</li>
+<li><code>N != 0</code>.</li>
+</ul>
+<h5 id="examples-51"><a href="#examples-51">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)]
+</span><span class="kw">let </span>slice: <span class="kw-2">&amp;</span>[char] = <span class="kw-2">&amp;</span>[<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>, <span class="string">&#39;!&#39;</span>];
+<span class="kw">let </span>chunks: <span class="kw-2">&amp;</span>[[char; <span class="number">1</span>]] =
+ <span class="comment">// SAFETY: 1-element chunks never have remainder
+ </span><span class="kw">unsafe </span>{ slice.as_chunks_unchecked() };
+<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&amp;</span>[[<span class="string">&#39;l&#39;</span>], [<span class="string">&#39;o&#39;</span>], [<span class="string">&#39;r&#39;</span>], [<span class="string">&#39;e&#39;</span>], [<span class="string">&#39;m&#39;</span>], [<span class="string">&#39;!&#39;</span>]]);
+<span class="kw">let </span>chunks: <span class="kw-2">&amp;</span>[[char; <span class="number">3</span>]] =
+ <span class="comment">// SAFETY: The slice length (6) is a multiple of 3
+ </span><span class="kw">unsafe </span>{ slice.as_chunks_unchecked() };
+<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&amp;</span>[[<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>], [<span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>, <span class="string">&#39;!&#39;</span>]]);
+
+<span class="comment">// These would be unsound:
+// let chunks: &amp;[[_; 5]] = slice.as_chunks_unchecked() // The slice length is not a multiple of 5
+// let chunks: &amp;[[_; 0]] = slice.as_chunks_unchecked() // Zero-length chunks are never allowed</span></code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_chunks" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1007">source</a><h4 class="code-header">pub fn <a href="#method.as_chunks" class="fnname">as_chunks</a>&lt;const N:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(&amp;self) -&gt; (&amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[T; N]</a>], &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays,
+starting at the beginning of the slice,
+and a remainder slice with length strictly less than <code>N</code>.</p>
+<h5 id="panics-9"><a href="#panics-9">Panics</a></h5>
+<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time
+error before this method gets stabilized.</p>
+<h5 id="examples-52"><a href="#examples-52">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)]
+</span><span class="kw">let </span>slice = [<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>];
+<span class="kw">let </span>(chunks, remainder) = slice.as_chunks();
+<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&amp;</span>[[<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>], [<span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>]]);
+<span class="macro">assert_eq!</span>(remainder, <span class="kw-2">&amp;</span>[<span class="string">&#39;m&#39;</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_rchunks" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1038">source</a><h4 class="code-header">pub fn <a href="#method.as_rchunks" class="fnname">as_rchunks</a>&lt;const N:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(&amp;self) -&gt; (&amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[T; N]</a>])</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays,
+starting at the end of the slice,
+and a remainder slice with length strictly less than <code>N</code>.</p>
+<h5 id="panics-10"><a href="#panics-10">Panics</a></h5>
+<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time
+error before this method gets stabilized.</p>
+<h5 id="examples-53"><a href="#examples-53">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)]
+</span><span class="kw">let </span>slice = [<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>];
+<span class="kw">let </span>(remainder, chunks) = slice.as_rchunks();
+<span class="macro">assert_eq!</span>(remainder, <span class="kw-2">&amp;</span>[<span class="string">&#39;l&#39;</span>]);
+<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&amp;</span>[[<span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>], [<span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>]]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.array_chunks" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1077">source</a><h4 class="code-header">pub fn <a href="#method.array_chunks" class="fnname">array_chunks</a>&lt;const N:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.ArrayChunks.html" title="struct core::slice::iter::ArrayChunks">ArrayChunks</a>&lt;'_, T, N&gt;</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>array_chunks</code>)</span></div></span></summary><div class="docblock"><p>Returns an iterator over <code>N</code> elements of the slice at a time, starting at the
+beginning of the slice.</p>
+<p>The chunks are array references and do not overlap. If <code>N</code> does not divide the
+length of the slice, then the last up to <code>N-1</code> elements will be omitted and can be
+retrieved from the <code>remainder</code> function of the iterator.</p>
+<p>This method is the const generic equivalent of <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.chunks_exact"><code>chunks_exact</code></a>.</p>
+<h5 id="panics-11"><a href="#panics-11">Panics</a></h5>
+<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time
+error before this method gets stabilized.</p>
+<h5 id="examples-54"><a href="#examples-54">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(array_chunks)]
+</span><span class="kw">let </span>slice = [<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.array_chunks();
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>]);
+<span class="macro">assert!</span>(iter.next().is_none());
+<span class="macro">assert_eq!</span>(iter.remainder(), <span class="kw-2">&amp;</span>[<span class="string">&#39;m&#39;</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_chunks_unchecked_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1114">source</a><h4 class="code-header">pub unsafe fn <a href="#method.as_chunks_unchecked_mut" class="fnname">as_chunks_unchecked_mut</a>&lt;const N:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self<br>) -&gt; &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[T; N]</a>]</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays,
+assuming that there’s no remainder.</p>
+<h5 id="safety-4"><a href="#safety-4">Safety</a></h5>
+<p>This may only be called when</p>
+<ul>
+<li>The slice splits exactly into <code>N</code>-element chunks (aka <code>self.len() % N == 0</code>).</li>
+<li><code>N != 0</code>.</li>
+</ul>
+<h5 id="examples-55"><a href="#examples-55">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)]
+</span><span class="kw">let </span>slice: <span class="kw-2">&amp;mut </span>[char] = <span class="kw-2">&amp;mut </span>[<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>, <span class="string">&#39;!&#39;</span>];
+<span class="kw">let </span>chunks: <span class="kw-2">&amp;mut </span>[[char; <span class="number">1</span>]] =
+ <span class="comment">// SAFETY: 1-element chunks never have remainder
+ </span><span class="kw">unsafe </span>{ slice.as_chunks_unchecked_mut() };
+chunks[<span class="number">0</span>] = [<span class="string">&#39;L&#39;</span>];
+<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&amp;</span>[[<span class="string">&#39;L&#39;</span>], [<span class="string">&#39;o&#39;</span>], [<span class="string">&#39;r&#39;</span>], [<span class="string">&#39;e&#39;</span>], [<span class="string">&#39;m&#39;</span>], [<span class="string">&#39;!&#39;</span>]]);
+<span class="kw">let </span>chunks: <span class="kw-2">&amp;mut </span>[[char; <span class="number">3</span>]] =
+ <span class="comment">// SAFETY: The slice length (6) is a multiple of 3
+ </span><span class="kw">unsafe </span>{ slice.as_chunks_unchecked_mut() };
+chunks[<span class="number">1</span>] = [<span class="string">&#39;a&#39;</span>, <span class="string">&#39;x&#39;</span>, <span class="string">&#39;?&#39;</span>];
+<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&amp;</span>[<span class="string">&#39;L&#39;</span>, <span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>, <span class="string">&#39;a&#39;</span>, <span class="string">&#39;x&#39;</span>, <span class="string">&#39;?&#39;</span>]);
+
+<span class="comment">// These would be unsound:
+// let chunks: &amp;[[_; 5]] = slice.as_chunks_unchecked_mut() // The slice length is not a multiple of 5
+// let chunks: &amp;[[_; 0]] = slice.as_chunks_unchecked_mut() // Zero-length chunks are never allowed</span></code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_chunks_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1156">source</a><h4 class="code-header">pub fn <a href="#method.as_chunks_mut" class="fnname">as_chunks_mut</a>&lt;const N:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(&amp;mut self) -&gt; (&amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[T; N]</a>], &amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays,
+starting at the beginning of the slice,
+and a remainder slice with length strictly less than <code>N</code>.</p>
+<h5 id="panics-12"><a href="#panics-12">Panics</a></h5>
+<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time
+error before this method gets stabilized.</p>
+<h5 id="examples-56"><a href="#examples-56">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)]
+</span><span class="kw">let </span>v = <span class="kw-2">&amp;mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>;
+
+<span class="kw">let </span>(chunks, remainder) = v.as_chunks_mut();
+remainder[<span class="number">0</span>] = <span class="number">9</span>;
+<span class="kw">for </span>chunk <span class="kw">in </span>chunks {
+ <span class="kw-2">*</span>chunk = [count; <span class="number">2</span>];
+ count += <span class="number">1</span>;
+}
+<span class="macro">assert_eq!</span>(v, <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">9</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_rchunks_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1193">source</a><h4 class="code-header">pub fn <a href="#method.as_rchunks_mut" class="fnname">as_rchunks_mut</a>&lt;const N:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(&amp;mut self) -&gt; (&amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[T; N]</a>])</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays,
+starting at the end of the slice,
+and a remainder slice with length strictly less than <code>N</code>.</p>
+<h5 id="panics-13"><a href="#panics-13">Panics</a></h5>
+<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time
+error before this method gets stabilized.</p>
+<h5 id="examples-57"><a href="#examples-57">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)]
+</span><span class="kw">let </span>v = <span class="kw-2">&amp;mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>;
+
+<span class="kw">let </span>(remainder, chunks) = v.as_rchunks_mut();
+remainder[<span class="number">0</span>] = <span class="number">9</span>;
+<span class="kw">for </span>chunk <span class="kw">in </span>chunks {
+ <span class="kw-2">*</span>chunk = [count; <span class="number">2</span>];
+ count += <span class="number">1</span>;
+}
+<span class="macro">assert_eq!</span>(v, <span class="kw-2">&amp;</span>[<span class="number">9</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.array_chunks_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1234">source</a><h4 class="code-header">pub fn <a href="#method.array_chunks_mut" class="fnname">array_chunks_mut</a>&lt;const N:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(&amp;mut self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.ArrayChunksMut.html" title="struct core::slice::iter::ArrayChunksMut">ArrayChunksMut</a>&lt;'_, T, N&gt;</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>array_chunks</code>)</span></div></span></summary><div class="docblock"><p>Returns an iterator over <code>N</code> elements of the slice at a time, starting at the
+beginning of the slice.</p>
+<p>The chunks are mutable array references and do not overlap. If <code>N</code> does not divide
+the length of the slice, then the last up to <code>N-1</code> elements will be omitted and
+can be retrieved from the <code>into_remainder</code> function of the iterator.</p>
+<p>This method is the const generic equivalent of <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.chunks_exact_mut"><code>chunks_exact_mut</code></a>.</p>
+<h5 id="panics-14"><a href="#panics-14">Panics</a></h5>
+<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time
+error before this method gets stabilized.</p>
+<h5 id="examples-58"><a href="#examples-58">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(array_chunks)]
+</span><span class="kw">let </span>v = <span class="kw-2">&amp;mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>;
+
+<span class="kw">for </span>chunk <span class="kw">in </span>v.array_chunks_mut() {
+ <span class="kw-2">*</span>chunk = [count; <span class="number">2</span>];
+ count += <span class="number">1</span>;
+}
+<span class="macro">assert_eq!</span>(v, <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">0</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.array_windows" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1266">source</a><h4 class="code-header">pub fn <a href="#method.array_windows" class="fnname">array_windows</a>&lt;const N:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.ArrayWindows.html" title="struct core::slice::iter::ArrayWindows">ArrayWindows</a>&lt;'_, T, N&gt;</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>array_windows</code>)</span></div></span></summary><div class="docblock"><p>Returns an iterator over overlapping windows of <code>N</code> elements of a slice,
+starting at the beginning of the slice.</p>
+<p>This is the const generic equivalent of <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.windows"><code>windows</code></a>.</p>
+<p>If <code>N</code> is greater than the size of the slice, it will return no windows.</p>
+<h5 id="panics-15"><a href="#panics-15">Panics</a></h5>
+<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time
+error before this method gets stabilized.</p>
+<h5 id="examples-59"><a href="#examples-59">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(array_windows)]
+</span><span class="kw">let </span>slice = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.array_windows();
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">0</span>, <span class="number">1</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">2</span>, <span class="number">3</span>]);
+<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rchunks" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1300">source</a></span><h4 class="code-header">pub fn <a href="#method.rchunks" class="fnname">rchunks</a>(&amp;self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.RChunks.html" title="struct core::slice::iter::RChunks">RChunks</a>&lt;'_, T&gt;</h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the end
+of the slice.</p>
+<p>The chunks are slices and do not overlap. If <code>chunk_size</code> does not divide the length of the
+slice, then the last chunk will not have length <code>chunk_size</code>.</p>
+<p>See <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.rchunks_exact"><code>rchunks_exact</code></a> for a variant of this iterator that returns chunks of always exactly
+<code>chunk_size</code> elements, and <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.chunks"><code>chunks</code></a> for the same iterator but starting at the beginning
+of the slice.</p>
+<h5 id="panics-16"><a href="#panics-16">Panics</a></h5>
+<p>Panics if <code>chunk_size</code> is 0.</p>
+<h5 id="examples-60"><a href="#examples-60">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.rchunks(<span class="number">2</span>);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;l&#39;</span>]);
+<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rchunks_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1338">source</a></span><h4 class="code-header">pub fn <a href="#method.rchunks_mut" class="fnname">rchunks_mut</a>(&amp;mut self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.RChunksMut.html" title="struct core::slice::iter::RChunksMut">RChunksMut</a>&lt;'_, T&gt;</h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the end
+of the slice.</p>
+<p>The chunks are mutable slices, and do not overlap. If <code>chunk_size</code> does not divide the
+length of the slice, then the last chunk will not have length <code>chunk_size</code>.</p>
+<p>See <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.rchunks_exact_mut"><code>rchunks_exact_mut</code></a> for a variant of this iterator that returns chunks of always
+exactly <code>chunk_size</code> elements, and <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.chunks_mut"><code>chunks_mut</code></a> for the same iterator but starting at the
+beginning of the slice.</p>
+<h5 id="panics-17"><a href="#panics-17">Panics</a></h5>
+<p>Panics if <code>chunk_size</code> is 0.</p>
+<h5 id="examples-61"><a href="#examples-61">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&amp;mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>;
+
+<span class="kw">for </span>chunk <span class="kw">in </span>v.rchunks_mut(<span class="number">2</span>) {
+ <span class="kw">for </span>elem <span class="kw">in </span>chunk.iter_mut() {
+ <span class="kw-2">*</span>elem += count;
+ }
+ count += <span class="number">1</span>;
+}
+<span class="macro">assert_eq!</span>(v, <span class="kw-2">&amp;</span>[<span class="number">3</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">1</span>, <span class="number">1</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rchunks_exact" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1377">source</a></span><h4 class="code-header">pub fn <a href="#method.rchunks_exact" class="fnname">rchunks_exact</a>(&amp;self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.RChunksExact.html" title="struct core::slice::iter::RChunksExact">RChunksExact</a>&lt;'_, T&gt;</h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the
+end of the slice.</p>
+<p>The chunks are slices and do not overlap. If <code>chunk_size</code> does not divide the length of the
+slice, then the last up to <code>chunk_size-1</code> elements will be omitted and can be retrieved
+from the <code>remainder</code> function of the iterator.</p>
+<p>Due to each chunk having exactly <code>chunk_size</code> elements, the compiler can often optimize the
+resulting code better than in the case of <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.rchunks"><code>rchunks</code></a>.</p>
+<p>See <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.rchunks"><code>rchunks</code></a> for a variant of this iterator that also returns the remainder as a smaller
+chunk, and <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.chunks_exact"><code>chunks_exact</code></a> for the same iterator but starting at the beginning of the
+slice.</p>
+<h5 id="panics-18"><a href="#panics-18">Panics</a></h5>
+<p>Panics if <code>chunk_size</code> is 0.</p>
+<h5 id="examples-62"><a href="#examples-62">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">&#39;l&#39;</span>, <span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.rchunks_exact(<span class="number">2</span>);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;e&#39;</span>, <span class="string">&#39;m&#39;</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="string">&#39;o&#39;</span>, <span class="string">&#39;r&#39;</span>]);
+<span class="macro">assert!</span>(iter.next().is_none());
+<span class="macro">assert_eq!</span>(iter.remainder(), <span class="kw-2">&amp;</span>[<span class="string">&#39;l&#39;</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rchunks_exact_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1420">source</a></span><h4 class="code-header">pub fn <a href="#method.rchunks_exact_mut" class="fnname">rchunks_exact_mut</a>(&amp;mut self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.RChunksExactMut.html" title="struct core::slice::iter::RChunksExactMut">RChunksExactMut</a>&lt;'_, T&gt;</h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the end
+of the slice.</p>
+<p>The chunks are mutable slices, and do not overlap. If <code>chunk_size</code> does not divide the
+length of the slice, then the last up to <code>chunk_size-1</code> elements will be omitted and can be
+retrieved from the <code>into_remainder</code> function of the iterator.</p>
+<p>Due to each chunk having exactly <code>chunk_size</code> elements, the compiler can often optimize the
+resulting code better than in the case of <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.chunks_mut"><code>chunks_mut</code></a>.</p>
+<p>See <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.rchunks_mut"><code>rchunks_mut</code></a> for a variant of this iterator that also returns the remainder as a
+smaller chunk, and <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.chunks_exact_mut"><code>chunks_exact_mut</code></a> for the same iterator but starting at the beginning
+of the slice.</p>
+<h5 id="panics-19"><a href="#panics-19">Panics</a></h5>
+<p>Panics if <code>chunk_size</code> is 0.</p>
+<h5 id="examples-63"><a href="#examples-63">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&amp;mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>;
+
+<span class="kw">for </span>chunk <span class="kw">in </span>v.rchunks_exact_mut(<span class="number">2</span>) {
+ <span class="kw">for </span>elem <span class="kw">in </span>chunk.iter_mut() {
+ <span class="kw-2">*</span>elem += count;
+ }
+ count += <span class="number">1</span>;
+}
+<span class="macro">assert_eq!</span>(v, <span class="kw-2">&amp;</span>[<span class="number">0</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">1</span>, <span class="number">1</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.group_by" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1463-1465">source</a><h4 class="code-header">pub fn <a href="#method.group_by" class="fnname">group_by</a>&lt;F&gt;(&amp;self, pred: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.GroupBy.html" title="struct core::slice::iter::GroupBy">GroupBy</a>&lt;'_, T, F&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_group_by</code>)</span></div></span></summary><div class="docblock"><p>Returns an iterator over the slice producing non-overlapping runs
+of elements using the predicate to separate them.</p>
+<p>The predicate is called on two elements following themselves,
+it means the predicate is called on <code>slice[0]</code> and <code>slice[1]</code>
+then on <code>slice[1]</code> and <code>slice[2]</code> and so on.</p>
+<h5 id="examples-64"><a href="#examples-64">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_group_by)]
+
+</span><span class="kw">let </span>slice = <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">3</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">2</span>];
+
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.group_by(|a, b| a == b);
+
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>][..]));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span>[<span class="number">3</span>, <span class="number">3</span>][..]));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span>[<span class="number">2</span>, <span class="number">2</span>, <span class="number">2</span>][..]));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div>
+<p>This method can be used to extract the sorted subslices:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_group_by)]
+
+</span><span class="kw">let </span>slice = <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>];
+
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.group_by(|a, b| a &lt;= b);
+
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>][..]));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span>[<span class="number">2</span>, <span class="number">3</span>][..]));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span>[<span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>][..]));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.group_by_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1508-1510">source</a><h4 class="code-header">pub fn <a href="#method.group_by_mut" class="fnname">group_by_mut</a>&lt;F&gt;(&amp;mut self, pred: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.GroupByMut.html" title="struct core::slice::iter::GroupByMut">GroupByMut</a>&lt;'_, T, F&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_group_by</code>)</span></div></span></summary><div class="docblock"><p>Returns an iterator over the slice producing non-overlapping mutable
+runs of elements using the predicate to separate them.</p>
+<p>The predicate is called on two elements following themselves,
+it means the predicate is called on <code>slice[0]</code> and <code>slice[1]</code>
+then on <code>slice[1]</code> and <code>slice[2]</code> and so on.</p>
+<h5 id="examples-65"><a href="#examples-65">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_group_by)]
+
+</span><span class="kw">let </span>slice = <span class="kw-2">&amp;mut </span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">3</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">2</span>];
+
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.group_by_mut(|a, b| a == b);
+
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;mut </span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>][..]));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;mut </span>[<span class="number">3</span>, <span class="number">3</span>][..]));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;mut </span>[<span class="number">2</span>, <span class="number">2</span>, <span class="number">2</span>][..]));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div>
+<p>This method can be used to extract the sorted subslices:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_group_by)]
+
+</span><span class="kw">let </span>slice = <span class="kw-2">&amp;mut </span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>];
+
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.group_by_mut(|a, b| a &lt;= b);
+
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;mut </span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>][..]));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;mut </span>[<span class="number">2</span>, <span class="number">3</span>][..]));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;mut </span>[<span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>][..]));
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_at" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1553">source</a></span><h4 class="code-header">pub fn <a href="#method.split_at" class="fnname">split_at</a>(&amp;self, mid: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; (&amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Divides one slice into two at an index.</p>
+<p>The first will contain all indices from <code>[0, mid)</code> (excluding
+the index <code>mid</code> itself) and the second will contain all
+indices from <code>[mid, len)</code> (excluding the index <code>len</code> itself).</p>
+<h5 id="panics-20"><a href="#panics-20">Panics</a></h5>
+<p>Panics if <code>mid &gt; len</code>.</p>
+<h5 id="examples-66"><a href="#examples-66">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>];
+
+{
+ <span class="kw">let </span>(left, right) = v.split_at(<span class="number">0</span>);
+ <span class="macro">assert_eq!</span>(left, []);
+ <span class="macro">assert_eq!</span>(right, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+}
+
+{
+ <span class="kw">let </span>(left, right) = v.split_at(<span class="number">2</span>);
+ <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>]);
+ <span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+}
+
+{
+ <span class="kw">let </span>(left, right) = v.split_at(<span class="number">6</span>);
+ <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+ <span class="macro">assert_eq!</span>(right, []);
+}</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_at_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1586">source</a></span><h4 class="code-header">pub fn <a href="#method.split_at_mut" class="fnname">split_at_mut</a>(&amp;mut self, mid: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; (&amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, &amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Divides one mutable slice into two at an index.</p>
+<p>The first will contain all indices from <code>[0, mid)</code> (excluding
+the index <code>mid</code> itself) and the second will contain all
+indices from <code>[mid, len)</code> (excluding the index <code>len</code> itself).</p>
+<h5 id="panics-21"><a href="#panics-21">Panics</a></h5>
+<p>Panics if <code>mid &gt; len</code>.</p>
+<h5 id="examples-67"><a href="#examples-67">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">1</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>];
+<span class="kw">let </span>(left, right) = v.split_at_mut(<span class="number">2</span>);
+<span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">0</span>]);
+<span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>]);
+left[<span class="number">1</span>] = <span class="number">2</span>;
+right[<span class="number">1</span>] = <span class="number">4</span>;
+<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_at_unchecked" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1639">source</a><h4 class="code-header">pub unsafe fn <a href="#method.split_at_unchecked" class="fnname">split_at_unchecked</a>(&amp;self, mid: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; (&amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_split_at_unchecked</code>)</span></div></span></summary><div class="docblock"><p>Divides one slice into two at an index, without doing bounds checking.</p>
+<p>The first will contain all indices from <code>[0, mid)</code> (excluding
+the index <code>mid</code> itself) and the second will contain all
+indices from <code>[mid, len)</code> (excluding the index <code>len</code> itself).</p>
+<p>For a safe alternative see <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_at"><code>split_at</code></a>.</p>
+<h5 id="safety-5"><a href="#safety-5">Safety</a></h5>
+<p>Calling this method with an out-of-bounds index is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em>
+even if the resulting reference is not used. The caller has to ensure that
+<code>0 &lt;= mid &lt;= self.len()</code>.</p>
+<h5 id="examples-68"><a href="#examples-68">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_split_at_unchecked)]
+
+</span><span class="kw">let </span>v = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>];
+
+<span class="kw">unsafe </span>{
+ <span class="kw">let </span>(left, right) = v.split_at_unchecked(<span class="number">0</span>);
+ <span class="macro">assert_eq!</span>(left, []);
+ <span class="macro">assert_eq!</span>(right, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+}
+
+<span class="kw">unsafe </span>{
+ <span class="kw">let </span>(left, right) = v.split_at_unchecked(<span class="number">2</span>);
+ <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>]);
+ <span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+}
+
+<span class="kw">unsafe </span>{
+ <span class="kw">let </span>(left, right) = v.split_at_unchecked(<span class="number">6</span>);
+ <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+ <span class="macro">assert_eq!</span>(right, []);
+}</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_at_mut_unchecked" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1688">source</a><h4 class="code-header">pub unsafe fn <a href="#method.split_at_mut_unchecked" class="fnname">split_at_mut_unchecked</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;mid: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -&gt; (&amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, &amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_split_at_unchecked</code>)</span></div></span></summary><div class="docblock"><p>Divides one mutable slice into two at an index, without doing bounds checking.</p>
+<p>The first will contain all indices from <code>[0, mid)</code> (excluding
+the index <code>mid</code> itself) and the second will contain all
+indices from <code>[mid, len)</code> (excluding the index <code>len</code> itself).</p>
+<p>For a safe alternative see <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_at_mut"><code>split_at_mut</code></a>.</p>
+<h5 id="safety-6"><a href="#safety-6">Safety</a></h5>
+<p>Calling this method with an out-of-bounds index is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em>
+even if the resulting reference is not used. The caller has to ensure that
+<code>0 &lt;= mid &lt;= self.len()</code>.</p>
+<h5 id="examples-69"><a href="#examples-69">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_split_at_unchecked)]
+
+</span><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">1</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>];
+<span class="comment">// scoped to restrict the lifetime of the borrows
+</span><span class="kw">unsafe </span>{
+ <span class="kw">let </span>(left, right) = v.split_at_mut_unchecked(<span class="number">2</span>);
+ <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">0</span>]);
+ <span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>]);
+ left[<span class="number">1</span>] = <span class="number">2</span>;
+ right[<span class="number">1</span>] = <span class="number">4</span>;
+}
+<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_array_ref" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1744">source</a><h4 class="code-header">pub fn <a href="#method.split_array_ref" class="fnname">split_array_ref</a>&lt;const N:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(&amp;self) -&gt; (&amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[T; N]</a>, &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>split_array</code>)</span></div></span></summary><div class="docblock"><p>Divides one slice into an array and a remainder slice at an index.</p>
+<p>The array will contain all indices from <code>[0, N)</code> (excluding
+the index <code>N</code> itself) and the slice will contain all
+indices from <code>[N, len)</code> (excluding the index <code>len</code> itself).</p>
+<h5 id="panics-22"><a href="#panics-22">Panics</a></h5>
+<p>Panics if <code>N &gt; len</code>.</p>
+<h5 id="examples-70"><a href="#examples-70">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(split_array)]
+
+</span><span class="kw">let </span>v = <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>][..];
+
+{
+ <span class="kw">let </span>(left, right) = v.split_array_ref::&lt;<span class="number">0</span>&gt;();
+ <span class="macro">assert_eq!</span>(left, <span class="kw-2">&amp;</span>[]);
+ <span class="macro">assert_eq!</span>(right, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+}
+
+{
+ <span class="kw">let </span>(left, right) = v.split_array_ref::&lt;<span class="number">2</span>&gt;();
+ <span class="macro">assert_eq!</span>(left, <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>]);
+ <span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+}
+
+{
+ <span class="kw">let </span>(left, right) = v.split_array_ref::&lt;<span class="number">6</span>&gt;();
+ <span class="macro">assert_eq!</span>(left, <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+ <span class="macro">assert_eq!</span>(right, []);
+}</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_array_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1777">source</a><h4 class="code-header">pub fn <a href="#method.split_array_mut" class="fnname">split_array_mut</a>&lt;const N:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(&amp;mut self) -&gt; (&amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[T; N]</a>, &amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>split_array</code>)</span></div></span></summary><div class="docblock"><p>Divides one mutable slice into an array and a remainder slice at an index.</p>
+<p>The array will contain all indices from <code>[0, N)</code> (excluding
+the index <code>N</code> itself) and the slice will contain all
+indices from <code>[N, len)</code> (excluding the index <code>len</code> itself).</p>
+<h5 id="panics-23"><a href="#panics-23">Panics</a></h5>
+<p>Panics if <code>N &gt; len</code>.</p>
+<h5 id="examples-71"><a href="#examples-71">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(split_array)]
+
+</span><span class="kw">let </span><span class="kw-2">mut </span>v = <span class="kw-2">&amp;mut </span>[<span class="number">1</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>][..];
+<span class="kw">let </span>(left, right) = v.split_array_mut::&lt;<span class="number">2</span>&gt;();
+<span class="macro">assert_eq!</span>(left, <span class="kw-2">&amp;mut </span>[<span class="number">1</span>, <span class="number">0</span>]);
+<span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>]);
+left[<span class="number">1</span>] = <span class="number">2</span>;
+right[<span class="number">1</span>] = <span class="number">4</span>;
+<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rsplit_array_ref" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1822">source</a><h4 class="code-header">pub fn <a href="#method.rsplit_array_ref" class="fnname">rsplit_array_ref</a>&lt;const N:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(&amp;self) -&gt; (&amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[T; N]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>split_array</code>)</span></div></span></summary><div class="docblock"><p>Divides one slice into an array and a remainder slice at an index from
+the end.</p>
+<p>The slice will contain all indices from <code>[0, len - N)</code> (excluding
+the index <code>len - N</code> itself) and the array will contain all
+indices from <code>[len - N, len)</code> (excluding the index <code>len</code> itself).</p>
+<h5 id="panics-24"><a href="#panics-24">Panics</a></h5>
+<p>Panics if <code>N &gt; len</code>.</p>
+<h5 id="examples-72"><a href="#examples-72">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(split_array)]
+
+</span><span class="kw">let </span>v = <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>][..];
+
+{
+ <span class="kw">let </span>(left, right) = v.rsplit_array_ref::&lt;<span class="number">0</span>&gt;();
+ <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+ <span class="macro">assert_eq!</span>(right, <span class="kw-2">&amp;</span>[]);
+}
+
+{
+ <span class="kw">let </span>(left, right) = v.rsplit_array_ref::&lt;<span class="number">2</span>&gt;();
+ <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);
+ <span class="macro">assert_eq!</span>(right, <span class="kw-2">&amp;</span>[<span class="number">5</span>, <span class="number">6</span>]);
+}
+
+{
+ <span class="kw">let </span>(left, right) = v.rsplit_array_ref::&lt;<span class="number">6</span>&gt;();
+ <span class="macro">assert_eq!</span>(left, []);
+ <span class="macro">assert_eq!</span>(right, <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+}</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rsplit_array_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1856">source</a><h4 class="code-header">pub fn <a href="#method.rsplit_array_mut" class="fnname">rsplit_array_mut</a>&lt;const N:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(&amp;mut self) -&gt; (&amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, &amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[T; N]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>split_array</code>)</span></div></span></summary><div class="docblock"><p>Divides one mutable slice into an array and a remainder slice at an
+index from the end.</p>
+<p>The slice will contain all indices from <code>[0, len - N)</code> (excluding
+the index <code>N</code> itself) and the array will contain all
+indices from <code>[len - N, len)</code> (excluding the index <code>len</code> itself).</p>
+<h5 id="panics-25"><a href="#panics-25">Panics</a></h5>
+<p>Panics if <code>N &gt; len</code>.</p>
+<h5 id="examples-73"><a href="#examples-73">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(split_array)]
+
+</span><span class="kw">let </span><span class="kw-2">mut </span>v = <span class="kw-2">&amp;mut </span>[<span class="number">1</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>][..];
+<span class="kw">let </span>(left, right) = v.rsplit_array_mut::&lt;<span class="number">4</span>&gt;();
+<span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">0</span>]);
+<span class="macro">assert_eq!</span>(right, <span class="kw-2">&amp;mut </span>[<span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>]);
+left[<span class="number">1</span>] = <span class="number">2</span>;
+right[<span class="number">1</span>] = <span class="number">4</span>;
+<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split-1" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1905-1907">source</a></span><h4 class="code-header">pub fn <a href="#method.split-1" class="fnname">split</a>&lt;F&gt;(&amp;self, pred: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.Split.html" title="struct core::slice::iter::Split">Split</a>&lt;'_, T, F&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match
+<code>pred</code>. The matched element is not contained in the subslices.</p>
+<h5 id="examples-74"><a href="#examples-74">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>, <span class="number">20</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split(|num| num % <span class="number">3 </span>== <span class="number">0</span>);
+
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">20</span>]);
+<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
+<p>If the first element is matched, an empty slice will be the first item
+returned by the iterator. Similarly, if the last element in the slice
+is matched, an empty slice will be the last item returned by the
+iterator:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split(|num| num % <span class="number">3 </span>== <span class="number">0</span>);
+
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[]);
+<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
+<p>If two matched elements are directly adjacent, an empty slice will be
+present between them:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">10</span>, <span class="number">6</span>, <span class="number">33</span>, <span class="number">20</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split(|num| num % <span class="number">3 </span>== <span class="number">0</span>);
+
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">10</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">20</span>]);
+<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1927-1929">source</a></span><h4 class="code-header">pub fn <a href="#method.split_mut" class="fnname">split_mut</a>&lt;F&gt;(&amp;mut self, pred: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.SplitMut.html" title="struct core::slice::iter::SplitMut">SplitMut</a>&lt;'_, T, F&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over mutable subslices separated by elements that
+match <code>pred</code>. The matched element is not contained in the subslices.</p>
+<h5 id="examples-75"><a href="#examples-75">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>];
+
+<span class="kw">for </span>group <span class="kw">in </span>v.split_mut(|num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) {
+ group[<span class="number">0</span>] = <span class="number">1</span>;
+}
+<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">1</span>, <span class="number">60</span>, <span class="number">1</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_inclusive" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1963-1965">source</a></span><h4 class="code-header">pub fn <a href="#method.split_inclusive" class="fnname">split_inclusive</a>&lt;F&gt;(&amp;self, pred: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.SplitInclusive.html" title="struct core::slice::iter::SplitInclusive">SplitInclusive</a>&lt;'_, T, F&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match
+<code>pred</code>. The matched element is contained in the end of the previous
+subslice as a terminator.</p>
+<h5 id="examples-76"><a href="#examples-76">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>, <span class="number">20</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split_inclusive(|num| num % <span class="number">3 </span>== <span class="number">0</span>);
+
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">20</span>]);
+<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
+<p>If the last element of the slice is matched,
+that element will be considered the terminator of the preceding slice.
+That slice will be the last item returned by the iterator.</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">3</span>, <span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split_inclusive(|num| num % <span class="number">3 </span>== <span class="number">0</span>);
+
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">3</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>]);
+<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_inclusive_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#1987-1989">source</a></span><h4 class="code-header">pub fn <a href="#method.split_inclusive_mut" class="fnname">split_inclusive_mut</a>&lt;F&gt;(&amp;mut self, pred: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.SplitInclusiveMut.html" title="struct core::slice::iter::SplitInclusiveMut">SplitInclusiveMut</a>&lt;'_, T, F&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over mutable subslices separated by elements that
+match <code>pred</code>. The matched element is contained in the previous
+subslice as a terminator.</p>
+<h5 id="examples-77"><a href="#examples-77">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>];
+
+<span class="kw">for </span>group <span class="kw">in </span>v.split_inclusive_mut(|num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) {
+ <span class="kw">let </span>terminator_idx = group.len()-<span class="number">1</span>;
+ group[terminator_idx] = <span class="number">1</span>;
+}
+<span class="macro">assert_eq!</span>(v, [<span class="number">10</span>, <span class="number">40</span>, <span class="number">1</span>, <span class="number">20</span>, <span class="number">1</span>, <span class="number">1</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rsplit" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.27.0">1.27.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2023-2025">source</a></span><h4 class="code-header">pub fn <a href="#method.rsplit" class="fnname">rsplit</a>&lt;F&gt;(&amp;self, pred: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.RSplit.html" title="struct core::slice::iter::RSplit">RSplit</a>&lt;'_, T, F&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match
+<code>pred</code>, starting at the end of the slice and working backwards.
+The matched element is not contained in the subslices.</p>
+<h5 id="examples-78"><a href="#examples-78">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">11</span>, <span class="number">22</span>, <span class="number">33</span>, <span class="number">0</span>, <span class="number">44</span>, <span class="number">55</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.rsplit(|num| <span class="kw-2">*</span>num == <span class="number">0</span>);
+
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">44</span>, <span class="number">55</span>]);
+<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">11</span>, <span class="number">22</span>, <span class="number">33</span>]);
+<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div>
+<p>As with <code>split()</code>, if the first or last element is matched, an empty
+slice will be the first (or last) item returned by the iterator.</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&amp;</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>it = v.rsplit(|n| <span class="kw-2">*</span>n % <span class="number">2 </span>== <span class="number">0</span>);
+<span class="macro">assert_eq!</span>(it.next().unwrap(), <span class="kw-2">&amp;</span>[]);
+<span class="macro">assert_eq!</span>(it.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">3</span>, <span class="number">5</span>]);
+<span class="macro">assert_eq!</span>(it.next().unwrap(), <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">1</span>]);
+<span class="macro">assert_eq!</span>(it.next().unwrap(), <span class="kw-2">&amp;</span>[]);
+<span class="macro">assert_eq!</span>(it.next(), <span class="prelude-val">None</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rsplit_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.27.0">1.27.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2049-2051">source</a></span><h4 class="code-header">pub fn <a href="#method.rsplit_mut" class="fnname">rsplit_mut</a>&lt;F&gt;(&amp;mut self, pred: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.RSplitMut.html" title="struct core::slice::iter::RSplitMut">RSplitMut</a>&lt;'_, T, F&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over mutable subslices separated by elements that
+match <code>pred</code>, starting at the end of the slice and working
+backwards. The matched element is not contained in the subslices.</p>
+<h5 id="examples-79"><a href="#examples-79">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">100</span>, <span class="number">400</span>, <span class="number">300</span>, <span class="number">200</span>, <span class="number">600</span>, <span class="number">500</span>];
+
+<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">0</span>;
+<span class="kw">for </span>group <span class="kw">in </span>v.rsplit_mut(|num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) {
+ count += <span class="number">1</span>;
+ group[<span class="number">0</span>] = count;
+}
+<span class="macro">assert_eq!</span>(v, [<span class="number">3</span>, <span class="number">400</span>, <span class="number">300</span>, <span class="number">2</span>, <span class="number">600</span>, <span class="number">1</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.splitn" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2077-2079">source</a></span><h4 class="code-header">pub fn <a href="#method.splitn" class="fnname">splitn</a>&lt;F&gt;(&amp;self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, pred: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.SplitN.html" title="struct core::slice::iter::SplitN">SplitN</a>&lt;'_, T, F&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match
+<code>pred</code>, limited to returning at most <code>n</code> items. The matched element is
+not contained in the subslices.</p>
+<p>The last element returned, if any, will contain the remainder of the
+slice.</p>
+<h5 id="examples-80"><a href="#examples-80">Examples</a></h5>
+<p>Print the slice split once by numbers divisible by 3 (i.e., <code>[10, 40]</code>,
+<code>[20, 60, 50]</code>):</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>];
+
+<span class="kw">for </span>group <span class="kw">in </span>v.splitn(<span class="number">2</span>, |num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) {
+ <span class="macro">println!</span>(<span class="string">&quot;{group:?}&quot;</span>);
+}</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.splitn_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2103-2105">source</a></span><h4 class="code-header">pub fn <a href="#method.splitn_mut" class="fnname">splitn_mut</a>&lt;F&gt;(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, pred: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.SplitNMut.html" title="struct core::slice::iter::SplitNMut">SplitNMut</a>&lt;'_, T, F&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over mutable subslices separated by elements that match
+<code>pred</code>, limited to returning at most <code>n</code> items. The matched element is
+not contained in the subslices.</p>
+<p>The last element returned, if any, will contain the remainder of the
+slice.</p>
+<h5 id="examples-81"><a href="#examples-81">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>];
+
+<span class="kw">for </span>group <span class="kw">in </span>v.splitn_mut(<span class="number">2</span>, |num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) {
+ group[<span class="number">0</span>] = <span class="number">1</span>;
+}
+<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">1</span>, <span class="number">60</span>, <span class="number">50</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rsplitn" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2132-2134">source</a></span><h4 class="code-header">pub fn <a href="#method.rsplitn" class="fnname">rsplitn</a>&lt;F&gt;(&amp;self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, pred: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.RSplitN.html" title="struct core::slice::iter::RSplitN">RSplitN</a>&lt;'_, T, F&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match
+<code>pred</code> limited to returning at most <code>n</code> items. This starts at the end of
+the slice and works backwards. The matched element is not contained in
+the subslices.</p>
+<p>The last element returned, if any, will contain the remainder of the
+slice.</p>
+<h5 id="examples-82"><a href="#examples-82">Examples</a></h5>
+<p>Print the slice split once, starting from the end, by numbers divisible
+by 3 (i.e., <code>[50]</code>, <code>[10, 40, 30, 20]</code>):</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>];
+
+<span class="kw">for </span>group <span class="kw">in </span>v.rsplitn(<span class="number">2</span>, |num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) {
+ <span class="macro">println!</span>(<span class="string">&quot;{group:?}&quot;</span>);
+}</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rsplitn_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2159-2161">source</a></span><h4 class="code-header">pub fn <a href="#method.rsplitn_mut" class="fnname">rsplitn_mut</a>&lt;F&gt;(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, pred: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.RSplitNMut.html" title="struct core::slice::iter::RSplitNMut">RSplitNMut</a>&lt;'_, T, F&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match
+<code>pred</code> limited to returning at most <code>n</code> items. This starts at the end of
+the slice and works backwards. The matched element is not contained in
+the subslices.</p>
+<p>The last element returned, if any, will contain the remainder of the
+slice.</p>
+<h5 id="examples-83"><a href="#examples-83">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>s = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>];
+
+<span class="kw">for </span>group <span class="kw">in </span>s.rsplitn_mut(<span class="number">2</span>, |num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) {
+ group[<span class="number">0</span>] = <span class="number">1</span>;
+}
+<span class="macro">assert_eq!</span>(s, [<span class="number">1</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">1</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.contains" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2194-2196">source</a></span><h4 class="code-header">pub fn <a href="#method.contains" class="fnname">contains</a>(&amp;self, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;T&gt;,</span></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if the slice contains an element with the given value.</p>
+<p>This operation is <em>O</em>(<em>n</em>).</p>
+<p>Note that if you have a sorted slice, <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.binary_search"><code>binary_search</code></a> may be faster.</p>
+<h5 id="examples-84"><a href="#examples-84">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="macro">assert!</span>(v.contains(<span class="kw-2">&amp;</span><span class="number">30</span>));
+<span class="macro">assert!</span>(!v.contains(<span class="kw-2">&amp;</span><span class="number">50</span>));</code></pre></div>
+<p>If you do not have a <code>&amp;T</code>, but some other value that you can compare
+with one (for example, <code>String</code> implements <code>PartialEq&lt;str&gt;</code>), you can
+use <code>iter().any</code>:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [String::from(<span class="string">&quot;hello&quot;</span>), String::from(<span class="string">&quot;world&quot;</span>)]; <span class="comment">// slice of `String`
+</span><span class="macro">assert!</span>(v.iter().any(|e| e == <span class="string">&quot;hello&quot;</span>)); <span class="comment">// search with `&amp;str`
+</span><span class="macro">assert!</span>(!v.iter().any(|e| e == <span class="string">&quot;hi&quot;</span>));</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.starts_with" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2223-2225">source</a></span><h4 class="code-header">pub fn <a href="#method.starts_with" class="fnname">starts_with</a>(&amp;self, needle: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;T&gt;,</span></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if <code>needle</code> is a prefix of the slice.</p>
+<h5 id="examples-85"><a href="#examples-85">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="macro">assert!</span>(v.starts_with(<span class="kw-2">&amp;</span>[<span class="number">10</span>]));
+<span class="macro">assert!</span>(v.starts_with(<span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>]));
+<span class="macro">assert!</span>(!v.starts_with(<span class="kw-2">&amp;</span>[<span class="number">50</span>]));
+<span class="macro">assert!</span>(!v.starts_with(<span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">50</span>]));</code></pre></div>
+<p>Always returns <code>true</code> if <code>needle</code> is an empty slice:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="macro">assert!</span>(v.starts_with(<span class="kw-2">&amp;</span>[]));
+<span class="kw">let </span>v: <span class="kw-2">&amp;</span>[u8] = <span class="kw-2">&amp;</span>[];
+<span class="macro">assert!</span>(v.starts_with(<span class="kw-2">&amp;</span>[]));</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ends_with" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2253-2255">source</a></span><h4 class="code-header">pub fn <a href="#method.ends_with" class="fnname">ends_with</a>(&amp;self, needle: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;T&gt;,</span></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if <code>needle</code> is a suffix of the slice.</p>
+<h5 id="examples-86"><a href="#examples-86">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="macro">assert!</span>(v.ends_with(<span class="kw-2">&amp;</span>[<span class="number">30</span>]));
+<span class="macro">assert!</span>(v.ends_with(<span class="kw-2">&amp;</span>[<span class="number">40</span>, <span class="number">30</span>]));
+<span class="macro">assert!</span>(!v.ends_with(<span class="kw-2">&amp;</span>[<span class="number">50</span>]));
+<span class="macro">assert!</span>(!v.ends_with(<span class="kw-2">&amp;</span>[<span class="number">50</span>, <span class="number">30</span>]));</code></pre></div>
+<p>Always returns <code>true</code> if <code>needle</code> is an empty slice:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="macro">assert!</span>(v.ends_with(<span class="kw-2">&amp;</span>[]));
+<span class="kw">let </span>v: <span class="kw-2">&amp;</span>[u8] = <span class="kw-2">&amp;</span>[];
+<span class="macro">assert!</span>(v.ends_with(<span class="kw-2">&amp;</span>[]));</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.strip_prefix" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2283-2285">source</a></span><h4 class="code-header">pub fn <a href="#method.strip_prefix" class="fnname">strip_prefix</a>&lt;P&gt;(&amp;self, prefix: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>P) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/slice/trait.SlicePattern.html" title="trait core::slice::SlicePattern">SlicePattern</a>&lt;Item = T&gt; + ?<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;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;T&gt;,</span></h4></section></summary><div class="docblock"><p>Returns a subslice with the prefix removed.</p>
+<p>If the slice starts with <code>prefix</code>, returns the subslice after the prefix, wrapped in <code>Some</code>.
+If <code>prefix</code> is empty, simply returns the original slice.</p>
+<p>If the slice does not start with <code>prefix</code>, returns <code>None</code>.</p>
+<h5 id="examples-87"><a href="#examples-87">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="macro">assert_eq!</span>(v.strip_prefix(<span class="kw-2">&amp;</span>[<span class="number">10</span>]), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span>[<span class="number">40</span>, <span class="number">30</span>][..]));
+<span class="macro">assert_eq!</span>(v.strip_prefix(<span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>]), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span>[<span class="number">30</span>][..]));
+<span class="macro">assert_eq!</span>(v.strip_prefix(<span class="kw-2">&amp;</span>[<span class="number">50</span>]), <span class="prelude-val">None</span>);
+<span class="macro">assert_eq!</span>(v.strip_prefix(<span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">50</span>]), <span class="prelude-val">None</span>);
+
+<span class="kw">let </span>prefix : <span class="kw-2">&amp;</span>str = <span class="string">&quot;he&quot;</span>;
+<span class="macro">assert_eq!</span>(<span class="string">b&quot;hello&quot;</span>.strip_prefix(prefix.as_bytes()),
+ <span class="prelude-val">Some</span>(<span class="string">b&quot;llo&quot;</span>.as_ref()));</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.strip_suffix" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2317-2319">source</a></span><h4 class="code-header">pub fn <a href="#method.strip_suffix" class="fnname">strip_suffix</a>&lt;P&gt;(&amp;self, suffix: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>P) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/slice/trait.SlicePattern.html" title="trait core::slice::SlicePattern">SlicePattern</a>&lt;Item = T&gt; + ?<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;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;T&gt;,</span></h4></section></summary><div class="docblock"><p>Returns a subslice with the suffix removed.</p>
+<p>If the slice ends with <code>suffix</code>, returns the subslice before the suffix, wrapped in <code>Some</code>.
+If <code>suffix</code> is empty, simply returns the original slice.</p>
+<p>If the slice does not end with <code>suffix</code>, returns <code>None</code>.</p>
+<h5 id="examples-88"><a href="#examples-88">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="macro">assert_eq!</span>(v.strip_suffix(<span class="kw-2">&amp;</span>[<span class="number">30</span>]), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span>[<span class="number">10</span>, <span class="number">40</span>][..]));
+<span class="macro">assert_eq!</span>(v.strip_suffix(<span class="kw-2">&amp;</span>[<span class="number">40</span>, <span class="number">30</span>]), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span>[<span class="number">10</span>][..]));
+<span class="macro">assert_eq!</span>(v.strip_suffix(<span class="kw-2">&amp;</span>[<span class="number">50</span>]), <span class="prelude-val">None</span>);
+<span class="macro">assert_eq!</span>(v.strip_suffix(<span class="kw-2">&amp;</span>[<span class="number">50</span>, <span class="number">30</span>]), <span class="prelude-val">None</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.binary_search" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2401-2403">source</a></span><h4 class="code-header">pub fn <a href="#method.binary_search" class="fnname">binary_search</a>(&amp;self, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Binary searches this slice for a given element.
+This behaves similarly to <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.contains"><code>contains</code></a> if this slice is sorted.</p>
+<p>If the value is found then <a href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html#variant.Ok" title="Result::Ok"><code>Result::Ok</code></a> is returned, containing the
+index of the matching element. If there are multiple matches, then any
+one of the matches could be returned. The index is chosen
+deterministically, but is subject to change in future versions of Rust.
+If the value is not found then <a href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html#variant.Err" title="Result::Err"><code>Result::Err</code></a> is returned, containing
+the index where a matching element could be inserted while maintaining
+sorted order.</p>
+<p>See also <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.binary_search_by"><code>binary_search_by</code></a>, <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.binary_search_by_key"><code>binary_search_by_key</code></a>, and <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.partition_point"><code>partition_point</code></a>.</p>
+<h5 id="examples-89"><a href="#examples-89">Examples</a></h5>
+<p>Looks up a series of four elements. The first is found, with a
+uniquely determined position; the second and third are not
+found; the fourth could match any position in <code>[1, 4]</code>.</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>];
+
+<span class="macro">assert_eq!</span>(s.binary_search(<span class="kw-2">&amp;</span><span class="number">13</span>), <span class="prelude-val">Ok</span>(<span class="number">9</span>));
+<span class="macro">assert_eq!</span>(s.binary_search(<span class="kw-2">&amp;</span><span class="number">4</span>), <span class="prelude-val">Err</span>(<span class="number">7</span>));
+<span class="macro">assert_eq!</span>(s.binary_search(<span class="kw-2">&amp;</span><span class="number">100</span>), <span class="prelude-val">Err</span>(<span class="number">13</span>));
+<span class="kw">let </span>r = s.binary_search(<span class="kw-2">&amp;</span><span class="number">1</span>);
+<span class="macro">assert!</span>(<span class="kw">match </span>r { <span class="prelude-val">Ok</span>(<span class="number">1</span>..=<span class="number">4</span>) =&gt; <span class="bool-val">true</span>, <span class="kw">_ </span>=&gt; <span class="bool-val">false</span>, });</code></pre></div>
+<p>If you want to find that whole <em>range</em> of matching items, rather than
+an arbitrary matching one, that can be done using <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.partition_point"><code>partition_point</code></a>:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>];
+
+<span class="kw">let </span>low = s.partition_point(|x| x &lt; <span class="kw-2">&amp;</span><span class="number">1</span>);
+<span class="macro">assert_eq!</span>(low, <span class="number">1</span>);
+<span class="kw">let </span>high = s.partition_point(|x| x &lt;= <span class="kw-2">&amp;</span><span class="number">1</span>);
+<span class="macro">assert_eq!</span>(high, <span class="number">5</span>);
+<span class="kw">let </span>r = s.binary_search(<span class="kw-2">&amp;</span><span class="number">1</span>);
+<span class="macro">assert!</span>((low..high).contains(<span class="kw-2">&amp;</span>r.unwrap()));
+
+<span class="macro">assert!</span>(s[..low].iter().all(|<span class="kw-2">&amp;</span>x| x &lt; <span class="number">1</span>));
+<span class="macro">assert!</span>(s[low..high].iter().all(|<span class="kw-2">&amp;</span>x| x == <span class="number">1</span>));
+<span class="macro">assert!</span>(s[high..].iter().all(|<span class="kw-2">&amp;</span>x| x &gt; <span class="number">1</span>));
+
+<span class="comment">// For something not found, the &quot;range&quot; of equal items is empty
+</span><span class="macro">assert_eq!</span>(s.partition_point(|x| x &lt; <span class="kw-2">&amp;</span><span class="number">11</span>), <span class="number">9</span>);
+<span class="macro">assert_eq!</span>(s.partition_point(|x| x &lt;= <span class="kw-2">&amp;</span><span class="number">11</span>), <span class="number">9</span>);
+<span class="macro">assert_eq!</span>(s.binary_search(<span class="kw-2">&amp;</span><span class="number">11</span>), <span class="prelude-val">Err</span>(<span class="number">9</span>));</code></pre></div>
+<p>If you want to insert an item to a sorted vector, while maintaining
+sort order, consider using <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.partition_point"><code>partition_point</code></a>:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>s = <span class="macro">vec!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>];
+<span class="kw">let </span>num = <span class="number">42</span>;
+<span class="kw">let </span>idx = s.partition_point(|<span class="kw-2">&amp;</span>x| x &lt; num);
+<span class="comment">// The above is equivalent to `let idx = s.binary_search(&amp;num).unwrap_or_else(|x| x);`
+</span>s.insert(idx, num);
+<span class="macro">assert_eq!</span>(s, [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">42</span>, <span class="number">55</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.binary_search_by" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2452-2454">source</a></span><h4 class="code-header">pub fn <a href="#method.binary_search_by" class="fnname">binary_search_by</a>&lt;'a, F&gt;(&amp;'a self, f: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>T) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</span></h4></section></summary><div class="docblock"><p>Binary searches this slice with a comparator function.
+This behaves similarly to <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.contains"><code>contains</code></a> if this slice is sorted.</p>
+<p>The comparator function should implement an order consistent
+with the sort order of the underlying slice, returning an
+order code that indicates whether its argument is <code>Less</code>,
+<code>Equal</code> or <code>Greater</code> the desired target.</p>
+<p>If the value is found then <a href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html#variant.Ok" title="Result::Ok"><code>Result::Ok</code></a> is returned, containing the
+index of the matching element. If there are multiple matches, then any
+one of the matches could be returned. The index is chosen
+deterministically, but is subject to change in future versions of Rust.
+If the value is not found then <a href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html#variant.Err" title="Result::Err"><code>Result::Err</code></a> is returned, containing
+the index where a matching element could be inserted while maintaining
+sorted order.</p>
+<p>See also <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.binary_search"><code>binary_search</code></a>, <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.binary_search_by_key"><code>binary_search_by_key</code></a>, and <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.partition_point"><code>partition_point</code></a>.</p>
+<h5 id="examples-90"><a href="#examples-90">Examples</a></h5>
+<p>Looks up a series of four elements. The first is found, with a
+uniquely determined position; the second and third are not
+found; the fourth could match any position in <code>[1, 4]</code>.</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>];
+
+<span class="kw">let </span>seek = <span class="number">13</span>;
+<span class="macro">assert_eq!</span>(s.binary_search_by(|probe| probe.cmp(<span class="kw-2">&amp;</span>seek)), <span class="prelude-val">Ok</span>(<span class="number">9</span>));
+<span class="kw">let </span>seek = <span class="number">4</span>;
+<span class="macro">assert_eq!</span>(s.binary_search_by(|probe| probe.cmp(<span class="kw-2">&amp;</span>seek)), <span class="prelude-val">Err</span>(<span class="number">7</span>));
+<span class="kw">let </span>seek = <span class="number">100</span>;
+<span class="macro">assert_eq!</span>(s.binary_search_by(|probe| probe.cmp(<span class="kw-2">&amp;</span>seek)), <span class="prelude-val">Err</span>(<span class="number">13</span>));
+<span class="kw">let </span>seek = <span class="number">1</span>;
+<span class="kw">let </span>r = s.binary_search_by(|probe| probe.cmp(<span class="kw-2">&amp;</span>seek));
+<span class="macro">assert!</span>(<span class="kw">match </span>r { <span class="prelude-val">Ok</span>(<span class="number">1</span>..=<span class="number">4</span>) =&gt; <span class="bool-val">true</span>, <span class="kw">_ </span>=&gt; <span class="bool-val">false</span>, });</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.binary_search_by_key" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.10.0">1.10.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2541-2544">source</a></span><h4 class="code-header">pub fn <a href="#method.binary_search_by_key" class="fnname">binary_search_by_key</a>&lt;'a, B, F&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;'a self,<br>&nbsp;&nbsp;&nbsp;&nbsp;b: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>B,<br>&nbsp;&nbsp;&nbsp;&nbsp;f: F<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>T) -&gt; B,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Binary searches this slice with a key extraction function.
+This behaves similarly to <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.contains"><code>contains</code></a> if this slice is sorted.</p>
+<p>Assumes that the slice is sorted by the key, for instance with
+<a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.sort_by_key"><code>sort_by_key</code></a> using the same key extraction function.</p>
+<p>If the value is found then <a href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html#variant.Ok" title="Result::Ok"><code>Result::Ok</code></a> is returned, containing the
+index of the matching element. If there are multiple matches, then any
+one of the matches could be returned. The index is chosen
+deterministically, but is subject to change in future versions of Rust.
+If the value is not found then <a href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html#variant.Err" title="Result::Err"><code>Result::Err</code></a> is returned, containing
+the index where a matching element could be inserted while maintaining
+sorted order.</p>
+<p>See also <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.binary_search"><code>binary_search</code></a>, <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.binary_search_by"><code>binary_search_by</code></a>, and <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.partition_point"><code>partition_point</code></a>.</p>
+<h5 id="examples-91"><a href="#examples-91">Examples</a></h5>
+<p>Looks up a series of four elements in a slice of pairs sorted by
+their second elements. The first is found, with a uniquely
+determined position; the second and third are not found; the
+fourth could match any position in <code>[1, 4]</code>.</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [(<span class="number">0</span>, <span class="number">0</span>), (<span class="number">2</span>, <span class="number">1</span>), (<span class="number">4</span>, <span class="number">1</span>), (<span class="number">5</span>, <span class="number">1</span>), (<span class="number">3</span>, <span class="number">1</span>),
+ (<span class="number">1</span>, <span class="number">2</span>), (<span class="number">2</span>, <span class="number">3</span>), (<span class="number">4</span>, <span class="number">5</span>), (<span class="number">5</span>, <span class="number">8</span>), (<span class="number">3</span>, <span class="number">13</span>),
+ (<span class="number">1</span>, <span class="number">21</span>), (<span class="number">2</span>, <span class="number">34</span>), (<span class="number">4</span>, <span class="number">55</span>)];
+
+<span class="macro">assert_eq!</span>(s.binary_search_by_key(<span class="kw-2">&amp;</span><span class="number">13</span>, |<span class="kw-2">&amp;</span>(a, b)| b), <span class="prelude-val">Ok</span>(<span class="number">9</span>));
+<span class="macro">assert_eq!</span>(s.binary_search_by_key(<span class="kw-2">&amp;</span><span class="number">4</span>, |<span class="kw-2">&amp;</span>(a, b)| b), <span class="prelude-val">Err</span>(<span class="number">7</span>));
+<span class="macro">assert_eq!</span>(s.binary_search_by_key(<span class="kw-2">&amp;</span><span class="number">100</span>, |<span class="kw-2">&amp;</span>(a, b)| b), <span class="prelude-val">Err</span>(<span class="number">13</span>));
+<span class="kw">let </span>r = s.binary_search_by_key(<span class="kw-2">&amp;</span><span class="number">1</span>, |<span class="kw-2">&amp;</span>(a, b)| b);
+<span class="macro">assert!</span>(<span class="kw">match </span>r { <span class="prelude-val">Ok</span>(<span class="number">1</span>..=<span class="number">4</span>) =&gt; <span class="bool-val">true</span>, <span class="kw">_ </span>=&gt; <span class="bool-val">false</span>, });</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sort_unstable" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.20.0">1.20.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2577-2579">source</a></span><h4 class="code-header">pub fn <a href="#method.sort_unstable" class="fnname">sort_unstable</a>(&amp;mut self)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Sorts the slice, but might not preserve the order of equal elements.</p>
+<p>This sort is unstable (i.e., may reorder equal elements), in-place
+(i.e., does not allocate), and <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case.</p>
+<h5 id="current-implementation-2"><a href="#current-implementation-2">Current implementation</a></h5>
+<p>The current algorithm is based on <a href="https://github.com/orlp/pdqsort">pattern-defeating quicksort</a> by Orson Peters,
+which combines the fast average case of randomized quicksort with the fast worst case of
+heapsort, while achieving linear time on slices with certain patterns. It uses some
+randomization to avoid degenerate cases, but with a fixed seed to always provide
+deterministic behavior.</p>
+<p>It is typically faster than stable sorting, except in a few special cases, e.g., when the
+slice consists of several concatenated sorted sequences.</p>
+<h5 id="examples-92"><a href="#examples-92">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>];
+
+v.sort_unstable();
+<span class="macro">assert!</span>(v == [-<span class="number">5</span>, -<span class="number">3</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sort_unstable_by" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.20.0">1.20.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2632-2634">source</a></span><h4 class="code-header">pub fn <a href="#method.sort_unstable_by" class="fnname">sort_unstable_by</a>&lt;F&gt;(&amp;mut self, compare: F)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</span></h4></section></summary><div class="docblock"><p>Sorts the slice with a comparator function, but might not preserve the order of equal
+elements.</p>
+<p>This sort is unstable (i.e., may reorder equal elements), in-place
+(i.e., does not allocate), and <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case.</p>
+<p>The comparator function must define a total ordering for the elements in the slice. If
+the ordering is not total, the order of the elements is unspecified. An order is a
+total order if it is (for all <code>a</code>, <code>b</code> and <code>c</code>):</p>
+<ul>
+<li>total and antisymmetric: exactly one of <code>a &lt; b</code>, <code>a == b</code> or <code>a &gt; b</code> is true, and</li>
+<li>transitive, <code>a &lt; b</code> and <code>b &lt; c</code> implies <code>a &lt; c</code>. The same must hold for both <code>==</code> and <code>&gt;</code>.</li>
+</ul>
+<p>For example, while <a href="https://doc.rust-lang.org/nightly/std/primitive.f64.html" title="f64"><code>f64</code></a> doesn’t implement <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="Ord"><code>Ord</code></a> because <code>NaN != NaN</code>, we can use
+<code>partial_cmp</code> as our sort function when we know the slice doesn’t contain a <code>NaN</code>.</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>floats = [<span class="number">5f64</span>, <span class="number">4.0</span>, <span class="number">1.0</span>, <span class="number">3.0</span>, <span class="number">2.0</span>];
+floats.sort_unstable_by(|a, b| a.partial_cmp(b).unwrap());
+<span class="macro">assert_eq!</span>(floats, [<span class="number">1.0</span>, <span class="number">2.0</span>, <span class="number">3.0</span>, <span class="number">4.0</span>, <span class="number">5.0</span>]);</code></pre></div>
+<h5 id="current-implementation-3"><a href="#current-implementation-3">Current implementation</a></h5>
+<p>The current algorithm is based on <a href="https://github.com/orlp/pdqsort">pattern-defeating quicksort</a> by Orson Peters,
+which combines the fast average case of randomized quicksort with the fast worst case of
+heapsort, while achieving linear time on slices with certain patterns. It uses some
+randomization to avoid degenerate cases, but with a fixed seed to always provide
+deterministic behavior.</p>
+<p>It is typically faster than stable sorting, except in a few special cases, e.g., when the
+slice consists of several concatenated sorted sequences.</p>
+<h5 id="examples-93"><a href="#examples-93">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">5</span>, <span class="number">4</span>, <span class="number">1</span>, <span class="number">3</span>, <span class="number">2</span>];
+v.sort_unstable_by(|a, b| a.cmp(b));
+<span class="macro">assert!</span>(v == [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]);
+
+<span class="comment">// reverse sorting
+</span>v.sort_unstable_by(|a, b| b.cmp(a));
+<span class="macro">assert!</span>(v == [<span class="number">5</span>, <span class="number">4</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">1</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sort_unstable_by_key" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.20.0">1.20.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2670-2673">source</a></span><h4 class="code-header">pub fn <a href="#method.sort_unstable_by_key" class="fnname">sort_unstable_by_key</a>&lt;K, F&gt;(&amp;mut self, f: F)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; K,<br>&nbsp;&nbsp;&nbsp;&nbsp;K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Sorts the slice with a key extraction function, but might not preserve the order of equal
+elements.</p>
+<p>This sort is unstable (i.e., may reorder equal elements), in-place
+(i.e., does not allocate), and <em>O</em>(m * <em>n</em> * log(<em>n</em>)) worst-case, where the key function is
+<em>O</em>(<em>m</em>).</p>
+<h5 id="current-implementation-4"><a href="#current-implementation-4">Current implementation</a></h5>
+<p>The current algorithm is based on <a href="https://github.com/orlp/pdqsort">pattern-defeating quicksort</a> by Orson Peters,
+which combines the fast average case of randomized quicksort with the fast worst case of
+heapsort, while achieving linear time on slices with certain patterns. It uses some
+randomization to avoid degenerate cases, but with a fixed seed to always provide
+deterministic behavior.</p>
+<p>Due to its key calling strategy, <a href="#method.sort_unstable_by_key"><code>sort_unstable_by_key</code></a>
+is likely to be slower than <a href="#method.sort_by_cached_key"><code>sort_by_cached_key</code></a> in
+cases where the key function is expensive.</p>
+<h5 id="examples-94"><a href="#examples-94">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5i32</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>];
+
+v.sort_unstable_by_key(|k| k.abs());
+<span class="macro">assert!</span>(v == [<span class="number">1</span>, <span class="number">2</span>, -<span class="number">3</span>, <span class="number">4</span>, -<span class="number">5</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.select_nth_unstable" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.49.0">1.49.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2717-2719">source</a></span><h4 class="code-header">pub fn <a href="#method.select_nth_unstable" class="fnname">select_nth_unstable</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -&gt; (&amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T, &amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Reorder the slice such that the element at <code>index</code> is at its final sorted position.</p>
+<p>This reordering has the additional property that any value at position <code>i &lt; index</code> will be
+less than or equal to any value at a position <code>j &gt; index</code>. Additionally, this reordering is
+unstable (i.e. any number of equal elements may end up at position <code>index</code>), in-place
+(i.e. does not allocate), and <em>O</em>(<em>n</em>) worst-case. This function is also/ known as “kth
+element” in other libraries. It returns a triplet of the following from the reordered slice:
+the subslice prior to <code>index</code>, the element at <code>index</code>, and the subslice after <code>index</code>;
+accordingly, the values in those two subslices will respectively all be less-than-or-equal-to
+and greater-than-or-equal-to the value of the element at <code>index</code>.</p>
+<h5 id="current-implementation-5"><a href="#current-implementation-5">Current implementation</a></h5>
+<p>The current algorithm is based on the quickselect portion of the same quicksort algorithm
+used for <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.sort_unstable"><code>sort_unstable</code></a>.</p>
+<h5 id="panics-26"><a href="#panics-26">Panics</a></h5>
+<p>Panics when <code>index &gt;= len()</code>, meaning it always panics on empty slices.</p>
+<h5 id="examples-95"><a href="#examples-95">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5i32</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>];
+
+<span class="comment">// Find the median
+</span>v.select_nth_unstable(<span class="number">2</span>);
+
+<span class="comment">// We are only guaranteed the slice will be one of the following, based on the way we sort
+// about the specified index.
+</span><span class="macro">assert!</span>(v == [-<span class="number">3</span>, -<span class="number">5</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>] ||
+ v == [-<span class="number">5</span>, -<span class="number">3</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>] ||
+ v == [-<span class="number">3</span>, -<span class="number">5</span>, <span class="number">1</span>, <span class="number">4</span>, <span class="number">2</span>] ||
+ v == [-<span class="number">5</span>, -<span class="number">3</span>, <span class="number">1</span>, <span class="number">4</span>, <span class="number">2</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.select_nth_unstable_by" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.49.0">1.49.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2765-2771">source</a></span><h4 class="code-header">pub fn <a href="#method.select_nth_unstable_by" class="fnname">select_nth_unstable_by</a>&lt;F&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;compare: F<br>) -&gt; (&amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T, &amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</span></h4></section></summary><div class="docblock"><p>Reorder the slice with a comparator function such that the element at <code>index</code> is at its
+final sorted position.</p>
+<p>This reordering has the additional property that any value at position <code>i &lt; index</code> will be
+less than or equal to any value at a position <code>j &gt; index</code> using the comparator function.
+Additionally, this reordering is unstable (i.e. any number of equal elements may end up at
+position <code>index</code>), in-place (i.e. does not allocate), and <em>O</em>(<em>n</em>) worst-case. This function
+is also known as “kth element” in other libraries. It returns a triplet of the following from
+the slice reordered according to the provided comparator function: the subslice prior to
+<code>index</code>, the element at <code>index</code>, and the subslice after <code>index</code>; accordingly, the values in
+those two subslices will respectively all be less-than-or-equal-to and greater-than-or-equal-to
+the value of the element at <code>index</code>.</p>
+<h5 id="current-implementation-6"><a href="#current-implementation-6">Current implementation</a></h5>
+<p>The current algorithm is based on the quickselect portion of the same quicksort algorithm
+used for <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.sort_unstable"><code>sort_unstable</code></a>.</p>
+<h5 id="panics-27"><a href="#panics-27">Panics</a></h5>
+<p>Panics when <code>index &gt;= len()</code>, meaning it always panics on empty slices.</p>
+<h5 id="examples-96"><a href="#examples-96">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5i32</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>];
+
+<span class="comment">// Find the median as if the slice were sorted in descending order.
+</span>v.select_nth_unstable_by(<span class="number">2</span>, |a, b| b.cmp(a));
+
+<span class="comment">// We are only guaranteed the slice will be one of the following, based on the way we sort
+// about the specified index.
+</span><span class="macro">assert!</span>(v == [<span class="number">2</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">5</span>, -<span class="number">3</span>] ||
+ v == [<span class="number">2</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, -<span class="number">5</span>] ||
+ v == [<span class="number">4</span>, <span class="number">2</span>, <span class="number">1</span>, -<span class="number">5</span>, -<span class="number">3</span>] ||
+ v == [<span class="number">4</span>, <span class="number">2</span>, <span class="number">1</span>, -<span class="number">3</span>, -<span class="number">5</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.select_nth_unstable_by_key" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.49.0">1.49.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2817-2824">source</a></span><h4 class="code-header">pub fn <a href="#method.select_nth_unstable_by_key" class="fnname">select_nth_unstable_by_key</a>&lt;K, F&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;f: F<br>) -&gt; (&amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T, &amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; K,<br>&nbsp;&nbsp;&nbsp;&nbsp;K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Reorder the slice with a key extraction function such that the element at <code>index</code> is at its
+final sorted position.</p>
+<p>This reordering has the additional property that any value at position <code>i &lt; index</code> will be
+less than or equal to any value at a position <code>j &gt; index</code> using the key extraction function.
+Additionally, this reordering is unstable (i.e. any number of equal elements may end up at
+position <code>index</code>), in-place (i.e. does not allocate), and <em>O</em>(<em>n</em>) worst-case. This function
+is also known as “kth element” in other libraries. It returns a triplet of the following from
+the slice reordered according to the provided key extraction function: the subslice prior to
+<code>index</code>, the element at <code>index</code>, and the subslice after <code>index</code>; accordingly, the values in
+those two subslices will respectively all be less-than-or-equal-to and greater-than-or-equal-to
+the value of the element at <code>index</code>.</p>
+<h5 id="current-implementation-7"><a href="#current-implementation-7">Current implementation</a></h5>
+<p>The current algorithm is based on the quickselect portion of the same quicksort algorithm
+used for <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.sort_unstable"><code>sort_unstable</code></a>.</p>
+<h5 id="panics-28"><a href="#panics-28">Panics</a></h5>
+<p>Panics when <code>index &gt;= len()</code>, meaning it always panics on empty slices.</p>
+<h5 id="examples-97"><a href="#examples-97">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5i32</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>];
+
+<span class="comment">// Return the median as if the array were sorted according to absolute value.
+</span>v.select_nth_unstable_by_key(<span class="number">2</span>, |a| a.abs());
+
+<span class="comment">// We are only guaranteed the slice will be one of the following, based on the way we sort
+// about the specified index.
+</span><span class="macro">assert!</span>(v == [<span class="number">1</span>, <span class="number">2</span>, -<span class="number">3</span>, <span class="number">4</span>, -<span class="number">5</span>] ||
+ v == [<span class="number">1</span>, <span class="number">2</span>, -<span class="number">3</span>, -<span class="number">5</span>, <span class="number">4</span>] ||
+ v == [<span class="number">2</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">4</span>, -<span class="number">5</span>] ||
+ v == [<span class="number">2</span>, <span class="number">1</span>, -<span class="number">3</span>, -<span class="number">5</span>, <span class="number">4</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partition_dedup" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2851-2853">source</a><h4 class="code-header">pub fn <a href="#method.partition_dedup" class="fnname">partition_dedup</a>(&amp;mut self) -&gt; (&amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, &amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;T&gt;,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_partition_dedup</code>)</span></div></span></summary><div class="docblock"><p>Moves all consecutive repeated elements to the end of the slice according to the
+<a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="PartialEq"><code>PartialEq</code></a> trait implementation.</p>
+<p>Returns two slices. The first contains no consecutive repeated elements.
+The second contains all the duplicates in no specified order.</p>
+<p>If the slice is sorted, the first returned slice contains no duplicates.</p>
+<h5 id="examples-98"><a href="#examples-98">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_partition_dedup)]
+
+</span><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">1</span>, <span class="number">1</span>];
+
+<span class="kw">let </span>(dedup, duplicates) = slice.partition_dedup();
+
+<span class="macro">assert_eq!</span>(dedup, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">1</span>]);
+<span class="macro">assert_eq!</span>(duplicates, [<span class="number">2</span>, <span class="number">3</span>, <span class="number">1</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partition_dedup_by" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#2885-2887">source</a><h4 class="code-header">pub fn <a href="#method.partition_dedup_by" class="fnname">partition_dedup_by</a>&lt;F&gt;(&amp;mut self, same_bucket: F) -&gt; (&amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, &amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_partition_dedup</code>)</span></div></span></summary><div class="docblock"><p>Moves all but the first of consecutive elements to the end of the slice satisfying
+a given equality relation.</p>
+<p>Returns two slices. The first contains no consecutive repeated elements.
+The second contains all the duplicates in no specified order.</p>
+<p>The <code>same_bucket</code> function is passed references to two elements from the slice and
+must determine if the elements compare equal. The elements are passed in opposite order
+from their order in the slice, so if <code>same_bucket(a, b)</code> returns <code>true</code>, <code>a</code> is moved
+at the end of the slice.</p>
+<p>If the slice is sorted, the first returned slice contains no duplicates.</p>
+<h5 id="examples-99"><a href="#examples-99">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_partition_dedup)]
+
+</span><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="string">&quot;foo&quot;</span>, <span class="string">&quot;Foo&quot;</span>, <span class="string">&quot;BAZ&quot;</span>, <span class="string">&quot;Bar&quot;</span>, <span class="string">&quot;bar&quot;</span>, <span class="string">&quot;baz&quot;</span>, <span class="string">&quot;BAZ&quot;</span>];
+
+<span class="kw">let </span>(dedup, duplicates) = slice.partition_dedup_by(|a, b| a.eq_ignore_ascii_case(b));
+
+<span class="macro">assert_eq!</span>(dedup, [<span class="string">&quot;foo&quot;</span>, <span class="string">&quot;BAZ&quot;</span>, <span class="string">&quot;Bar&quot;</span>, <span class="string">&quot;baz&quot;</span>]);
+<span class="macro">assert_eq!</span>(duplicates, [<span class="string">&quot;bar&quot;</span>, <span class="string">&quot;Foo&quot;</span>, <span class="string">&quot;BAZ&quot;</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partition_dedup_by_key" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3011-3014">source</a><h4 class="code-header">pub fn <a href="#method.partition_dedup_by_key" class="fnname">partition_dedup_by_key</a>&lt;K, F&gt;(&amp;mut self, key: F) -&gt; (&amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, &amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T) -&gt; K,<br>&nbsp;&nbsp;&nbsp;&nbsp;K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;K&gt;,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_partition_dedup</code>)</span></div></span></summary><div class="docblock"><p>Moves all but the first of consecutive elements to the end of the slice that resolve
+to the same key.</p>
+<p>Returns two slices. The first contains no consecutive repeated elements.
+The second contains all the duplicates in no specified order.</p>
+<p>If the slice is sorted, the first returned slice contains no duplicates.</p>
+<h5 id="examples-100"><a href="#examples-100">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_partition_dedup)]
+
+</span><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">10</span>, <span class="number">20</span>, <span class="number">21</span>, <span class="number">30</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">11</span>, <span class="number">13</span>];
+
+<span class="kw">let </span>(dedup, duplicates) = slice.partition_dedup_by_key(|i| <span class="kw-2">*</span>i / <span class="number">10</span>);
+
+<span class="macro">assert_eq!</span>(dedup, [<span class="number">10</span>, <span class="number">20</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">11</span>]);
+<span class="macro">assert_eq!</span>(duplicates, [<span class="number">21</span>, <span class="number">30</span>, <span class="number">13</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rotate_left" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.26.0">1.26.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3050">source</a></span><h4 class="code-header">pub fn <a href="#method.rotate_left" class="fnname">rotate_left</a>(&amp;mut self, mid: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Rotates the slice in-place such that the first <code>mid</code> elements of the
+slice move to the end while the last <code>self.len() - mid</code> elements move to
+the front. After calling <code>rotate_left</code>, the element previously at index
+<code>mid</code> will become the first element in the slice.</p>
+<h5 id="panics-29"><a href="#panics-29">Panics</a></h5>
+<p>This function will panic if <code>mid</code> is greater than the length of the
+slice. Note that <code>mid == self.len()</code> does <em>not</em> panic and is a no-op
+rotation.</p>
+<h5 id="complexity"><a href="#complexity">Complexity</a></h5>
+<p>Takes linear (in <code>self.len()</code>) time.</p>
+<h5 id="examples-101"><a href="#examples-101">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>a = [<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>, <span class="string">&#39;d&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;f&#39;</span>];
+a.rotate_left(<span class="number">2</span>);
+<span class="macro">assert_eq!</span>(a, [<span class="string">&#39;c&#39;</span>, <span class="string">&#39;d&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;f&#39;</span>, <span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>]);</code></pre></div>
+<p>Rotating a subslice:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>a = [<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>, <span class="string">&#39;d&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;f&#39;</span>];
+a[<span class="number">1</span>..<span class="number">5</span>].rotate_left(<span class="number">1</span>);
+<span class="macro">assert_eq!</span>(a, [<span class="string">&#39;a&#39;</span>, <span class="string">&#39;c&#39;</span>, <span class="string">&#39;d&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;f&#39;</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rotate_right" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.26.0">1.26.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3093">source</a></span><h4 class="code-header">pub fn <a href="#method.rotate_right" class="fnname">rotate_right</a>(&amp;mut self, k: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Rotates the slice in-place such that the first <code>self.len() - k</code>
+elements of the slice move to the end while the last <code>k</code> elements move
+to the front. After calling <code>rotate_right</code>, the element previously at
+index <code>self.len() - k</code> will become the first element in the slice.</p>
+<h5 id="panics-30"><a href="#panics-30">Panics</a></h5>
+<p>This function will panic if <code>k</code> is greater than the length of the
+slice. Note that <code>k == self.len()</code> does <em>not</em> panic and is a no-op
+rotation.</p>
+<h5 id="complexity-1"><a href="#complexity-1">Complexity</a></h5>
+<p>Takes linear (in <code>self.len()</code>) time.</p>
+<h5 id="examples-102"><a href="#examples-102">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>a = [<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>, <span class="string">&#39;d&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;f&#39;</span>];
+a.rotate_right(<span class="number">2</span>);
+<span class="macro">assert_eq!</span>(a, [<span class="string">&#39;e&#39;</span>, <span class="string">&#39;f&#39;</span>, <span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>, <span class="string">&#39;d&#39;</span>]);</code></pre></div>
+<p>Rotate a subslice:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>a = [<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>, <span class="string">&#39;d&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;f&#39;</span>];
+a[<span class="number">1</span>..<span class="number">5</span>].rotate_right(<span class="number">1</span>);
+<span class="macro">assert_eq!</span>(a, [<span class="string">&#39;a&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>, <span class="string">&#39;d&#39;</span>, <span class="string">&#39;f&#39;</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fill" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3116-3118">source</a></span><h4 class="code-header">pub fn <a href="#method.fill" class="fnname">fill</a>(&amp;mut self, value: T)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h4></section></summary><div class="docblock"><p>Fills <code>self</code> with elements by cloning <code>value</code>.</p>
+<h5 id="examples-103"><a href="#examples-103">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[<span class="number">0</span>; <span class="number">10</span>];
+buf.fill(<span class="number">1</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="macro">vec!</span>[<span class="number">1</span>; <span class="number">10</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fill_with" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3140-3142">source</a></span><h4 class="code-header">pub fn <a href="#method.fill_with" class="fnname">fill_with</a>&lt;F&gt;(&amp;mut self, f: F)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>() -&gt; T,</span></h4></section></summary><div class="docblock"><p>Fills <code>self</code> with elements returned by calling a closure repeatedly.</p>
+<p>This method uses a closure to create new values. If you’d rather
+<a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="Clone"><code>Clone</code></a> a given value, use <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.fill"><code>fill</code></a>. If you want to use the <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="Default"><code>Default</code></a>
+trait to generate values, you can pass <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" title="Default::default"><code>Default::default</code></a> as the
+argument.</p>
+<h5 id="examples-104"><a href="#examples-104">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[<span class="number">1</span>; <span class="number">10</span>];
+buf.fill_with(Default::default);
+<span class="macro">assert_eq!</span>(buf, <span class="macro">vec!</span>[<span class="number">0</span>; <span class="number">10</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from_slice" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.7.0">1.7.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3203-3205">source</a></span><h4 class="code-header">pub fn <a href="#method.clone_from_slice" class="fnname">clone_from_slice</a>(&amp;mut self, src: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h4></section></summary><div class="docblock"><p>Copies the elements from <code>src</code> into <code>self</code>.</p>
+<p>The length of <code>src</code> must be the same as <code>self</code>.</p>
+<h5 id="panics-31"><a href="#panics-31">Panics</a></h5>
+<p>This function will panic if the two slices have different lengths.</p>
+<h5 id="examples-105"><a href="#examples-105">Examples</a></h5>
+<p>Cloning two elements from a slice into another:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>src = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0</span>, <span class="number">0</span>];
+
+<span class="comment">// Because the slices have to be the same length,
+// we slice the source slice from four elements
+// to two. It will panic if we don&#39;t do this.
+</span>dst.clone_from_slice(<span class="kw-2">&amp;</span>src[<span class="number">2</span>..]);
+
+<span class="macro">assert_eq!</span>(src, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);
+<span class="macro">assert_eq!</span>(dst, [<span class="number">3</span>, <span class="number">4</span>]);</code></pre></div>
+<p>Rust enforces that there can only be one mutable reference with no
+immutable references to a particular piece of data in a particular
+scope. Because of this, attempting to use <code>clone_from_slice</code> on a
+single slice will result in a compile failure:</p>
+
+<div class="example-wrap compile_fail"><div class='tooltip'>ⓘ</div><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>];
+
+slice[..<span class="number">2</span>].clone_from_slice(<span class="kw-2">&amp;</span>slice[<span class="number">3</span>..]); <span class="comment">// compile fail!</span></code></pre></div>
+<p>To work around this, we can use <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_at_mut"><code>split_at_mut</code></a> to create two distinct
+sub-slices from a slice:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>];
+
+{
+ <span class="kw">let </span>(left, right) = slice.split_at_mut(<span class="number">2</span>);
+ left.clone_from_slice(<span class="kw-2">&amp;</span>right[<span class="number">1</span>..]);
+}
+
+<span class="macro">assert_eq!</span>(slice, [<span class="number">4</span>, <span class="number">5</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.copy_from_slice" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.9.0">1.9.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3267-3269">source</a></span><h4 class="code-header">pub fn <a href="#method.copy_from_slice" class="fnname">copy_from_slice</a>(&amp;mut self, src: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>,</span></h4></section></summary><div class="docblock"><p>Copies all elements from <code>src</code> into <code>self</code>, using a memcpy.</p>
+<p>The length of <code>src</code> must be the same as <code>self</code>.</p>
+<p>If <code>T</code> does not implement <code>Copy</code>, use <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.clone_from_slice"><code>clone_from_slice</code></a>.</p>
+<h5 id="panics-32"><a href="#panics-32">Panics</a></h5>
+<p>This function will panic if the two slices have different lengths.</p>
+<h5 id="examples-106"><a href="#examples-106">Examples</a></h5>
+<p>Copying two elements from a slice into another:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>src = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0</span>, <span class="number">0</span>];
+
+<span class="comment">// Because the slices have to be the same length,
+// we slice the source slice from four elements
+// to two. It will panic if we don&#39;t do this.
+</span>dst.copy_from_slice(<span class="kw-2">&amp;</span>src[<span class="number">2</span>..]);
+
+<span class="macro">assert_eq!</span>(src, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);
+<span class="macro">assert_eq!</span>(dst, [<span class="number">3</span>, <span class="number">4</span>]);</code></pre></div>
+<p>Rust enforces that there can only be one mutable reference with no
+immutable references to a particular piece of data in a particular
+scope. Because of this, attempting to use <code>copy_from_slice</code> on a
+single slice will result in a compile failure:</p>
+
+<div class="example-wrap compile_fail"><div class='tooltip'>ⓘ</div><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>];
+
+slice[..<span class="number">2</span>].copy_from_slice(<span class="kw-2">&amp;</span>slice[<span class="number">3</span>..]); <span class="comment">// compile fail!</span></code></pre></div>
+<p>To work around this, we can use <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_at_mut"><code>split_at_mut</code></a> to create two distinct
+sub-slices from a slice:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>];
+
+{
+ <span class="kw">let </span>(left, right) = slice.split_at_mut(<span class="number">2</span>);
+ left.copy_from_slice(<span class="kw-2">&amp;</span>right[<span class="number">1</span>..]);
+}
+
+<span class="macro">assert_eq!</span>(slice, [<span class="number">4</span>, <span class="number">5</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.copy_within" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.37.0">1.37.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3321-3323">source</a></span><h4 class="code-header">pub fn <a href="#method.copy_within" class="fnname">copy_within</a>&lt;R&gt;(&amp;mut self, src: R, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/range/trait.RangeBounds.html" title="trait core::ops::range::RangeBounds">RangeBounds</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>,</span></h4></section></summary><div class="docblock"><p>Copies elements from one part of the slice to another part of itself,
+using a memmove.</p>
+<p><code>src</code> is the range within <code>self</code> to copy from. <code>dest</code> is the starting
+index of the range within <code>self</code> to copy to, which will have the same
+length as <code>src</code>. The two ranges may overlap. The ends of the two ranges
+must be less than or equal to <code>self.len()</code>.</p>
+<h5 id="panics-33"><a href="#panics-33">Panics</a></h5>
+<p>This function will panic if either range exceeds the end of the slice,
+or if the end of <code>src</code> is before the start.</p>
+<h5 id="examples-107"><a href="#examples-107">Examples</a></h5>
+<p>Copying four bytes within a slice:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>bytes = <span class="kw-2">*</span><span class="string">b&quot;Hello, World!&quot;</span>;
+
+bytes.copy_within(<span class="number">1</span>..<span class="number">5</span>, <span class="number">8</span>);
+
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>bytes, <span class="string">b&quot;Hello, Wello!&quot;</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.swap_with_slice" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.27.0">1.27.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3388">source</a></span><h4 class="code-header">pub fn <a href="#method.swap_with_slice" class="fnname">swap_with_slice</a>(&amp;mut self, other: &amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Swaps all elements in <code>self</code> with those in <code>other</code>.</p>
+<p>The length of <code>other</code> must be the same as <code>self</code>.</p>
+<h5 id="panics-34"><a href="#panics-34">Panics</a></h5>
+<p>This function will panic if the two slices have different lengths.</p>
+<h5 id="example"><a href="#example">Example</a></h5>
+<p>Swapping two elements across slices:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice1 = [<span class="number">0</span>, <span class="number">0</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>slice2 = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>];
+
+slice1.swap_with_slice(<span class="kw-2">&amp;mut </span>slice2[<span class="number">2</span>..]);
+
+<span class="macro">assert_eq!</span>(slice1, [<span class="number">3</span>, <span class="number">4</span>]);
+<span class="macro">assert_eq!</span>(slice2, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">0</span>, <span class="number">0</span>]);</code></pre></div>
+<p>Rust enforces that there can only be one mutable reference to a
+particular piece of data in a particular scope. Because of this,
+attempting to use <code>swap_with_slice</code> on a single slice will result in
+a compile failure:</p>
+
+<div class="example-wrap compile_fail"><div class='tooltip'>ⓘ</div><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>];
+slice[..<span class="number">2</span>].swap_with_slice(<span class="kw-2">&amp;mut </span>slice[<span class="number">3</span>..]); <span class="comment">// compile fail!</span></code></pre></div>
+<p>To work around this, we can use <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_at_mut"><code>split_at_mut</code></a> to create two distinct
+mutable sub-slices from a slice:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>];
+
+{
+ <span class="kw">let </span>(left, right) = slice.split_at_mut(<span class="number">2</span>);
+ left.swap_with_slice(<span class="kw-2">&amp;mut </span>right[<span class="number">1</span>..]);
+}
+
+<span class="macro">assert_eq!</span>(slice, [<span class="number">4</span>, <span class="number">5</span>, <span class="number">3</span>, <span class="number">1</span>, <span class="number">2</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.align_to" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.30.0">1.30.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3498">source</a></span><h4 class="code-header">pub unsafe fn <a href="#method.align_to" class="fnname">align_to</a>&lt;U&gt;(&amp;self) -&gt; (&amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[U]</a>, &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Transmute the slice to a slice of another type, ensuring alignment of the types is
+maintained.</p>
+<p>This method splits the slice into three distinct slices: prefix, correctly aligned middle
+slice of a new type, and the suffix slice. The method may make the middle slice the greatest
+length possible for a given type and input slice, but only your algorithm’s performance
+should depend on that, not its correctness. It is permissible for all of the input data to
+be returned as the prefix or suffix slice.</p>
+<p>This method has no purpose when either input element <code>T</code> or output element <code>U</code> are
+zero-sized and will return the original slice without splitting anything.</p>
+<h5 id="safety-7"><a href="#safety-7">Safety</a></h5>
+<p>This method is essentially a <code>transmute</code> with respect to the elements in the returned
+middle slice, so all the usual caveats pertaining to <code>transmute::&lt;T, U&gt;</code> also apply here.</p>
+<h5 id="examples-108"><a href="#examples-108">Examples</a></h5>
+<p>Basic usage:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">unsafe </span>{
+ <span class="kw">let </span>bytes: [u8; <span class="number">7</span>] = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>, <span class="number">7</span>];
+ <span class="kw">let </span>(prefix, shorts, suffix) = bytes.align_to::&lt;u16&gt;();
+ <span class="comment">// less_efficient_algorithm_for_bytes(prefix);
+ // more_efficient_algorithm_for_aligned_shorts(shorts);
+ // less_efficient_algorithm_for_bytes(suffix);
+</span>}</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.align_to_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.30.0">1.30.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3559">source</a></span><h4 class="code-header">pub unsafe fn <a href="#method.align_to_mut" class="fnname">align_to_mut</a>&lt;U&gt;(&amp;mut self) -&gt; (&amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, &amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[U]</a>, &amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Transmute the mutable slice to a mutable slice of another type, ensuring alignment of the
+types is maintained.</p>
+<p>This method splits the slice into three distinct slices: prefix, correctly aligned middle
+slice of a new type, and the suffix slice. The method may make the middle slice the greatest
+length possible for a given type and input slice, but only your algorithm’s performance
+should depend on that, not its correctness. It is permissible for all of the input data to
+be returned as the prefix or suffix slice.</p>
+<p>This method has no purpose when either input element <code>T</code> or output element <code>U</code> are
+zero-sized and will return the original slice without splitting anything.</p>
+<h5 id="safety-8"><a href="#safety-8">Safety</a></h5>
+<p>This method is essentially a <code>transmute</code> with respect to the elements in the returned
+middle slice, so all the usual caveats pertaining to <code>transmute::&lt;T, U&gt;</code> also apply here.</p>
+<h5 id="examples-109"><a href="#examples-109">Examples</a></h5>
+<p>Basic usage:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">unsafe </span>{
+ <span class="kw">let </span><span class="kw-2">mut </span>bytes: [u8; <span class="number">7</span>] = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>, <span class="number">7</span>];
+ <span class="kw">let </span>(prefix, shorts, suffix) = bytes.align_to_mut::&lt;u16&gt;();
+ <span class="comment">// less_efficient_algorithm_for_bytes(prefix);
+ // more_efficient_algorithm_for_aligned_shorts(shorts);
+ // less_efficient_algorithm_for_bytes(suffix);
+</span>}</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_simd" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3654-3658">source</a><h4 class="code-header">pub fn <a href="#method.as_simd" class="fnname">as_simd</a>&lt;const LANES:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(&amp;self) -&gt; (&amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, &amp;[<a class="struct" href="https://doc.rust-lang.org/nightly/core/core_simd/vector/struct.Simd.html" title="struct core::core_simd::vector::Simd">Simd</a>&lt;T, LANES&gt;], &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="struct" href="https://doc.rust-lang.org/nightly/core/core_simd/vector/struct.Simd.html" title="struct core::core_simd::vector::Simd">Simd</a>&lt;T, LANES&gt;: <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.array.html">[T; LANES]</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/core_simd/vector/trait.SimdElement.html" title="trait core::core_simd::vector::SimdElement">SimdElement</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="struct" href="https://doc.rust-lang.org/nightly/core/core_simd/lane_count/struct.LaneCount.html" title="struct core::core_simd::lane_count::LaneCount">LaneCount</a>&lt;LANES&gt;: <a class="trait" href="https://doc.rust-lang.org/nightly/core/core_simd/lane_count/trait.SupportedLaneCount.html" title="trait core::core_simd::lane_count::SupportedLaneCount">SupportedLaneCount</a>,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>portable_simd</code>)</span></div></span></summary><div class="docblock"><p>Split a slice into a prefix, a middle of aligned SIMD types, and a suffix.</p>
+<p>This is a safe wrapper around <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.align_to" title="slice::align_to"><code>slice::align_to</code></a>, so has the same weak
+postconditions as that method. You’re only assured that
+<code>self.len() == prefix.len() + middle.len() * LANES + suffix.len()</code>.</p>
+<p>Notably, all of the following are possible:</p>
+<ul>
+<li><code>prefix.len() &gt;= LANES</code>.</li>
+<li><code>middle.is_empty()</code> despite <code>self.len() &gt;= 3 * LANES</code>.</li>
+<li><code>suffix.len() &gt;= LANES</code>.</li>
+</ul>
+<p>That said, this is a safe method, so if you’re only writing safe code,
+then this can at most cause incorrect logic, not unsoundness.</p>
+<h5 id="panics-35"><a href="#panics-35">Panics</a></h5>
+<p>This will panic if the size of the SIMD type is different from
+<code>LANES</code> times that of the scalar.</p>
+<p>At the time of writing, the trait restrictions on <code>Simd&lt;T, LANES&gt;</code> keeps
+that from ever happening, as only power-of-two numbers of lanes are
+supported. It’s possible that, in the future, those restrictions might
+be lifted in a way that would make it possible to see panics from this
+method for something like <code>LANES == 3</code>.</p>
+<h5 id="examples-110"><a href="#examples-110">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(portable_simd)]
+</span><span class="kw">use </span>core::simd::SimdFloat;
+
+<span class="kw">let </span>short = <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>];
+<span class="kw">let </span>(prefix, middle, suffix) = short.as_simd::&lt;<span class="number">4</span>&gt;();
+<span class="macro">assert_eq!</span>(middle, []); <span class="comment">// Not enough elements for anything in the middle
+
+// They might be split in any possible way between prefix and suffix
+</span><span class="kw">let </span>it = prefix.iter().chain(suffix).copied();
+<span class="macro">assert_eq!</span>(it.collect::&lt;Vec&lt;<span class="kw">_</span>&gt;&gt;(), <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
+
+<span class="kw">fn </span>basic_simd_sum(x: <span class="kw-2">&amp;</span>[f32]) -&gt; f32 {
+ <span class="kw">use </span>std::ops::Add;
+ <span class="kw">use </span>std::simd::f32x4;
+ <span class="kw">let </span>(prefix, middle, suffix) = x.as_simd();
+ <span class="kw">let </span>sums = f32x4::from_array([
+ prefix.iter().copied().sum(),
+ <span class="number">0.0</span>,
+ <span class="number">0.0</span>,
+ suffix.iter().copied().sum(),
+ ]);
+ <span class="kw">let </span>sums = middle.iter().copied().fold(sums, f32x4::add);
+ sums.reduce_sum()
+}
+
+<span class="kw">let </span>numbers: Vec&lt;f32&gt; = (<span class="number">1</span>..<span class="number">101</span>).map(|x| x <span class="kw">as _</span>).collect();
+<span class="macro">assert_eq!</span>(basic_simd_sum(<span class="kw-2">&amp;</span>numbers[<span class="number">1</span>..<span class="number">99</span>]), <span class="number">4949.0</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_simd_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3699-3703">source</a><h4 class="code-header">pub fn <a href="#method.as_simd_mut" class="fnname">as_simd_mut</a>&lt;const LANES:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self<br>) -&gt; (&amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, &amp;mut [<a class="struct" href="https://doc.rust-lang.org/nightly/core/core_simd/vector/struct.Simd.html" title="struct core::core_simd::vector::Simd">Simd</a>&lt;T, LANES&gt;], &amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="struct" href="https://doc.rust-lang.org/nightly/core/core_simd/vector/struct.Simd.html" title="struct core::core_simd::vector::Simd">Simd</a>&lt;T, LANES&gt;: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[T; LANES]</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/core_simd/vector/trait.SimdElement.html" title="trait core::core_simd::vector::SimdElement">SimdElement</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="struct" href="https://doc.rust-lang.org/nightly/core/core_simd/lane_count/struct.LaneCount.html" title="struct core::core_simd::lane_count::LaneCount">LaneCount</a>&lt;LANES&gt;: <a class="trait" href="https://doc.rust-lang.org/nightly/core/core_simd/lane_count/trait.SupportedLaneCount.html" title="trait core::core_simd::lane_count::SupportedLaneCount">SupportedLaneCount</a>,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>portable_simd</code>)</span></div></span></summary><div class="docblock"><p>Split a mutable slice into a mutable prefix, a middle of aligned SIMD types,
+and a mutable suffix.</p>
+<p>This is a safe wrapper around <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.align_to_mut" title="slice::align_to_mut"><code>slice::align_to_mut</code></a>, so has the same weak
+postconditions as that method. You’re only assured that
+<code>self.len() == prefix.len() + middle.len() * LANES + suffix.len()</code>.</p>
+<p>Notably, all of the following are possible:</p>
+<ul>
+<li><code>prefix.len() &gt;= LANES</code>.</li>
+<li><code>middle.is_empty()</code> despite <code>self.len() &gt;= 3 * LANES</code>.</li>
+<li><code>suffix.len() &gt;= LANES</code>.</li>
+</ul>
+<p>That said, this is a safe method, so if you’re only writing safe code,
+then this can at most cause incorrect logic, not unsoundness.</p>
+<p>This is the mutable version of <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.as_simd" title="slice::as_simd"><code>slice::as_simd</code></a>; see that for examples.</p>
+<h5 id="panics-36"><a href="#panics-36">Panics</a></h5>
+<p>This will panic if the size of the SIMD type is different from
+<code>LANES</code> times that of the scalar.</p>
+<p>At the time of writing, the trait restrictions on <code>Simd&lt;T, LANES&gt;</code> keeps
+that from ever happening, as only power-of-two numbers of lanes are
+supported. It’s possible that, in the future, those restrictions might
+be lifted in a way that would make it possible to see panics from this
+method for something like <code>LANES == 3</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_sorted" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3739-3741">source</a><h4 class="code-header">pub fn <a href="#method.is_sorted" class="fnname">is_sorted</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;T&gt;,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>is_sorted</code>)</span></div></span></summary><div class="docblock"><p>Checks if the elements of this slice are sorted.</p>
+<p>That is, for each element <code>a</code> and its following element <code>b</code>, <code>a &lt;= b</code> must hold. If the
+slice yields exactly zero or one element, <code>true</code> is returned.</p>
+<p>Note that if <code>Self::Item</code> is only <code>PartialOrd</code>, but not <code>Ord</code>, the above definition
+implies that this function returns <code>false</code> if any two consecutive items are not
+comparable.</p>
+<h5 id="examples-111"><a href="#examples-111">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(is_sorted)]
+</span><span class="kw">let </span>empty: [i32; <span class="number">0</span>] = [];
+
+<span class="macro">assert!</span>([<span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">9</span>].is_sorted());
+<span class="macro">assert!</span>(![<span class="number">1</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">4</span>].is_sorted());
+<span class="macro">assert!</span>([<span class="number">0</span>].is_sorted());
+<span class="macro">assert!</span>(empty.is_sorted());
+<span class="macro">assert!</span>(![<span class="number">0.0</span>, <span class="number">1.0</span>, f32::NAN].is_sorted());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_sorted_by" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3755-3757">source</a><h4 class="code-header">pub fn <a href="#method.is_sorted_by" class="fnname">is_sorted_by</a>&lt;F&gt;(&amp;self, compare: F) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>is_sorted</code>)</span></div></span></summary><div class="docblock"><p>Checks if the elements of this slice are sorted using the given comparator function.</p>
+<p>Instead of using <code>PartialOrd::partial_cmp</code>, this function uses the given <code>compare</code>
+function to determine the ordering of two elements. Apart from that, it’s equivalent to
+<a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.is_sorted"><code>is_sorted</code></a>; see its documentation for more information.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_sorted_by_key" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3781-3784">source</a><h4 class="code-header">pub fn <a href="#method.is_sorted_by_key" class="fnname">is_sorted_by_key</a>&lt;F, K&gt;(&amp;self, f: F) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; K,<br>&nbsp;&nbsp;&nbsp;&nbsp;K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;K&gt;,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>is_sorted</code>)</span></div></span></summary><div class="docblock"><p>Checks if the elements of this slice are sorted using the given key extraction function.</p>
+<p>Instead of comparing the slice’s elements directly, this function compares the keys of the
+elements, as determined by <code>f</code>. Apart from that, it’s equivalent to <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.is_sorted"><code>is_sorted</code></a>; see its
+documentation for more information.</p>
+<h5 id="examples-112"><a href="#examples-112">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(is_sorted)]
+
+</span><span class="macro">assert!</span>([<span class="string">&quot;c&quot;</span>, <span class="string">&quot;bb&quot;</span>, <span class="string">&quot;aaa&quot;</span>].is_sorted_by_key(|s| s.len()));
+<span class="macro">assert!</span>(![-<span class="number">2i32</span>, -<span class="number">1</span>, <span class="number">0</span>, <span class="number">3</span>].is_sorted_by_key(|n| n.abs()));</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partition_point" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.52.0">1.52.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3840-3842">source</a></span><h4 class="code-header">pub fn <a href="#method.partition_point" class="fnname">partition_point</a>&lt;P&gt;(&amp;self, pred: P) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns the index of the partition point according to the given predicate
+(the index of the first element of the second partition).</p>
+<p>The slice is assumed to be partitioned according to the given predicate.
+This means that all elements for which the predicate returns true are at the start of the slice
+and all elements for which the predicate returns false are at the end.
+For example, [7, 15, 3, 5, 4, 12, 6] is a partitioned under the predicate x % 2 != 0
+(all odd numbers are at the start, all even at the end).</p>
+<p>If this slice is not partitioned, the returned result is unspecified and meaningless,
+as this method performs a kind of binary search.</p>
+<p>See also <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.binary_search"><code>binary_search</code></a>, <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.binary_search_by"><code>binary_search_by</code></a>, and <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.binary_search_by_key"><code>binary_search_by_key</code></a>.</p>
+<h5 id="examples-113"><a href="#examples-113">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">6</span>, <span class="number">7</span>];
+<span class="kw">let </span>i = v.partition_point(|<span class="kw-2">&amp;</span>x| x &lt; <span class="number">5</span>);
+
+<span class="macro">assert_eq!</span>(i, <span class="number">4</span>);
+<span class="macro">assert!</span>(v[..i].iter().all(|<span class="kw-2">&amp;</span>x| x &lt; <span class="number">5</span>));
+<span class="macro">assert!</span>(v[i..].iter().all(|<span class="kw-2">&amp;</span>x| !(x &lt; <span class="number">5</span>)));</code></pre></div>
+<p>If all elements of the slice match the predicate, including if the slice
+is empty, then the length of the slice will be returned:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>a = [<span class="number">2</span>, <span class="number">4</span>, <span class="number">8</span>];
+<span class="macro">assert_eq!</span>(a.partition_point(|x| x &lt; <span class="kw-2">&amp;</span><span class="number">100</span>), a.len());
+<span class="kw">let </span>a: [i32; <span class="number">0</span>] = [];
+<span class="macro">assert_eq!</span>(a.partition_point(|x| x &lt; <span class="kw-2">&amp;</span><span class="number">100</span>), <span class="number">0</span>);</code></pre></div>
+<p>If you want to insert an item to a sorted vector, while maintaining
+sort order:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>s = <span class="macro">vec!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>];
+<span class="kw">let </span>num = <span class="number">42</span>;
+<span class="kw">let </span>idx = s.partition_point(|<span class="kw-2">&amp;</span>x| x &lt; num);
+s.insert(idx, num);
+<span class="macro">assert_eq!</span>(s, [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">42</span>, <span class="number">55</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3898">source</a><h4 class="code-header">pub fn <a href="#method.take" class="fnname">take</a>&lt;R, 'a&gt;(self: &amp;mut &amp;'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, range: R) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/range/trait.OneSidedRange.html" title="trait core::ops::range::OneSidedRange">OneSidedRange</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the subslice corresponding to the given range
+and returns a reference to it.</p>
+<p>Returns <code>None</code> and does not modify the slice if the given
+range is out of bounds.</p>
+<p>Note that this method only accepts one-sided ranges such as
+<code>2..</code> or <code>..6</code>, but not <code>2..6</code>.</p>
+<h5 id="examples-114"><a href="#examples-114">Examples</a></h5>
+<p>Taking the first three elements of a slice:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)]
+
+</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&amp;</span>[<span class="kw">_</span>] = <span class="kw-2">&amp;</span>[<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>, <span class="string">&#39;d&#39;</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>first_three = slice.take(..<span class="number">3</span>).unwrap();
+
+<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&amp;</span>[<span class="string">&#39;d&#39;</span>]);
+<span class="macro">assert_eq!</span>(first_three, <span class="kw-2">&amp;</span>[<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>]);</code></pre></div>
+<p>Taking the last two elements of a slice:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)]
+
+</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&amp;</span>[<span class="kw">_</span>] = <span class="kw-2">&amp;</span>[<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>, <span class="string">&#39;d&#39;</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>tail = slice.take(<span class="number">2</span>..).unwrap();
+
+<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&amp;</span>[<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>]);
+<span class="macro">assert_eq!</span>(tail, <span class="kw-2">&amp;</span>[<span class="string">&#39;c&#39;</span>, <span class="string">&#39;d&#39;</span>]);</code></pre></div>
+<p>Getting <code>None</code> when <code>range</code> is out of bounds:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)]
+
+</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&amp;</span>[<span class="kw">_</span>] = <span class="kw-2">&amp;</span>[<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>, <span class="string">&#39;d&#39;</span>];
+
+<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take(<span class="number">5</span>..));
+<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take(..<span class="number">5</span>));
+<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take(..=<span class="number">4</span>));
+<span class="kw">let </span>expected: <span class="kw-2">&amp;</span>[char] = <span class="kw-2">&amp;</span>[<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>, <span class="string">&#39;d&#39;</span>];
+<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(expected), slice.take(..<span class="number">4</span>));</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#3967-3970">source</a><h4 class="code-header">pub fn <a href="#method.take_mut" class="fnname">take_mut</a>&lt;R, 'a&gt;(self: &amp;mut &amp;'a mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>, range: R) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;'a mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/range/trait.OneSidedRange.html" title="trait core::ops::range::OneSidedRange">OneSidedRange</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the subslice corresponding to the given range
+and returns a mutable reference to it.</p>
+<p>Returns <code>None</code> and does not modify the slice if the given
+range is out of bounds.</p>
+<p>Note that this method only accepts one-sided ranges such as
+<code>2..</code> or <code>..6</code>, but not <code>2..6</code>.</p>
+<h5 id="examples-115"><a href="#examples-115">Examples</a></h5>
+<p>Taking the first three elements of a slice:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)]
+
+</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&amp;mut </span>[<span class="kw">_</span>] = <span class="kw-2">&amp;mut </span>[<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>, <span class="string">&#39;d&#39;</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>first_three = slice.take_mut(..<span class="number">3</span>).unwrap();
+
+<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&amp;mut </span>[<span class="string">&#39;d&#39;</span>]);
+<span class="macro">assert_eq!</span>(first_three, <span class="kw-2">&amp;mut </span>[<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>]);</code></pre></div>
+<p>Taking the last two elements of a slice:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)]
+
+</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&amp;mut </span>[<span class="kw">_</span>] = <span class="kw-2">&amp;mut </span>[<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>, <span class="string">&#39;d&#39;</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>tail = slice.take_mut(<span class="number">2</span>..).unwrap();
+
+<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&amp;mut </span>[<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>]);
+<span class="macro">assert_eq!</span>(tail, <span class="kw-2">&amp;mut </span>[<span class="string">&#39;c&#39;</span>, <span class="string">&#39;d&#39;</span>]);</code></pre></div>
+<p>Getting <code>None</code> when <code>range</code> is out of bounds:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)]
+
+</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&amp;mut </span>[<span class="kw">_</span>] = <span class="kw-2">&amp;mut </span>[<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>, <span class="string">&#39;d&#39;</span>];
+
+<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take_mut(<span class="number">5</span>..));
+<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take_mut(..<span class="number">5</span>));
+<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take_mut(..=<span class="number">4</span>));
+<span class="kw">let </span>expected: <span class="kw-2">&amp;mut </span>[<span class="kw">_</span>] = <span class="kw-2">&amp;mut </span>[<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>, <span class="string">&#39;d&#39;</span>];
+<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(expected), slice.take_mut(..<span class="number">4</span>));</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take_first" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#4006">source</a><h4 class="code-header">pub fn <a href="#method.take_first" class="fnname">take_first</a>&lt;'a&gt;(self: &amp;mut &amp;'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>) -&gt; <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.reference.html">&amp;'a </a>T&gt;</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the first element of the slice and returns a reference
+to it.</p>
+<p>Returns <code>None</code> if the slice is empty.</p>
+<h5 id="examples-116"><a href="#examples-116">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)]
+
+</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&amp;</span>[<span class="kw">_</span>] = <span class="kw-2">&amp;</span>[<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>];
+<span class="kw">let </span>first = slice.take_first().unwrap();
+
+<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&amp;</span>[<span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>]);
+<span class="macro">assert_eq!</span>(first, <span class="kw-2">&amp;</span><span class="string">&#39;a&#39;</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take_first_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#4031">source</a><h4 class="code-header">pub fn <a href="#method.take_first_mut" class="fnname">take_first_mut</a>&lt;'a&gt;(self: &amp;mut &amp;'a mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>) -&gt; <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.reference.html">&amp;'a mut </a>T&gt;</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the first element of the slice and returns a mutable
+reference to it.</p>
+<p>Returns <code>None</code> if the slice is empty.</p>
+<h5 id="examples-117"><a href="#examples-117">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)]
+
+</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&amp;mut </span>[<span class="kw">_</span>] = <span class="kw-2">&amp;mut </span>[<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>];
+<span class="kw">let </span>first = slice.take_first_mut().unwrap();
+<span class="kw-2">*</span>first = <span class="string">&#39;d&#39;</span>;
+
+<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&amp;</span>[<span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>]);
+<span class="macro">assert_eq!</span>(first, <span class="kw-2">&amp;</span><span class="string">&#39;d&#39;</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take_last" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#4055">source</a><h4 class="code-header">pub fn <a href="#method.take_last" class="fnname">take_last</a>&lt;'a&gt;(self: &amp;mut &amp;'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>) -&gt; <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.reference.html">&amp;'a </a>T&gt;</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the last element of the slice and returns a reference
+to it.</p>
+<p>Returns <code>None</code> if the slice is empty.</p>
+<h5 id="examples-118"><a href="#examples-118">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)]
+
+</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&amp;</span>[<span class="kw">_</span>] = <span class="kw-2">&amp;</span>[<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>];
+<span class="kw">let </span>last = slice.take_last().unwrap();
+
+<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&amp;</span>[<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>]);
+<span class="macro">assert_eq!</span>(last, <span class="kw-2">&amp;</span><span class="string">&#39;c&#39;</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take_last_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#4080">source</a><h4 class="code-header">pub fn <a href="#method.take_last_mut" class="fnname">take_last_mut</a>&lt;'a&gt;(self: &amp;mut &amp;'a mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>) -&gt; <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.reference.html">&amp;'a mut </a>T&gt;</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the last element of the slice and returns a mutable
+reference to it.</p>
+<p>Returns <code>None</code> if the slice is empty.</p>
+<h5 id="examples-119"><a href="#examples-119">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)]
+
+</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&amp;mut </span>[<span class="kw">_</span>] = <span class="kw-2">&amp;mut </span>[<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>];
+<span class="kw">let </span>last = slice.take_last_mut().unwrap();
+<span class="kw-2">*</span>last = <span class="string">&#39;d&#39;</span>;
+
+<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&amp;</span>[<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>]);
+<span class="macro">assert_eq!</span>(last, <span class="kw-2">&amp;</span><span class="string">&#39;d&#39;</span>);</code></pre></div>
+</div></details></div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.flatten" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#4117">source</a><h4 class="code-header">pub fn <a href="#method.flatten" class="fnname">flatten</a>(&amp;self) -&gt; &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a><span class="notable-traits" data-ty="&amp;[T]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_flatten</code>)</span></div></span></summary><div class="docblock"><p>Takes a <code>&amp;[[T; N]]</code>, and flattens it to a <code>&amp;[T]</code>.</p>
+<h5 id="panics-37"><a href="#panics-37">Panics</a></h5>
+<p>This panics if the length of the resulting slice would overflow a <code>usize</code>.</p>
+<p>This is only possible when flattening a slice of arrays of zero-sized
+types, and thus tends to be irrelevant in practice. If
+<code>size_of::&lt;T&gt;() &gt; 0</code>, this will never panic.</p>
+<h5 id="examples-120"><a href="#examples-120">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_flatten)]
+
+</span><span class="macro">assert_eq!</span>([[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>], [<span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]].flatten(), <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
+
+<span class="macro">assert_eq!</span>(
+ [[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>], [<span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]].flatten(),
+ [[<span class="number">1</span>, <span class="number">2</span>], [<span class="number">3</span>, <span class="number">4</span>], [<span class="number">5</span>, <span class="number">6</span>]].flatten(),
+);
+
+<span class="kw">let </span>slice_of_empty_arrays: <span class="kw-2">&amp;</span>[[i32; <span class="number">0</span>]] = <span class="kw-2">&amp;</span>[[], [], [], [], []];
+<span class="macro">assert!</span>(slice_of_empty_arrays.flatten().is_empty());
+
+<span class="kw">let </span>empty_slice_of_arrays: <span class="kw-2">&amp;</span>[[u32; <span class="number">10</span>]] = <span class="kw-2">&amp;</span>[];
+<span class="macro">assert!</span>(empty_slice_of_arrays.flatten().is_empty());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.flatten_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/slice/mod.rs.html#4155">source</a><h4 class="code-header">pub fn <a href="#method.flatten_mut" class="fnname">flatten_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a><span class="notable-traits" data-ty="&amp;mut [T]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_flatten</code>)</span></div></span></summary><div class="docblock"><p>Takes a <code>&amp;mut [[T; N]]</code>, and flattens it to a <code>&amp;mut [T]</code>.</p>
+<h5 id="panics-38"><a href="#panics-38">Panics</a></h5>
+<p>This panics if the length of the resulting slice would overflow a <code>usize</code>.</p>
+<p>This is only possible when flattening a slice of arrays of zero-sized
+types, and thus tends to be irrelevant in practice. If
+<code>size_of::&lt;T&gt;() &gt; 0</code>, this will never panic.</p>
+<h5 id="examples-121"><a href="#examples-121">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_flatten)]
+
+</span><span class="kw">fn </span>add_5_to_all(slice: <span class="kw-2">&amp;mut </span>[i32]) {
+ <span class="kw">for </span>i <span class="kw">in </span>slice {
+ <span class="kw-2">*</span>i += <span class="number">5</span>;
+ }
+}
+
+<span class="kw">let </span><span class="kw-2">mut </span>array = [[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>], [<span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>], [<span class="number">7</span>, <span class="number">8</span>, <span class="number">9</span>]];
+add_5_to_all(array.flatten_mut());
+<span class="macro">assert_eq!</span>(array, [[<span class="number">6</span>, <span class="number">7</span>, <span class="number">8</span>], [<span class="number">9</span>, <span class="number">10</span>, <span class="number">11</span>], [<span class="number">12</span>, <span class="number">13</span>, <span class="number">14</span>]]);</code></pre></div>
+</div></details></div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sort" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/slice.rs.html#202-204">source</a></span><h4 class="code-header">pub fn <a href="#method.sort" class="fnname">sort</a>(&amp;mut self)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Sorts the slice.</p>
+<p>This sort is stable (i.e., does not reorder equal elements) and <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case.</p>
+<p>When applicable, unstable sorting is preferred because it is generally faster than stable
+sorting and it doesn’t allocate auxiliary memory.
+See <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.sort_unstable"><code>sort_unstable</code></a>.</p>
+<h5 id="current-implementation-8"><a href="#current-implementation-8">Current implementation</a></h5>
+<p>The current algorithm is an adaptive, iterative merge sort inspired by
+<a href="https://en.wikipedia.org/wiki/Timsort">timsort</a>.
+It is designed to be very fast in cases where the slice is nearly sorted, or consists of
+two or more sorted sequences concatenated one after another.</p>
+<p>Also, it allocates temporary storage half the size of <code>self</code>, but for short slices a
+non-allocating insertion sort is used instead.</p>
+<h5 id="examples-122"><a href="#examples-122">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>];
+
+v.sort();
+<span class="macro">assert!</span>(v == [-<span class="number">5</span>, -<span class="number">3</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sort_by" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/slice.rs.html#258-260">source</a></span><h4 class="code-header">pub fn <a href="#method.sort_by" class="fnname">sort_by</a>&lt;F&gt;(&amp;mut self, compare: F)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</span></h4></section></summary><div class="docblock"><p>Sorts the slice with a comparator function.</p>
+<p>This sort is stable (i.e., does not reorder equal elements) and <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case.</p>
+<p>The comparator function must define a total ordering for the elements in the slice. If
+the ordering is not total, the order of the elements is unspecified. An order is a
+total order if it is (for all <code>a</code>, <code>b</code> and <code>c</code>):</p>
+<ul>
+<li>total and antisymmetric: exactly one of <code>a &lt; b</code>, <code>a == b</code> or <code>a &gt; b</code> is true, and</li>
+<li>transitive, <code>a &lt; b</code> and <code>b &lt; c</code> implies <code>a &lt; c</code>. The same must hold for both <code>==</code> and <code>&gt;</code>.</li>
+</ul>
+<p>For example, while <a href="https://doc.rust-lang.org/nightly/std/primitive.f64.html" title="f64"><code>f64</code></a> doesn’t implement <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="Ord"><code>Ord</code></a> because <code>NaN != NaN</code>, we can use
+<code>partial_cmp</code> as our sort function when we know the slice doesn’t contain a <code>NaN</code>.</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>floats = [<span class="number">5f64</span>, <span class="number">4.0</span>, <span class="number">1.0</span>, <span class="number">3.0</span>, <span class="number">2.0</span>];
+floats.sort_by(|a, b| a.partial_cmp(b).unwrap());
+<span class="macro">assert_eq!</span>(floats, [<span class="number">1.0</span>, <span class="number">2.0</span>, <span class="number">3.0</span>, <span class="number">4.0</span>, <span class="number">5.0</span>]);</code></pre></div>
+<p>When applicable, unstable sorting is preferred because it is generally faster than stable
+sorting and it doesn’t allocate auxiliary memory.
+See <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.sort_unstable_by"><code>sort_unstable_by</code></a>.</p>
+<h5 id="current-implementation-9"><a href="#current-implementation-9">Current implementation</a></h5>
+<p>The current algorithm is an adaptive, iterative merge sort inspired by
+<a href="https://en.wikipedia.org/wiki/Timsort">timsort</a>.
+It is designed to be very fast in cases where the slice is nearly sorted, or consists of
+two or more sorted sequences concatenated one after another.</p>
+<p>Also, it allocates temporary storage half the size of <code>self</code>, but for short slices a
+non-allocating insertion sort is used instead.</p>
+<h5 id="examples-123"><a href="#examples-123">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">5</span>, <span class="number">4</span>, <span class="number">1</span>, <span class="number">3</span>, <span class="number">2</span>];
+v.sort_by(|a, b| a.cmp(b));
+<span class="macro">assert!</span>(v == [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]);
+
+<span class="comment">// reverse sorting
+</span>v.sort_by(|a, b| b.cmp(a));
+<span class="macro">assert!</span>(v == [<span class="number">5</span>, <span class="number">4</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">1</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sort_by_key" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.7.0">1.7.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/slice.rs.html#300-303">source</a></span><h4 class="code-header">pub fn <a href="#method.sort_by_key" class="fnname">sort_by_key</a>&lt;K, F&gt;(&amp;mut self, f: F)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; K,<br>&nbsp;&nbsp;&nbsp;&nbsp;K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Sorts the slice with a key extraction function.</p>
+<p>This sort is stable (i.e., does not reorder equal elements) and <em>O</em>(<em>m</em> * <em>n</em> * log(<em>n</em>))
+worst-case, where the key function is <em>O</em>(<em>m</em>).</p>
+<p>For expensive key functions (e.g. functions that are not simple property accesses or
+basic operations), <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.sort_by_cached_key"><code>sort_by_cached_key</code></a> is likely to be
+significantly faster, as it does not recompute element keys.</p>
+<p>When applicable, unstable sorting is preferred because it is generally faster than stable
+sorting and it doesn’t allocate auxiliary memory.
+See <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.sort_unstable_by_key"><code>sort_unstable_by_key</code></a>.</p>
+<h5 id="current-implementation-10"><a href="#current-implementation-10">Current implementation</a></h5>
+<p>The current algorithm is an adaptive, iterative merge sort inspired by
+<a href="https://en.wikipedia.org/wiki/Timsort">timsort</a>.
+It is designed to be very fast in cases where the slice is nearly sorted, or consists of
+two or more sorted sequences concatenated one after another.</p>
+<p>Also, it allocates temporary storage half the size of <code>self</code>, but for short slices a
+non-allocating insertion sort is used instead.</p>
+<h5 id="examples-124"><a href="#examples-124">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5i32</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>];
+
+v.sort_by_key(|k| k.abs());
+<span class="macro">assert!</span>(v == [<span class="number">1</span>, <span class="number">2</span>, -<span class="number">3</span>, <span class="number">4</span>, -<span class="number">5</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sort_by_cached_key" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.34.0">1.34.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/slice.rs.html#347-350">source</a></span><h4 class="code-header">pub fn <a href="#method.sort_by_cached_key" class="fnname">sort_by_cached_key</a>&lt;K, F&gt;(&amp;mut self, f: F)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; K,<br>&nbsp;&nbsp;&nbsp;&nbsp;K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Sorts the slice with a key extraction function.</p>
+<p>During sorting, the key function is called at most once per element, by using
+temporary storage to remember the results of key evaluation.
+The order of calls to the key function is unspecified and may change in future versions
+of the standard library.</p>
+<p>This sort is stable (i.e., does not reorder equal elements) and <em>O</em>(<em>m</em> * <em>n</em> + <em>n</em> * log(<em>n</em>))
+worst-case, where the key function is <em>O</em>(<em>m</em>).</p>
+<p>For simple key functions (e.g., functions that are property accesses or
+basic operations), <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.sort_by_key"><code>sort_by_key</code></a> is likely to be
+faster.</p>
+<h5 id="current-implementation-11"><a href="#current-implementation-11">Current implementation</a></h5>
+<p>The current algorithm is based on <a href="https://github.com/orlp/pdqsort">pattern-defeating quicksort</a> by Orson Peters,
+which combines the fast average case of randomized quicksort with the fast worst case of
+heapsort, while achieving linear time on slices with certain patterns. It uses some
+randomization to avoid degenerate cases, but with a fixed seed to always provide
+deterministic behavior.</p>
+<p>In the worst case, the algorithm allocates temporary storage in a <code>Vec&lt;(K, usize)&gt;</code> the
+length of the slice.</p>
+<h5 id="examples-125"><a href="#examples-125">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5i32</span>, <span class="number">4</span>, <span class="number">32</span>, -<span class="number">3</span>, <span class="number">2</span>];
+
+v.sort_by_cached_key(|k| k.to_string());
+<span class="macro">assert!</span>(v == [-<span class="number">3</span>, -<span class="number">5</span>, <span class="number">2</span>, <span class="number">32</span>, <span class="number">4</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_vec" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/slice.rs.html#407-409">source</a></span><h4 class="code-header">pub fn <a href="#method.to_vec" class="fnname">to_vec</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h4></section></summary><div class="docblock"><p>Copies <code>self</code> into a new <code>Vec</code>.</p>
+<h5 id="examples-126"><a href="#examples-126">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="kw">let </span>x = s.to_vec();
+<span class="comment">// Here, `s` and `x` can be modified independently.</span></code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_vec_in" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/alloc/slice.rs.html#431-433">source</a><h4 class="code-header">pub fn <a href="#method.to_vec_in" class="fnname">to_vec_in</a>&lt;A&gt;(&amp;self, alloc: A) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;T, A&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/nightly/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>allocator_api</code>)</span></div></span></summary><div class="docblock"><p>Copies <code>self</code> into a new <code>Vec</code> with an allocator.</p>
+<h5 id="examples-127"><a href="#examples-127">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(allocator_api)]
+
+</span><span class="kw">use </span>std::alloc::System;
+
+<span class="kw">let </span>s = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
+<span class="kw">let </span>x = s.to_vec_in(System);
+<span class="comment">// Here, `s` and `x` can be modified independently.</span></code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.repeat" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.40.0">1.40.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/slice.rs.html#484-486">source</a></span><h4 class="code-header">pub fn <a href="#method.repeat" class="fnname">repeat</a>(&amp;self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>,</span></h4></section></summary><div class="docblock"><p>Creates a vector by repeating a slice <code>n</code> times.</p>
+<h5 id="panics-39"><a href="#panics-39">Panics</a></h5>
+<p>This function will panic if the capacity would overflow.</p>
+<h5 id="examples-128"><a href="#examples-128">Examples</a></h5>
+<p>Basic usage:</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="macro">assert_eq!</span>([<span class="number">1</span>, <span class="number">2</span>].repeat(<span class="number">3</span>), <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">1</span>, <span class="number">2</span>]);</code></pre></div>
+<p>A panic upon overflow:</p>
+
+<div class="example-wrap should_panic"><div class='tooltip'>ⓘ</div><pre class="rust rust-example-rendered"><code><span class="comment">// this will panic at runtime
+</span><span class="string">b&quot;0123456789abcdef&quot;</span>.repeat(usize::MAX);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.concat" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/slice.rs.html#552-554">source</a></span><h4 class="code-header">pub fn <a href="#method.concat" class="fnname">concat</a>&lt;Item&gt;(&amp;self) -&gt; &lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a> as <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/slice/trait.Concat.html" title="trait alloc::slice::Concat">Concat</a>&lt;Item&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/alloc/slice/trait.Concat.html#associatedtype.Output" title="type alloc::slice::Concat::Output">Output</a><span class="notable-traits" data-ty="&lt;[T] as Concat&lt;Item&gt;&gt;::Output"><span class="notable-traits-tooltip">ⓘ</span></span><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/slice/trait.Concat.html" title="trait alloc::slice::Concat">Concat</a>&lt;Item&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Item: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class="docblock"><p>Flattens a slice of <code>T</code> into a single value <code>Self::Output</code>.</p>
+<h5 id="examples-129"><a href="#examples-129">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="macro">assert_eq!</span>([<span class="string">&quot;hello&quot;</span>, <span class="string">&quot;world&quot;</span>].concat(), <span class="string">&quot;helloworld&quot;</span>);
+<span class="macro">assert_eq!</span>([[<span class="number">1</span>, <span class="number">2</span>], [<span class="number">3</span>, <span class="number">4</span>]].concat(), [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.join" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.3.0">1.3.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/slice.rs.html#571-573">source</a></span><h4 class="code-header">pub fn <a href="#method.join" class="fnname">join</a>&lt;Separator&gt;(&amp;self, sep: Separator) -&gt; &lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a> as <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/slice/trait.Join.html" title="trait alloc::slice::Join">Join</a>&lt;Separator&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/alloc/slice/trait.Join.html#associatedtype.Output" title="type alloc::slice::Join::Output">Output</a><span class="notable-traits" data-ty="&lt;[T] as Join&lt;Separator&gt;&gt;::Output"><span class="notable-traits-tooltip">ⓘ</span></span><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/slice/trait.Join.html" title="trait alloc::slice::Join">Join</a>&lt;Separator&gt;,</span></h4></section></summary><div class="docblock"><p>Flattens a slice of <code>T</code> into a single value <code>Self::Output</code>, placing a
+given separator between each.</p>
+<h5 id="examples-130"><a href="#examples-130">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="macro">assert_eq!</span>([<span class="string">&quot;hello&quot;</span>, <span class="string">&quot;world&quot;</span>].join(<span class="string">&quot; &quot;</span>), <span class="string">&quot;hello world&quot;</span>);
+<span class="macro">assert_eq!</span>([[<span class="number">1</span>, <span class="number">2</span>], [<span class="number">3</span>, <span class="number">4</span>]].join(<span class="kw-2">&amp;</span><span class="number">0</span>), [<span class="number">1</span>, <span class="number">2</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">4</span>]);
+<span class="macro">assert_eq!</span>([[<span class="number">1</span>, <span class="number">2</span>], [<span class="number">3</span>, <span class="number">4</span>]].join(<span class="kw-2">&amp;</span>[<span class="number">0</span>, <span class="number">0</span>][..]), [<span class="number">1</span>, <span class="number">2</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">4</span>]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.connect" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/slice.rs.html#591-593">source</a></span><h4 class="code-header">pub fn <a href="#method.connect" class="fnname">connect</a>&lt;Separator&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self,<br>&nbsp;&nbsp;&nbsp;&nbsp;sep: Separator<br>) -&gt; &lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a> as <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/slice/trait.Join.html" title="trait alloc::slice::Join">Join</a>&lt;Separator&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/alloc/slice/trait.Join.html#associatedtype.Output" title="type alloc::slice::Join::Output">Output</a><span class="notable-traits" data-ty="&lt;[T] as Join&lt;Separator&gt;&gt;::Output"><span class="notable-traits-tooltip">ⓘ</span></span><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/slice/trait.Join.html" title="trait alloc::slice::Join">Join</a>&lt;Separator&gt;,</span></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 1.3.0: renamed to join</span></div></span></summary><div class="docblock"><p>Flattens a slice of <code>T</code> into a single value <code>Self::Output</code>, placing a
+given separator between each.</p>
+<h5 id="examples-131"><a href="#examples-131">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="macro">assert_eq!</span>([<span class="string">&quot;hello&quot;</span>, <span class="string">&quot;world&quot;</span>].connect(<span class="string">&quot; &quot;</span>), <span class="string">&quot;hello world&quot;</span>);
+<span class="macro">assert_eq!</span>([[<span class="number">1</span>, <span class="number">2</span>], [<span class="number">3</span>, <span class="number">4</span>]].connect(<span class="kw-2">&amp;</span><span class="number">0</span>), [<span class="number">1</span>, <span class="number">2</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">4</span>]);</code></pre></div>
+</div></details></div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_ascii_uppercase" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/slice.rs.html#616">source</a></span><h4 class="code-header">pub fn <a href="#method.to_ascii_uppercase" class="fnname">to_ascii_uppercase</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a vector containing a copy of this slice where each byte
+is mapped to its ASCII upper case equivalent.</p>
+<p>ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’,
+but non-ASCII letters are unchanged.</p>
+<p>To uppercase the value in-place, use <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.make_ascii_uppercase"><code>make_ascii_uppercase</code></a>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_ascii_lowercase" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/slice.rs.html#637">source</a></span><h4 class="code-header">pub fn <a href="#method.to_ascii_lowercase" class="fnname">to_ascii_lowercase</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a vector containing a copy of this slice where each byte
+is mapped to its ASCII lower case equivalent.</p>
+<p>ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’,
+but non-ASCII letters are unchanged.</p>
+<p>To lowercase the value in-place, use <a href="https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.make_ascii_lowercase"><code>make_ascii_lowercase</code></a>.</p>
+</div></details></div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5Bu8%5D%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1166-1171">source</a><a href="#impl-AsMut%3C%5Bu8%5D%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a>&lt;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1168-1170">source</a><a href="#method.as_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html#tymethod.as_mut" class="fnname">as_mut</a>(&amp;mut self) -&gt; &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;mut [u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5Bu8%5D%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1150-1155">source</a><a href="#impl-AsRef%3C%5Bu8%5D%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1152-1154">source</a><a href="#method.as_ref" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html#tymethod.as_ref" class="fnname">as_ref</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Borrow%3C%5Bu8%5D%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1235-1239">source</a><a href="#impl-Borrow%3C%5Bu8%5D%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1236-1238">source</a><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-BorrowMut%3C%5Bu8%5D%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1241-1245">source</a><a href="#impl-BorrowMut%3C%5Bu8%5D%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1242-1244">source</a><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;mut [u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Buf-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1055-1091">source</a><a href="#impl-Buf-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.remaining" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1057-1059">source</a><a href="#method.remaining" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#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></h4></section></summary><div class='docblock'>Returns the number of bytes between the current position and the end of
+the buffer. <a href="buf/trait.Buf.html#tymethod.remaining">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunk" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1062-1064">source</a><a href="#method.chunk" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#tymethod.chunk" class="fnname">chunk</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section></summary><div class='docblock'>Returns a slice starting at the current position and of length between 0
+and <code>Buf::remaining()</code>. Note that this <em>can</em> return shorter slice (this allows
+non-continuous internal representation). <a href="buf/trait.Buf.html#tymethod.chunk">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.advance" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1067-1086">source</a><a href="#method.advance" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#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>)</h4></section></summary><div class='docblock'>Advance the internal cursor of the Buf <a href="buf/trait.Buf.html#tymethod.advance">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.copy_to_bytes" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1088-1090">source</a><a href="#method.copy_to_bytes" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.copy_to_bytes" class="fnname">copy_to_bytes</a>(&amp;mut self, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h4></section></summary><div class='docblock'>Consumes <code>len</code> bytes inside self and returns new instance of <code>Bytes</code>
+with this data. <a href="buf/trait.Buf.html#method.copy_to_bytes">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunks_vectored" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#181-192">source</a><a href="#method.chunks_vectored" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.chunks_vectored" class="fnname">chunks_vectored</a>&lt;'a&gt;(&amp;'a self, dst: &amp;mut [<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a>&lt;'a&gt;]) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>std</code></strong> only.</div></span><div class='docblock'>Fills <code>dst</code> with potentially multiple slices starting at <code>self</code>’s
+current position. <a href="buf/trait.Buf.html#method.chunks_vectored">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.has_remaining" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#243-245">source</a><a href="#method.has_remaining" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Returns true if there are any more bytes to consume <a href="buf/trait.Buf.html#method.has_remaining">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.copy_to_slice" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#268-282">source</a><a href="#method.copy_to_slice" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.copy_to_slice" class="fnname">copy_to_slice</a>(&amp;mut self, dst: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section></summary><div class='docblock'>Copies bytes from <code>self</code> into <code>dst</code>. <a href="buf/trait.Buf.html#method.copy_to_slice">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#300-307">source</a><a href="#method.get_u8" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an unsigned 8 bit integer from <code>self</code>. <a href="buf/trait.Buf.html#method.get_u8">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#325-332">source</a><a href="#method.get_i8" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets a signed 8 bit integer from <code>self</code>. <a href="buf/trait.Buf.html#method.get_i8">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u16" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#350-352">source</a><a href="#method.get_u16" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_u16" class="fnname">get_u16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h4></section></summary><div class='docblock'>Gets an unsigned 16 bit integer from <code>self</code> in big-endian byte order. <a href="buf/trait.Buf.html#method.get_u16">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u16_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#370-372">source</a><a href="#method.get_u16_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an unsigned 16 bit integer from <code>self</code> in little-endian byte order. <a href="buf/trait.Buf.html#method.get_u16_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u16_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#393-395">source</a><a href="#method.get_u16_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_u16_ne" class="fnname">get_u16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h4></section></summary><div class='docblock'>Gets an unsigned 16 bit integer from <code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_u16_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i16" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#413-415">source</a><a href="#method.get_i16" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_i16" class="fnname">get_i16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></h4></section></summary><div class='docblock'>Gets a signed 16 bit integer from <code>self</code> in big-endian byte order. <a href="buf/trait.Buf.html#method.get_i16">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i16_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#433-435">source</a><a href="#method.get_i16_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets a signed 16 bit integer from <code>self</code> in little-endian byte order. <a href="buf/trait.Buf.html#method.get_i16_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i16_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#456-458">source</a><a href="#method.get_i16_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_i16_ne" class="fnname">get_i16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></h4></section></summary><div class='docblock'>Gets a signed 16 bit integer from <code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_i16_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#476-478">source</a><a href="#method.get_u32" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_u32" class="fnname">get_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'>Gets an unsigned 32 bit integer from <code>self</code> in the big-endian byte order. <a href="buf/trait.Buf.html#method.get_u32">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u32_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#496-498">source</a><a href="#method.get_u32_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an unsigned 32 bit integer from <code>self</code> in the little-endian byte order. <a href="buf/trait.Buf.html#method.get_u32_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u32_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#519-521">source</a><a href="#method.get_u32_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_u32_ne" class="fnname">get_u32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'>Gets an unsigned 32 bit integer from <code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_u32_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#539-541">source</a><a href="#method.get_i32" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_i32" class="fnname">get_i32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section></summary><div class='docblock'>Gets a signed 32 bit integer from <code>self</code> in big-endian byte order. <a href="buf/trait.Buf.html#method.get_i32">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i32_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#559-561">source</a><a href="#method.get_i32_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets a signed 32 bit integer from <code>self</code> in little-endian byte order. <a href="buf/trait.Buf.html#method.get_i32_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i32_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#582-584">source</a><a href="#method.get_i32_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_i32_ne" class="fnname">get_i32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section></summary><div class='docblock'>Gets a signed 32 bit integer from <code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_i32_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#602-604">source</a><a href="#method.get_u64" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_u64" class="fnname">get_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section></summary><div class='docblock'>Gets an unsigned 64 bit integer from <code>self</code> in big-endian byte order. <a href="buf/trait.Buf.html#method.get_u64">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u64_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#622-624">source</a><a href="#method.get_u64_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an unsigned 64 bit integer from <code>self</code> in little-endian byte order. <a href="buf/trait.Buf.html#method.get_u64_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u64_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#645-647">source</a><a href="#method.get_u64_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_u64_ne" class="fnname">get_u64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section></summary><div class='docblock'>Gets an unsigned 64 bit integer from <code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_u64_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#665-667">source</a><a href="#method.get_i64" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_i64" class="fnname">get_i64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section></summary><div class='docblock'>Gets a signed 64 bit integer from <code>self</code> in big-endian byte order. <a href="buf/trait.Buf.html#method.get_i64">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i64_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#685-687">source</a><a href="#method.get_i64_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets a signed 64 bit integer from <code>self</code> in little-endian byte order. <a href="buf/trait.Buf.html#method.get_i64_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i64_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#708-710">source</a><a href="#method.get_i64_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_i64_ne" class="fnname">get_i64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section></summary><div class='docblock'>Gets a signed 64 bit integer from <code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_i64_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u128" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#728-730">source</a><a href="#method.get_u128" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_u128" class="fnname">get_u128</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></h4></section></summary><div class='docblock'>Gets an unsigned 128 bit integer from <code>self</code> in big-endian byte order. <a href="buf/trait.Buf.html#method.get_u128">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u128_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#748-750">source</a><a href="#method.get_u128_le" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_u128_le" class="fnname">get_u128_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></h4></section></summary><div class='docblock'>Gets an unsigned 128 bit integer from <code>self</code> in little-endian byte order. <a href="buf/trait.Buf.html#method.get_u128_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u128_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#771-773">source</a><a href="#method.get_u128_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_u128_ne" class="fnname">get_u128_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></h4></section></summary><div class='docblock'>Gets an unsigned 128 bit integer from <code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_u128_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i128" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#791-793">source</a><a href="#method.get_i128" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_i128" class="fnname">get_i128</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a></h4></section></summary><div class='docblock'>Gets a signed 128 bit integer from <code>self</code> in big-endian byte order. <a href="buf/trait.Buf.html#method.get_i128">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i128_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#811-813">source</a><a href="#method.get_i128_le" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_i128_le" class="fnname">get_i128_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a></h4></section></summary><div class='docblock'>Gets a signed 128 bit integer from <code>self</code> in little-endian byte order. <a href="buf/trait.Buf.html#method.get_i128_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i128_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#834-836">source</a><a href="#method.get_i128_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_i128_ne" class="fnname">get_i128_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a></h4></section></summary><div class='docblock'>Gets a signed 128 bit integer from <code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_i128_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_uint" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#854-856">source</a><a href="#method.get_uint" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_uint" class="fnname">get_uint</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></h4></section></summary><div class='docblock'>Gets an unsigned n-byte integer from <code>self</code> in big-endian byte order. <a href="buf/trait.Buf.html#method.get_uint">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_uint_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#874-876">source</a><a href="#method.get_uint_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an unsigned n-byte integer from <code>self</code> in little-endian byte order. <a href="buf/trait.Buf.html#method.get_uint_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_uint_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#898-904">source</a><a href="#method.get_uint_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_uint_ne" class="fnname">get_uint_ne</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></h4></section></summary><div class='docblock'>Gets an unsigned n-byte integer from <code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_uint_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_int" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#923-925">source</a><a href="#method.get_int" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_int" class="fnname">get_int</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></h4></section></summary><div class='docblock'>Gets a signed n-byte integer from <code>self</code> in big-endian byte order. <a href="buf/trait.Buf.html#method.get_int">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_int_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#944-946">source</a><a href="#method.get_int_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets a signed n-byte integer from <code>self</code> in little-endian byte order. <a href="buf/trait.Buf.html#method.get_int_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_int_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#968-974">source</a><a href="#method.get_int_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_int_ne" class="fnname">get_int_ne</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></h4></section></summary><div class='docblock'>Gets a signed n-byte integer from <code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_int_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#993-995">source</a><a href="#method.get_f32" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_f32" class="fnname">get_f32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></h4></section></summary><div class='docblock'>Gets an IEEE754 single-precision (4 bytes) floating point number from
+<code>self</code> in big-endian byte order. <a href="buf/trait.Buf.html#method.get_f32">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f32_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1014-1016">source</a><a href="#method.get_f32_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an IEEE754 single-precision (4 bytes) floating point number from
+<code>self</code> in little-endian byte order. <a href="buf/trait.Buf.html#method.get_f32_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f32_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1038-1040">source</a><a href="#method.get_f32_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_f32_ne" class="fnname">get_f32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></h4></section></summary><div class='docblock'>Gets an IEEE754 single-precision (4 bytes) floating point number from
+<code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_f32_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1059-1061">source</a><a href="#method.get_f64" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_f64" class="fnname">get_f64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></h4></section></summary><div class='docblock'>Gets an IEEE754 double-precision (8 bytes) floating point number from
+<code>self</code> in big-endian byte order. <a href="buf/trait.Buf.html#method.get_f64">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f64_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1080-1082">source</a><a href="#method.get_f64_le" class="anchor"></a><h4 class="code-header">fn <a href="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></h4></section></summary><div class='docblock'>Gets an IEEE754 double-precision (8 bytes) floating point number from
+<code>self</code> in little-endian byte order. <a href="buf/trait.Buf.html#method.get_f64_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f64_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1104-1106">source</a><a href="#method.get_f64_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.get_f64_ne" class="fnname">get_f64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></h4></section></summary><div class='docblock'>Gets an IEEE754 double-precision (8 bytes) floating point number from
+<code>self</code> in native-endian byte order. <a href="buf/trait.Buf.html#method.get_f64_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1160-1165">source</a><a href="#method.take-1" class="anchor"></a><h4 class="code-header">fn <a href="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="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>,</span></h4></section></summary><div class='docblock'>Creates an adaptor which will read at most <code>limit</code> bytes from <code>self</code>. <a href="buf/trait.Buf.html#method.take">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chain" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1182-1187">source</a><a href="#method.chain" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.chain" class="fnname">chain</a>&lt;U:&nbsp;<a class="trait" href="buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt;(self, next: U) -&gt; <a class="struct" href="buf/struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;Self, U&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>,</span></h4></section></summary><div class='docblock'>Creates an adaptor which will chain this buffer with another. <a href="buf/trait.Buf.html#method.chain">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.reader" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1214-1219">source</a><a href="#method.reader" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.Buf.html#method.reader" class="fnname">reader</a>(self) -&gt; <a class="struct" href="buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;Self&gt;<span class="notable-traits" data-ty="Reader&lt;Self&gt;"><span class="notable-traits-tooltip">ⓘ</span></span><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>,</span></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>std</code></strong> only.</div></span><div class='docblock'>Creates an adaptor which implements the <code>Read</code> trait for <code>self</code>. <a href="buf/trait.Buf.html#method.reader">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-BufMut-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1093-1148">source</a><a href="#impl-BufMut-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="buf/trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a> for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.remaining_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1095-1097">source</a><a href="#method.remaining_mut" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#tymethod.remaining_mut" class="fnname">remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Returns the number of bytes that can be written from the current
+position until the end of the buffer is reached. <a href="buf/trait.BufMut.html#tymethod.remaining_mut">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.advance_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1100-1107">source</a><a href="#method.advance_mut" class="anchor"></a><h4 class="code-header">unsafe fn <a href="buf/trait.BufMut.html#tymethod.advance_mut" class="fnname">advance_mut</a>(&amp;mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Advance the internal cursor of the BufMut <a href="buf/trait.BufMut.html#tymethod.advance_mut">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunk_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1110-1115">source</a><a href="#method.chunk_mut" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#tymethod.chunk_mut" class="fnname">chunk_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="buf/struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class='docblock'>Returns a mutable slice starting at the current BufMut position and of
+length between 0 and <code>BufMut::remaining_mut()</code>. Note that this <em>can</em> be shorter than the
+whole remainder of the buffer (this allows non-continuous implementation). <a href="buf/trait.BufMut.html#tymethod.chunk_mut">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1120-1130">source</a><a href="#method.put" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put" class="fnname">put</a>&lt;T:&nbsp;<a class="trait" href="buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt;(&amp;mut self, src: T)<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>,</span></h4></section></summary><div class='docblock'>Transfer bytes into <code>self</code> from <code>src</code> and advance the cursor by the
+number of bytes written. <a href="buf/trait.BufMut.html#method.put">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_slice" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1132-1134">source</a><a href="#method.put_slice" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_slice" class="fnname">put_slice</a>(&amp;mut self, src: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section></summary><div class='docblock'>Transfer bytes into <code>self</code> from <code>src</code> and advance the cursor by the
+number of bytes written. <a href="buf/trait.BufMut.html#method.put_slice">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_bytes" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1136-1147">source</a><a href="#method.put_bytes" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_bytes" class="fnname">put_bytes</a>(&amp;mut self, val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Put <code>cnt</code> bytes <code>val</code> into <code>self</code>. <a href="buf/trait.BufMut.html#method.put_bytes">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.has_remaining_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#128-130">source</a><a href="#method.has_remaining_mut" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.has_remaining_mut" class="fnname">has_remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Returns true if there is space in <code>self</code> for more bytes. <a href="buf/trait.BufMut.html#method.has_remaining_mut">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#321-324">source</a><a href="#method.put_u8" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_u8" class="fnname">put_u8</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 8 bit integer to <code>self</code>. <a href="buf/trait.BufMut.html#method.put_u8">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#345-348">source</a><a href="#method.put_i8" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_i8" class="fnname">put_i8</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>)</h4></section></summary><div class='docblock'>Writes a signed 8 bit integer to <code>self</code>. <a href="buf/trait.BufMut.html#method.put_i8">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u16" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#369-371">source</a><a href="#method.put_u16" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_u16" class="fnname">put_u16</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 16 bit integer to <code>self</code> in big-endian byte order. <a href="buf/trait.BufMut.html#method.put_u16">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u16_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#392-394">source</a><a href="#method.put_u16_le" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_u16_le" class="fnname">put_u16_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 16 bit integer to <code>self</code> in little-endian byte order. <a href="buf/trait.BufMut.html#method.put_u16_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u16_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#419-421">source</a><a href="#method.put_u16_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_u16_ne" class="fnname">put_u16_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 16 bit integer to <code>self</code> in native-endian byte order. <a href="buf/trait.BufMut.html#method.put_u16_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i16" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#442-444">source</a><a href="#method.put_i16" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_i16" class="fnname">put_i16</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section></summary><div class='docblock'>Writes a signed 16 bit integer to <code>self</code> in big-endian byte order. <a href="buf/trait.BufMut.html#method.put_i16">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i16_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#465-467">source</a><a href="#method.put_i16_le" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_i16_le" class="fnname">put_i16_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section></summary><div class='docblock'>Writes a signed 16 bit integer to <code>self</code> in little-endian byte order. <a href="buf/trait.BufMut.html#method.put_i16_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i16_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#492-494">source</a><a href="#method.put_i16_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_i16_ne" class="fnname">put_i16_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section></summary><div class='docblock'>Writes a signed 16 bit integer to <code>self</code> in native-endian byte order. <a href="buf/trait.BufMut.html#method.put_i16_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#515-517">source</a><a href="#method.put_u32" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_u32" class="fnname">put_u32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 32 bit integer to <code>self</code> in big-endian byte order. <a href="buf/trait.BufMut.html#method.put_u32">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u32_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#538-540">source</a><a href="#method.put_u32_le" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_u32_le" class="fnname">put_u32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 32 bit integer to <code>self</code> in little-endian byte order. <a href="buf/trait.BufMut.html#method.put_u32_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u32_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#565-567">source</a><a href="#method.put_u32_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_u32_ne" class="fnname">put_u32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 32 bit integer to <code>self</code> in native-endian byte order. <a href="buf/trait.BufMut.html#method.put_u32_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#588-590">source</a><a href="#method.put_i32" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_i32" class="fnname">put_i32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section></summary><div class='docblock'>Writes a signed 32 bit integer to <code>self</code> in big-endian byte order. <a href="buf/trait.BufMut.html#method.put_i32">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i32_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#611-613">source</a><a href="#method.put_i32_le" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_i32_le" class="fnname">put_i32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section></summary><div class='docblock'>Writes a signed 32 bit integer to <code>self</code> in little-endian byte order. <a href="buf/trait.BufMut.html#method.put_i32_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i32_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#638-640">source</a><a href="#method.put_i32_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_i32_ne" class="fnname">put_i32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section></summary><div class='docblock'>Writes a signed 32 bit integer to <code>self</code> in native-endian byte order. <a href="buf/trait.BufMut.html#method.put_i32_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#661-663">source</a><a href="#method.put_u64" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_u64" class="fnname">put_u64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 64 bit integer to <code>self</code> in the big-endian byte order. <a href="buf/trait.BufMut.html#method.put_u64">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u64_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#684-686">source</a><a href="#method.put_u64_le" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_u64_le" class="fnname">put_u64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 64 bit integer to <code>self</code> in little-endian byte order. <a href="buf/trait.BufMut.html#method.put_u64_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u64_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#711-713">source</a><a href="#method.put_u64_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_u64_ne" class="fnname">put_u64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 64 bit integer to <code>self</code> in native-endian byte order. <a href="buf/trait.BufMut.html#method.put_u64_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#734-736">source</a><a href="#method.put_i64" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_i64" class="fnname">put_i64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section></summary><div class='docblock'>Writes a signed 64 bit integer to <code>self</code> in the big-endian byte order. <a href="buf/trait.BufMut.html#method.put_i64">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i64_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#757-759">source</a><a href="#method.put_i64_le" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_i64_le" class="fnname">put_i64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section></summary><div class='docblock'>Writes a signed 64 bit integer to <code>self</code> in little-endian byte order. <a href="buf/trait.BufMut.html#method.put_i64_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i64_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#784-786">source</a><a href="#method.put_i64_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_i64_ne" class="fnname">put_i64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section></summary><div class='docblock'>Writes a signed 64 bit integer to <code>self</code> in native-endian byte order. <a href="buf/trait.BufMut.html#method.put_i64_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u128" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#807-809">source</a><a href="#method.put_u128" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_u128" class="fnname">put_u128</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 128 bit integer to <code>self</code> in the big-endian byte order. <a href="buf/trait.BufMut.html#method.put_u128">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u128_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#830-832">source</a><a href="#method.put_u128_le" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_u128_le" class="fnname">put_u128_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 128 bit integer to <code>self</code> in little-endian byte order. <a href="buf/trait.BufMut.html#method.put_u128_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u128_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#857-859">source</a><a href="#method.put_u128_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_u128_ne" class="fnname">put_u128_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>)</h4></section></summary><div class='docblock'>Writes an unsigned 128 bit integer to <code>self</code> in native-endian byte order. <a href="buf/trait.BufMut.html#method.put_u128_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i128" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#880-882">source</a><a href="#method.put_i128" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_i128" class="fnname">put_i128</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>)</h4></section></summary><div class='docblock'>Writes a signed 128 bit integer to <code>self</code> in the big-endian byte order. <a href="buf/trait.BufMut.html#method.put_i128">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i128_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#903-905">source</a><a href="#method.put_i128_le" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_i128_le" class="fnname">put_i128_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>)</h4></section></summary><div class='docblock'>Writes a signed 128 bit integer to <code>self</code> in little-endian byte order. <a href="buf/trait.BufMut.html#method.put_i128_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i128_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#930-932">source</a><a href="#method.put_i128_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_i128_ne" class="fnname">put_i128_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>)</h4></section></summary><div class='docblock'>Writes a signed 128 bit integer to <code>self</code> in native-endian byte order. <a href="buf/trait.BufMut.html#method.put_i128_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_uint" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#953-960">source</a><a href="#method.put_uint" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_uint" class="fnname">put_uint</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Writes an unsigned n-byte integer to <code>self</code> in big-endian byte order. <a href="buf/trait.BufMut.html#method.put_uint">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_uint_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#981-989">source</a><a href="#method.put_uint_le" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_uint_le" class="fnname">put_uint_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Writes an unsigned n-byte integer to <code>self</code> in the little-endian byte order. <a href="buf/trait.BufMut.html#method.put_uint_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_uint_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1014-1020">source</a><a href="#method.put_uint_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_uint_ne" class="fnname">put_uint_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Writes an unsigned n-byte integer to <code>self</code> in the native-endian byte order. <a href="buf/trait.BufMut.html#method.put_uint_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_int" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1041-1048">source</a><a href="#method.put_int" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_int" class="fnname">put_int</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Writes low <code>nbytes</code> of a signed integer to <code>self</code> in big-endian byte order. <a href="buf/trait.BufMut.html#method.put_int">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_int_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1069-1077">source</a><a href="#method.put_int_le" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_int_le" class="fnname">put_int_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Writes low <code>nbytes</code> of a signed integer to <code>self</code> in little-endian byte order. <a href="buf/trait.BufMut.html#method.put_int_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_int_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1102-1108">source</a><a href="#method.put_int_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_int_ne" class="fnname">put_int_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Writes low <code>nbytes</code> of a signed integer to <code>self</code> in native-endian byte order. <a href="buf/trait.BufMut.html#method.put_int_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1130-1132">source</a><a href="#method.put_f32" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_f32" class="fnname">put_f32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>)</h4></section></summary><div class='docblock'>Writes an IEEE754 single-precision (4 bytes) floating point number to
+<code>self</code> in big-endian byte order. <a href="buf/trait.BufMut.html#method.put_f32">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f32_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1154-1156">source</a><a href="#method.put_f32_le" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_f32_le" class="fnname">put_f32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>)</h4></section></summary><div class='docblock'>Writes an IEEE754 single-precision (4 bytes) floating point number to
+<code>self</code> in little-endian byte order. <a href="buf/trait.BufMut.html#method.put_f32_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f32_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1182-1184">source</a><a href="#method.put_f32_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_f32_ne" class="fnname">put_f32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>)</h4></section></summary><div class='docblock'>Writes an IEEE754 single-precision (4 bytes) floating point number to
+<code>self</code> in native-endian byte order. <a href="buf/trait.BufMut.html#method.put_f32_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1206-1208">source</a><a href="#method.put_f64" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_f64" class="fnname">put_f64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</h4></section></summary><div class='docblock'>Writes an IEEE754 double-precision (8 bytes) floating point number to
+<code>self</code> in big-endian byte order. <a href="buf/trait.BufMut.html#method.put_f64">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f64_le" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1230-1232">source</a><a href="#method.put_f64_le" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_f64_le" class="fnname">put_f64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</h4></section></summary><div class='docblock'>Writes an IEEE754 double-precision (8 bytes) floating point number to
+<code>self</code> in little-endian byte order. <a href="buf/trait.BufMut.html#method.put_f64_le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f64_ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1258-1260">source</a><a href="#method.put_f64_ne" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.put_f64_ne" class="fnname">put_f64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</h4></section></summary><div class='docblock'>Writes an IEEE754 double-precision (8 bytes) floating point number to
+<code>self</code> in native-endian byte order. <a href="buf/trait.BufMut.html#method.put_f64_ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.limit" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1276-1281">source</a><a href="#method.limit" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.limit" class="fnname">limit</a>(self, limit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="buf/struct.Limit.html" title="struct bytes::buf::Limit">Limit</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>,</span></h4></section></summary><div class='docblock'>Creates an adaptor which can write at most <code>limit</code> bytes to <code>self</code>. <a href="buf/trait.BufMut.html#method.limit">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.writer" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1308-1313">source</a><a href="#method.writer" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.writer" class="fnname">writer</a>(self) -&gt; <a class="struct" href="buf/struct.Writer.html" title="struct bytes::buf::Writer">Writer</a>&lt;Self&gt;<span class="notable-traits" data-ty="Writer&lt;Self&gt;"><span class="notable-traits-tooltip">ⓘ</span></span><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>,</span></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>std</code></strong> only.</div></span><div class='docblock'>Creates an adaptor which implements the <code>Write</code> trait for <code>self</code>. <a href="buf/trait.BufMut.html#method.writer">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chain_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1336-1341">source</a><a href="#method.chain_mut" class="anchor"></a><h4 class="code-header">fn <a href="buf/trait.BufMut.html#method.chain_mut" class="fnname">chain_mut</a>&lt;U:&nbsp;<a class="trait" href="buf/trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a>&gt;(self, next: U) -&gt; <a class="struct" href="buf/struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;Self, U&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>,</span></h4></section></summary><div class='docblock'>Creates an adapter which will chain this buffer with another. <a href="buf/trait.BufMut.html#method.chain_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1264-1268">source</a><a href="#impl-Clone-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1265-1267">source</a><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/fmt/debug.rs.html#45-49">source</a><a href="#impl-Debug-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/fmt/debug.rs.html#46-48">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Default-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1218-1223">source</a><a href="#impl-Default-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.default" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1220-1222">source</a><a href="#method.default" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -&gt; <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Deref-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1157-1164">source</a><a href="#impl-Deref-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a> for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Target" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Target" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target" class="associatedtype">Target</a> = [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]</h4></section></summary><div class='docblock'>The resulting type after dereferencing.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.deref" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1161-1163">source</a><a href="#method.deref" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#tymethod.deref" class="fnname">deref</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section></summary><div class='docblock'>Dereferences the value.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-DerefMut-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1173-1178">source</a><a href="#impl-DerefMut-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a> for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.deref_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1175-1177">source</a><a href="#method.deref_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html#tymethod.deref_mut" class="fnname">deref_mut</a>(&amp;mut self) -&gt; &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;mut [u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section></summary><div class='docblock'>Mutably dereferences the value.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Deserialize%3C%27de%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/serde.rs.html#89">source</a><a href="#impl-Deserialize%3C%27de%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.203/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.deserialize" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/serde.rs.html#89">source</a><a href="#method.deserialize" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.203/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a>&lt;D&gt;(deserializer: D) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>, D::<a class="associatedtype" href="https://docs.rs/serde/1.0.203/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="https://docs.rs/serde/1.0.203/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,</span></h4></section></summary><div class='docblock'>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.203/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Drop-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1038-1053">source</a><a href="#impl-Drop-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html" title="trait core::ops::drop::Drop">Drop</a> for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.drop" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1039-1052">source</a><a href="#method.drop" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop" class="fnname">drop</a>(&amp;mut self)</h4></section></summary><div class='docblock'>Executes the destructor for this type. <a href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Extend%3C%26%27a%20u8%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1306-1313">source</a><a href="#impl-Extend%3C%26%27a%20u8%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a>&lt;&amp;'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.extend-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1307-1312">source</a><a href="#method.extend-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#tymethod.extend" class="fnname">extend</a>&lt;T&gt;(&amp;mut self, iter: T)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = &amp;'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;,</span></h4></section></summary><div class='docblock'>Extends a collection with the contents of an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#tymethod.extend">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.extend_one-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/collect.rs.html#372">source</a><a href="#method.extend_one-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#method.extend_one" class="fnname">extend_one</a>(&amp;mut self, item: A)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><div class='docblock'>Extends a collection with exactly one element.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.extend_reserve-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/collect.rs.html#380">source</a><a href="#method.extend_reserve-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#method.extend_reserve" class="fnname">extend_reserve</a>(&amp;mut self, additional: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><div class='docblock'>Reserves capacity in a collection for the given number of additional elements. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#method.extend_reserve">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Extend%3CBytes%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1315-1324">source</a><a href="#impl-Extend%3CBytes%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a>&lt;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.extend-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1316-1323">source</a><a href="#method.extend-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#tymethod.extend" class="fnname">extend</a>&lt;T&gt;(&amp;mut self, iter: T)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt;,</span></h4></section></summary><div class='docblock'>Extends a collection with the contents of an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#tymethod.extend">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.extend_one-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/collect.rs.html#372">source</a><a href="#method.extend_one-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#method.extend_one" class="fnname">extend_one</a>(&amp;mut self, item: A)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><div class='docblock'>Extends a collection with exactly one element.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.extend_reserve-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/collect.rs.html#380">source</a><a href="#method.extend_reserve-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#method.extend_reserve" class="fnname">extend_reserve</a>(&amp;mut self, additional: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><div class='docblock'>Reserves capacity in a collection for the given number of additional elements. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#method.extend_reserve">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Extend%3Cu8%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1288-1304">source</a><a href="#impl-Extend%3Cu8%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.extend" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1289-1303">source</a><a href="#method.extend" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#tymethod.extend" class="fnname">extend</a>&lt;T&gt;(&amp;mut self, iter: T)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;,</span></h4></section></summary><div class='docblock'>Extends a collection with the contents of an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#tymethod.extend">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.extend_one" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/collect.rs.html#372">source</a><a href="#method.extend_one" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#method.extend_one" class="fnname">extend_one</a>(&amp;mut self, item: A)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><div class='docblock'>Extends a collection with exactly one element.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.extend_reserve" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/collect.rs.html#380">source</a><a href="#method.extend_reserve" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#method.extend_reserve" class="fnname">extend_reserve</a>(&amp;mut self, additional: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><div class='docblock'>Reserves capacity in a collection for the given number of additional elements. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#method.extend_reserve">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5Bu8%5D%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1180-1184">source</a><a href="#impl-From%3C%26%27a%20%5Bu8%5D%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;&amp;'a [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1181-1183">source</a><a href="#method.from-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(src: &amp;'a [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20str%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1186-1190">source</a><a href="#impl-From%3C%26%27a%20str%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;&amp;'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1187-1189">source</a><a href="#method.from-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(src: &amp;'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CBytes%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#915-935">source</a><a href="#impl-From%3CBytes%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#931-934">source</a><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(bytes: <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>Convert self into <code>BytesMut</code>.</p>
+<p>If <code>bytes</code> is unique for the entire original buffer, this will return a
+<code>BytesMut</code> with the contents of <code>bytes</code> without copying.
+If <code>bytes</code> is not unique for the entire original buffer, this will make
+a copy of <code>bytes</code> subset of the original buffer in a new <code>BytesMut</code>.</p>
+<h5 id="examples-132"><a href="#examples-132">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::{Bytes, BytesMut};
+
+<span class="kw">let </span>bytes = Bytes::from(<span class="string">b&quot;hello&quot;</span>.to_vec());
+<span class="macro">assert_eq!</span>(BytesMut::from(bytes), BytesMut::from(<span class="kw-2">&amp;</span><span class="string">b&quot;hello&quot;</span>[..]));</code></pre></div>
+</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CBytesMut%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1192-1196">source</a><a href="#impl-From%3CBytesMut%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1193-1195">source</a><a href="#method.from-3" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(src: <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>) -&gt; <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CBytesMut%3E-for-Vec%3Cu8%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1630-1663">source</a><a href="#impl-From%3CBytesMut%3E-for-Vec%3Cu8%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>&gt; for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1631-1662">source</a><a href="#method.from-4" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(bytes: <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>) -&gt; Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-FromIterator%3C%26%27a%20u8%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1332-1336">source</a><a href="#impl-FromIterator%3C%26%27a%20u8%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a>&lt;&amp;'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_iter-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1333-1335">source</a><a href="#method.from_iter-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter" class="fnname">from_iter</a>&lt;T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = &amp;'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;&gt;(into_iter: T) -&gt; Self</h4></section></summary><div class='docblock'>Creates a value from an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-FromIterator%3Cu8%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1326-1330">source</a><a href="#impl-FromIterator%3Cu8%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_iter" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1327-1329">source</a><a href="#method.from_iter" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter" class="fnname">from_iter</a>&lt;T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;&gt;(into_iter: T) -&gt; Self</h4></section></summary><div class='docblock'>Creates a value from an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Hash-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1225-1233">source</a><a href="#impl-Hash-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.hash" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1226-1232">source</a><a href="#method.hash" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash" class="fnname">hash</a>&lt;H&gt;(&amp;self, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>H)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,</span></h4></section></summary><div class='docblock'>Feeds this value into the given <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.hash_slice" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.3.0">1.3.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/hash/mod.rs.html#239-241">source</a></span><a href="#method.hash_slice" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice" class="fnname">hash_slice</a>&lt;H&gt;(data: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[Self]</a>, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>H)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</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>,</span></h4></section></summary><div class='docblock'>Feeds a slice of this type into the given <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-%26%27a%20BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1279-1286">source</a><a href="#impl-IntoIterator-for-%26%27a%20BytesMut" class="anchor"></a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &amp;'a <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Item-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = &amp;'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="rustdoc-toggle" open><summary><section id="associatedtype.IntoIter-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.IntoIter-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.Iter.html" title="struct core::slice::iter::Iter">Iter</a>&lt;'a, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;</h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_iter-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1283-1285">source</a><a href="#method.into_iter-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fnname">into_iter</a>(self) -&gt; Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1270-1277">source</a><a href="#impl-IntoIterator-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Item" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="rustdoc-toggle" open><summary><section id="associatedtype.IntoIter" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.IntoIter" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <a class="struct" href="buf/struct.IntoIter.html" title="struct bytes::buf::IntoIter">IntoIter</a>&lt;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>&gt;</h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_iter" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1274-1276">source</a><a href="#method.into_iter" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fnname">into_iter</a>(self) -&gt; Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-LowerHex-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/fmt/hex.rs.html#35">source</a><a href="#impl-LowerHex-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.LowerHex.html" title="trait core::fmt::LowerHex">LowerHex</a> for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/fmt/hex.rs.html#35">source</a><a href="#method.fmt-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.LowerHex.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Ord-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1210-1214">source</a><a href="#impl-Ord-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1211-1213">source</a><a href="#method.cmp" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp" class="fnname">cmp</a>(&amp;self, other: &amp;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.max" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#795-798">source</a></span><a href="#method.max" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max" class="fnname">max</a>(self, other: Self) -&gt; 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>,</span></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.min" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#822-825">source</a></span><a href="#method.min" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min" class="fnname">min</a>(self, other: Self) -&gt; 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>,</span></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#854-858">source</a></span><a href="#method.clamp" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp" class="fnname">clamp</a>(self, min: Self, max: Self) -&gt; 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> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;Self&gt;,</span></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3C%26%27a%20T%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1576-1583">source</a><a href="#impl-PartialEq%3C%26%27a%20T%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl&lt;'a, T:&nbsp;?<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/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>T&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-9" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1580-1582">source</a><a href="#method.eq-9" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-9" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-9" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3C%5Bu8%5D%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1480-1484">source</a><a href="#impl-PartialEq%3C%5Bu8%5D%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1481-1483">source</a><a href="#method.eq-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBytes%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1624-1628">source</a><a href="#impl-PartialEq%3CBytes%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-13" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1625-1627">source</a><a href="#method.eq-13" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-13" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-13" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBytesMut%3E-for-%26%5Bu8%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1594-1598">source</a><a href="#impl-PartialEq%3CBytesMut%3E-for-%26%5Bu8%5D" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>&gt; for &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-10" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1595-1597">source</a><a href="#method.eq-10" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-10" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-10" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBytesMut%3E-for-%26str" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1606-1610">source</a><a href="#impl-PartialEq%3CBytesMut%3E-for-%26str" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>&gt; for &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-11" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1607-1609">source</a><a href="#method.eq-11" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-11" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-11" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBytesMut%3E-for-%5Bu8%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1492-1496">source</a><a href="#impl-PartialEq%3CBytesMut%3E-for-%5Bu8%5D" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>&gt; for [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1493-1495">source</a><a href="#method.eq-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-2" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBytesMut%3E-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1618-1622">source</a><a href="#impl-PartialEq%3CBytesMut%3E-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>&gt; for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-12" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1619-1621">source</a><a href="#method.eq-12" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-12" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-12" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBytesMut%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1198-1202">source</a><a href="#impl-PartialEq%3CBytesMut%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1199-1201">source</a><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBytesMut%3E-for-String" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1564-1568">source</a><a href="#impl-PartialEq%3CBytesMut%3E-for-String" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>&gt; for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1565-1567">source</a><a href="#method.eq-8" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-8" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-8" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBytesMut%3E-for-Vec%3Cu8%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1540-1544">source</a><a href="#impl-PartialEq%3CBytesMut%3E-for-Vec%3Cu8%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>&gt; for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-6" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1541-1543">source</a><a href="#method.eq-6" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-6" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-6" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBytesMut%3E-for-str" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1516-1520">source</a><a href="#impl-PartialEq%3CBytesMut%3E-for-str" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>&gt; for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1517-1519">source</a><a href="#method.eq-4" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-4" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-4" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CString%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1552-1556">source</a><a href="#impl-PartialEq%3CString%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-7" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1553-1555">source</a><a href="#method.eq-7" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-7" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-7" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CVec%3Cu8%2C%20Global%3E%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1528-1532">source</a><a href="#impl-PartialEq%3CVec%3Cu8%2C%20Global%3E%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-5" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1529-1531">source</a><a href="#method.eq-5" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-5" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-5" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3Cstr%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1504-1508">source</a><a href="#impl-PartialEq%3Cstr%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1505-1507">source</a><a href="#method.eq-3" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
+by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-3" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-3" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
+sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3C%26%27a%20T%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1585-1592">source</a><a href="#impl-PartialOrd%3C%26%27a%20T%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl&lt;'a, T:&nbsp;?<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/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>T&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-9" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1589-1591">source</a><a href="#method.partial_cmp-9" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>T) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-9" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-9" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-9" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-9" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-9" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-9" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-9" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-9" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3C%5Bu8%5D%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1486-1490">source</a><a href="#impl-PartialOrd%3C%5Bu8%5D%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1487-1489">source</a><a href="#method.partial_cmp-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBytesMut%3E-for-%26%5Bu8%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1600-1604">source</a><a href="#impl-PartialOrd%3CBytesMut%3E-for-%26%5Bu8%5D" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>&gt; for &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-10" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1601-1603">source</a><a href="#method.partial_cmp-10" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-10" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-10" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-10" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-10" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-10" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-10" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-10" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-10" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBytesMut%3E-for-%26str" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1612-1616">source</a><a href="#impl-PartialOrd%3CBytesMut%3E-for-%26str" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>&gt; for &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-11" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1613-1615">source</a><a href="#method.partial_cmp-11" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-11" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-11" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-11" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-11" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-11" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-11" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-11" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-11" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBytesMut%3E-for-%5Bu8%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1498-1502">source</a><a href="#impl-PartialOrd%3CBytesMut%3E-for-%5Bu8%5D" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>&gt; for [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1499-1501">source</a><a href="#method.partial_cmp-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-2" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-2" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-2" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-2" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBytesMut%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1204-1208">source</a><a href="#impl-PartialOrd%3CBytesMut%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1205-1207">source</a><a href="#method.partial_cmp" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBytesMut%3E-for-String" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1570-1574">source</a><a href="#impl-PartialOrd%3CBytesMut%3E-for-String" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>&gt; for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1571-1573">source</a><a href="#method.partial_cmp-8" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-8" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-8" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-8" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-8" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-8" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-8" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-8" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-8" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBytesMut%3E-for-Vec%3Cu8%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1546-1550">source</a><a href="#impl-PartialOrd%3CBytesMut%3E-for-Vec%3Cu8%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>&gt; for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-6" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1547-1549">source</a><a href="#method.partial_cmp-6" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-6" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-6" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-6" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-6" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-6" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-6" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-6" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-6" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBytesMut%3E-for-str" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1522-1526">source</a><a href="#impl-PartialOrd%3CBytesMut%3E-for-str" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>&gt; for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1523-1525">source</a><a href="#method.partial_cmp-4" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a>) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-4" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-4" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-4" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-4" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-4" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-4" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-4" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-4" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CString%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1558-1562">source</a><a href="#impl-PartialOrd%3CString%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-7" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1559-1561">source</a><a href="#method.partial_cmp-7" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-7" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-7" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-7" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-7" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-7" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-7" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-7" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-7" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CVec%3Cu8%2C%20Global%3E%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1534-1538">source</a><a href="#impl-PartialOrd%3CVec%3Cu8%2C%20Global%3E%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-5" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1535-1537">source</a><a href="#method.partial_cmp-5" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-5" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-5" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-5" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-5" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-5" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-5" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-5" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-5" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3Cstr%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1510-1514">source</a><a href="#impl-PartialOrd%3Cstr%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt; for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1511-1513">source</a><a href="#method.partial_cmp-3" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <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="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-3" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-3" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-3" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-3" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-3" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-3" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-3" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-3" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
+operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Serialize-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/serde.rs.html#89">source</a><a href="#impl-Serialize-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://docs.rs/serde/1.0.203/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.serialize" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/serde.rs.html#89">source</a><a href="#method.serialize" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.203/serde/ser/trait.Serialize.html#tymethod.serialize" class="fnname">serialize</a>&lt;S&gt;(&amp;self, serializer: S) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;S::<a class="associatedtype" href="https://docs.rs/serde/1.0.203/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, S::<a class="associatedtype" href="https://docs.rs/serde/1.0.203/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="https://docs.rs/serde/1.0.203/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>,</span></h4></section></summary><div class='docblock'>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.203/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-UpperHex-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/fmt/hex.rs.html#37">source</a><a href="#impl-UpperHex-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.UpperHex.html" title="trait core::fmt::UpperHex">UpperHex</a> for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/fmt/hex.rs.html#37">source</a><a href="#method.fmt-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.UpperHex.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Write-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1247-1262">source</a><a href="#impl-Write-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Write.html" title="trait core::fmt::Write">Write</a> for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.write_str" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1249-1256">source</a><a href="#method.write_str" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Write.html#tymethod.write_str" class="fnname">write_str</a>(&amp;mut self, s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Writes a string slice into this writer, returning whether the write
+succeeded. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Write.html#tymethod.write_str">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.write_fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1259-1261">source</a><a href="#method.write_fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Write.html#method.write_fmt" class="fnname">write_fmt</a>(&amp;mut self, args: <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Arguments.html" title="struct core::fmt::Arguments">Arguments</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Glue for usage of the <a href="https://doc.rust-lang.org/nightly/core/macro.write.html" title="write!"><code>write!</code></a> macro with implementors of this trait. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Write.html#method.write_fmt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.write_char" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.1.0">1.1.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/fmt/mod.rs.html#168">source</a></span><a href="#method.write_char" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Write.html#method.write_char" class="fnname">write_char</a>(&amp;mut self, c: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.char.html">char</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Writes a <a href="https://doc.rust-lang.org/nightly/std/primitive.char.html" title="char"><code>char</code></a> into this writer, returning whether the write succeeded. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Write.html#method.write_char">Read more</a></div></details></div></details><section id="impl-Eq-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1216">source</a><a href="#impl-Eq-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section><section id="impl-Send-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1471">source</a><a href="#impl-Send-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section><section id="impl-Sync-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1472">source</a><a href="#impl-Sync-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-BytesMut" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section><section id="impl-Unpin-for-BytesMut" class="impl has-srclink"><a href="#impl-Unpin-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section><section id="impl-UnwindSafe-for-BytesMut" class="impl has-srclink"><a href="#impl-UnwindSafe-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-BytesMut" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-5" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from-5" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
+</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
+<p>That is, this conversion is whatever the implementation of
+<code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
+</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#82">source</a><a href="#impl-ToOwned-for-BytesMut" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#87">source</a><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&amp;self) -&gt; T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#91">source</a><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&amp;self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-BytesMut" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><section id="impl-DeserializeOwned-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="https://docs.rs/serde/1.0.203/src/serde/de/mod.rs.html#608">source</a><a href="#impl-DeserializeOwned-for-BytesMut" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://docs.rs/serde/1.0.203/serde/de/trait.DeserializeOwned.html" title="trait serde::de::DeserializeOwned">DeserializeOwned</a> for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: for&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.203/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt;,</span></h3></section></div><script type="text/json" id="notable-traits-data">{"&[T]":"<h3 class=\"notable\">Notable traits for <code>&amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for &amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span>","&[u8]":"<h3 class=\"notable\">Notable traits for <code>&amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for &amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span>","&mut [T]":"<h3 class=\"notable\">Notable traits for <code>&amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for &amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span>","&mut [u8]":"<h3 class=\"notable\">Notable traits for <code>&amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for &amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span>","<[T] as Concat<Item>>::Output":"<h3 class=\"notable\">Notable traits for <code>&amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for &amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span>","<[T] as Join<Separator>>::Output":"<h3 class=\"notable\">Notable traits for <code>&amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for &amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span>","Reader<Self>":"<h3 class=\"notable\">Notable traits for <code><a class=\"struct\" href=\"buf/struct.Reader.html\" title=\"struct bytes::buf::Reader\">Reader</a>&lt;B&gt;</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl&lt;B:&nbsp;<a class=\"trait\" href=\"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=\"buf/struct.Reader.html\" title=\"struct bytes::buf::Reader\">Reader</a>&lt;B&gt;</span>","Writer<Self>":"<h3 class=\"notable\">Notable traits for <code><a class=\"struct\" href=\"buf/struct.Writer.html\" title=\"struct bytes::buf::Writer\">Writer</a>&lt;B&gt;</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl&lt;B:&nbsp;<a class=\"trait\" href=\"buf/trait.BufMut.html\" title=\"trait bytes::buf::BufMut\">BufMut</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.Write.html\" title=\"trait std::io::Write\">Write</a> for <a class=\"struct\" href=\"buf/struct.Writer.html\" title=\"struct bytes::buf::Writer\">Writer</a>&lt;B&gt;</span>"}</script></section></div></main><div id="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/bytes/trait.Buf.html b/bytes/trait.Buf.html
new file mode 100644
index 0000000..c68ac5c
--- /dev/null
+++ b/bytes/trait.Buf.html
@@ -0,0 +1,619 @@
+<!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="Read bytes from a buffer."><meta name="keywords" content="rust, rustlang, rust-lang, Buf"><title>Buf in bytes - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2 class="location"><a href="#">Buf</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.advance">advance</a></li><li><a href="#tymethod.chunk">chunk</a></li><li><a href="#tymethod.remaining">remaining</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.chain">chain</a></li><li><a href="#method.chunks_vectored">chunks_vectored</a></li><li><a href="#method.copy_to_bytes">copy_to_bytes</a></li><li><a href="#method.copy_to_slice">copy_to_slice</a></li><li><a href="#method.get_f32">get_f32</a></li><li><a href="#method.get_f32_le">get_f32_le</a></li><li><a href="#method.get_f32_ne">get_f32_ne</a></li><li><a href="#method.get_f64">get_f64</a></li><li><a href="#method.get_f64_le">get_f64_le</a></li><li><a href="#method.get_f64_ne">get_f64_ne</a></li><li><a href="#method.get_i128">get_i128</a></li><li><a href="#method.get_i128_le">get_i128_le</a></li><li><a href="#method.get_i128_ne">get_i128_ne</a></li><li><a href="#method.get_i16">get_i16</a></li><li><a href="#method.get_i16_le">get_i16_le</a></li><li><a href="#method.get_i16_ne">get_i16_ne</a></li><li><a href="#method.get_i32">get_i32</a></li><li><a href="#method.get_i32_le">get_i32_le</a></li><li><a href="#method.get_i32_ne">get_i32_ne</a></li><li><a href="#method.get_i64">get_i64</a></li><li><a href="#method.get_i64_le">get_i64_le</a></li><li><a href="#method.get_i64_ne">get_i64_ne</a></li><li><a href="#method.get_i8">get_i8</a></li><li><a href="#method.get_int">get_int</a></li><li><a href="#method.get_int_le">get_int_le</a></li><li><a href="#method.get_int_ne">get_int_ne</a></li><li><a href="#method.get_u128">get_u128</a></li><li><a href="#method.get_u128_le">get_u128_le</a></li><li><a href="#method.get_u128_ne">get_u128_ne</a></li><li><a href="#method.get_u16">get_u16</a></li><li><a href="#method.get_u16_le">get_u16_le</a></li><li><a href="#method.get_u16_ne">get_u16_ne</a></li><li><a href="#method.get_u32">get_u32</a></li><li><a href="#method.get_u32_le">get_u32_le</a></li><li><a href="#method.get_u32_ne">get_u32_ne</a></li><li><a href="#method.get_u64">get_u64</a></li><li><a href="#method.get_u64_le">get_u64_le</a></li><li><a href="#method.get_u64_ne">get_u64_ne</a></li><li><a href="#method.get_u8">get_u8</a></li><li><a href="#method.get_uint">get_uint</a></li><li><a href="#method.get_uint_le">get_uint_le</a></li><li><a href="#method.get_uint_ne">get_uint_ne</a></li><li><a href="#method.has_remaining">has_remaining</a></li><li><a href="#method.reader">reader</a></li><li><a href="#method.take">take</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-Buf-for-%26%5Bu8%5D">&amp;[u8]</a></li><li><a href="#impl-Buf-for-%26mut%20T">&amp;mut T</a></li><li><a href="#impl-Buf-for-Box%3CT%3E">Box&lt;T&gt;</a></li><li><a href="#impl-Buf-for-Cursor%3CT%3E">Cursor&lt;T&gt;</a></li><li><a href="#impl-Buf-for-VecDeque%3Cu8%3E">VecDeque&lt;u8&gt;</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In bytes</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Trait <a href="index.html">bytes</a>::<wbr><a class="trait" href="#">Buf</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../src/bytes/buf/buf_impl.rs.html#93-1220">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><div class="item-decl"><pre class="rust trait"><code>pub trait Buf {
+<details class="rustdoc-toggle type-contents-toggle"><summary class="hideme"><span>Show 48 methods</span></summary> 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>;
+<span class="item-spacer"></span> fn <a href="#tymethod.chunk" class="fnname">chunk</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span>;
+<span class="item-spacer"></span> 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.chunks_vectored" class="fnname">chunks_vectored</a>&lt;'a&gt;(&amp;'a self, dst: &amp;mut [<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a>&lt;'a&gt;]) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.copy_to_slice" class="fnname">copy_to_slice</a>(&amp;mut self, dst: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_u16" class="fnname">get_u16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_u16_ne" class="fnname">get_u16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_i16" class="fnname">get_i16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_i16_ne" class="fnname">get_i16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_u32" class="fnname">get_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_u32_ne" class="fnname">get_u32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_i32" class="fnname">get_i32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_i32_ne" class="fnname">get_i32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_u64" class="fnname">get_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_u64_ne" class="fnname">get_u64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_i64" class="fnname">get_i64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_i64_ne" class="fnname">get_i64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_u128" class="fnname">get_u128</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_u128_le" class="fnname">get_u128_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_u128_ne" class="fnname">get_u128_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_i128" class="fnname">get_i128</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_i128_le" class="fnname">get_i128_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_i128_ne" class="fnname">get_i128_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_uint" class="fnname">get_uint</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> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_uint_ne" class="fnname">get_uint_ne</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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_int" class="fnname">get_int</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> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_int_ne" class="fnname">get_int_ne</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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_f32" class="fnname">get_f32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_f32_ne" class="fnname">get_f32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_f64" class="fnname">get_f64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a> { ... }
+<span class="item-spacer"></span> 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> { ... }
+<span class="item-spacer"></span> fn <a href="#method.get_f64_ne" class="fnname">get_f64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.copy_to_bytes" class="fnname">copy_to_bytes</a>(&amp;mut self, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a> { ... }
+<span class="item-spacer"></span> 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="buf/struct.Take.html" title="struct bytes::buf::Take">Take</a>&lt;Self&gt;<br>&nbsp;&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>,
+ { ... }
+<span class="item-spacer"></span> fn <a href="#method.chain" class="fnname">chain</a>&lt;U:&nbsp;<a class="trait" href="buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt;(self, next: U) -&gt; <a class="struct" href="buf/struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;Self, U&gt;<br>&nbsp;&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>,
+ { ... }
+<span class="item-spacer"></span> fn <a href="#method.reader" class="fnname">reader</a>(self) -&gt; <a class="struct" href="buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;Self&gt;<span class="notable-traits" data-ty="Reader&lt;Self&gt;"><span class="notable-traits-tooltip">ⓘ</span></span><br>&nbsp;&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>,
+ { ... }
+</details>}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><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>&amp;[u8]</code>.</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..];
+
+<span class="macro">assert_eq!</span>(<span class="string">b&#39;h&#39;</span>, buf.get_u8());
+<span class="macro">assert_eq!</span>(<span class="string">b&#39;e&#39;</span>, buf.get_u8());
+<span class="macro">assert_eq!</span>(<span class="string">b&#39;l&#39;</span>, buf.get_u8());
+
+<span class="kw">let </span><span class="kw-2">mut </span>rest = [<span class="number">0</span>; <span class="number">8</span>];
+buf.copy_to_slice(<span class="kw-2">&amp;mut </span>rest);
+
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>rest[..], <span class="kw-2">&amp;</span><span class="string">b&quot;lo world&quot;</span>[..]);</code></pre></div>
+</div></details><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.remaining" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#119">source</a><h4 class="code-header">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></h4></section></summary><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>chunk()</code>.</p>
+<h5 id="examples"><a href="#examples">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..];
+
+<span class="macro">assert_eq!</span>(buf.remaining(), <span class="number">11</span>);
+
+buf.get_u8();
+
+<span class="macro">assert_eq!</span>(buf.remaining(), <span class="number">10</span>);</code></pre></div>
+<h5 id="implementer-notes"><a href="#implementer-notes">Implementer notes</a></h5>
+<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></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.chunk" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#150">source</a><h4 class="code-header">fn <a href="#tymethod.chunk" class="fnname">chunk</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section></summary><div class="docblock"><p>Returns a slice starting at the current position and of length between 0
+and <code>Buf::remaining()</code>. Note that this <em>can</em> return shorter slice (this allows
+non-continuous internal representation).</p>
+<p>This is a lower level function. Most operations are done with other
+functions.</p>
+<h5 id="examples-1"><a href="#examples-1">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..];
+
+<span class="macro">assert_eq!</span>(buf.chunk(), <span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]);
+
+buf.advance(<span class="number">6</span>);
+
+<span class="macro">assert_eq!</span>(buf.chunk(), <span class="kw-2">&amp;</span><span class="string">b&quot;world&quot;</span>[..]);</code></pre></div>
+<h5 id="implementer-notes-1"><a href="#implementer-notes-1">Implementer notes</a></h5>
+<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>chunk()</code> should return an
+empty slice.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.advance" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#224">source</a><h4 class="code-header">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>)</h4></section></summary><div class="docblock"><p>Advance the internal cursor of the Buf</p>
+<p>The next call to <code>chunk()</code> will return a slice starting <code>cnt</code> bytes
+further into the underlying buffer.</p>
+<h5 id="examples-2"><a href="#examples-2">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..];
+
+<span class="macro">assert_eq!</span>(buf.chunk(), <span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]);
+
+buf.advance(<span class="number">6</span>);
+
+<span class="macro">assert_eq!</span>(buf.chunk(), <span class="kw-2">&amp;</span><span class="string">b&quot;world&quot;</span>[..]);</code></pre></div>
+<h5 id="panics"><a href="#panics">Panics</a></h5>
+<p>This function <strong>may</strong> panic if <code>cnt &gt; self.remaining()</code>.</p>
+<h5 id="implementer-notes-2"><a href="#implementer-notes-2">Implementer notes</a></h5>
+<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></details></div><h2 id="provided-methods" class="small-section-header">Provided Methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunks_vectored" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#181-192">source</a><h4 class="code-header">fn <a href="#method.chunks_vectored" class="fnname">chunks_vectored</a>&lt;'a&gt;(&amp;'a self, dst: &amp;mut [<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a>&lt;'a&gt;]) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>std</code></strong> only.</div></span><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>chunk_vectored</code> enables
+fetching more than one slice at once. <code>dst</code> is a slice of <code>IoSlice</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>chunk_vectored</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>
+<h5 id="implementer-notes-3"><a href="#implementer-notes-3">Implementer notes</a></h5>
+<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>chunk_vectored</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></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.has_remaining" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#243-245">source</a><h4 class="code-header">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></h4></section></summary><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>
+<h5 id="examples-3"><a href="#examples-3">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;a&quot;</span>[..];
+
+<span class="macro">assert!</span>(buf.has_remaining());
+
+buf.get_u8();
+
+<span class="macro">assert!</span>(!buf.has_remaining());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.copy_to_slice" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#268-282">source</a><h4 class="code-header">fn <a href="#method.copy_to_slice" class="fnname">copy_to_slice</a>(&amp;mut self, dst: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section></summary><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>
+<h5 id="examples-4"><a href="#examples-4">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..];
+<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0</span>; <span class="number">5</span>];
+
+buf.copy_to_slice(<span class="kw-2">&amp;mut </span>dst);
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span><span class="string">b&quot;hello&quot;</span>[..], <span class="kw-2">&amp;</span>dst);
+<span class="macro">assert_eq!</span>(<span class="number">6</span>, buf.remaining());</code></pre></div>
+<h5 id="panics-1"><a href="#panics-1">Panics</a></h5>
+<p>This function panics if <code>self.remaining() &lt; dst.len()</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u8" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#300-307">source</a><h4 class="code-header">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></h4></section></summary><div class="docblock"><p>Gets an unsigned 8 bit integer from <code>self</code>.</p>
+<p>The current position is advanced by 1.</p>
+<h5 id="examples-5"><a href="#examples-5">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x08 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">8</span>, buf.get_u8());</code></pre></div>
+<h5 id="panics-2"><a href="#panics-2">Panics</a></h5>
+<p>This function panics if there is no more remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i8" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#325-332">source</a><h4 class="code-header">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></h4></section></summary><div class="docblock"><p>Gets a signed 8 bit integer from <code>self</code>.</p>
+<p>The current position is advanced by 1.</p>
+<h5 id="examples-6"><a href="#examples-6">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x08 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">8</span>, buf.get_i8());</code></pre></div>
+<h5 id="panics-3"><a href="#panics-3">Panics</a></h5>
+<p>This function panics if there is no more remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u16" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#350-352">source</a><h4 class="code-header">fn <a href="#method.get_u16" class="fnname">get_u16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h4></section></summary><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>
+<h5 id="examples-7"><a href="#examples-7">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x08\x09 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x0809</span>, buf.get_u16());</code></pre></div>
+<h5 id="panics-4"><a href="#panics-4">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u16_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#370-372">source</a><h4 class="code-header">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></h4></section></summary><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>
+<h5 id="examples-8"><a href="#examples-8">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x09\x08 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x0809</span>, buf.get_u16_le());</code></pre></div>
+<h5 id="panics-5"><a href="#panics-5">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u16_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#393-395">source</a><h4 class="code-header">fn <a href="#method.get_u16_ne" class="fnname">get_u16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h4></section></summary><div class="docblock"><p>Gets an unsigned 16 bit integer from <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 2.</p>
+<h5 id="examples-9"><a href="#examples-9">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x08\x09 hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\x09\x08 hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">0x0809</span>, buf.get_u16_ne());</code></pre></div>
+<h5 id="panics-6"><a href="#panics-6">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i16" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#413-415">source</a><h4 class="code-header">fn <a href="#method.get_i16" class="fnname">get_i16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></h4></section></summary><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>
+<h5 id="examples-10"><a href="#examples-10">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x08\x09 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x0809</span>, buf.get_i16());</code></pre></div>
+<h5 id="panics-7"><a href="#panics-7">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i16_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#433-435">source</a><h4 class="code-header">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></h4></section></summary><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>
+<h5 id="examples-11"><a href="#examples-11">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x09\x08 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x0809</span>, buf.get_i16_le());</code></pre></div>
+<h5 id="panics-8"><a href="#panics-8">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i16_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#456-458">source</a><h4 class="code-header">fn <a href="#method.get_i16_ne" class="fnname">get_i16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></h4></section></summary><div class="docblock"><p>Gets a signed 16 bit integer from <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 2.</p>
+<h5 id="examples-12"><a href="#examples-12">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x08\x09 hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\x09\x08 hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">0x0809</span>, buf.get_i16_ne());</code></pre></div>
+<h5 id="panics-9"><a href="#panics-9">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u32" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#476-478">source</a><h4 class="code-header">fn <a href="#method.get_u32" class="fnname">get_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><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>
+<h5 id="examples-13"><a href="#examples-13">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x08\x09\xA0\xA1 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x0809A0A1</span>, buf.get_u32());</code></pre></div>
+<h5 id="panics-10"><a href="#panics-10">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u32_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#496-498">source</a><h4 class="code-header">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></h4></section></summary><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>
+<h5 id="examples-14"><a href="#examples-14">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\xA1\xA0\x09\x08 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x0809A0A1</span>, buf.get_u32_le());</code></pre></div>
+<h5 id="panics-11"><a href="#panics-11">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u32_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#519-521">source</a><h4 class="code-header">fn <a href="#method.get_u32_ne" class="fnname">get_u32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class="docblock"><p>Gets an unsigned 32 bit integer from <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-15"><a href="#examples-15">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x08\x09\xA0\xA1 hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\xA1\xA0\x09\x08 hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">0x0809A0A1</span>, buf.get_u32_ne());</code></pre></div>
+<h5 id="panics-12"><a href="#panics-12">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i32" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#539-541">source</a><h4 class="code-header">fn <a href="#method.get_i32" class="fnname">get_i32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section></summary><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>
+<h5 id="examples-16"><a href="#examples-16">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x08\x09\xA0\xA1 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x0809A0A1</span>, buf.get_i32());</code></pre></div>
+<h5 id="panics-13"><a href="#panics-13">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i32_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#559-561">source</a><h4 class="code-header">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></h4></section></summary><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>
+<h5 id="examples-17"><a href="#examples-17">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\xA1\xA0\x09\x08 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x0809A0A1</span>, buf.get_i32_le());</code></pre></div>
+<h5 id="panics-14"><a href="#panics-14">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i32_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#582-584">source</a><h4 class="code-header">fn <a href="#method.get_i32_ne" class="fnname">get_i32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section></summary><div class="docblock"><p>Gets a signed 32 bit integer from <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-18"><a href="#examples-18">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x08\x09\xA0\xA1 hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\xA1\xA0\x09\x08 hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">0x0809A0A1</span>, buf.get_i32_ne());</code></pre></div>
+<h5 id="panics-15"><a href="#panics-15">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u64" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#602-604">source</a><h4 class="code-header">fn <a href="#method.get_u64" class="fnname">get_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section></summary><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>
+<h5 id="examples-19"><a href="#examples-19">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</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="number">0x0102030405060708</span>, buf.get_u64());</code></pre></div>
+<h5 id="panics-16"><a href="#panics-16">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u64_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#622-624">source</a><h4 class="code-header">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></h4></section></summary><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>
+<h5 id="examples-20"><a href="#examples-20">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</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="number">0x0102030405060708</span>, buf.get_u64_le());</code></pre></div>
+<h5 id="panics-17"><a href="#panics-17">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u64_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#645-647">source</a><h4 class="code-header">fn <a href="#method.get_u64_ne" class="fnname">get_u64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section></summary><div class="docblock"><p>Gets an unsigned 64 bit integer from <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-21"><a href="#examples-21">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08 hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\x08\x07\x06\x05\x04\x03\x02\x01 hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">0x0102030405060708</span>, buf.get_u64_ne());</code></pre></div>
+<h5 id="panics-18"><a href="#panics-18">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i64" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#665-667">source</a><h4 class="code-header">fn <a href="#method.get_i64" class="fnname">get_i64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section></summary><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>
+<h5 id="examples-22"><a href="#examples-22">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</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="number">0x0102030405060708</span>, buf.get_i64());</code></pre></div>
+<h5 id="panics-19"><a href="#panics-19">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i64_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#685-687">source</a><h4 class="code-header">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></h4></section></summary><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>
+<h5 id="examples-23"><a href="#examples-23">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</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="number">0x0102030405060708</span>, buf.get_i64_le());</code></pre></div>
+<h5 id="panics-20"><a href="#panics-20">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i64_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#708-710">source</a><h4 class="code-header">fn <a href="#method.get_i64_ne" class="fnname">get_i64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section></summary><div class="docblock"><p>Gets a signed 64 bit integer from <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-24"><a href="#examples-24">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08 hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\x08\x07\x06\x05\x04\x03\x02\x01 hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">0x0102030405060708</span>, buf.get_i64_ne());</code></pre></div>
+<h5 id="panics-21"><a href="#panics-21">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u128" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#728-730">source</a><h4 class="code-header">fn <a href="#method.get_u128" class="fnname">get_u128</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></h4></section></summary><div class="docblock"><p>Gets an unsigned 128 bit integer from <code>self</code> in big-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-25"><a href="#examples-25">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x01020304050607080910111213141516</span>, buf.get_u128());</code></pre></div>
+<h5 id="panics-22"><a href="#panics-22">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u128_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#748-750">source</a><h4 class="code-header">fn <a href="#method.get_u128_le" class="fnname">get_u128_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></h4></section></summary><div class="docblock"><p>Gets an unsigned 128 bit integer from <code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-26"><a href="#examples-26">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x01020304050607080910111213141516</span>, buf.get_u128_le());</code></pre></div>
+<h5 id="panics-23"><a href="#panics-23">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_u128_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#771-773">source</a><h4 class="code-header">fn <a href="#method.get_u128_ne" class="fnname">get_u128_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></h4></section></summary><div class="docblock"><p>Gets an unsigned 128 bit integer from <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-27"><a href="#examples-27">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">0x01020304050607080910111213141516</span>, buf.get_u128_ne());</code></pre></div>
+<h5 id="panics-24"><a href="#panics-24">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i128" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#791-793">source</a><h4 class="code-header">fn <a href="#method.get_i128" class="fnname">get_i128</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a></h4></section></summary><div class="docblock"><p>Gets a signed 128 bit integer from <code>self</code> in big-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-28"><a href="#examples-28">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x01020304050607080910111213141516</span>, buf.get_i128());</code></pre></div>
+<h5 id="panics-25"><a href="#panics-25">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i128_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#811-813">source</a><h4 class="code-header">fn <a href="#method.get_i128_le" class="fnname">get_i128_le</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a></h4></section></summary><div class="docblock"><p>Gets a signed 128 bit integer from <code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-29"><a href="#examples-29">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x01020304050607080910111213141516</span>, buf.get_i128_le());</code></pre></div>
+<h5 id="panics-26"><a href="#panics-26">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_i128_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#834-836">source</a><h4 class="code-header">fn <a href="#method.get_i128_ne" class="fnname">get_i128_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a></h4></section></summary><div class="docblock"><p>Gets a signed 128 bit integer from <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-30"><a href="#examples-30">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">0x01020304050607080910111213141516</span>, buf.get_i128_ne());</code></pre></div>
+<h5 id="panics-27"><a href="#panics-27">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_uint" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#854-856">source</a><h4 class="code-header">fn <a href="#method.get_uint" class="fnname">get_uint</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></h4></section></summary><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>
+<h5 id="examples-31"><a href="#examples-31">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x01\x02\x03 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x010203</span>, buf.get_uint(<span class="number">3</span>));</code></pre></div>
+<h5 id="panics-28"><a href="#panics-28">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_uint_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#874-876">source</a><h4 class="code-header">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></h4></section></summary><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>
+<h5 id="examples-32"><a href="#examples-32">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x03\x02\x01 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x010203</span>, buf.get_uint_le(<span class="number">3</span>));</code></pre></div>
+<h5 id="panics-29"><a href="#panics-29">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_uint_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#898-904">source</a><h4 class="code-header">fn <a href="#method.get_uint_ne" class="fnname">get_uint_ne</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></h4></section></summary><div class="docblock"><p>Gets an unsigned n-byte integer from <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by <code>nbytes</code>.</p>
+<h5 id="examples-33"><a href="#examples-33">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x01\x02\x03 hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\x03\x02\x01 hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">0x010203</span>, buf.get_uint_ne(<span class="number">3</span>));</code></pre></div>
+<h5 id="panics-30"><a href="#panics-30">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>, or
+if <code>nbytes</code> is greater than 8.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_int" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#923-925">source</a><h4 class="code-header">fn <a href="#method.get_int" class="fnname">get_int</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></h4></section></summary><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>
+<h5 id="examples-34"><a href="#examples-34">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x01\x02\x03 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x010203</span>, buf.get_int(<span class="number">3</span>));</code></pre></div>
+<h5 id="panics-31"><a href="#panics-31">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>, or
+if <code>nbytes</code> is greater than 8.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_int_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#944-946">source</a><h4 class="code-header">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></h4></section></summary><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>
+<h5 id="examples-35"><a href="#examples-35">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x03\x02\x01 hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">0x010203</span>, buf.get_int_le(<span class="number">3</span>));</code></pre></div>
+<h5 id="panics-32"><a href="#panics-32">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>, or
+if <code>nbytes</code> is greater than 8.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_int_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#968-974">source</a><h4 class="code-header">fn <a href="#method.get_int_ne" class="fnname">get_int_ne</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></h4></section></summary><div class="docblock"><p>Gets a signed n-byte integer from <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by <code>nbytes</code>.</p>
+<h5 id="examples-36"><a href="#examples-36">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x01\x02\x03 hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\x03\x02\x01 hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">0x010203</span>, buf.get_int_ne(<span class="number">3</span>));</code></pre></div>
+<h5 id="panics-33"><a href="#panics-33">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>, or
+if <code>nbytes</code> is greater than 8.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f32" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#993-995">source</a><h4 class="code-header">fn <a href="#method.get_f32" class="fnname">get_f32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></h4></section></summary><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>
+<h5 id="examples-37"><a href="#examples-37">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x3F\x99\x99\x9A hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">1.2f32</span>, buf.get_f32());</code></pre></div>
+<h5 id="panics-34"><a href="#panics-34">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f32_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1014-1016">source</a><h4 class="code-header">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></h4></section></summary><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>
+<h5 id="examples-38"><a href="#examples-38">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</span><span class="string">b&quot;\x9A\x99\x99\x3F hello&quot;</span>[..];
+<span class="macro">assert_eq!</span>(<span class="number">1.2f32</span>, buf.get_f32_le());</code></pre></div>
+<h5 id="panics-35"><a href="#panics-35">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f32_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1038-1040">source</a><h4 class="code-header">fn <a href="#method.get_f32_ne" class="fnname">get_f32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p>Gets an IEEE754 single-precision (4 bytes) floating point number from
+<code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-39"><a href="#examples-39">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x3F\x99\x99\x9A hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\x9A\x99\x99\x3F hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">1.2f32</span>, buf.get_f32_ne());</code></pre></div>
+<h5 id="panics-36"><a href="#panics-36">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f64" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1059-1061">source</a><h4 class="code-header">fn <a href="#method.get_f64" class="fnname">get_f64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></h4></section></summary><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>
+<h5 id="examples-40"><a href="#examples-40">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</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="number">1.2f64</span>, buf.get_f64());</code></pre></div>
+<h5 id="panics-37"><a href="#panics-37">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f64_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1080-1082">source</a><h4 class="code-header">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></h4></section></summary><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>
+<h5 id="examples-41"><a href="#examples-41">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;</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="number">1.2f64</span>, buf.get_f64_le());</code></pre></div>
+<h5 id="panics-38"><a href="#panics-38">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_f64_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1104-1106">source</a><h4 class="code-header">fn <a href="#method.get_f64_ne" class="fnname">get_f64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></h4></section></summary><div class="docblock"><p>Gets an IEEE754 double-precision (8 bytes) floating point number from
+<code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-42"><a href="#examples-42">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf: <span class="kw-2">&amp;</span>[u8] = <span class="kw">match </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="bool-val">true </span>=&gt; <span class="string">b&quot;\x3F\xF3\x33\x33\x33\x33\x33\x33 hello&quot;</span>,
+ <span class="bool-val">false </span>=&gt; <span class="string">b&quot;\x33\x33\x33\x33\x33\x33\xF3\x3F hello&quot;</span>,
+};
+<span class="macro">assert_eq!</span>(<span class="number">1.2f64</span>, buf.get_f64_ne());</code></pre></div>
+<h5 id="panics-39"><a href="#panics-39">Panics</a></h5>
+<p>This function panics if there is not enough remaining data in <code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.copy_to_bytes" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1127-1137">source</a><h4 class="code-header">fn <a href="#method.copy_to_bytes" class="fnname">copy_to_bytes</a>(&amp;mut self, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h4></section></summary><div class="docblock"><p>Consumes <code>len</code> bytes inside self and returns new instance of <code>Bytes</code>
+with this data.</p>
+<p>This function may be optimized by the underlying type to avoid actual
+copies. For example, <code>Bytes</code> implementation will do a shallow copy
+(ref-count increment).</p>
+<h5 id="examples-43"><a href="#examples-43">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span>bytes = (<span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]).copy_to_bytes(<span class="number">5</span>);
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>bytes[..], <span class="kw-2">&amp;</span><span class="string">b&quot;hello&quot;</span>[..]);</code></pre></div>
+<h5 id="panics-40"><a href="#panics-40">Panics</a></h5>
+<p>This function panics if <code>len &gt; self.remaining()</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1160-1165">source</a><h4 class="code-header">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="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>,</span></h4></section></summary><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>
+<h5 id="examples-44"><a href="#examples-44">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::{Buf, BufMut};
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="string">b&quot;hello world&quot;</span>[..].take(<span class="number">5</span>);
+<span class="kw">let </span><span class="kw-2">mut </span>dst = <span class="macro">vec!</span>[];
+
+dst.put(<span class="kw-2">&amp;mut </span>buf);
+<span class="macro">assert_eq!</span>(dst, <span class="string">b&quot;hello&quot;</span>);
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = buf.into_inner();
+dst.clear();
+dst.put(<span class="kw-2">&amp;mut </span>buf);
+<span class="macro">assert_eq!</span>(dst, <span class="string">b&quot; world&quot;</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chain" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1182-1187">source</a><h4 class="code-header">fn <a href="#method.chain" class="fnname">chain</a>&lt;U:&nbsp;<a class="trait" href="buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt;(self, next: U) -&gt; <a class="struct" href="buf/struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;Self, U&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>,</span></h4></section></summary><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>
+<h5 id="examples-45"><a href="#examples-45">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::Buf;
+
+<span class="kw">let </span><span class="kw-2">mut </span>chain = <span class="string">b&quot;hello &quot;</span>[..].chain(<span class="kw-2">&amp;</span><span class="string">b&quot;world&quot;</span>[..]);
+
+<span class="kw">let </span>full = chain.copy_to_bytes(<span class="number">11</span>);
+<span class="macro">assert_eq!</span>(full.chunk(), <span class="string">b&quot;hello world&quot;</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.reader" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1214-1219">source</a><h4 class="code-header">fn <a href="#method.reader" class="fnname">reader</a>(self) -&gt; <a class="struct" href="buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a>&lt;Self&gt;<span class="notable-traits" data-ty="Reader&lt;Self&gt;"><span class="notable-traits-tooltip">ⓘ</span></span><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>,</span></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>std</code></strong> only.</div></span><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>
+<h5 id="examples-46"><a href="#examples-46">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::{Bytes, Buf};
+<span class="kw">use </span>std::io::Read;
+
+<span class="kw">let </span>buf = Bytes::from(<span class="string">&quot;hello world&quot;</span>);
+
+<span class="kw">let </span><span class="kw-2">mut </span>reader = buf.reader();
+<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0</span>; <span class="number">1024</span>];
+
+<span class="kw">let </span>num = reader.read(<span class="kw-2">&amp;mut </span>dst).unwrap();
+
+<span class="macro">assert_eq!</span>(<span class="number">11</span>, num);
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>dst[..<span class="number">11</span>], <span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]);</code></pre></div>
+</div></details></div><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Buf-for-%26mut%20T" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1392-1394">source</a><a href="#impl-Buf-for-%26mut%20T" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="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="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;mut </a>T</h3></section></summary><div class="impl-items"><section id="method.remaining" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.remaining" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.chunk" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.chunk" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.chunk" class="fnname">chunk</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunks_vectored-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.chunks_vectored-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.chunks_vectored" class="fnname">chunks_vectored</a>&lt;'b&gt;(&amp;'b self, dst: &amp;mut [<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a>&lt;'b&gt;]) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>std</code></strong> only.</div></span></details><section id="method.advance" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.advance" class="anchor"></a><h4 class="code-header">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>)</h4></section><section id="method.has_remaining-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.has_remaining-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.copy_to_slice-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.copy_to_slice-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.copy_to_slice" class="fnname">copy_to_slice</a>(&amp;mut self, dst: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section><section id="method.get_u8-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_u8-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_i8-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_i8-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_u16-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_u16-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u16" class="fnname">get_u16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h4></section><section id="method.get_u16_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_u16_le-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_u16_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_u16_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u16_ne" class="fnname">get_u16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h4></section><section id="method.get_i16-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_i16-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i16" class="fnname">get_i16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></h4></section><section id="method.get_i16_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_i16_le-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_i16_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_i16_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i16_ne" class="fnname">get_i16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></h4></section><section id="method.get_u32-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_u32-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u32" class="fnname">get_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section><section id="method.get_u32_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_u32_le-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_u32_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_u32_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u32_ne" class="fnname">get_u32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section><section id="method.get_i32-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_i32-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i32" class="fnname">get_i32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section><section id="method.get_i32_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_i32_le-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_i32_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_i32_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i32_ne" class="fnname">get_i32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section><section id="method.get_u64-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_u64-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u64" class="fnname">get_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section><section id="method.get_u64_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_u64_le-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_u64_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_u64_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u64_ne" class="fnname">get_u64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section><section id="method.get_i64-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_i64-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i64" class="fnname">get_i64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section><section id="method.get_i64_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_i64_le-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_i64_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_i64_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i64_ne" class="fnname">get_i64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section><section id="method.get_uint-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_uint-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_uint" class="fnname">get_uint</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></h4></section><section id="method.get_uint_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_uint_le-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_uint_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_uint_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_uint_ne" class="fnname">get_uint_ne</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></h4></section><section id="method.get_int-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_int-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_int" class="fnname">get_int</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></h4></section><section id="method.get_int_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_int_le-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_int_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.get_int_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_int_ne" class="fnname">get_int_ne</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></h4></section><section id="method.copy_to_bytes-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1393">source</a><a href="#method.copy_to_bytes-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.copy_to_bytes" class="fnname">copy_to_bytes</a>(&amp;mut self, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Buf-for-Box%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1396-1398">source</a><a href="#impl-Buf-for-Box%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="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="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;</h3></section></summary><div class="impl-items"><section id="method.remaining-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.remaining-1" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.chunk-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.chunk-1" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.chunk" class="fnname">chunk</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunks_vectored-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.chunks_vectored-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.chunks_vectored" class="fnname">chunks_vectored</a>&lt;'b&gt;(&amp;'b self, dst: &amp;mut [<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a>&lt;'b&gt;]) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>std</code></strong> only.</div></span></details><section id="method.advance-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.advance-1" class="anchor"></a><h4 class="code-header">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>)</h4></section><section id="method.has_remaining-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.has_remaining-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.copy_to_slice-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.copy_to_slice-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.copy_to_slice" class="fnname">copy_to_slice</a>(&amp;mut self, dst: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section><section id="method.get_u8-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_u8-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_i8-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_i8-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_u16-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_u16-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u16" class="fnname">get_u16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h4></section><section id="method.get_u16_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_u16_le-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_u16_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_u16_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u16_ne" class="fnname">get_u16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h4></section><section id="method.get_i16-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_i16-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i16" class="fnname">get_i16</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></h4></section><section id="method.get_i16_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_i16_le-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_i16_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_i16_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i16_ne" class="fnname">get_i16_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></h4></section><section id="method.get_u32-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_u32-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u32" class="fnname">get_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section><section id="method.get_u32_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_u32_le-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_u32_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_u32_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u32_ne" class="fnname">get_u32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section><section id="method.get_i32-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_i32-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i32" class="fnname">get_i32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section><section id="method.get_i32_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_i32_le-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_i32_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_i32_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i32_ne" class="fnname">get_i32_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section><section id="method.get_u64-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_u64-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u64" class="fnname">get_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section><section id="method.get_u64_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_u64_le-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_u64_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_u64_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_u64_ne" class="fnname">get_u64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section><section id="method.get_i64-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_i64-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i64" class="fnname">get_i64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section><section id="method.get_i64_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_i64_le-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_i64_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_i64_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_i64_ne" class="fnname">get_i64_ne</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section><section id="method.get_uint-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_uint-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_uint" class="fnname">get_uint</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></h4></section><section id="method.get_uint_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_uint_le-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_uint_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_uint_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_uint_ne" class="fnname">get_uint_ne</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></h4></section><section id="method.get_int-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_int-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_int" class="fnname">get_int</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></h4></section><section id="method.get_int_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_int_le-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.get_int_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.get_int_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.get_int_ne" class="fnname">get_int_ne</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></h4></section><section id="method.copy_to_bytes-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1397">source</a><a href="#method.copy_to_bytes-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.copy_to_bytes" class="fnname">copy_to_bytes</a>(&amp;mut self, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Buf-for-%26%5Bu8%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1400-1429">source</a><a href="#impl-Buf-for-%26%5Bu8%5D" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> for &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><section id="method.remaining-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1402-1404">source</a><a href="#method.remaining-2" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.chunk-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1407-1409">source</a><a href="#method.chunk-2" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.chunk" class="fnname">chunk</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section><section id="method.advance-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1412-1418">source</a><a href="#method.advance-2" class="anchor"></a><h4 class="code-header">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>)</h4></section><section id="method.copy_to_slice-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1421-1428">source</a><a href="#method.copy_to_slice-3" class="anchor"></a><h4 class="code-header">fn <a href="#method.copy_to_slice" class="fnname">copy_to_slice</a>(&amp;mut self, dst: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Buf-for-Cursor%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1432-1460">source</a><a href="#impl-Buf-for-Cursor%3CT%3E" class="anchor"></a><h3 class="code-header">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.u8.html">u8</a>]&gt;&gt; <a class="trait" href="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;</h3></section></summary><div class="impl-items"><section id="method.remaining-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1434-1436">source</a><a href="#method.remaining-3" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.chunk-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1439-1443">source</a><a href="#method.chunk-3" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.chunk" class="fnname">chunk</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section><section id="method.advance-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_impl.rs.html#1446-1459">source</a><a href="#method.advance-3" class="anchor"></a><h4 class="code-header">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>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Buf-for-VecDeque%3Cu8%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/vec_deque.rs.html#5-22">source</a><a href="#impl-Buf-for-VecDeque%3Cu8%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/vec_deque/struct.VecDeque.html" title="struct alloc::collections::vec_deque::VecDeque">VecDeque</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;</h3></section></summary><div class="impl-items"><section id="method.remaining-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/vec_deque.rs.html#6-8">source</a><a href="#method.remaining-4" class="anchor"></a><h4 class="code-header">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></h4></section><section id="method.chunk-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/vec_deque.rs.html#10-17">source</a><a href="#method.chunk-4" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.chunk" class="fnname">chunk</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<span class="notable-traits" data-ty="&amp;[u8]"><span class="notable-traits-tooltip">ⓘ</span></span></h4></section><section id="method.advance-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/vec_deque.rs.html#19-21">source</a><a href="#method.advance-4" class="anchor"></a><h4 class="code-header">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>)</h4></section></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div id="implementors-list"><section id="impl-Buf-for-Bytes" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes.rs.html#583-611">source</a><a href="#impl-Buf-for-Bytes" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> for <a class="struct" href="struct.Bytes.html" title="struct bytes::Bytes">Bytes</a></h3></section><section id="impl-Buf-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1055-1091">source</a><a href="#impl-Buf-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section><section id="impl-Buf-for-Chain%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/chain.rs.html#130-189">source</a><a href="#impl-Buf-for-Chain%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> for <a class="struct" href="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="buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>,</span></h3></section><section id="impl-Buf-for-Take%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/take.rs.html#132-155">source</a><a href="#impl-Buf-for-Take%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt; <a class="trait" href="buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> for <a class="struct" href="buf/struct.Take.html" title="struct bytes::buf::Take">Take</a>&lt;T&gt;</h3></section></div><script src="../implementors/bytes/buf/buf_impl/trait.Buf.js" data-ignore-extern-crates="alloc,std" async></script><script type="text/json" id="notable-traits-data">{"&[u8]":"<h3 class=\"notable\">Notable traits for <code>&amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for &amp;mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span><span class=\"where fmt-newline\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</span>","Reader<Self>":"<h3 class=\"notable\">Notable traits for <code><a class=\"struct\" href=\"buf/struct.Reader.html\" title=\"struct bytes::buf::Reader\">Reader</a>&lt;B&gt;</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl&lt;B:&nbsp;<a class=\"trait\" href=\"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=\"buf/struct.Reader.html\" title=\"struct bytes::buf::Reader\">Reader</a>&lt;B&gt;</span>"}</script></section></div></main><div id="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/bytes/trait.BufMut.html b/bytes/trait.BufMut.html
new file mode 100644
index 0000000..024339b
--- /dev/null
+++ b/bytes/trait.BufMut.html
@@ -0,0 +1,732 @@
+<!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="A trait for values that provide sequential write access to bytes."><meta name="keywords" content="rust, rustlang, rust-lang, BufMut"><title>BufMut in bytes - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../bytes/index.html"><div class="logo-container"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2 class="location"><a href="#">BufMut</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.advance_mut">advance_mut</a></li><li><a href="#tymethod.chunk_mut">chunk_mut</a></li><li><a href="#tymethod.remaining_mut">remaining_mut</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.chain_mut">chain_mut</a></li><li><a href="#method.has_remaining_mut">has_remaining_mut</a></li><li><a href="#method.limit">limit</a></li><li><a href="#method.put">put</a></li><li><a href="#method.put_bytes">put_bytes</a></li><li><a href="#method.put_f32">put_f32</a></li><li><a href="#method.put_f32_le">put_f32_le</a></li><li><a href="#method.put_f32_ne">put_f32_ne</a></li><li><a href="#method.put_f64">put_f64</a></li><li><a href="#method.put_f64_le">put_f64_le</a></li><li><a href="#method.put_f64_ne">put_f64_ne</a></li><li><a href="#method.put_i128">put_i128</a></li><li><a href="#method.put_i128_le">put_i128_le</a></li><li><a href="#method.put_i128_ne">put_i128_ne</a></li><li><a href="#method.put_i16">put_i16</a></li><li><a href="#method.put_i16_le">put_i16_le</a></li><li><a href="#method.put_i16_ne">put_i16_ne</a></li><li><a href="#method.put_i32">put_i32</a></li><li><a href="#method.put_i32_le">put_i32_le</a></li><li><a href="#method.put_i32_ne">put_i32_ne</a></li><li><a href="#method.put_i64">put_i64</a></li><li><a href="#method.put_i64_le">put_i64_le</a></li><li><a href="#method.put_i64_ne">put_i64_ne</a></li><li><a href="#method.put_i8">put_i8</a></li><li><a href="#method.put_int">put_int</a></li><li><a href="#method.put_int_le">put_int_le</a></li><li><a href="#method.put_int_ne">put_int_ne</a></li><li><a href="#method.put_slice">put_slice</a></li><li><a href="#method.put_u128">put_u128</a></li><li><a href="#method.put_u128_le">put_u128_le</a></li><li><a href="#method.put_u128_ne">put_u128_ne</a></li><li><a href="#method.put_u16">put_u16</a></li><li><a href="#method.put_u16_le">put_u16_le</a></li><li><a href="#method.put_u16_ne">put_u16_ne</a></li><li><a href="#method.put_u32">put_u32</a></li><li><a href="#method.put_u32_le">put_u32_le</a></li><li><a href="#method.put_u32_ne">put_u32_ne</a></li><li><a href="#method.put_u64">put_u64</a></li><li><a href="#method.put_u64_le">put_u64_le</a></li><li><a href="#method.put_u64_ne">put_u64_ne</a></li><li><a href="#method.put_u8">put_u8</a></li><li><a href="#method.put_uint">put_uint</a></li><li><a href="#method.put_uint_le">put_uint_le</a></li><li><a href="#method.put_uint_ne">put_uint_ne</a></li><li><a href="#method.writer">writer</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-BufMut-for-%26mut%20T">&amp;mut T</a></li><li><a href="#impl-BufMut-for-%26mut%20%5BMaybeUninit%3Cu8%3E%5D">&amp;mut [MaybeUninit&lt;u8&gt;]</a></li><li><a href="#impl-BufMut-for-%26mut%20%5Bu8%5D">&amp;mut [u8]</a></li><li><a href="#impl-BufMut-for-Box%3CT%3E">Box&lt;T&gt;</a></li><li><a href="#impl-BufMut-for-Vec%3Cu8%3E">Vec&lt;u8&gt;</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In bytes</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Trait <a href="index.html">bytes</a>::<wbr><a class="trait" href="#">BufMut</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../src/bytes/buf/buf_mut.rs.html#30-1342">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><div class="item-decl"><pre class="rust trait"><code>pub unsafe trait BufMut {
+<details class="rustdoc-toggle type-contents-toggle"><summary class="hideme"><span>Show 48 methods</span></summary> fn <a href="#tymethod.remaining_mut" class="fnname">remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>;
+<span class="item-spacer"></span> unsafe fn <a href="#tymethod.advance_mut" class="fnname">advance_mut</a>(&amp;mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>);
+<span class="item-spacer"></span> fn <a href="#tymethod.chunk_mut" class="fnname">chunk_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="buf/struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a>;
+
+ fn <a href="#method.has_remaining_mut" class="fnname">has_remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> { ... }
+<span class="item-spacer"></span> fn <a href="#method.put" class="fnname">put</a>&lt;T:&nbsp;<a class="trait" href="buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt;(&amp;mut self, src: T)<br>&nbsp;&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>,
+ { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_slice" class="fnname">put_slice</a>(&amp;mut self, src: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_bytes" class="fnname">put_bytes</a>(&amp;mut self, val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u8" class="fnname">put_u8</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i8" class="fnname">put_i8</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u16" class="fnname">put_u16</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u16_le" class="fnname">put_u16_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u16_ne" class="fnname">put_u16_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i16" class="fnname">put_i16</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i16_le" class="fnname">put_i16_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i16_ne" class="fnname">put_i16_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u32" class="fnname">put_u32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u32_le" class="fnname">put_u32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u32_ne" class="fnname">put_u32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i32" class="fnname">put_i32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i32_le" class="fnname">put_i32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i32_ne" class="fnname">put_i32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u64" class="fnname">put_u64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u64_le" class="fnname">put_u64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u64_ne" class="fnname">put_u64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i64" class="fnname">put_i64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i64_le" class="fnname">put_i64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i64_ne" class="fnname">put_i64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u128" class="fnname">put_u128</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u128_le" class="fnname">put_u128_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_u128_ne" class="fnname">put_u128_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i128" class="fnname">put_i128</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i128_le" class="fnname">put_i128_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_i128_ne" class="fnname">put_i128_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_uint" class="fnname">put_uint</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_uint_le" class="fnname">put_uint_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_uint_ne" class="fnname">put_uint_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_int" class="fnname">put_int</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_int_le" class="fnname">put_int_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_int_ne" class="fnname">put_int_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_f32" class="fnname">put_f32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_f32_le" class="fnname">put_f32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_f32_ne" class="fnname">put_f32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_f64" class="fnname">put_f64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_f64_le" class="fnname">put_f64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.put_f64_ne" class="fnname">put_f64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) { ... }
+<span class="item-spacer"></span> fn <a href="#method.limit" class="fnname">limit</a>(self, limit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="buf/struct.Limit.html" title="struct bytes::buf::Limit">Limit</a>&lt;Self&gt;<br>&nbsp;&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>,
+ { ... }
+<span class="item-spacer"></span> fn <a href="#method.writer" class="fnname">writer</a>(self) -&gt; <a class="struct" href="buf/struct.Writer.html" title="struct bytes::buf::Writer">Writer</a>&lt;Self&gt;<span class="notable-traits" data-ty="Writer&lt;Self&gt;"><span class="notable-traits-tooltip">ⓘ</span></span><br>&nbsp;&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>,
+ { ... }
+<span class="item-spacer"></span> fn <a href="#method.chain_mut" class="fnname">chain_mut</a>&lt;U:&nbsp;<a class="trait" href="buf/trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a>&gt;(self, next: U) -&gt; <a class="struct" href="buf/struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;Self, U&gt;<br>&nbsp;&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>,
+ { ... }
+</details>}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A trait for values that provide sequential write access to bytes.</p>
+<p>Write bytes to a buffer</p>
+<p>A buffer stores bytes in memory such that write operations are infallible.
+The underlying storage may or may not be in contiguous memory. A <code>BufMut</code>
+value is a cursor into the buffer. Writing to <code>BufMut</code> advances the cursor
+position.</p>
+<p>The simplest <code>BufMut</code> is a <code>Vec&lt;u8&gt;</code>.</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+
+buf.put(<span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]);
+
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;hello world&quot;</span>);</code></pre></div>
+</div></details><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.remaining_mut" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#64">source</a><h4 class="code-header">fn <a href="#tymethod.remaining_mut" class="fnname">remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the number of bytes that can be written from the current
+position until the end of the buffer is reached.</p>
+<p>This value is greater than or equal to the length of the slice returned
+by <code>chunk_mut()</code>.</p>
+<p>Writing to a <code>BufMut</code> may involve allocating more memory on the fly.
+Implementations may fail before reaching the number of bytes indicated
+by this method if they encounter an allocation failure.</p>
+<h5 id="examples"><a href="#examples">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0</span>; <span class="number">10</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;mut </span>dst[..];
+
+<span class="kw">let </span>original_remaining = buf.remaining_mut();
+buf.put(<span class="kw-2">&amp;</span><span class="string">b&quot;hello&quot;</span>[..]);
+
+<span class="macro">assert_eq!</span>(original_remaining - <span class="number">5</span>, buf.remaining_mut());</code></pre></div>
+<h5 id="implementer-notes"><a href="#implementer-notes">Implementer notes</a></h5>
+<p>Implementations of <code>remaining_mut</code> should ensure that the return value
+does not change unless a call is made to <code>advance_mut</code> or any other
+function that is documented to change the <code>BufMut</code>’s current position.</p>
+<h5 id="note"><a href="#note">Note</a></h5>
+<p><code>remaining_mut</code> may return value smaller than actual available space.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.advance_mut" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#107">source</a><h4 class="code-header">unsafe fn <a href="#tymethod.advance_mut" class="fnname">advance_mut</a>(&amp;mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Advance the internal cursor of the BufMut</p>
+<p>The next call to <code>chunk_mut</code> will return a slice starting <code>cnt</code> bytes
+further into the underlying buffer.</p>
+<h5 id="safety"><a href="#safety">Safety</a></h5>
+<p>The caller must ensure that the next <code>cnt</code> bytes of <code>chunk</code> are
+initialized.</p>
+<h5 id="examples-1"><a href="#examples-1">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = Vec::with_capacity(<span class="number">16</span>);
+
+<span class="comment">// Write some data
+</span>buf.chunk_mut()[<span class="number">0</span>..<span class="number">2</span>].copy_from_slice(<span class="string">b&quot;he&quot;</span>);
+<span class="kw">unsafe </span>{ buf.advance_mut(<span class="number">2</span>) };
+
+<span class="comment">// write more bytes
+</span>buf.chunk_mut()[<span class="number">0</span>..<span class="number">3</span>].copy_from_slice(<span class="string">b&quot;llo&quot;</span>);
+
+<span class="kw">unsafe </span>{ buf.advance_mut(<span class="number">3</span>); }
+
+<span class="macro">assert_eq!</span>(<span class="number">5</span>, buf.len());
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;hello&quot;</span>);</code></pre></div>
+<h5 id="panics"><a href="#panics">Panics</a></h5>
+<p>This function <strong>may</strong> panic if <code>cnt &gt; self.remaining_mut()</code>.</p>
+<h5 id="implementer-notes-1"><a href="#implementer-notes-1">Implementer notes</a></h5>
+<p>It is recommended for implementations of <code>advance_mut</code> to panic if
+<code>cnt &gt; self.remaining_mut()</code>. If the implementation does not panic,
+the call must behave as if <code>cnt == self.remaining_mut()</code>.</p>
+<p>A call with <code>cnt == 0</code> should never panic and be a no-op.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.chunk_mut" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#179">source</a><h4 class="code-header">fn <a href="#tymethod.chunk_mut" class="fnname">chunk_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="buf/struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section></summary><div class="docblock"><p>Returns a mutable slice starting at the current BufMut position and of
+length between 0 and <code>BufMut::remaining_mut()</code>. Note that this <em>can</em> be shorter than the
+whole remainder of the buffer (this allows non-continuous implementation).</p>
+<p>This is a lower level function. Most operations are done with other
+functions.</p>
+<p>The returned byte slice may represent uninitialized memory.</p>
+<h5 id="examples-2"><a href="#examples-2">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = Vec::with_capacity(<span class="number">16</span>);
+
+<span class="kw">unsafe </span>{
+ <span class="comment">// MaybeUninit::as_mut_ptr
+ </span>buf.chunk_mut()[<span class="number">0</span>..].as_mut_ptr().write(<span class="string">b&#39;h&#39;</span>);
+ buf.chunk_mut()[<span class="number">1</span>..].as_mut_ptr().write(<span class="string">b&#39;e&#39;</span>);
+
+ buf.advance_mut(<span class="number">2</span>);
+
+ buf.chunk_mut()[<span class="number">0</span>..].as_mut_ptr().write(<span class="string">b&#39;l&#39;</span>);
+ buf.chunk_mut()[<span class="number">1</span>..].as_mut_ptr().write(<span class="string">b&#39;l&#39;</span>);
+ buf.chunk_mut()[<span class="number">2</span>..].as_mut_ptr().write(<span class="string">b&#39;o&#39;</span>);
+
+ buf.advance_mut(<span class="number">3</span>);
+}
+
+<span class="macro">assert_eq!</span>(<span class="number">5</span>, buf.len());
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;hello&quot;</span>);</code></pre></div>
+<h5 id="implementer-notes-2"><a href="#implementer-notes-2">Implementer notes</a></h5>
+<p>This function should never panic. <code>chunk_mut</code> should return an empty
+slice <strong>if and only if</strong> <code>remaining_mut()</code> returns 0. In other words,
+<code>chunk_mut()</code> returning an empty slice implies that <code>remaining_mut()</code> will
+return 0 and <code>remaining_mut()</code> returning 0 implies that <code>chunk_mut()</code> will
+return an empty slice.</p>
+<p>This function may trigger an out-of-memory abort if it tries to allocate
+memory and fails to do so.</p>
+</div></details></div><h2 id="provided-methods" class="small-section-header">Provided Methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.has_remaining_mut" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#128-130">source</a><h4 class="code-header">fn <a href="#method.has_remaining_mut" class="fnname">has_remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if there is space in <code>self</code> for more bytes.</p>
+<p>This is equivalent to <code>self.remaining_mut() != 0</code>.</p>
+<h5 id="examples-3"><a href="#examples-3">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0</span>; <span class="number">5</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;mut </span>dst[..];
+
+<span class="macro">assert!</span>(buf.has_remaining_mut());
+
+buf.put(<span class="kw-2">&amp;</span><span class="string">b&quot;hello&quot;</span>[..]);
+
+<span class="macro">assert!</span>(!buf.has_remaining_mut());</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#202-221">source</a><h4 class="code-header">fn <a href="#method.put" class="fnname">put</a>&lt;T:&nbsp;<a class="trait" href="buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt;(&amp;mut self, src: T)<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>,</span></h4></section></summary><div class="docblock"><p>Transfer bytes into <code>self</code> from <code>src</code> and advance the cursor by the
+number of bytes written.</p>
+<h5 id="examples-4"><a href="#examples-4">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+
+buf.put_u8(<span class="string">b&#39;h&#39;</span>);
+buf.put(<span class="kw-2">&amp;</span><span class="string">b&quot;ello&quot;</span>[..]);
+buf.put(<span class="kw-2">&amp;</span><span class="string">b&quot; world&quot;</span>[..]);
+
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;hello world&quot;</span>);</code></pre></div>
+<h5 id="panics-1"><a href="#panics-1">Panics</a></h5>
+<p>Panics if <code>self</code> does not have enough capacity to contain <code>src</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_slice" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#243-258">source</a><h4 class="code-header">fn <a href="#method.put_slice" class="fnname">put_slice</a>(&amp;mut self, src: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section></summary><div class="docblock"><p>Transfer bytes into <code>self</code> from <code>src</code> and advance the cursor by the
+number of bytes written.</p>
+<p><code>self</code> must have enough remaining capacity to contain all of <code>src</code>.</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0</span>; <span class="number">6</span>];
+
+{
+ <span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;mut </span>dst[..];
+ buf.put_slice(<span class="string">b&quot;hello&quot;</span>);
+
+ <span class="macro">assert_eq!</span>(<span class="number">1</span>, buf.remaining_mut());
+}
+
+<span class="macro">assert_eq!</span>(<span class="string">b&quot;hello\0&quot;</span>, <span class="kw-2">&amp;</span>dst);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_bytes" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#286-300">source</a><h4 class="code-header">fn <a href="#method.put_bytes" class="fnname">put_bytes</a>(&amp;mut self, val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Put <code>cnt</code> bytes <code>val</code> into <code>self</code>.</p>
+<p>Logically equivalent to calling <code>self.put_u8(val)</code> <code>cnt</code> times, but may work faster.</p>
+<p><code>self</code> must have at least <code>cnt</code> remaining capacity.</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0</span>; <span class="number">6</span>];
+
+{
+ <span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="kw-2">&amp;mut </span>dst[..];
+ buf.put_bytes(<span class="string">b&#39;a&#39;</span>, <span class="number">4</span>);
+
+ <span class="macro">assert_eq!</span>(<span class="number">2</span>, buf.remaining_mut());
+}
+
+<span class="macro">assert_eq!</span>(<span class="string">b&quot;aaaa\0\0&quot;</span>, <span class="kw-2">&amp;</span>dst);</code></pre></div>
+<h5 id="panics-2"><a href="#panics-2">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u8" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#321-324">source</a><h4 class="code-header">fn <a href="#method.put_u8" class="fnname">put_u8</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 8 bit integer to <code>self</code>.</p>
+<p>The current position is advanced by 1.</p>
+<h5 id="examples-5"><a href="#examples-5">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u8(<span class="number">0x01</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01&quot;</span>);</code></pre></div>
+<h5 id="panics-3"><a href="#panics-3">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i8" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#345-348">source</a><h4 class="code-header">fn <a href="#method.put_i8" class="fnname">put_i8</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 8 bit integer to <code>self</code>.</p>
+<p>The current position is advanced by 1.</p>
+<h5 id="examples-6"><a href="#examples-6">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i8(<span class="number">0x01</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01&quot;</span>);</code></pre></div>
+<h5 id="panics-4"><a href="#panics-4">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u16" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#369-371">source</a><h4 class="code-header">fn <a href="#method.put_u16" class="fnname">put_u16</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 16 bit integer to <code>self</code> in big-endian byte order.</p>
+<p>The current position is advanced by 2.</p>
+<h5 id="examples-7"><a href="#examples-7">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u16(<span class="number">0x0809</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x09&quot;</span>);</code></pre></div>
+<h5 id="panics-5"><a href="#panics-5">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u16_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#392-394">source</a><h4 class="code-header">fn <a href="#method.put_u16_le" class="fnname">put_u16_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 16 bit integer to <code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 2.</p>
+<h5 id="examples-8"><a href="#examples-8">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u16_le(<span class="number">0x0809</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x09\x08&quot;</span>);</code></pre></div>
+<h5 id="panics-6"><a href="#panics-6">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u16_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#419-421">source</a><h4 class="code-header">fn <a href="#method.put_u16_ne" class="fnname">put_u16_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 16 bit integer to <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 2.</p>
+<h5 id="examples-9"><a href="#examples-9">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u16_ne(<span class="number">0x0809</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x09&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x09\x08&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-7"><a href="#panics-7">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i16" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#442-444">source</a><h4 class="code-header">fn <a href="#method.put_i16" class="fnname">put_i16</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 16 bit integer to <code>self</code> in big-endian byte order.</p>
+<p>The current position is advanced by 2.</p>
+<h5 id="examples-10"><a href="#examples-10">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i16(<span class="number">0x0809</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x09&quot;</span>);</code></pre></div>
+<h5 id="panics-8"><a href="#panics-8">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i16_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#465-467">source</a><h4 class="code-header">fn <a href="#method.put_i16_le" class="fnname">put_i16_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 16 bit integer to <code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 2.</p>
+<h5 id="examples-11"><a href="#examples-11">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i16_le(<span class="number">0x0809</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x09\x08&quot;</span>);</code></pre></div>
+<h5 id="panics-9"><a href="#panics-9">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i16_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#492-494">source</a><h4 class="code-header">fn <a href="#method.put_i16_ne" class="fnname">put_i16_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 16 bit integer to <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 2.</p>
+<h5 id="examples-12"><a href="#examples-12">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i16_ne(<span class="number">0x0809</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x09&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x09\x08&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-10"><a href="#panics-10">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u32" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#515-517">source</a><h4 class="code-header">fn <a href="#method.put_u32" class="fnname">put_u32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 32 bit integer to <code>self</code> in big-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-13"><a href="#examples-13">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u32(<span class="number">0x0809A0A1</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x09\xA0\xA1&quot;</span>);</code></pre></div>
+<h5 id="panics-11"><a href="#panics-11">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u32_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#538-540">source</a><h4 class="code-header">fn <a href="#method.put_u32_le" class="fnname">put_u32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 32 bit integer to <code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-14"><a href="#examples-14">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u32_le(<span class="number">0x0809A0A1</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\xA1\xA0\x09\x08&quot;</span>);</code></pre></div>
+<h5 id="panics-12"><a href="#panics-12">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u32_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#565-567">source</a><h4 class="code-header">fn <a href="#method.put_u32_ne" class="fnname">put_u32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 32 bit integer to <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-15"><a href="#examples-15">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u32_ne(<span class="number">0x0809A0A1</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x09\xA0\xA1&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\xA1\xA0\x09\x08&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-13"><a href="#panics-13">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i32" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#588-590">source</a><h4 class="code-header">fn <a href="#method.put_i32" class="fnname">put_i32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 32 bit integer to <code>self</code> in big-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-16"><a href="#examples-16">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i32(<span class="number">0x0809A0A1</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x09\xA0\xA1&quot;</span>);</code></pre></div>
+<h5 id="panics-14"><a href="#panics-14">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i32_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#611-613">source</a><h4 class="code-header">fn <a href="#method.put_i32_le" class="fnname">put_i32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 32 bit integer to <code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-17"><a href="#examples-17">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i32_le(<span class="number">0x0809A0A1</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\xA1\xA0\x09\x08&quot;</span>);</code></pre></div>
+<h5 id="panics-15"><a href="#panics-15">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i32_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#638-640">source</a><h4 class="code-header">fn <a href="#method.put_i32_ne" class="fnname">put_i32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 32 bit integer to <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-18"><a href="#examples-18">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i32_ne(<span class="number">0x0809A0A1</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x09\xA0\xA1&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\xA1\xA0\x09\x08&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-16"><a href="#panics-16">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u64" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#661-663">source</a><h4 class="code-header">fn <a href="#method.put_u64" class="fnname">put_u64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 64 bit integer to <code>self</code> in the big-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-19"><a href="#examples-19">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u64(<span class="number">0x0102030405060708</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08&quot;</span>);</code></pre></div>
+<h5 id="panics-17"><a href="#panics-17">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u64_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#684-686">source</a><h4 class="code-header">fn <a href="#method.put_u64_le" class="fnname">put_u64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 64 bit integer to <code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-20"><a href="#examples-20">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u64_le(<span class="number">0x0102030405060708</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x07\x06\x05\x04\x03\x02\x01&quot;</span>);</code></pre></div>
+<h5 id="panics-18"><a href="#panics-18">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u64_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#711-713">source</a><h4 class="code-header">fn <a href="#method.put_u64_ne" class="fnname">put_u64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 64 bit integer to <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-21"><a href="#examples-21">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u64_ne(<span class="number">0x0102030405060708</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x07\x06\x05\x04\x03\x02\x01&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-19"><a href="#panics-19">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i64" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#734-736">source</a><h4 class="code-header">fn <a href="#method.put_i64" class="fnname">put_i64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 64 bit integer to <code>self</code> in the big-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-22"><a href="#examples-22">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i64(<span class="number">0x0102030405060708</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08&quot;</span>);</code></pre></div>
+<h5 id="panics-20"><a href="#panics-20">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i64_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#757-759">source</a><h4 class="code-header">fn <a href="#method.put_i64_le" class="fnname">put_i64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 64 bit integer to <code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-23"><a href="#examples-23">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i64_le(<span class="number">0x0102030405060708</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x07\x06\x05\x04\x03\x02\x01&quot;</span>);</code></pre></div>
+<h5 id="panics-21"><a href="#panics-21">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i64_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#784-786">source</a><h4 class="code-header">fn <a href="#method.put_i64_ne" class="fnname">put_i64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 64 bit integer to <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-24"><a href="#examples-24">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i64_ne(<span class="number">0x0102030405060708</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x08\x07\x06\x05\x04\x03\x02\x01&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-22"><a href="#panics-22">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u128" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#807-809">source</a><h4 class="code-header">fn <a href="#method.put_u128" class="fnname">put_u128</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 128 bit integer to <code>self</code> in the big-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-25"><a href="#examples-25">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u128(<span class="number">0x01020304050607080910111213141516</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16&quot;</span>);</code></pre></div>
+<h5 id="panics-23"><a href="#panics-23">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u128_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#830-832">source</a><h4 class="code-header">fn <a href="#method.put_u128_le" class="fnname">put_u128_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 128 bit integer to <code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-26"><a href="#examples-26">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u128_le(<span class="number">0x01020304050607080910111213141516</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01&quot;</span>);</code></pre></div>
+<h5 id="panics-24"><a href="#panics-24">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_u128_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#857-859">source</a><h4 class="code-header">fn <a href="#method.put_u128_ne" class="fnname">put_u128_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned 128 bit integer to <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-27"><a href="#examples-27">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_u128_ne(<span class="number">0x01020304050607080910111213141516</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-25"><a href="#panics-25">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i128" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#880-882">source</a><h4 class="code-header">fn <a href="#method.put_i128" class="fnname">put_i128</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 128 bit integer to <code>self</code> in the big-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-28"><a href="#examples-28">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i128(<span class="number">0x01020304050607080910111213141516</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16&quot;</span>);</code></pre></div>
+<h5 id="panics-26"><a href="#panics-26">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i128_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#903-905">source</a><h4 class="code-header">fn <a href="#method.put_i128_le" class="fnname">put_i128_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 128 bit integer to <code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-29"><a href="#examples-29">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i128_le(<span class="number">0x01020304050607080910111213141516</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01&quot;</span>);</code></pre></div>
+<h5 id="panics-27"><a href="#panics-27">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_i128_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#930-932">source</a><h4 class="code-header">fn <a href="#method.put_i128_ne" class="fnname">put_i128_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>)</h4></section></summary><div class="docblock"><p>Writes a signed 128 bit integer to <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 16.</p>
+<h5 id="examples-30"><a href="#examples-30">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_i128_ne(<span class="number">0x01020304050607080910111213141516</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-28"><a href="#panics-28">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_uint" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#953-960">source</a><h4 class="code-header">fn <a href="#method.put_uint" class="fnname">put_uint</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned n-byte integer to <code>self</code> in big-endian byte order.</p>
+<p>The current position is advanced by <code>nbytes</code>.</p>
+<h5 id="examples-31"><a href="#examples-31">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_uint(<span class="number">0x010203</span>, <span class="number">3</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03&quot;</span>);</code></pre></div>
+<h5 id="panics-29"><a href="#panics-29">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code> or if <code>nbytes</code> is greater than 8.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_uint_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#981-989">source</a><h4 class="code-header">fn <a href="#method.put_uint_le" class="fnname">put_uint_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned n-byte integer to <code>self</code> in the little-endian byte order.</p>
+<p>The current position is advanced by <code>nbytes</code>.</p>
+<h5 id="examples-32"><a href="#examples-32">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_uint_le(<span class="number">0x010203</span>, <span class="number">3</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x03\x02\x01&quot;</span>);</code></pre></div>
+<h5 id="panics-30"><a href="#panics-30">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code> or if <code>nbytes</code> is greater than 8.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_uint_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1014-1020">source</a><h4 class="code-header">fn <a href="#method.put_uint_ne" class="fnname">put_uint_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Writes an unsigned n-byte integer to <code>self</code> in the native-endian byte order.</p>
+<p>The current position is advanced by <code>nbytes</code>.</p>
+<h5 id="examples-33"><a href="#examples-33">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_uint_ne(<span class="number">0x010203</span>, <span class="number">3</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x03\x02\x01&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-31"><a href="#panics-31">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code> or if <code>nbytes</code> is greater than 8.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_int" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1041-1048">source</a><h4 class="code-header">fn <a href="#method.put_int" class="fnname">put_int</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Writes low <code>nbytes</code> of a signed integer to <code>self</code> in big-endian byte order.</p>
+<p>The current position is advanced by <code>nbytes</code>.</p>
+<h5 id="examples-34"><a href="#examples-34">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_int(<span class="number">0x0504010203</span>, <span class="number">3</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03&quot;</span>);</code></pre></div>
+<h5 id="panics-32"><a href="#panics-32">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code> or if <code>nbytes</code> is greater than 8.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_int_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1069-1077">source</a><h4 class="code-header">fn <a href="#method.put_int_le" class="fnname">put_int_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Writes low <code>nbytes</code> of a signed integer to <code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by <code>nbytes</code>.</p>
+<h5 id="examples-35"><a href="#examples-35">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_int_le(<span class="number">0x0504010203</span>, <span class="number">3</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x03\x02\x01&quot;</span>);</code></pre></div>
+<h5 id="panics-33"><a href="#panics-33">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code> or if <code>nbytes</code> is greater than 8.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_int_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1102-1108">source</a><h4 class="code-header">fn <a href="#method.put_int_ne" class="fnname">put_int_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Writes low <code>nbytes</code> of a signed integer to <code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by <code>nbytes</code>.</p>
+<h5 id="examples-36"><a href="#examples-36">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_int_ne(<span class="number">0x010203</span>, <span class="number">3</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x01\x02\x03&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x03\x02\x01&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-34"><a href="#panics-34">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code> or if <code>nbytes</code> is greater than 8.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f32" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1130-1132">source</a><h4 class="code-header">fn <a href="#method.put_f32" class="fnname">put_f32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>)</h4></section></summary><div class="docblock"><p>Writes an IEEE754 single-precision (4 bytes) floating point number to
+<code>self</code> in big-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-37"><a href="#examples-37">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_f32(<span class="number">1.2f32</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x3F\x99\x99\x9A&quot;</span>);</code></pre></div>
+<h5 id="panics-35"><a href="#panics-35">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f32_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1154-1156">source</a><h4 class="code-header">fn <a href="#method.put_f32_le" class="fnname">put_f32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>)</h4></section></summary><div class="docblock"><p>Writes an IEEE754 single-precision (4 bytes) floating point number to
+<code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-38"><a href="#examples-38">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_f32_le(<span class="number">1.2f32</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x9A\x99\x99\x3F&quot;</span>);</code></pre></div>
+<h5 id="panics-36"><a href="#panics-36">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f32_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1182-1184">source</a><h4 class="code-header">fn <a href="#method.put_f32_ne" class="fnname">put_f32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>)</h4></section></summary><div class="docblock"><p>Writes an IEEE754 single-precision (4 bytes) floating point number to
+<code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 4.</p>
+<h5 id="examples-39"><a href="#examples-39">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_f32_ne(<span class="number">1.2f32</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x3F\x99\x99\x9A&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x9A\x99\x99\x3F&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-37"><a href="#panics-37">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f64" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1206-1208">source</a><h4 class="code-header">fn <a href="#method.put_f64" class="fnname">put_f64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</h4></section></summary><div class="docblock"><p>Writes an IEEE754 double-precision (8 bytes) floating point number to
+<code>self</code> in big-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-40"><a href="#examples-40">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_f64(<span class="number">1.2f64</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x3F\xF3\x33\x33\x33\x33\x33\x33&quot;</span>);</code></pre></div>
+<h5 id="panics-38"><a href="#panics-38">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f64_le" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1230-1232">source</a><h4 class="code-header">fn <a href="#method.put_f64_le" class="fnname">put_f64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</h4></section></summary><div class="docblock"><p>Writes an IEEE754 double-precision (8 bytes) floating point number to
+<code>self</code> in little-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-41"><a href="#examples-41">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_f64_le(<span class="number">1.2f64</span>);
+<span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x33\x33\x33\x33\x33\x33\xF3\x3F&quot;</span>);</code></pre></div>
+<h5 id="panics-39"><a href="#panics-39">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.put_f64_ne" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1258-1260">source</a><h4 class="code-header">fn <a href="#method.put_f64_ne" class="fnname">put_f64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</h4></section></summary><div class="docblock"><p>Writes an IEEE754 double-precision (8 bytes) floating point number to
+<code>self</code> in native-endian byte order.</p>
+<p>The current position is advanced by 8.</p>
+<h5 id="examples-42"><a href="#examples-42">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
+buf.put_f64_ne(<span class="number">1.2f64</span>);
+<span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x3F\xF3\x33\x33\x33\x33\x33\x33&quot;</span>);
+} <span class="kw">else </span>{
+ <span class="macro">assert_eq!</span>(buf, <span class="string">b&quot;\x33\x33\x33\x33\x33\x33\xF3\x3F&quot;</span>);
+}</code></pre></div>
+<h5 id="panics-40"><a href="#panics-40">Panics</a></h5>
+<p>This function panics if there is not enough remaining capacity in
+<code>self</code>.</p>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.limit" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1276-1281">source</a><h4 class="code-header">fn <a href="#method.limit" class="fnname">limit</a>(self, limit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="buf/struct.Limit.html" title="struct bytes::buf::Limit">Limit</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>,</span></h4></section></summary><div class="docblock"><p>Creates an adaptor which can write at most <code>limit</code> bytes to <code>self</code>.</p>
+<h5 id="examples-43"><a href="#examples-43">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span>arr = <span class="kw-2">&amp;mut </span>[<span class="number">0u8</span>; <span class="number">128</span>][..];
+<span class="macro">assert_eq!</span>(arr.remaining_mut(), <span class="number">128</span>);
+
+<span class="kw">let </span>dst = arr.limit(<span class="number">10</span>);
+<span class="macro">assert_eq!</span>(dst.remaining_mut(), <span class="number">10</span>);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.writer" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1308-1313">source</a><h4 class="code-header">fn <a href="#method.writer" class="fnname">writer</a>(self) -&gt; <a class="struct" href="buf/struct.Writer.html" title="struct bytes::buf::Writer">Writer</a>&lt;Self&gt;<span class="notable-traits" data-ty="Writer&lt;Self&gt;"><span class="notable-traits-tooltip">ⓘ</span></span><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>,</span></h4></section></summary><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>std</code></strong> only.</div></span><div class="docblock"><p>Creates an adaptor which implements the <code>Write</code> trait for <code>self</code>.</p>
+<p>This function returns a new value which implements <code>Write</code> by adapting
+the <code>Write</code> trait functions to the <code>BufMut</code> trait functions. Given that
+<code>BufMut</code> operations are infallible, none of the <code>Write</code> functions will
+return with <code>Err</code>.</p>
+<h5 id="examples-44"><a href="#examples-44">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+<span class="kw">use </span>std::io::Write;
+
+<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[].writer();
+
+<span class="kw">let </span>num = buf.write(<span class="kw-2">&amp;</span><span class="string">b&quot;hello world&quot;</span>[..]).unwrap();
+<span class="macro">assert_eq!</span>(<span class="number">11</span>, num);
+
+<span class="kw">let </span>buf = buf.into_inner();
+
+<span class="macro">assert_eq!</span>(<span class="kw-2">*</span>buf, <span class="string">b&quot;hello world&quot;</span>[..]);</code></pre></div>
+</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chain_mut" class="method has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1336-1341">source</a><h4 class="code-header">fn <a href="#method.chain_mut" class="fnname">chain_mut</a>&lt;U:&nbsp;<a class="trait" href="buf/trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a>&gt;(self, next: U) -&gt; <a class="struct" href="buf/struct.Chain.html" title="struct bytes::buf::Chain">Chain</a>&lt;Self, U&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>,</span></h4></section></summary><div class="docblock"><p>Creates an adapter which will chain this buffer with another.</p>
+<p>The returned <code>BufMut</code> instance will first write to all bytes from
+<code>self</code>. Afterwards, it will write to <code>next</code>.</p>
+<h5 id="examples-45"><a href="#examples-45">Examples</a></h5>
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bytes::BufMut;
+
+<span class="kw">let </span><span class="kw-2">mut </span>a = [<span class="number">0u8</span>; <span class="number">5</span>];
+<span class="kw">let </span><span class="kw-2">mut </span>b = [<span class="number">0u8</span>; <span class="number">6</span>];
+
+<span class="kw">let </span><span class="kw-2">mut </span>chain = (<span class="kw-2">&amp;mut </span>a[..]).chain_mut(<span class="kw-2">&amp;mut </span>b[..]);
+
+chain.put_slice(<span class="string">b&quot;hello world&quot;</span>);
+
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>a[..], <span class="string">b&quot;hello&quot;</span>);
+<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>b[..], <span class="string">b&quot; world&quot;</span>);</code></pre></div>
+</div></details></div><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BufMut-for-%26mut%20T" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1468-1470">source</a><a href="#impl-BufMut-for-%26mut%20T" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="buf/trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</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="buf/trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</h3></section></summary><div class="impl-items"><section id="method.remaining_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.remaining_mut" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.remaining_mut" class="fnname">remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section><section id="method.chunk_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.chunk_mut" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.chunk_mut" class="fnname">chunk_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="buf/struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section><section id="method.advance_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.advance_mut" class="anchor"></a><h4 class="code-header">unsafe fn <a href="#tymethod.advance_mut" class="fnname">advance_mut</a>(&amp;mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section><section id="method.put_slice-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_slice-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_slice" class="fnname">put_slice</a>(&amp;mut self, src: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section><section id="method.put_u8-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_u8-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u8" class="fnname">put_u8</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>)</h4></section><section id="method.put_i8-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_i8-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i8" class="fnname">put_i8</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>)</h4></section><section id="method.put_u16-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_u16-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u16" class="fnname">put_u16</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section><section id="method.put_u16_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_u16_le-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u16_le" class="fnname">put_u16_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section><section id="method.put_u16_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_u16_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u16_ne" class="fnname">put_u16_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section><section id="method.put_i16-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_i16-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i16" class="fnname">put_i16</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section><section id="method.put_i16_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_i16_le-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i16_le" class="fnname">put_i16_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section><section id="method.put_i16_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_i16_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i16_ne" class="fnname">put_i16_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section><section id="method.put_u32-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_u32-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u32" class="fnname">put_u32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section><section id="method.put_u32_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_u32_le-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u32_le" class="fnname">put_u32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section><section id="method.put_u32_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_u32_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u32_ne" class="fnname">put_u32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section><section id="method.put_i32-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_i32-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i32" class="fnname">put_i32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section><section id="method.put_i32_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_i32_le-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i32_le" class="fnname">put_i32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section><section id="method.put_i32_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_i32_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i32_ne" class="fnname">put_i32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section><section id="method.put_u64-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_u64-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u64" class="fnname">put_u64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section><section id="method.put_u64_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_u64_le-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u64_le" class="fnname">put_u64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section><section id="method.put_u64_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_u64_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u64_ne" class="fnname">put_u64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section><section id="method.put_i64-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_i64-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i64" class="fnname">put_i64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section><section id="method.put_i64_le-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_i64_le-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i64_le" class="fnname">put_i64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section><section id="method.put_i64_ne-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1469">source</a><a href="#method.put_i64_ne-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i64_ne" class="fnname">put_i64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BufMut-for-Box%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1472-1474">source</a><a href="#impl-BufMut-for-Box%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="buf/trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</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="buf/trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</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;</h3></section></summary><div class="impl-items"><section id="method.remaining_mut-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.remaining_mut-1" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.remaining_mut" class="fnname">remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section><section id="method.chunk_mut-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.chunk_mut-1" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.chunk_mut" class="fnname">chunk_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="buf/struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section><section id="method.advance_mut-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.advance_mut-1" class="anchor"></a><h4 class="code-header">unsafe fn <a href="#tymethod.advance_mut" class="fnname">advance_mut</a>(&amp;mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section><section id="method.put_slice-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_slice-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_slice" class="fnname">put_slice</a>(&amp;mut self, src: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section><section id="method.put_u8-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_u8-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u8" class="fnname">put_u8</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>)</h4></section><section id="method.put_i8-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_i8-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i8" class="fnname">put_i8</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>)</h4></section><section id="method.put_u16-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_u16-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u16" class="fnname">put_u16</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section><section id="method.put_u16_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_u16_le-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u16_le" class="fnname">put_u16_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section><section id="method.put_u16_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_u16_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u16_ne" class="fnname">put_u16_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section><section id="method.put_i16-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_i16-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i16" class="fnname">put_i16</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section><section id="method.put_i16_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_i16_le-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i16_le" class="fnname">put_i16_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section><section id="method.put_i16_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_i16_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i16_ne" class="fnname">put_i16_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>)</h4></section><section id="method.put_u32-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_u32-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u32" class="fnname">put_u32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section><section id="method.put_u32_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_u32_le-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u32_le" class="fnname">put_u32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section><section id="method.put_u32_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_u32_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u32_ne" class="fnname">put_u32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section><section id="method.put_i32-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_i32-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i32" class="fnname">put_i32</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section><section id="method.put_i32_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_i32_le-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i32_le" class="fnname">put_i32_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section><section id="method.put_i32_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_i32_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i32_ne" class="fnname">put_i32_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</h4></section><section id="method.put_u64-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_u64-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u64" class="fnname">put_u64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section><section id="method.put_u64_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_u64_le-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u64_le" class="fnname">put_u64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section><section id="method.put_u64_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_u64_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_u64_ne" class="fnname">put_u64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section><section id="method.put_i64-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_i64-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i64" class="fnname">put_i64</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section><section id="method.put_i64_le-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_i64_le-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i64_le" class="fnname">put_i64_le</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section><section id="method.put_i64_ne-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1473">source</a><a href="#method.put_i64_ne-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_i64_ne" class="fnname">put_i64_ne</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BufMut-for-%26mut%20%5Bu8%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1476-1521">source</a><a href="#impl-BufMut-for-%26mut%20%5Bu8%5D" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="buf/trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a> for &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><section id="method.remaining_mut-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1478-1480">source</a><a href="#method.remaining_mut-2" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.remaining_mut" class="fnname">remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section><section id="method.chunk_mut-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1483-1485">source</a><a href="#method.chunk_mut-2" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.chunk_mut" class="fnname">chunk_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="buf/struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section><section id="method.advance_mut-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1488-1496">source</a><a href="#method.advance_mut-2" class="anchor"></a><h4 class="code-header">unsafe fn <a href="#tymethod.advance_mut" class="fnname">advance_mut</a>(&amp;mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section><section id="method.put_slice-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1499-1507">source</a><a href="#method.put_slice-3" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_slice" class="fnname">put_slice</a>(&amp;mut self, src: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section><section id="method.put_bytes-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1510-1520">source</a><a href="#method.put_bytes-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_bytes" class="fnname">put_bytes</a>(&amp;mut self, val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BufMut-for-%26mut%20%5BMaybeUninit%3Cu8%3E%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1523-1570">source</a><a href="#impl-BufMut-for-%26mut%20%5BMaybeUninit%3Cu8%3E%5D" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="buf/trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a> for &amp;mut [<a class="union" href="https://doc.rust-lang.org/nightly/core/mem/maybe_uninit/union.MaybeUninit.html" title="union core::mem::maybe_uninit::MaybeUninit">MaybeUninit</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;]</h3></section></summary><div class="impl-items"><section id="method.remaining_mut-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1525-1527">source</a><a href="#method.remaining_mut-3" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.remaining_mut" class="fnname">remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section><section id="method.chunk_mut-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1530-1532">source</a><a href="#method.chunk_mut-3" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.chunk_mut" class="fnname">chunk_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="buf/struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section><section id="method.advance_mut-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1535-1543">source</a><a href="#method.advance_mut-3" class="anchor"></a><h4 class="code-header">unsafe fn <a href="#tymethod.advance_mut" class="fnname">advance_mut</a>(&amp;mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section><section id="method.put_slice-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1546-1556">source</a><a href="#method.put_slice-4" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_slice" class="fnname">put_slice</a>(&amp;mut self, src: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section><section id="method.put_bytes-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1559-1569">source</a><a href="#method.put_bytes-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_bytes" class="fnname">put_bytes</a>(&amp;mut self, val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BufMut-for-Vec%3Cu8%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1572-1637">source</a><a href="#impl-BufMut-for-Vec%3Cu8%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="buf/trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;</h3></section></summary><div class="impl-items"><section id="method.remaining_mut-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1574-1577">source</a><a href="#method.remaining_mut-4" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.remaining_mut" class="fnname">remaining_mut</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section><section id="method.advance_mut-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1580-1590">source</a><a href="#method.advance_mut-4" class="anchor"></a><h4 class="code-header">unsafe fn <a href="#tymethod.advance_mut" class="fnname">advance_mut</a>(&amp;mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section><section id="method.chunk_mut-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1593-1606">source</a><a href="#method.chunk_mut-4" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.chunk_mut" class="fnname">chunk_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="buf/struct.UninitSlice.html" title="struct bytes::buf::UninitSlice">UninitSlice</a></h4></section><section id="method.put-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1611-1624">source</a><a href="#method.put-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.put" class="fnname">put</a>&lt;T:&nbsp;<a class="trait" href="buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>&gt;(&amp;mut self, src: T)<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>,</span></h4></section><section id="method.put_slice-5" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1627-1629">source</a><a href="#method.put_slice-5" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_slice" class="fnname">put_slice</a>(&amp;mut self, src: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section><section id="method.put_bytes-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/buf_mut.rs.html#1632-1636">source</a><a href="#method.put_bytes-3" class="anchor"></a><h4 class="code-header">fn <a href="#method.put_bytes" class="fnname">put_bytes</a>(&amp;mut self, val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div id="implementors-list"><section id="impl-BufMut-for-BytesMut" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/bytes_mut.rs.html#1093-1148">source</a><a href="#impl-BufMut-for-BytesMut" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="buf/trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a> for <a class="struct" href="struct.BytesMut.html" title="struct bytes::BytesMut">BytesMut</a></h3></section><section id="impl-BufMut-for-Chain%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/chain.rs.html#191-227">source</a><a href="#impl-BufMut-for-Chain%3CT%2C%20U%3E" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="buf/trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a> for <a class="struct" href="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="buf/trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="buf/trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a>,</span></h3></section><section id="impl-BufMut-for-Limit%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/bytes/buf/limit.rs.html#59-75">source</a><a href="#impl-BufMut-for-Limit%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="buf/trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a>&gt; <a class="trait" href="buf/trait.BufMut.html" title="trait bytes::buf::BufMut">BufMut</a> for <a class="struct" href="buf/struct.Limit.html" title="struct bytes::buf::Limit">Limit</a>&lt;T&gt;</h3></section></div><script src="../implementors/bytes/buf/buf_mut/trait.BufMut.js" data-ignore-extern-crates="alloc,std" async></script><script type="text/json" id="notable-traits-data">{"Writer<Self>":"<h3 class=\"notable\">Notable traits for <code><a class=\"struct\" href=\"buf/struct.Writer.html\" title=\"struct bytes::buf::Writer\">Writer</a>&lt;B&gt;</code></h3><pre class=\"content\"><code><span class=\"where fmt-newline\">impl&lt;B:&nbsp;<a class=\"trait\" href=\"buf/trait.BufMut.html\" title=\"trait bytes::buf::BufMut\">BufMut</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.Write.html\" title=\"trait std::io::Write\">Write</a> for <a class=\"struct\" href=\"buf/struct.Writer.html\" title=\"struct bytes::buf::Writer\">Writer</a>&lt;B&gt;</span>"}</script></section></div></main><div id="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/crates.js b/crates.js
new file mode 100644
index 0000000..d5d218d
--- /dev/null
+++ b/crates.js
@@ -0,0 +1 @@
+window.ALL_CRATES = ["bytes"]; \ No newline at end of file
diff --git a/help.html b/help.html
new file mode 100644
index 0000000..825784f
--- /dev/null
+++ b/help.html
@@ -0,0 +1 @@
+<!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="Documentation for Rustdoc"><meta name="keywords" content="rust, rustlang, rust-lang"><title>Rustdoc help</title><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="./static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="./static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="./static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="./static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="./static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="./static.files/storage-d43fa987303ecbbb.js"></script><script defer src="./static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="./static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="./static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="./static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="./bytes/index.html"><div class="logo-container"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="./bytes/index.html"><div class="logo-container"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2 class="location">Help</h2><div class="sidebar-elems"></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="./help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="./settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="./static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Rustdoc help</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section><p>You need to enable Javascript to use keyboard commands or search.</p><p>For more information, browse the <a href="https://doc.rust-lang.org/rustdoc/">rustdoc handbook</a>.</p></section></noscript></section></div></main><div id="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/implementors/bytes/buf/buf_impl/trait.Buf.js b/implementors/bytes/buf/buf_impl/trait.Buf.js
new file mode 100644
index 0000000..90df625
--- /dev/null
+++ b/implementors/bytes/buf/buf_impl/trait.Buf.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/bytes/buf/buf_mut/trait.BufMut.js b/implementors/bytes/buf/buf_mut/trait.BufMut.js
new file mode 100644
index 0000000..90df625
--- /dev/null
+++ b/implementors/bytes/buf/buf_mut/trait.BufMut.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/borrow/trait.Borrow.js b/implementors/core/borrow/trait.Borrow.js
new file mode 100644
index 0000000..1ebef87
--- /dev/null
+++ b/implementors/core/borrow/trait.Borrow.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html\" title=\"trait core::borrow::Borrow\">Borrow</a>&lt;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]&gt; for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html\" title=\"trait core::borrow::Borrow\">Borrow</a>&lt;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/borrow/trait.BorrowMut.js b/implementors/core/borrow/trait.BorrowMut.js
new file mode 100644
index 0000000..cb60715
--- /dev/null
+++ b/implementors/core/borrow/trait.BorrowMut.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html\" title=\"trait core::borrow::BorrowMut\">BorrowMut</a>&lt;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/clone/trait.Clone.js b/implementors/core/clone/trait.Clone.js
new file mode 100644
index 0000000..679f3fb
--- /dev/null
+++ b/implementors/core/clone/trait.Clone.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/cmp/trait.Eq.js b/implementors/core/cmp/trait.Eq.js
new file mode 100644
index 0000000..011a75d
--- /dev/null
+++ b/implementors/core/cmp/trait.Eq.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/cmp/trait.Ord.js b/implementors/core/cmp/trait.Ord.js
new file mode 100644
index 0000000..5af7ee3
--- /dev/null
+++ b/implementors/core/cmp/trait.Ord.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/cmp/trait.PartialEq.js b/implementors/core/cmp/trait.PartialEq.js
new file mode 100644
index 0000000..87eb242
--- /dev/null
+++ b/implementors/core/cmp/trait.PartialEq.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>&gt; for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]&gt; for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>&gt; for [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.str.html\">str</a>&gt; for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>&gt; for <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.str.html\">str</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>, <a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html\" title=\"struct alloc::alloc::Global\">Global</a>&gt;&gt; for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>&gt; for <a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>&gt;"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/string/struct.String.html\" title=\"struct alloc::string::String\">String</a>&gt; for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>&gt; for <a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/string/struct.String.html\" title=\"struct alloc::string::String\">String</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>&gt; for &amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>&gt; for &amp;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.str.html\">str</a>"],["impl&lt;'a, T:&nbsp;?<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/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.reference.html\">&amp;'a </a>T&gt; for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a><span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;T&gt;,</span>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>&gt; for [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.str.html\">str</a>&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>&gt; for <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.str.html\">str</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>, <a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html\" title=\"struct alloc::alloc::Global\">Global</a>&gt;&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>&gt; for <a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>&gt;"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/string/struct.String.html\" title=\"struct alloc::string::String\">String</a>&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>&gt; for <a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/string/struct.String.html\" title=\"struct alloc::string::String\">String</a>"],["impl&lt;'a, T:&nbsp;?<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/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.reference.html\">&amp;'a </a>T&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a><span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;T&gt;,</span>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>&gt; for &amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>&gt; for &amp;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.str.html\">str</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>&gt; for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>&lt;<a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/cmp/trait.PartialOrd.js b/implementors/core/cmp/trait.PartialOrd.js
new file mode 100644
index 0000000..2abeeea
--- /dev/null
+++ b/implementors/core/cmp/trait.PartialOrd.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;<a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>&gt; for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]&gt; for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;<a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>&gt; for [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.str.html\">str</a>&gt; for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;<a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>&gt; for <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.str.html\">str</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>, <a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html\" title=\"struct alloc::alloc::Global\">Global</a>&gt;&gt; for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;<a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>&gt; for <a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>&gt;"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/string/struct.String.html\" title=\"struct alloc::string::String\">String</a>&gt; for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;<a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>&gt; for <a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/string/struct.String.html\" title=\"struct alloc::string::String\">String</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;<a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>&gt; for &amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;<a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>&gt; for &amp;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.str.html\">str</a>"],["impl&lt;'a, T:&nbsp;?<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/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.reference.html\">&amp;'a </a>T&gt; for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a><span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;T&gt;,</span>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;<a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;<a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>&gt; for [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.str.html\">str</a>&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;<a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>&gt; for <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.str.html\">str</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>, <a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html\" title=\"struct alloc::alloc::Global\">Global</a>&gt;&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;<a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>&gt; for <a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>&gt;"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/string/struct.String.html\" title=\"struct alloc::string::String\">String</a>&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;<a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>&gt; for <a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/string/struct.String.html\" title=\"struct alloc::string::String\">String</a>"],["impl&lt;'a, T:&nbsp;?<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/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.reference.html\">&amp;'a </a>T&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a><span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;T&gt;,</span>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;<a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>&gt; for &amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>&lt;<a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>&gt; for &amp;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.str.html\">str</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/convert/trait.AsMut.js b/implementors/core/convert/trait.AsMut.js
new file mode 100644
index 0000000..4ed670a
--- /dev/null
+++ b/implementors/core/convert/trait.AsMut.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html\" title=\"trait core::convert::AsMut\">AsMut</a>&lt;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/convert/trait.AsRef.js b/implementors/core/convert/trait.AsRef.js
new file mode 100644
index 0000000..6236898
--- /dev/null
+++ b/implementors/core/convert/trait.AsRef.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html\" title=\"trait core::convert::AsRef\">AsRef</a>&lt;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]&gt; for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html\" title=\"trait core::convert::AsRef\">AsRef</a>&lt;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/convert/trait.From.js b/implementors/core/convert/trait.From.js
new file mode 100644
index 0000000..ede1818
--- /dev/null
+++ b/implementors/core/convert/trait.From.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl&lt;'a&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;&amp;'a mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]&gt; for &amp;'a mut <a class=\"struct\" href=\"bytes/buf/struct.UninitSlice.html\" title=\"struct bytes::buf::UninitSlice\">UninitSlice</a>"],["impl&lt;'a&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;&amp;'a mut [<a class=\"union\" href=\"https://doc.rust-lang.org/nightly/core/mem/maybe_uninit/union.MaybeUninit.html\" title=\"union core::mem::maybe_uninit::MaybeUninit\">MaybeUninit</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>&gt;]&gt; for &amp;'a mut <a class=\"struct\" href=\"bytes/buf/struct.UninitSlice.html\" title=\"struct bytes::buf::UninitSlice\">UninitSlice</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;&amp;'static [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]&gt; for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;&amp;'static <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.str.html\">str</a>&gt; for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>, <a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html\" title=\"struct alloc::alloc::Global\">Global</a>&gt;&gt; for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html\" title=\"struct alloc::boxed::Box\">Box</a>&lt;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>], <a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html\" title=\"struct alloc::alloc::Global\">Global</a>&gt;&gt; for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/string/struct.String.html\" title=\"struct alloc::string::String\">String</a>&gt; for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>&gt; for <a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>&gt;"],["impl&lt;'a&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;&amp;'a [<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"],["impl&lt;'a&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;&amp;'a <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.str.html\">str</a>&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>&gt; for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>&gt; for <a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>&gt;"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/default/trait.Default.js b/implementors/core/default/trait.Default.js
new file mode 100644
index 0000000..353d698
--- /dev/null
+++ b/implementors/core/default/trait.Default.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/fmt/trait.Debug.js b/implementors/core/fmt/trait.Debug.js
new file mode 100644
index 0000000..8bae6f7
--- /dev/null
+++ b/implementors/core/fmt/trait.Debug.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl&lt;T:&nbsp;<a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a>, U:&nbsp;<a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a>&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"bytes/buf/struct.Chain.html\" title=\"struct bytes::buf::Chain\">Chain</a>&lt;T, U&gt;"],["impl&lt;T:&nbsp;<a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a>&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"bytes/buf/struct.IntoIter.html\" title=\"struct bytes::buf::IntoIter\">IntoIter</a>&lt;T&gt;"],["impl&lt;T:&nbsp;<a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a>&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"bytes/buf/struct.Limit.html\" title=\"struct bytes::buf::Limit\">Limit</a>&lt;T&gt;"],["impl&lt;B:&nbsp;<a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a>&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"bytes/buf/struct.Reader.html\" title=\"struct bytes::buf::Reader\">Reader</a>&lt;B&gt;"],["impl&lt;T:&nbsp;<a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a>&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"bytes/buf/struct.Take.html\" title=\"struct bytes::buf::Take\">Take</a>&lt;T&gt;"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"bytes/buf/struct.UninitSlice.html\" title=\"struct bytes::buf::UninitSlice\">UninitSlice</a>"],["impl&lt;B:&nbsp;<a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a>&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"bytes/buf/struct.Writer.html\" title=\"struct bytes::buf::Writer\">Writer</a>&lt;B&gt;"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/fmt/trait.LowerHex.js b/implementors/core/fmt/trait.LowerHex.js
new file mode 100644
index 0000000..82337ac
--- /dev/null
+++ b/implementors/core/fmt/trait.LowerHex.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.LowerHex.html\" title=\"trait core::fmt::LowerHex\">LowerHex</a> for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.LowerHex.html\" title=\"trait core::fmt::LowerHex\">LowerHex</a> for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/fmt/trait.UpperHex.js b/implementors/core/fmt/trait.UpperHex.js
new file mode 100644
index 0000000..6513216
--- /dev/null
+++ b/implementors/core/fmt/trait.UpperHex.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.UpperHex.html\" title=\"trait core::fmt::UpperHex\">UpperHex</a> for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.UpperHex.html\" title=\"trait core::fmt::UpperHex\">UpperHex</a> for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/fmt/trait.Write.js b/implementors/core/fmt/trait.Write.js
new file mode 100644
index 0000000..9487976
--- /dev/null
+++ b/implementors/core/fmt/trait.Write.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Write.html\" title=\"trait core::fmt::Write\">Write</a> for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/hash/trait.Hash.js b/implementors/core/hash/trait.Hash.js
new file mode 100644
index 0000000..a5cabd0
--- /dev/null
+++ b/implementors/core/hash/trait.Hash.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html\" title=\"trait core::hash::Hash\">Hash</a> for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html\" title=\"trait core::hash::Hash\">Hash</a> for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/iter/traits/collect/trait.Extend.js b/implementors/core/iter/traits/collect/trait.Extend.js
new file mode 100644
index 0000000..f5b17c1
--- /dev/null
+++ b/implementors/core/iter/traits/collect/trait.Extend.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html\" title=\"trait core::iter::traits::collect::Extend\">Extend</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"],["impl&lt;'a&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html\" title=\"trait core::iter::traits::collect::Extend\">Extend</a>&lt;&amp;'a <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html\" title=\"trait core::iter::traits::collect::Extend\">Extend</a>&lt;<a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/iter/traits/collect/trait.FromIterator.js b/implementors/core/iter/traits/collect/trait.FromIterator.js
new file mode 100644
index 0000000..618b87b
--- /dev/null
+++ b/implementors/core/iter/traits/collect/trait.FromIterator.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>&gt; for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"],["impl&lt;'a&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a>&lt;&amp;'a <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/iter/traits/collect/trait.IntoIterator.js b/implementors/core/iter/traits/collect/trait.IntoIterator.js
new file mode 100644
index 0000000..33fc8cd
--- /dev/null
+++ b/implementors/core/iter/traits/collect/trait.IntoIterator.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl&lt;T, U&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a> 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>,</span>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a> for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl&lt;'a&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a> for &amp;'a <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a> for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"],["impl&lt;'a&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a> for &amp;'a <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/iter/traits/exact_size/trait.ExactSizeIterator.js b/implementors/core/iter/traits/exact_size/trait.ExactSizeIterator.js
new file mode 100644
index 0000000..805ad6b
--- /dev/null
+++ b/implementors/core/iter/traits/exact_size/trait.ExactSizeIterator.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["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/traits/exact_size/trait.ExactSizeIterator.html\" title=\"trait core::iter::traits::exact_size::ExactSizeIterator\">ExactSizeIterator</a> for <a class=\"struct\" href=\"bytes/buf/struct.IntoIter.html\" title=\"struct bytes::buf::IntoIter\">IntoIter</a>&lt;T&gt;"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/iter/traits/iterator/trait.Iterator.js b/implementors/core/iter/traits/iterator/trait.Iterator.js
new file mode 100644
index 0000000..65d2360
--- /dev/null
+++ b/implementors/core/iter/traits/iterator/trait.Iterator.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["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/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"bytes/buf/struct.IntoIter.html\" title=\"struct bytes::buf::IntoIter\">IntoIter</a>&lt;T&gt;"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/marker/trait.Freeze.js b/implementors/core/marker/trait.Freeze.js
new file mode 100644
index 0000000..de7dc7a
--- /dev/null
+++ b/implementors/core/marker/trait.Freeze.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl&lt;T, U&gt; Freeze 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: Freeze,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: Freeze,</span>",1,["bytes::buf::chain::Chain"]],["impl&lt;T&gt; Freeze for <a class=\"struct\" href=\"bytes/buf/struct.IntoIter.html\" title=\"struct bytes::buf::IntoIter\">IntoIter</a>&lt;T&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: Freeze,</span>",1,["bytes::buf::iter::IntoIter"]],["impl&lt;T&gt; Freeze for <a class=\"struct\" href=\"bytes/buf/struct.Limit.html\" title=\"struct bytes::buf::Limit\">Limit</a>&lt;T&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: Freeze,</span>",1,["bytes::buf::limit::Limit"]],["impl&lt;B&gt; Freeze for <a class=\"struct\" href=\"bytes/buf/struct.Reader.html\" title=\"struct bytes::buf::Reader\">Reader</a>&lt;B&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: Freeze,</span>",1,["bytes::buf::reader::Reader"]],["impl&lt;T&gt; Freeze for <a class=\"struct\" href=\"bytes/buf/struct.Take.html\" title=\"struct bytes::buf::Take\">Take</a>&lt;T&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: Freeze,</span>",1,["bytes::buf::take::Take"]],["impl Freeze for <a class=\"struct\" href=\"bytes/buf/struct.UninitSlice.html\" title=\"struct bytes::buf::UninitSlice\">UninitSlice</a>",1,["bytes::buf::uninit_slice::UninitSlice"]],["impl&lt;B&gt; Freeze for <a class=\"struct\" href=\"bytes/buf/struct.Writer.html\" title=\"struct bytes::buf::Writer\">Writer</a>&lt;B&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: Freeze,</span>",1,["bytes::buf::writer::Writer"]],["impl !Freeze for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>",1,["bytes::bytes::Bytes"]],["impl Freeze for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>",1,["bytes::bytes_mut::BytesMut"]]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/marker/trait.Send.js b/implementors/core/marker/trait.Send.js
new file mode 100644
index 0000000..8b4a86c
--- /dev/null
+++ b/implementors/core/marker/trait.Send.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl&lt;T, U&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"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=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a>,</span>",1,["bytes::buf::chain::Chain"]],["impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"bytes/buf/struct.IntoIter.html\" title=\"struct bytes::buf::IntoIter\">IntoIter</a>&lt;T&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a>,</span>",1,["bytes::buf::iter::IntoIter"]],["impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"bytes/buf/struct.Limit.html\" title=\"struct bytes::buf::Limit\">Limit</a>&lt;T&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a>,</span>",1,["bytes::buf::limit::Limit"]],["impl&lt;B&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"bytes/buf/struct.Reader.html\" title=\"struct bytes::buf::Reader\">Reader</a>&lt;B&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a>,</span>",1,["bytes::buf::reader::Reader"]],["impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"bytes/buf/struct.Take.html\" title=\"struct bytes::buf::Take\">Take</a>&lt;T&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a>,</span>",1,["bytes::buf::take::Take"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"bytes/buf/struct.UninitSlice.html\" title=\"struct bytes::buf::UninitSlice\">UninitSlice</a>",1,["bytes::buf::uninit_slice::UninitSlice"]],["impl&lt;B&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"bytes/buf/struct.Writer.html\" title=\"struct bytes::buf::Writer\">Writer</a>&lt;B&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a>,</span>",1,["bytes::buf::writer::Writer"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/marker/trait.Sized.js b/implementors/core/marker/trait.Sized.js
new file mode 100644
index 0000000..ead8643
--- /dev/null
+++ b/implementors/core/marker/trait.Sized.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl !<a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html\" title=\"trait core::marker::Sized\">Sized</a> for <a class=\"struct\" href=\"bytes/buf/struct.UninitSlice.html\" title=\"struct bytes::buf::UninitSlice\">UninitSlice</a>",1,["bytes::buf::uninit_slice::UninitSlice"]]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/marker/trait.Sync.js b/implementors/core/marker/trait.Sync.js
new file mode 100644
index 0000000..7233b12
--- /dev/null
+++ b/implementors/core/marker/trait.Sync.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl&lt;T, U&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"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=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a>,</span>",1,["bytes::buf::chain::Chain"]],["impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"bytes/buf/struct.IntoIter.html\" title=\"struct bytes::buf::IntoIter\">IntoIter</a>&lt;T&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a>,</span>",1,["bytes::buf::iter::IntoIter"]],["impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"bytes/buf/struct.Limit.html\" title=\"struct bytes::buf::Limit\">Limit</a>&lt;T&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a>,</span>",1,["bytes::buf::limit::Limit"]],["impl&lt;B&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"bytes/buf/struct.Reader.html\" title=\"struct bytes::buf::Reader\">Reader</a>&lt;B&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a>,</span>",1,["bytes::buf::reader::Reader"]],["impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"bytes/buf/struct.Take.html\" title=\"struct bytes::buf::Take\">Take</a>&lt;T&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a>,</span>",1,["bytes::buf::take::Take"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"bytes/buf/struct.UninitSlice.html\" title=\"struct bytes::buf::UninitSlice\">UninitSlice</a>",1,["bytes::buf::uninit_slice::UninitSlice"]],["impl&lt;B&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"bytes/buf/struct.Writer.html\" title=\"struct bytes::buf::Writer\">Writer</a>&lt;B&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a>,</span>",1,["bytes::buf::writer::Writer"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/marker/trait.Unpin.js b/implementors/core/marker/trait.Unpin.js
new file mode 100644
index 0000000..13e9236
--- /dev/null
+++ b/implementors/core/marker/trait.Unpin.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl&lt;T, U&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"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=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a>,</span>",1,["bytes::buf::chain::Chain"]],["impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"bytes/buf/struct.IntoIter.html\" title=\"struct bytes::buf::IntoIter\">IntoIter</a>&lt;T&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a>,</span>",1,["bytes::buf::iter::IntoIter"]],["impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"bytes/buf/struct.Limit.html\" title=\"struct bytes::buf::Limit\">Limit</a>&lt;T&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a>,</span>",1,["bytes::buf::limit::Limit"]],["impl&lt;B&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"bytes/buf/struct.Reader.html\" title=\"struct bytes::buf::Reader\">Reader</a>&lt;B&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a>,</span>",1,["bytes::buf::reader::Reader"]],["impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"bytes/buf/struct.Take.html\" title=\"struct bytes::buf::Take\">Take</a>&lt;T&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a>,</span>",1,["bytes::buf::take::Take"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"bytes/buf/struct.UninitSlice.html\" title=\"struct bytes::buf::UninitSlice\">UninitSlice</a>",1,["bytes::buf::uninit_slice::UninitSlice"]],["impl&lt;B&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"bytes/buf/struct.Writer.html\" title=\"struct bytes::buf::Writer\">Writer</a>&lt;B&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a>,</span>",1,["bytes::buf::writer::Writer"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>",1,["bytes::bytes::Bytes"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>",1,["bytes::bytes_mut::BytesMut"]]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/ops/deref/trait.Deref.js b/implementors/core/ops/deref/trait.Deref.js
new file mode 100644
index 0000000..f98cd02
--- /dev/null
+++ b/implementors/core/ops/deref/trait.Deref.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/ops/deref/trait.DerefMut.js b/implementors/core/ops/deref/trait.DerefMut.js
new file mode 100644
index 0000000..ddb09ad
--- /dev/null
+++ b/implementors/core/ops/deref/trait.DerefMut.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/ops/drop/trait.Drop.js b/implementors/core/ops/drop/trait.Drop.js
new file mode 100644
index 0000000..669f6e2
--- /dev/null
+++ b/implementors/core/ops/drop/trait.Drop.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html\" title=\"trait core::ops::drop::Drop\">Drop</a> for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html\" title=\"trait core::ops::drop::Drop\">Drop</a> for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/ops/index/trait.Index.js b/implementors/core/ops/index/trait.Index.js
new file mode 100644
index 0000000..b7685fe
--- /dev/null
+++ b/implementors/core/ops/index/trait.Index.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html\" title=\"trait core::ops::index::Index\">Index</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/core/ops/range/struct.Range.html\" title=\"struct core::ops::range::Range\">Range</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.usize.html\">usize</a>&gt;&gt; for <a class=\"struct\" href=\"bytes/buf/struct.UninitSlice.html\" title=\"struct bytes::buf::UninitSlice\">UninitSlice</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html\" title=\"trait core::ops::index::Index\">Index</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeFrom.html\" title=\"struct core::ops::range::RangeFrom\">RangeFrom</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.usize.html\">usize</a>&gt;&gt; for <a class=\"struct\" href=\"bytes/buf/struct.UninitSlice.html\" title=\"struct bytes::buf::UninitSlice\">UninitSlice</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html\" title=\"trait core::ops::index::Index\">Index</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeFull.html\" title=\"struct core::ops::range::RangeFull\">RangeFull</a>&gt; for <a class=\"struct\" href=\"bytes/buf/struct.UninitSlice.html\" title=\"struct bytes::buf::UninitSlice\">UninitSlice</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html\" title=\"trait core::ops::index::Index\">Index</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeInclusive.html\" title=\"struct core::ops::range::RangeInclusive\">RangeInclusive</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.usize.html\">usize</a>&gt;&gt; for <a class=\"struct\" href=\"bytes/buf/struct.UninitSlice.html\" title=\"struct bytes::buf::UninitSlice\">UninitSlice</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html\" title=\"trait core::ops::index::Index\">Index</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeTo.html\" title=\"struct core::ops::range::RangeTo\">RangeTo</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.usize.html\">usize</a>&gt;&gt; for <a class=\"struct\" href=\"bytes/buf/struct.UninitSlice.html\" title=\"struct bytes::buf::UninitSlice\">UninitSlice</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html\" title=\"trait core::ops::index::Index\">Index</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeToInclusive.html\" title=\"struct core::ops::range::RangeToInclusive\">RangeToInclusive</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.usize.html\">usize</a>&gt;&gt; for <a class=\"struct\" href=\"bytes/buf/struct.UninitSlice.html\" title=\"struct bytes::buf::UninitSlice\">UninitSlice</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/ops/index/trait.IndexMut.js b/implementors/core/ops/index/trait.IndexMut.js
new file mode 100644
index 0000000..91034db
--- /dev/null
+++ b/implementors/core/ops/index/trait.IndexMut.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html\" title=\"trait core::ops::index::IndexMut\">IndexMut</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/core/ops/range/struct.Range.html\" title=\"struct core::ops::range::Range\">Range</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.usize.html\">usize</a>&gt;&gt; for <a class=\"struct\" href=\"bytes/buf/struct.UninitSlice.html\" title=\"struct bytes::buf::UninitSlice\">UninitSlice</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html\" title=\"trait core::ops::index::IndexMut\">IndexMut</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeFrom.html\" title=\"struct core::ops::range::RangeFrom\">RangeFrom</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.usize.html\">usize</a>&gt;&gt; for <a class=\"struct\" href=\"bytes/buf/struct.UninitSlice.html\" title=\"struct bytes::buf::UninitSlice\">UninitSlice</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html\" title=\"trait core::ops::index::IndexMut\">IndexMut</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeFull.html\" title=\"struct core::ops::range::RangeFull\">RangeFull</a>&gt; for <a class=\"struct\" href=\"bytes/buf/struct.UninitSlice.html\" title=\"struct bytes::buf::UninitSlice\">UninitSlice</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html\" title=\"trait core::ops::index::IndexMut\">IndexMut</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeInclusive.html\" title=\"struct core::ops::range::RangeInclusive\">RangeInclusive</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.usize.html\">usize</a>&gt;&gt; for <a class=\"struct\" href=\"bytes/buf/struct.UninitSlice.html\" title=\"struct bytes::buf::UninitSlice\">UninitSlice</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html\" title=\"trait core::ops::index::IndexMut\">IndexMut</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeTo.html\" title=\"struct core::ops::range::RangeTo\">RangeTo</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.usize.html\">usize</a>&gt;&gt; for <a class=\"struct\" href=\"bytes/buf/struct.UninitSlice.html\" title=\"struct bytes::buf::UninitSlice\">UninitSlice</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html\" title=\"trait core::ops::index::IndexMut\">IndexMut</a>&lt;<a class=\"struct\" href=\"https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeToInclusive.html\" title=\"struct core::ops::range::RangeToInclusive\">RangeToInclusive</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.usize.html\">usize</a>&gt;&gt; for <a class=\"struct\" href=\"bytes/buf/struct.UninitSlice.html\" title=\"struct bytes::buf::UninitSlice\">UninitSlice</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js b/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js
new file mode 100644
index 0000000..9d83d56
--- /dev/null
+++ b/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl&lt;T, U&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> 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=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a>,</span>",1,["bytes::buf::chain::Chain"]],["impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"bytes/buf/struct.IntoIter.html\" title=\"struct bytes::buf::IntoIter\">IntoIter</a>&lt;T&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a>,</span>",1,["bytes::buf::iter::IntoIter"]],["impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"bytes/buf/struct.Limit.html\" title=\"struct bytes::buf::Limit\">Limit</a>&lt;T&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a>,</span>",1,["bytes::buf::limit::Limit"]],["impl&lt;B&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"bytes/buf/struct.Reader.html\" title=\"struct bytes::buf::Reader\">Reader</a>&lt;B&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a>,</span>",1,["bytes::buf::reader::Reader"]],["impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"bytes/buf/struct.Take.html\" title=\"struct bytes::buf::Take\">Take</a>&lt;T&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a>,</span>",1,["bytes::buf::take::Take"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"bytes/buf/struct.UninitSlice.html\" title=\"struct bytes::buf::UninitSlice\">UninitSlice</a>",1,["bytes::buf::uninit_slice::UninitSlice"]],["impl&lt;B&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"bytes/buf/struct.Writer.html\" title=\"struct bytes::buf::Writer\">Writer</a>&lt;B&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a>,</span>",1,["bytes::buf::writer::Writer"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>",1,["bytes::bytes::Bytes"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>",1,["bytes::bytes_mut::BytesMut"]]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/core/panic/unwind_safe/trait.UnwindSafe.js b/implementors/core/panic/unwind_safe/trait.UnwindSafe.js
new file mode 100644
index 0000000..df4399e
--- /dev/null
+++ b/implementors/core/panic/unwind_safe/trait.UnwindSafe.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl&lt;T, U&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> 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=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a>,</span>",1,["bytes::buf::chain::Chain"]],["impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"bytes/buf/struct.IntoIter.html\" title=\"struct bytes::buf::IntoIter\">IntoIter</a>&lt;T&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a>,</span>",1,["bytes::buf::iter::IntoIter"]],["impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"bytes/buf/struct.Limit.html\" title=\"struct bytes::buf::Limit\">Limit</a>&lt;T&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a>,</span>",1,["bytes::buf::limit::Limit"]],["impl&lt;B&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"bytes/buf/struct.Reader.html\" title=\"struct bytes::buf::Reader\">Reader</a>&lt;B&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a>,</span>",1,["bytes::buf::reader::Reader"]],["impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"bytes/buf/struct.Take.html\" title=\"struct bytes::buf::Take\">Take</a>&lt;T&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a>,</span>",1,["bytes::buf::take::Take"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"bytes/buf/struct.UninitSlice.html\" title=\"struct bytes::buf::UninitSlice\">UninitSlice</a>",1,["bytes::buf::uninit_slice::UninitSlice"]],["impl&lt;B&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"bytes/buf/struct.Writer.html\" title=\"struct bytes::buf::Writer\">Writer</a>&lt;B&gt;<span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a>,</span>",1,["bytes::buf::writer::Writer"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>",1,["bytes::bytes::Bytes"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>",1,["bytes::bytes_mut::BytesMut"]]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/serde/de/trait.Deserialize.js b/implementors/serde/de/trait.Deserialize.js
new file mode 100644
index 0000000..16c12a0
--- /dev/null
+++ b/implementors/serde/de/trait.Deserialize.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl&lt;'de&gt; <a class=\"trait\" href=\"https://docs.rs/serde/1.0.203/serde/de/trait.Deserialize.html\" title=\"trait serde::de::Deserialize\">Deserialize</a>&lt;'de&gt; for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl&lt;'de&gt; <a class=\"trait\" href=\"https://docs.rs/serde/1.0.203/serde/de/trait.Deserialize.html\" title=\"trait serde::de::Deserialize\">Deserialize</a>&lt;'de&gt; for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/serde/ser/trait.Serialize.js b/implementors/serde/ser/trait.Serialize.js
new file mode 100644
index 0000000..774dcb9
--- /dev/null
+++ b/implementors/serde/ser/trait.Serialize.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl <a class=\"trait\" href=\"https://docs.rs/serde/1.0.203/serde/ser/trait.Serialize.html\" title=\"trait serde::ser::Serialize\">Serialize</a> for <a class=\"struct\" href=\"bytes/struct.Bytes.html\" title=\"struct bytes::Bytes\">Bytes</a>"],["impl <a class=\"trait\" href=\"https://docs.rs/serde/1.0.203/serde/ser/trait.Serialize.html\" title=\"trait serde::ser::Serialize\">Serialize</a> for <a class=\"struct\" href=\"bytes/struct.BytesMut.html\" title=\"struct bytes::BytesMut\">BytesMut</a>"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/std/io/trait.BufRead.js b/implementors/std/io/trait.BufRead.js
new file mode 100644
index 0000000..b18c214
--- /dev/null
+++ b/implementors/std/io/trait.BufRead.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["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.BufRead.html\" title=\"trait std::io::BufRead\">BufRead</a> for <a class=\"struct\" href=\"bytes/buf/struct.Reader.html\" title=\"struct bytes::buf::Reader\">Reader</a>&lt;B&gt;"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/std/io/trait.Read.js b/implementors/std/io/trait.Read.js
new file mode 100644
index 0000000..c5653d5
--- /dev/null
+++ b/implementors/std/io/trait.Read.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["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;"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/implementors/std/io/trait.Write.js b/implementors/std/io/trait.Write.js
new file mode 100644
index 0000000..1f57e9d
--- /dev/null
+++ b/implementors/std/io/trait.Write.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {
+"bytes":[["impl&lt;B:&nbsp;<a class=\"trait\" href=\"bytes/buf/trait.BufMut.html\" title=\"trait bytes::buf::BufMut\">BufMut</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.Write.html\" title=\"trait std::io::Write\">Write</a> for <a class=\"struct\" href=\"bytes/buf/struct.Writer.html\" title=\"struct bytes::buf::Writer\">Writer</a>&lt;B&gt;"]]
+};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file
diff --git a/search-index.js b/search-index.js
new file mode 100644
index 0000000..c9c12c5
--- /dev/null
+++ b/search-index.js
@@ -0,0 +1,5 @@
+var searchIndex = JSON.parse('{\
+"bytes":{"doc":"Provides abstractions for working with bytes.","t":[8,8,3,3,10,11,11,10,11,11,11,11,11,11,11,11,11,11,11,0,11,10,11,11,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,11,11,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,8,8,3,3,3,3,3,3,3,10,11,11,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,11,11,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,11,11,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11],"n":["Buf","BufMut","Bytes","BytesMut","advance","advance","advance","advance_mut","advance_mut","as_mut","as_ref","as_ref","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","buf","capacity","chunk","chunk","chunk","chunk_mut","chunk_mut","clear","clear","clone","clone","clone_into","clone_into","cmp","cmp","copy_from_slice","copy_to_bytes","copy_to_bytes","default","default","deref","deref","deref_mut","deserialize","deserialize","drop","drop","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","extend","extend","extend","extend_from_slice","fmt","fmt","fmt","fmt","fmt","fmt","freeze","from","from","from","from","from","from","from","from","from","from","from","from_iter","from_iter","from_iter","from_static","hash","hash","into","into","into_iter","into_iter","into_iter","into_iter","is_empty","is_empty","is_unique","len","len","new","new","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","put","put_bytes","put_slice","remaining","remaining","remaining","remaining_mut","remaining_mut","reserve","resize","serialize","serialize","set_len","slice","slice_ref","spare_capacity_mut","split","split_off","split_off","split_to","split_to","to_owned","to_owned","truncate","truncate","try_from","try_from","try_into","try_into","try_into_mut","type_id","type_id","unsplit","with_capacity","write_fmt","write_str","zeroed","Buf","BufMut","Chain","IntoIter","Limit","Reader","Take","UninitSlice","Writer","advance","advance","advance","advance_mut","advance_mut","advance_mut","as_mut_ptr","as_uninit_slice_mut","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","chain","chain","chain","chain_mut","chain_mut","chain_mut","chunk","chunk","chunk","chunk_mut","chunk_mut","chunk_mut","chunks_vectored","chunks_vectored","chunks_vectored","chunks_vectored","consume","copy_from_slice","copy_to_bytes","copy_to_bytes","copy_to_bytes","copy_to_bytes","copy_to_bytes","copy_to_slice","copy_to_slice","copy_to_slice","fill_buf","first_mut","first_ref","flush","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from_raw_parts_mut","get_f32","get_f32","get_f32","get_f32_le","get_f32_le","get_f32_le","get_f32_ne","get_f32_ne","get_f32_ne","get_f64","get_f64","get_f64","get_f64_le","get_f64_le","get_f64_le","get_f64_ne","get_f64_ne","get_f64_ne","get_i128","get_i128","get_i128","get_i128_le","get_i128_le","get_i128_le","get_i128_ne","get_i128_ne","get_i128_ne","get_i16","get_i16","get_i16","get_i16_le","get_i16_le","get_i16_le","get_i16_ne","get_i16_ne","get_i16_ne","get_i32","get_i32","get_i32","get_i32_le","get_i32_le","get_i32_le","get_i32_ne","get_i32_ne","get_i32_ne","get_i64","get_i64","get_i64","get_i64_le","get_i64_le","get_i64_le","get_i64_ne","get_i64_ne","get_i64_ne","get_i8","get_i8","get_i8","get_int","get_int","get_int","get_int_le","get_int_le","get_int_le","get_int_ne","get_int_ne","get_int_ne","get_mut","get_mut","get_mut","get_mut","get_mut","get_ref","get_ref","get_ref","get_ref","get_ref","get_u128","get_u128","get_u128","get_u128_le","get_u128_le","get_u128_le","get_u128_ne","get_u128_ne","get_u128_ne","get_u16","get_u16","get_u16","get_u16_le","get_u16_le","get_u16_le","get_u16_ne","get_u16_ne","get_u16_ne","get_u32","get_u32","get_u32","get_u32_le","get_u32_le","get_u32_le","get_u32_ne","get_u32_ne","get_u32_ne","get_u64","get_u64","get_u64","get_u64_le","get_u64_le","get_u64_le","get_u64_ne","get_u64_ne","get_u64_ne","get_u8","get_u8","get_u8","get_uint","get_uint","get_uint","get_uint_le","get_uint_le","get_uint_le","get_uint_ne","get_uint_ne","get_uint_ne","has_remaining","has_remaining","has_remaining","has_remaining_mut","has_remaining_mut","has_remaining_mut","index","index","index","index","index","index","index_mut","index_mut","index_mut","index_mut","index_mut","index_mut","into","into","into","into","into","into","into_inner","into_inner","into_inner","into_inner","into_inner","into_inner","into_iter","into_iter","last_mut","last_ref","len","limit","limit","limit","limit","limit","new","new","next","put","put","put","put_bytes","put_bytes","put_bytes","put_f32","put_f32","put_f32","put_f32_le","put_f32_le","put_f32_le","put_f32_ne","put_f32_ne","put_f32_ne","put_f64","put_f64","put_f64","put_f64_le","put_f64_le","put_f64_le","put_f64_ne","put_f64_ne","put_f64_ne","put_i128","put_i128","put_i128","put_i128_le","put_i128_le","put_i128_le","put_i128_ne","put_i128_ne","put_i128_ne","put_i16","put_i16","put_i16","put_i16_le","put_i16_le","put_i16_le","put_i16_ne","put_i16_ne","put_i16_ne","put_i32","put_i32","put_i32","put_i32_le","put_i32_le","put_i32_le","put_i32_ne","put_i32_ne","put_i32_ne","put_i64","put_i64","put_i64","put_i64_le","put_i64_le","put_i64_le","put_i64_ne","put_i64_ne","put_i64_ne","put_i8","put_i8","put_i8","put_int","put_int","put_int","put_int_le","put_int_le","put_int_le","put_int_ne","put_int_ne","put_int_ne","put_slice","put_slice","put_slice","put_u128","put_u128","put_u128","put_u128_le","put_u128_le","put_u128_le","put_u128_ne","put_u128_ne","put_u128_ne","put_u16","put_u16","put_u16","put_u16_le","put_u16_le","put_u16_le","put_u16_ne","put_u16_ne","put_u16_ne","put_u32","put_u32","put_u32","put_u32_le","put_u32_le","put_u32_le","put_u32_ne","put_u32_ne","put_u32_ne","put_u64","put_u64","put_u64","put_u64_le","put_u64_le","put_u64_le","put_u64_ne","put_u64_ne","put_u64_ne","put_u8","put_u8","put_u8","put_uint","put_uint","put_uint","put_uint_le","put_uint_le","put_uint_le","put_uint_ne","put_uint_ne","put_uint_ne","read","reader","reader","reader","remaining","remaining","remaining","remaining_mut","remaining_mut","remaining_mut","set_limit","set_limit","size_hint","take","take","take","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","uninit","write","write_byte","writer","writer","writer"],"q":["bytes","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","bytes::buf","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"d":["Read bytes from a buffer.","A trait for values that provide sequential write access to …","A cheaply cloneable and sliceable chunk of contiguous …","A unique reference to a contiguous slice of memory.","Advance the internal cursor of the Buf","","","Advance the internal cursor of the BufMut","","","","","","","","","","","","Utilities for working with buffers.","Returns the number of bytes the <code>BytesMut</code> can hold without …","Returns a slice starting at the current position and of …","","","Returns a mutable slice starting at the current BufMut …","","Clears the buffer, removing all data.","Clears the buffer, removing all data. Existing capacity is …","","","","","","","Creates <code>Bytes</code> instance from slice, by copying it.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Appends given bytes to this <code>BytesMut</code>.","","","","","","","Converts <code>self</code> into an immutable <code>Bytes</code>.","","Returns the argument unchanged.","","","","","","Convert self into <code>BytesMut</code>.","Returns the argument unchanged.","","","","","","Creates a new <code>Bytes</code> from a static slice.","","","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","","","","","Returns true if the <code>Bytes</code> has a length of 0.","Returns true if the <code>BytesMut</code> has a length of 0.","Returns true if this is the only reference to the data.","Returns the number of bytes contained in this <code>Bytes</code>.","Returns the number of bytes contained in this <code>BytesMut</code>.","Creates a new empty <code>Bytes</code>.","Creates a new <code>BytesMut</code> with default capacity.","","","","","","","","","","","","","","","","Returns the number of bytes between the current position …","","","Returns the number of bytes that can be written from the …","","Reserves capacity for at least <code>additional</code> more bytes to be …","Resizes the buffer so that <code>len</code> is equal to <code>new_len</code>.","","","Sets the length of the buffer.","Returns a slice of self for the provided range.","Returns a slice of self that is equivalent to the given …","Returns the remaining spare capacity of the buffer as a …","Removes the bytes from the current view, returning them in …","Splits the bytes into two at the given index.","Splits the bytes into two at the given index.","Splits the bytes into two at the given index.","Splits the buffer into two at the given index.","","","Shortens the buffer, keeping the first <code>len</code> bytes and …","Shortens the buffer, keeping the first <code>len</code> bytes and …","","","","","Try to convert self into <code>BytesMut</code>.","","","Absorbs a <code>BytesMut</code> that was previously split off.","Creates a new <code>BytesMut</code> with the specified capacity.","","","Creates a new <code>BytesMut</code>, which is initialized with zero.","Read bytes from a buffer.","A trait for values that provide sequential write access to …","A <code>Chain</code> sequences two buffers.","Iterator over the bytes contained by the buffer.","A <code>BufMut</code> adapter which limits the amount of bytes that can …","A <code>Buf</code> adapter which implements <code>io::Read</code> for the inner …","A <code>Buf</code> adapter which limits the bytes read from an …","Uninitialized byte slice.","A <code>BufMut</code> adapter which implements <code>io::Write</code> for the inner …","Advance the internal cursor of the Buf","","","Advance the internal cursor of the BufMut","","","Return a raw pointer to the slice’s buffer.","Return a <code>&amp;mut [MaybeUninit&lt;u8&gt;]</code> to this slice’s buffer.","","","","","","","","","","","","","","","Creates an adaptor which will chain this buffer with …","Creates an adaptor which will chain this buffer with …","Creates an adaptor which will chain this buffer with …","Creates an adapter which will chain this buffer with …","Creates an adapter which will chain this buffer with …","Creates an adapter which will chain this buffer with …","Returns a slice starting at the current position and of …","","","Returns a mutable slice starting at the current BufMut …","","","Fills <code>dst</code> with potentially multiple slices starting at <code>self</code>…","Fills <code>dst</code> with potentially multiple slices starting at <code>self</code>…","Fills <code>dst</code> with potentially multiple slices starting at <code>self</code>…","","","Copies bytes from <code>src</code> into <code>self</code>.","Consumes <code>len</code> bytes inside self and returns new instance of …","Consumes <code>len</code> bytes inside self and returns new instance of …","Consumes <code>len</code> bytes inside self and returns new instance of …","","","Copies bytes from <code>self</code> into <code>dst</code>.","Copies bytes from <code>self</code> into <code>dst</code>.","Copies bytes from <code>self</code> into <code>dst</code>.","","Gets a mutable reference to the first underlying <code>Buf</code>.","Gets a reference to the first underlying <code>Buf</code>.","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Create a <code>&amp;mut UninitSlice</code> from a pointer and a length.","Gets an IEEE754 single-precision (4 bytes) floating point …","Gets an IEEE754 single-precision (4 bytes) floating point …","Gets an IEEE754 single-precision (4 bytes) floating point …","Gets an IEEE754 single-precision (4 bytes) floating point …","Gets an IEEE754 single-precision (4 bytes) floating point …","Gets an IEEE754 single-precision (4 bytes) floating point …","Gets an IEEE754 single-precision (4 bytes) floating point …","Gets an IEEE754 single-precision (4 bytes) floating point …","Gets an IEEE754 single-precision (4 bytes) floating point …","Gets an IEEE754 double-precision (8 bytes) floating point …","Gets an IEEE754 double-precision (8 bytes) floating point …","Gets an IEEE754 double-precision (8 bytes) floating point …","Gets an IEEE754 double-precision (8 bytes) floating point …","Gets an IEEE754 double-precision (8 bytes) floating point …","Gets an IEEE754 double-precision (8 bytes) floating point …","Gets an IEEE754 double-precision (8 bytes) floating point …","Gets an IEEE754 double-precision (8 bytes) floating point …","Gets an IEEE754 double-precision (8 bytes) floating point …","Gets a signed 128 bit integer from <code>self</code> in big-endian byte …","Gets a signed 128 bit integer from <code>self</code> in big-endian byte …","Gets a signed 128 bit integer from <code>self</code> in big-endian byte …","Gets a signed 128 bit integer from <code>self</code> in little-endian …","Gets a signed 128 bit integer from <code>self</code> in little-endian …","Gets a signed 128 bit integer from <code>self</code> in little-endian …","Gets a signed 128 bit integer from <code>self</code> in native-endian …","Gets a signed 128 bit integer from <code>self</code> in native-endian …","Gets a signed 128 bit integer from <code>self</code> in native-endian …","Gets a signed 16 bit integer from <code>self</code> in big-endian byte …","Gets a signed 16 bit integer from <code>self</code> in big-endian byte …","Gets a signed 16 bit integer from <code>self</code> in big-endian byte …","Gets a signed 16 bit integer from <code>self</code> in little-endian …","Gets a signed 16 bit integer from <code>self</code> in little-endian …","Gets a signed 16 bit integer from <code>self</code> in little-endian …","Gets a signed 16 bit integer from <code>self</code> in native-endian …","Gets a signed 16 bit integer from <code>self</code> in native-endian …","Gets a signed 16 bit integer from <code>self</code> in native-endian …","Gets a signed 32 bit integer from <code>self</code> in big-endian byte …","Gets a signed 32 bit integer from <code>self</code> in big-endian byte …","Gets a signed 32 bit integer from <code>self</code> in big-endian byte …","Gets a signed 32 bit integer from <code>self</code> in little-endian …","Gets a signed 32 bit integer from <code>self</code> in little-endian …","Gets a signed 32 bit integer from <code>self</code> in little-endian …","Gets a signed 32 bit integer from <code>self</code> in native-endian …","Gets a signed 32 bit integer from <code>self</code> in native-endian …","Gets a signed 32 bit integer from <code>self</code> in native-endian …","Gets a signed 64 bit integer from <code>self</code> in big-endian byte …","Gets a signed 64 bit integer from <code>self</code> in big-endian byte …","Gets a signed 64 bit integer from <code>self</code> in big-endian byte …","Gets a signed 64 bit integer from <code>self</code> in little-endian …","Gets a signed 64 bit integer from <code>self</code> in little-endian …","Gets a signed 64 bit integer from <code>self</code> in little-endian …","Gets a signed 64 bit integer from <code>self</code> in native-endian …","Gets a signed 64 bit integer from <code>self</code> in native-endian …","Gets a signed 64 bit integer from <code>self</code> in native-endian …","Gets a signed 8 bit integer from <code>self</code>.","Gets a signed 8 bit integer from <code>self</code>.","Gets a signed 8 bit integer from <code>self</code>.","Gets a signed n-byte integer from <code>self</code> in big-endian byte …","Gets a signed n-byte integer from <code>self</code> in big-endian byte …","Gets a signed n-byte integer from <code>self</code> in big-endian byte …","Gets a signed n-byte integer from <code>self</code> in little-endian …","Gets a signed n-byte integer from <code>self</code> in little-endian …","Gets a signed n-byte integer from <code>self</code> in little-endian …","Gets a signed n-byte integer from <code>self</code> in native-endian …","Gets a signed n-byte integer from <code>self</code> in native-endian …","Gets a signed n-byte integer from <code>self</code> in native-endian …","Gets a mutable reference to the underlying <code>Buf</code>.","Gets a mutable reference to the underlying <code>BufMut</code>.","Gets a mutable reference to the underlying <code>Buf</code>.","Gets a mutable reference to the underlying <code>Buf</code>.","Gets a mutable reference to the underlying <code>BufMut</code>.","Gets a reference to the underlying <code>Buf</code>.","Gets a reference to the underlying <code>BufMut</code>.","Gets a reference to the underlying <code>Buf</code>.","Gets a reference to the underlying <code>Buf</code>.","Gets a reference to the underlying <code>BufMut</code>.","Gets an unsigned 128 bit integer from <code>self</code> in big-endian …","Gets an unsigned 128 bit integer from <code>self</code> in big-endian …","Gets an unsigned 128 bit integer from <code>self</code> in big-endian …","Gets an unsigned 128 bit integer from <code>self</code> in …","Gets an unsigned 128 bit integer from <code>self</code> in …","Gets an unsigned 128 bit integer from <code>self</code> in …","Gets an unsigned 128 bit integer from <code>self</code> in …","Gets an unsigned 128 bit integer from <code>self</code> in …","Gets an unsigned 128 bit integer from <code>self</code> in …","Gets an unsigned 16 bit integer from <code>self</code> in big-endian …","Gets an unsigned 16 bit integer from <code>self</code> in big-endian …","Gets an unsigned 16 bit integer from <code>self</code> in big-endian …","Gets an unsigned 16 bit integer from <code>self</code> in little-endian …","Gets an unsigned 16 bit integer from <code>self</code> in little-endian …","Gets an unsigned 16 bit integer from <code>self</code> in little-endian …","Gets an unsigned 16 bit integer from <code>self</code> in native-endian …","Gets an unsigned 16 bit integer from <code>self</code> in native-endian …","Gets an unsigned 16 bit integer from <code>self</code> in native-endian …","Gets an unsigned 32 bit integer from <code>self</code> in the …","Gets an unsigned 32 bit integer from <code>self</code> in the …","Gets an unsigned 32 bit integer from <code>self</code> in the …","Gets an unsigned 32 bit integer from <code>self</code> in the …","Gets an unsigned 32 bit integer from <code>self</code> in the …","Gets an unsigned 32 bit integer from <code>self</code> in the …","Gets an unsigned 32 bit integer from <code>self</code> in native-endian …","Gets an unsigned 32 bit integer from <code>self</code> in native-endian …","Gets an unsigned 32 bit integer from <code>self</code> in native-endian …","Gets an unsigned 64 bit integer from <code>self</code> in big-endian …","Gets an unsigned 64 bit integer from <code>self</code> in big-endian …","Gets an unsigned 64 bit integer from <code>self</code> in big-endian …","Gets an unsigned 64 bit integer from <code>self</code> in little-endian …","Gets an unsigned 64 bit integer from <code>self</code> in little-endian …","Gets an unsigned 64 bit integer from <code>self</code> in little-endian …","Gets an unsigned 64 bit integer from <code>self</code> in native-endian …","Gets an unsigned 64 bit integer from <code>self</code> in native-endian …","Gets an unsigned 64 bit integer from <code>self</code> in native-endian …","Gets an unsigned 8 bit integer from <code>self</code>.","Gets an unsigned 8 bit integer from <code>self</code>.","Gets an unsigned 8 bit integer from <code>self</code>.","Gets an unsigned n-byte integer from <code>self</code> in big-endian …","Gets an unsigned n-byte integer from <code>self</code> in big-endian …","Gets an unsigned n-byte integer from <code>self</code> in big-endian …","Gets an unsigned n-byte integer from <code>self</code> in little-endian …","Gets an unsigned n-byte integer from <code>self</code> in little-endian …","Gets an unsigned n-byte integer from <code>self</code> in little-endian …","Gets an unsigned n-byte integer from <code>self</code> in native-endian …","Gets an unsigned n-byte integer from <code>self</code> in native-endian …","Gets an unsigned n-byte integer from <code>self</code> in native-endian …","Returns true if there are any more bytes to consume","Returns true if there are any more bytes to consume","Returns true if there are any more bytes to consume","Returns true if there is space in <code>self</code> for more bytes.","Returns true if there is space in <code>self</code> for more bytes.","Returns true if there is space in <code>self</code> for more bytes.","","","","","","","","","","","","","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Consumes this <code>Chain</code>, returning the underlying values.","Consumes this <code>IntoIter</code>, returning the underlying value.","Consumes this <code>Limit</code>, returning the underlying value.","Consumes this <code>Reader</code>, returning the underlying value.","Consumes this <code>Take</code>, returning the underlying value.","Consumes this <code>Writer</code>, returning the underlying value.","","","Gets a mutable reference to the last underlying <code>Buf</code>.","Gets a reference to the last underlying <code>Buf</code>.","Returns the number of bytes in the slice.","Creates an adaptor which can write at most <code>limit</code> bytes to …","Creates an adaptor which can write at most <code>limit</code> bytes to …","Creates an adaptor which can write at most <code>limit</code> bytes to …","Returns the maximum number of bytes that can be written","Returns the maximum number of bytes that can be read.","Creates a <code>&amp;mut UninitSlice</code> wrapping a slice of initialised …","Creates an iterator over the bytes contained by the buffer.","","Transfer bytes into <code>self</code> from <code>src</code> and advance the cursor …","Transfer bytes into <code>self</code> from <code>src</code> and advance the cursor …","Transfer bytes into <code>self</code> from <code>src</code> and advance the cursor …","Put <code>cnt</code> bytes <code>val</code> into <code>self</code>.","Put <code>cnt</code> bytes <code>val</code> into <code>self</code>.","Put <code>cnt</code> bytes <code>val</code> into <code>self</code>.","Writes an IEEE754 single-precision (4 bytes) floating …","Writes an IEEE754 single-precision (4 bytes) floating …","Writes an IEEE754 single-precision (4 bytes) floating …","Writes an IEEE754 single-precision (4 bytes) floating …","Writes an IEEE754 single-precision (4 bytes) floating …","Writes an IEEE754 single-precision (4 bytes) floating …","Writes an IEEE754 single-precision (4 bytes) floating …","Writes an IEEE754 single-precision (4 bytes) floating …","Writes an IEEE754 single-precision (4 bytes) floating …","Writes an IEEE754 double-precision (8 bytes) floating …","Writes an IEEE754 double-precision (8 bytes) floating …","Writes an IEEE754 double-precision (8 bytes) floating …","Writes an IEEE754 double-precision (8 bytes) floating …","Writes an IEEE754 double-precision (8 bytes) floating …","Writes an IEEE754 double-precision (8 bytes) floating …","Writes an IEEE754 double-precision (8 bytes) floating …","Writes an IEEE754 double-precision (8 bytes) floating …","Writes an IEEE754 double-precision (8 bytes) floating …","Writes a signed 128 bit integer to <code>self</code> in the big-endian …","Writes a signed 128 bit integer to <code>self</code> in the big-endian …","Writes a signed 128 bit integer to <code>self</code> in the big-endian …","Writes a signed 128 bit integer to <code>self</code> in little-endian …","Writes a signed 128 bit integer to <code>self</code> in little-endian …","Writes a signed 128 bit integer to <code>self</code> in little-endian …","Writes a signed 128 bit integer to <code>self</code> in native-endian …","Writes a signed 128 bit integer to <code>self</code> in native-endian …","Writes a signed 128 bit integer to <code>self</code> in native-endian …","Writes a signed 16 bit integer to <code>self</code> in big-endian byte …","Writes a signed 16 bit integer to <code>self</code> in big-endian byte …","Writes a signed 16 bit integer to <code>self</code> in big-endian byte …","Writes a signed 16 bit integer to <code>self</code> in little-endian …","Writes a signed 16 bit integer to <code>self</code> in little-endian …","Writes a signed 16 bit integer to <code>self</code> in little-endian …","Writes a signed 16 bit integer to <code>self</code> in native-endian …","Writes a signed 16 bit integer to <code>self</code> in native-endian …","Writes a signed 16 bit integer to <code>self</code> in native-endian …","Writes a signed 32 bit integer to <code>self</code> in big-endian byte …","Writes a signed 32 bit integer to <code>self</code> in big-endian byte …","Writes a signed 32 bit integer to <code>self</code> in big-endian byte …","Writes a signed 32 bit integer to <code>self</code> in little-endian …","Writes a signed 32 bit integer to <code>self</code> in little-endian …","Writes a signed 32 bit integer to <code>self</code> in little-endian …","Writes a signed 32 bit integer to <code>self</code> in native-endian …","Writes a signed 32 bit integer to <code>self</code> in native-endian …","Writes a signed 32 bit integer to <code>self</code> in native-endian …","Writes a signed 64 bit integer to <code>self</code> in the big-endian …","Writes a signed 64 bit integer to <code>self</code> in the big-endian …","Writes a signed 64 bit integer to <code>self</code> in the big-endian …","Writes a signed 64 bit integer to <code>self</code> in little-endian …","Writes a signed 64 bit integer to <code>self</code> in little-endian …","Writes a signed 64 bit integer to <code>self</code> in little-endian …","Writes a signed 64 bit integer to <code>self</code> in native-endian …","Writes a signed 64 bit integer to <code>self</code> in native-endian …","Writes a signed 64 bit integer to <code>self</code> in native-endian …","Writes a signed 8 bit integer to <code>self</code>.","Writes a signed 8 bit integer to <code>self</code>.","Writes a signed 8 bit integer to <code>self</code>.","Writes low <code>nbytes</code> of a signed integer to <code>self</code> in …","Writes low <code>nbytes</code> of a signed integer to <code>self</code> in …","Writes low <code>nbytes</code> of a signed integer to <code>self</code> in …","Writes low <code>nbytes</code> of a signed integer to <code>self</code> in …","Writes low <code>nbytes</code> of a signed integer to <code>self</code> in …","Writes low <code>nbytes</code> of a signed integer to <code>self</code> in …","Writes low <code>nbytes</code> of a signed integer to <code>self</code> in …","Writes low <code>nbytes</code> of a signed integer to <code>self</code> in …","Writes low <code>nbytes</code> of a signed integer to <code>self</code> in …","Transfer bytes into <code>self</code> from <code>src</code> and advance the cursor …","Transfer bytes into <code>self</code> from <code>src</code> and advance the cursor …","Transfer bytes into <code>self</code> from <code>src</code> and advance the cursor …","Writes an unsigned 128 bit integer to <code>self</code> in the …","Writes an unsigned 128 bit integer to <code>self</code> in the …","Writes an unsigned 128 bit integer to <code>self</code> in the …","Writes an unsigned 128 bit integer to <code>self</code> in …","Writes an unsigned 128 bit integer to <code>self</code> in …","Writes an unsigned 128 bit integer to <code>self</code> in …","Writes an unsigned 128 bit integer to <code>self</code> in …","Writes an unsigned 128 bit integer to <code>self</code> in …","Writes an unsigned 128 bit integer to <code>self</code> in …","Writes an unsigned 16 bit integer to <code>self</code> in big-endian …","Writes an unsigned 16 bit integer to <code>self</code> in big-endian …","Writes an unsigned 16 bit integer to <code>self</code> in big-endian …","Writes an unsigned 16 bit integer to <code>self</code> in little-endian …","Writes an unsigned 16 bit integer to <code>self</code> in little-endian …","Writes an unsigned 16 bit integer to <code>self</code> in little-endian …","Writes an unsigned 16 bit integer to <code>self</code> in native-endian …","Writes an unsigned 16 bit integer to <code>self</code> in native-endian …","Writes an unsigned 16 bit integer to <code>self</code> in native-endian …","Writes an unsigned 32 bit integer to <code>self</code> in big-endian …","Writes an unsigned 32 bit integer to <code>self</code> in big-endian …","Writes an unsigned 32 bit integer to <code>self</code> in big-endian …","Writes an unsigned 32 bit integer to <code>self</code> in little-endian …","Writes an unsigned 32 bit integer to <code>self</code> in little-endian …","Writes an unsigned 32 bit integer to <code>self</code> in little-endian …","Writes an unsigned 32 bit integer to <code>self</code> in native-endian …","Writes an unsigned 32 bit integer to <code>self</code> in native-endian …","Writes an unsigned 32 bit integer to <code>self</code> in native-endian …","Writes an unsigned 64 bit integer to <code>self</code> in the …","Writes an unsigned 64 bit integer to <code>self</code> in the …","Writes an unsigned 64 bit integer to <code>self</code> in the …","Writes an unsigned 64 bit integer to <code>self</code> in little-endian …","Writes an unsigned 64 bit integer to <code>self</code> in little-endian …","Writes an unsigned 64 bit integer to <code>self</code> in little-endian …","Writes an unsigned 64 bit integer to <code>self</code> in native-endian …","Writes an unsigned 64 bit integer to <code>self</code> in native-endian …","Writes an unsigned 64 bit integer to <code>self</code> in native-endian …","Writes an unsigned 8 bit integer to <code>self</code>.","Writes an unsigned 8 bit integer to <code>self</code>.","Writes an unsigned 8 bit integer to <code>self</code>.","Writes an unsigned n-byte integer to <code>self</code> in big-endian …","Writes an unsigned n-byte integer to <code>self</code> in big-endian …","Writes an unsigned n-byte integer to <code>self</code> in big-endian …","Writes an unsigned n-byte integer to <code>self</code> in the …","Writes an unsigned n-byte integer to <code>self</code> in the …","Writes an unsigned n-byte integer to <code>self</code> in the …","Writes an unsigned n-byte integer to <code>self</code> in the …","Writes an unsigned n-byte integer to <code>self</code> in the …","Writes an unsigned n-byte integer to <code>self</code> in the …","","Creates an adaptor which implements the <code>Read</code> trait for <code>self</code>…","Creates an adaptor which implements the <code>Read</code> trait for <code>self</code>…","Creates an adaptor which implements the <code>Read</code> trait for <code>self</code>…","Returns the number of bytes between the current position …","","","Returns the number of bytes that can be written from the …","","","Sets the maximum number of bytes that can be written.","Sets the maximum number of bytes that can be read.","","Creates an adaptor which will read at most <code>limit</code> bytes …","Creates an adaptor which will read at most <code>limit</code> bytes …","Creates an adaptor which will read at most <code>limit</code> bytes …","","","","","","","","","","","","","","","","","","","","Creates a <code>&amp;mut UninitSlice</code> wrapping a slice of …","","Write a single byte at the specified offset.","Creates an adaptor which implements the <code>Write</code> trait for …","Creates an adaptor which implements the <code>Write</code> trait for …","Creates an adaptor which implements the <code>Write</code> trait for …"],"i":[0,0,0,0,17,2,3,23,3,3,2,3,2,2,3,3,2,3,3,0,3,17,2,3,23,3,2,3,2,3,2,3,2,3,2,2,3,2,3,2,3,3,2,3,2,3,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,2,2,2,3,3,3,3,2,2,2,2,2,2,2,3,3,3,3,2,3,3,2,2,3,2,3,2,2,3,3,2,3,2,2,3,2,3,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,17,2,3,23,3,3,3,2,3,3,2,2,3,3,2,3,2,3,2,3,2,3,2,3,2,3,2,2,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,17,21,22,23,21,24,4,4,4,21,30,24,26,22,28,4,21,30,24,26,22,28,17,17,17,23,23,23,17,21,22,23,21,24,17,17,17,21,26,4,17,17,17,21,22,17,17,17,26,21,21,28,4,21,30,24,26,22,28,4,4,21,30,24,26,22,28,4,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,30,24,26,22,28,30,24,26,22,28,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,23,23,23,4,4,4,4,4,4,4,4,4,4,4,4,21,30,24,26,22,28,21,30,24,26,22,28,21,30,21,21,4,23,23,23,24,22,4,30,30,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,26,17,17,17,17,21,22,23,21,24,24,22,30,17,17,17,21,30,24,26,22,28,21,30,24,26,22,28,4,21,30,24,26,22,28,4,28,4,23,23,23],"f":[0,0,0,0,[1],[[2,1]],[[3,1]],[1],[[3,1]],[3],[2],[3],[[]],[2],[[]],[3],[[]],[[]],[3],0,[3,1],[[]],[2],[3],[[],4],[3,4],[2],[3],[2,2],[3,3],[[]],[[]],[[2,2],5],[[3,3],5],[[],2],[[2,1],2],[[3,1],2],[[],2],[[],3],[2],[3],[3],[[],[[6,[2]]]],[[],[[6,[3]]]],[2],[3],[[2,2],7],[[2,8],7],[2,7],[[2,9],7],[2,7],[[2,10],7],[[2,3],7],[3,7],[[3,10],7],[3,7],[[3,2],7],[[3,9],7],[[3,3],7],[[3,8],7],[3],[3],[3],[3],[[2,11],12],[[2,11],12],[[2,11],12],[[3,11],12],[[3,11],12],[[3,11],12],[3,2],[[[8,[13]]],2],[[]],[14,2],[9,2],[3,2],[10,2],[[],2],[2,3],[[]],[9,3],[[],3],[15,2],[15,3],[15,3],[[],2],[2],[3],[[]],[[]],[2],[2],[3],[3],[2,7],[3,7],[2,7],[2,1],[3,1],[[],2],[[],3],[[2,9],[[16,[5]]]],[[2,8],[[16,[5]]]],[[2,10],[[16,[5]]]],[2,[[16,[5]]]],[[2,2],[[16,[5]]]],[2,[[16,[5]]]],[[3,3],[[16,[5]]]],[3,[[16,[5]]]],[3,[[16,[5]]]],[[3,9],[[16,[5]]]],[[3,8],[[16,[5]]]],[[3,10],[[16,[5]]]],[[3,17]],[[3,13,1]],[3],[[],1],[2,1],[3,1],[[],1],[3,1],[[3,1]],[[3,1,13]],[2,6],[3,6],[[3,1]],[[2,[18,[1]]],2],[2,2],[3],[3,3],[[2,1],2],[[3,1],3],[[2,1],2],[[3,1],3],[[]],[[]],[[2,1]],[[3,1]],[[],6],[[],6],[[],6],[[],6],[2,[[6,[3,2]]]],[[],19],[[],19],[[3,3]],[1,3],[[3,20],12],[[3,9],12],[1,3],0,0,0,0,0,0,0,0,0,[1],[[21,1]],[[[22,[17]],1]],[1],[[21,1]],[[[24,[23]],1]],[4,13],[4],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[17,[[21,[17]]]],[17,[[21,[17]]]],[17,[[21,[17]]]],[23,[[21,[23]]]],[23,[[21,[23]]]],[23,[[21,[23]]]],[[]],[21],[[[22,[17]]]],[[],4],[21,4],[[[24,[23]]],4],[[],1],[[],1],[[],1],[21,1],[[[26,[[0,[17,25]]]],1]],[4],[1,2],[1,2],[1,2],[[21,1],2],[[[22,[17]],1],2],[[]],[[]],[[]],[[[26,[[0,[17,25]]]]],27],[21],[21],[[[28,[[0,[23,25]]]]],27],[[4,11],12],[[[21,[29,29]],11],12],[[[30,[29]],11],12],[[[24,[29]],11],12],[[[26,[29]],11],12],[[[22,[29]],11],12],[[[28,[29]],11],12],[[],4],[[],4],[[]],[[]],[[]],[[]],[[]],[[]],[[13,1],4],[[],31],[[],31],[[],31],[[],31],[[],31],[[],31],[[],31],[[],31],[[],31],[[],32],[[],32],[[],32],[[],32],[[],32],[[],32],[[],32],[[],32],[[],32],[[],33],[[],33],[[],33],[[],33],[[],33],[[],33],[[],33],[[],33],[[],33],[[],34],[[],34],[[],34],[[],34],[[],34],[[],34],[[],34],[[],34],[[],34],[[],35],[[],35],[[],35],[[],35],[[],35],[[],35],[[],35],[[],35],[[],35],[[],36],[[],36],[[],36],[[],36],[[],36],[[],36],[[],36],[[],36],[[],36],[[],37],[[],37],[[],37],[1,36],[1,36],[1,36],[1,36],[1,36],[1,36],[1,36],[1,36],[1,36],[30],[24],[[[26,[17]]]],[22],[[[28,[23]]]],[30],[24],[[[26,[17]]]],[22],[[[28,[23]]]],[[],38],[[],38],[[],38],[[],38],[[],38],[[],38],[[],38],[[],38],[[],38],[[],39],[[],39],[[],39],[[],39],[[],39],[[],39],[[],39],[[],39],[[],39],[[],40],[[],40],[[],40],[[],40],[[],40],[[],40],[[],40],[[],40],[[],40],[[],41],[[],41],[[],41],[[],41],[[],41],[[],41],[[],41],[[],41],[[],41],[[],13],[[],13],[[],13],[1,41],[1,41],[1,41],[1,41],[1,41],[1,41],[1,41],[1,41],[1,41],[[],7],[[],7],[[],7],[[],7],[[],7],[[],7],[[4,[42,[1]]],4],[[4,[43,[1]]],4],[[4,[44,[1]]],4],[[4,[45,[1]]],4],[[4,46],4],[[4,[47,[1]]],4],[[4,[45,[1]]],4],[[4,[44,[1]]],4],[[4,46],4],[[4,[42,[1]]],4],[[4,[43,[1]]],4],[[4,[47,[1]]],4],[[]],[[]],[[]],[[]],[[]],[[]],[21],[30],[24],[[[26,[17]]],17],[22],[[[28,[23]]],23],[21],[[]],[21],[21],[4,1],[1,24],[1,24],[1,24],[24,1],[22,1],[[],4],[[],30],[[[30,[17]]],[[16,[13]]]],[17],[17],[17],[[13,1]],[[13,1]],[[13,1]],[31],[31],[31],[31],[31],[31],[31],[31],[31],[32],[32],[32],[32],[32],[32],[32],[32],[32],[33],[33],[33],[33],[33],[33],[33],[33],[33],[34],[34],[34],[34],[34],[34],[34],[34],[34],[35],[35],[35],[35],[35],[35],[35],[35],[35],[36],[36],[36],[36],[36],[36],[36],[36],[36],[37],[37],[37],[[36,1]],[[36,1]],[[36,1]],[[36,1]],[[36,1]],[[36,1]],[[36,1]],[[36,1]],[[36,1]],[[]],[[]],[[]],[38],[38],[38],[38],[38],[38],[38],[38],[38],[39],[39],[39],[39],[39],[39],[39],[39],[39],[40],[40],[40],[40],[40],[40],[40],[40],[40],[41],[41],[41],[41],[41],[41],[41],[41],[41],[13],[13],[13],[[41,1]],[[41,1]],[[41,1]],[[41,1]],[[41,1]],[[41,1]],[[41,1]],[[41,1]],[[41,1]],[[[26,[[0,[17,25]]]]],[[27,[1]]]],[[],26],[[],26],[[],26],[[],1],[21,1],[[[22,[17]]],1],[[],1],[21,1],[[[24,[23]]],1],[[24,1]],[[22,1]],[[[30,[17]]]],[1,22],[1,22],[1,22],[[],6],[[],6],[[],6],[[],6],[[],6],[[],6],[[],6],[[],6],[[],6],[[],6],[[],6],[[],6],[[],19],[[],19],[[],19],[[],19],[[],19],[[],19],[[],19],[[],4],[[[28,[[0,[23,25]]]]],[[27,[1]]]],[[4,1,13]],[[],28],[[],28],[[],28]],"p":[[15,"usize"],[3,"Bytes"],[3,"BytesMut"],[3,"UninitSlice"],[4,"Ordering"],[4,"Result"],[15,"bool"],[3,"Vec"],[15,"str"],[3,"String"],[3,"Formatter"],[6,"Result"],[15,"u8"],[3,"Box"],[8,"IntoIterator"],[4,"Option"],[8,"Buf"],[8,"RangeBounds"],[3,"TypeId"],[3,"Arguments"],[3,"Chain"],[3,"Take"],[8,"BufMut"],[3,"Limit"],[8,"Sized"],[3,"Reader"],[6,"Result"],[3,"Writer"],[8,"Debug"],[3,"IntoIter"],[15,"f32"],[15,"f64"],[15,"i128"],[15,"i16"],[15,"i32"],[15,"i64"],[15,"i8"],[15,"u128"],[15,"u16"],[15,"u32"],[15,"u64"],[3,"RangeFrom"],[3,"RangeToInclusive"],[3,"RangeInclusive"],[3,"RangeTo"],[3,"RangeFull"],[3,"Range"]],"a":{"bytes":[21,187],"bytes_mut":[24,190]}}\
+}');
+if (typeof window !== 'undefined' && window.initSearch) {window.initSearch(searchIndex)};
+if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex};
diff --git a/settings.html b/settings.html
new file mode 100644
index 0000000..21db84e
--- /dev/null
+++ b/settings.html
@@ -0,0 +1 @@
+<!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="Settings of Rustdoc"><meta name="keywords" content="rust, rustlang, rust-lang"><title>Rustdoc settings</title><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="./static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="./static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="./static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="./static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="./static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="./static.files/storage-d43fa987303ecbbb.js"></script><script defer src="./static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="./static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="./static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="./static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="./bytes/index.html"><div class="logo-container"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="./bytes/index.html"><div class="logo-container"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2 class="location">Settings</h2><div class="sidebar-elems"></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="./help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="./settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="./static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Rustdoc settings</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section>You need to enable Javascript be able to update your settings.</section></noscript><link rel="stylesheet" type="text/css" href="./static.files/settings-a66f7524084a489a.css"><script defer src="./static.files/settings-3a0b9947ba1bd99a.js"></script></section></div></main><div id="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/source-files.js b/source-files.js
new file mode 100644
index 0000000..8c3d4ec
--- /dev/null
+++ b/source-files.js
@@ -0,0 +1,4 @@
+var sourcesIndex = JSON.parse('{\
+"bytes":["",[["buf",[],["buf_impl.rs","buf_mut.rs","chain.rs","iter.rs","limit.rs","mod.rs","reader.rs","take.rs","uninit_slice.rs","vec_deque.rs","writer.rs"]],["fmt",[],["debug.rs","hex.rs","mod.rs"]]],["bytes.rs","bytes_mut.rs","lib.rs","loom.rs","serde.rs"]]\
+}');
+createSourceSidebar();
diff --git a/src/bytes/buf/buf_impl.rs.html b/src/bytes/buf/buf_impl.rs.html
new file mode 100644
index 0000000..55d225c
--- /dev/null
+++ b/src/bytes/buf/buf_impl.rs.html
@@ -0,0 +1,2930 @@
+<!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="Source of the Rust file `src/buf/buf_impl.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>buf_impl.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../../../static.files/source-script-74087aa2e88f4475.js"></script><script defer src="../../../source-files.js"></script><script defer src="../../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><div class="width-limiter"><nav class="sub"><a class="sub-logo-container" href="../../../bytes/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><pre class="src-line-numbers"><span id="1">1</span>
+<span id="2">2</span>
+<span id="3">3</span>
+<span id="4">4</span>
+<span id="5">5</span>
+<span id="6">6</span>
+<span id="7">7</span>
+<span id="8">8</span>
+<span id="9">9</span>
+<span id="10">10</span>
+<span id="11">11</span>
+<span id="12">12</span>
+<span id="13">13</span>
+<span id="14">14</span>
+<span id="15">15</span>
+<span id="16">16</span>
+<span id="17">17</span>
+<span id="18">18</span>
+<span id="19">19</span>
+<span id="20">20</span>
+<span id="21">21</span>
+<span id="22">22</span>
+<span id="23">23</span>
+<span id="24">24</span>
+<span id="25">25</span>
+<span id="26">26</span>
+<span id="27">27</span>
+<span id="28">28</span>
+<span id="29">29</span>
+<span id="30">30</span>
+<span id="31">31</span>
+<span id="32">32</span>
+<span id="33">33</span>
+<span id="34">34</span>
+<span id="35">35</span>
+<span id="36">36</span>
+<span id="37">37</span>
+<span id="38">38</span>
+<span id="39">39</span>
+<span id="40">40</span>
+<span id="41">41</span>
+<span id="42">42</span>
+<span id="43">43</span>
+<span id="44">44</span>
+<span id="45">45</span>
+<span id="46">46</span>
+<span id="47">47</span>
+<span id="48">48</span>
+<span id="49">49</span>
+<span id="50">50</span>
+<span id="51">51</span>
+<span id="52">52</span>
+<span id="53">53</span>
+<span id="54">54</span>
+<span id="55">55</span>
+<span id="56">56</span>
+<span id="57">57</span>
+<span id="58">58</span>
+<span id="59">59</span>
+<span id="60">60</span>
+<span id="61">61</span>
+<span id="62">62</span>
+<span id="63">63</span>
+<span id="64">64</span>
+<span id="65">65</span>
+<span id="66">66</span>
+<span id="67">67</span>
+<span id="68">68</span>
+<span id="69">69</span>
+<span id="70">70</span>
+<span id="71">71</span>
+<span id="72">72</span>
+<span id="73">73</span>
+<span id="74">74</span>
+<span id="75">75</span>
+<span id="76">76</span>
+<span id="77">77</span>
+<span id="78">78</span>
+<span id="79">79</span>
+<span id="80">80</span>
+<span id="81">81</span>
+<span id="82">82</span>
+<span id="83">83</span>
+<span id="84">84</span>
+<span id="85">85</span>
+<span id="86">86</span>
+<span id="87">87</span>
+<span id="88">88</span>
+<span id="89">89</span>
+<span id="90">90</span>
+<span id="91">91</span>
+<span id="92">92</span>
+<span id="93">93</span>
+<span id="94">94</span>
+<span id="95">95</span>
+<span id="96">96</span>
+<span id="97">97</span>
+<span id="98">98</span>
+<span id="99">99</span>
+<span id="100">100</span>
+<span id="101">101</span>
+<span id="102">102</span>
+<span id="103">103</span>
+<span id="104">104</span>
+<span id="105">105</span>
+<span id="106">106</span>
+<span id="107">107</span>
+<span id="108">108</span>
+<span id="109">109</span>
+<span id="110">110</span>
+<span id="111">111</span>
+<span id="112">112</span>
+<span id="113">113</span>
+<span id="114">114</span>
+<span id="115">115</span>
+<span id="116">116</span>
+<span id="117">117</span>
+<span id="118">118</span>
+<span id="119">119</span>
+<span id="120">120</span>
+<span id="121">121</span>
+<span id="122">122</span>
+<span id="123">123</span>
+<span id="124">124</span>
+<span id="125">125</span>
+<span id="126">126</span>
+<span id="127">127</span>
+<span id="128">128</span>
+<span id="129">129</span>
+<span id="130">130</span>
+<span id="131">131</span>
+<span id="132">132</span>
+<span id="133">133</span>
+<span id="134">134</span>
+<span id="135">135</span>
+<span id="136">136</span>
+<span id="137">137</span>
+<span id="138">138</span>
+<span id="139">139</span>
+<span id="140">140</span>
+<span id="141">141</span>
+<span id="142">142</span>
+<span id="143">143</span>
+<span id="144">144</span>
+<span id="145">145</span>
+<span id="146">146</span>
+<span id="147">147</span>
+<span id="148">148</span>
+<span id="149">149</span>
+<span id="150">150</span>
+<span id="151">151</span>
+<span id="152">152</span>
+<span id="153">153</span>
+<span id="154">154</span>
+<span id="155">155</span>
+<span id="156">156</span>
+<span id="157">157</span>
+<span id="158">158</span>
+<span id="159">159</span>
+<span id="160">160</span>
+<span id="161">161</span>
+<span id="162">162</span>
+<span id="163">163</span>
+<span id="164">164</span>
+<span id="165">165</span>
+<span id="166">166</span>
+<span id="167">167</span>
+<span id="168">168</span>
+<span id="169">169</span>
+<span id="170">170</span>
+<span id="171">171</span>
+<span id="172">172</span>
+<span id="173">173</span>
+<span id="174">174</span>
+<span id="175">175</span>
+<span id="176">176</span>
+<span id="177">177</span>
+<span id="178">178</span>
+<span id="179">179</span>
+<span id="180">180</span>
+<span id="181">181</span>
+<span id="182">182</span>
+<span id="183">183</span>
+<span id="184">184</span>
+<span id="185">185</span>
+<span id="186">186</span>
+<span id="187">187</span>
+<span id="188">188</span>
+<span id="189">189</span>
+<span id="190">190</span>
+<span id="191">191</span>
+<span id="192">192</span>
+<span id="193">193</span>
+<span id="194">194</span>
+<span id="195">195</span>
+<span id="196">196</span>
+<span id="197">197</span>
+<span id="198">198</span>
+<span id="199">199</span>
+<span id="200">200</span>
+<span id="201">201</span>
+<span id="202">202</span>
+<span id="203">203</span>
+<span id="204">204</span>
+<span id="205">205</span>
+<span id="206">206</span>
+<span id="207">207</span>
+<span id="208">208</span>
+<span id="209">209</span>
+<span id="210">210</span>
+<span id="211">211</span>
+<span id="212">212</span>
+<span id="213">213</span>
+<span id="214">214</span>
+<span id="215">215</span>
+<span id="216">216</span>
+<span id="217">217</span>
+<span id="218">218</span>
+<span id="219">219</span>
+<span id="220">220</span>
+<span id="221">221</span>
+<span id="222">222</span>
+<span id="223">223</span>
+<span id="224">224</span>
+<span id="225">225</span>
+<span id="226">226</span>
+<span id="227">227</span>
+<span id="228">228</span>
+<span id="229">229</span>
+<span id="230">230</span>
+<span id="231">231</span>
+<span id="232">232</span>
+<span id="233">233</span>
+<span id="234">234</span>
+<span id="235">235</span>
+<span id="236">236</span>
+<span id="237">237</span>
+<span id="238">238</span>
+<span id="239">239</span>
+<span id="240">240</span>
+<span id="241">241</span>
+<span id="242">242</span>
+<span id="243">243</span>
+<span id="244">244</span>
+<span id="245">245</span>
+<span id="246">246</span>
+<span id="247">247</span>
+<span id="248">248</span>
+<span id="249">249</span>
+<span id="250">250</span>
+<span id="251">251</span>
+<span id="252">252</span>
+<span id="253">253</span>
+<span id="254">254</span>
+<span id="255">255</span>
+<span id="256">256</span>
+<span id="257">257</span>
+<span id="258">258</span>
+<span id="259">259</span>
+<span id="260">260</span>
+<span id="261">261</span>
+<span id="262">262</span>
+<span id="263">263</span>
+<span id="264">264</span>
+<span id="265">265</span>
+<span id="266">266</span>
+<span id="267">267</span>
+<span id="268">268</span>
+<span id="269">269</span>
+<span id="270">270</span>
+<span id="271">271</span>
+<span id="272">272</span>
+<span id="273">273</span>
+<span id="274">274</span>
+<span id="275">275</span>
+<span id="276">276</span>
+<span id="277">277</span>
+<span id="278">278</span>
+<span id="279">279</span>
+<span id="280">280</span>
+<span id="281">281</span>
+<span id="282">282</span>
+<span id="283">283</span>
+<span id="284">284</span>
+<span id="285">285</span>
+<span id="286">286</span>
+<span id="287">287</span>
+<span id="288">288</span>
+<span id="289">289</span>
+<span id="290">290</span>
+<span id="291">291</span>
+<span id="292">292</span>
+<span id="293">293</span>
+<span id="294">294</span>
+<span id="295">295</span>
+<span id="296">296</span>
+<span id="297">297</span>
+<span id="298">298</span>
+<span id="299">299</span>
+<span id="300">300</span>
+<span id="301">301</span>
+<span id="302">302</span>
+<span id="303">303</span>
+<span id="304">304</span>
+<span id="305">305</span>
+<span id="306">306</span>
+<span id="307">307</span>
+<span id="308">308</span>
+<span id="309">309</span>
+<span id="310">310</span>
+<span id="311">311</span>
+<span id="312">312</span>
+<span id="313">313</span>
+<span id="314">314</span>
+<span id="315">315</span>
+<span id="316">316</span>
+<span id="317">317</span>
+<span id="318">318</span>
+<span id="319">319</span>
+<span id="320">320</span>
+<span id="321">321</span>
+<span id="322">322</span>
+<span id="323">323</span>
+<span id="324">324</span>
+<span id="325">325</span>
+<span id="326">326</span>
+<span id="327">327</span>
+<span id="328">328</span>
+<span id="329">329</span>
+<span id="330">330</span>
+<span id="331">331</span>
+<span id="332">332</span>
+<span id="333">333</span>
+<span id="334">334</span>
+<span id="335">335</span>
+<span id="336">336</span>
+<span id="337">337</span>
+<span id="338">338</span>
+<span id="339">339</span>
+<span id="340">340</span>
+<span id="341">341</span>
+<span id="342">342</span>
+<span id="343">343</span>
+<span id="344">344</span>
+<span id="345">345</span>
+<span id="346">346</span>
+<span id="347">347</span>
+<span id="348">348</span>
+<span id="349">349</span>
+<span id="350">350</span>
+<span id="351">351</span>
+<span id="352">352</span>
+<span id="353">353</span>
+<span id="354">354</span>
+<span id="355">355</span>
+<span id="356">356</span>
+<span id="357">357</span>
+<span id="358">358</span>
+<span id="359">359</span>
+<span id="360">360</span>
+<span id="361">361</span>
+<span id="362">362</span>
+<span id="363">363</span>
+<span id="364">364</span>
+<span id="365">365</span>
+<span id="366">366</span>
+<span id="367">367</span>
+<span id="368">368</span>
+<span id="369">369</span>
+<span id="370">370</span>
+<span id="371">371</span>
+<span id="372">372</span>
+<span id="373">373</span>
+<span id="374">374</span>
+<span id="375">375</span>
+<span id="376">376</span>
+<span id="377">377</span>
+<span id="378">378</span>
+<span id="379">379</span>
+<span id="380">380</span>
+<span id="381">381</span>
+<span id="382">382</span>
+<span id="383">383</span>
+<span id="384">384</span>
+<span id="385">385</span>
+<span id="386">386</span>
+<span id="387">387</span>
+<span id="388">388</span>
+<span id="389">389</span>
+<span id="390">390</span>
+<span id="391">391</span>
+<span id="392">392</span>
+<span id="393">393</span>
+<span id="394">394</span>
+<span id="395">395</span>
+<span id="396">396</span>
+<span id="397">397</span>
+<span id="398">398</span>
+<span id="399">399</span>
+<span id="400">400</span>
+<span id="401">401</span>
+<span id="402">402</span>
+<span id="403">403</span>
+<span id="404">404</span>
+<span id="405">405</span>
+<span id="406">406</span>
+<span id="407">407</span>
+<span id="408">408</span>
+<span id="409">409</span>
+<span id="410">410</span>
+<span id="411">411</span>
+<span id="412">412</span>
+<span id="413">413</span>
+<span id="414">414</span>
+<span id="415">415</span>
+<span id="416">416</span>
+<span id="417">417</span>
+<span id="418">418</span>
+<span id="419">419</span>
+<span id="420">420</span>
+<span id="421">421</span>
+<span id="422">422</span>
+<span id="423">423</span>
+<span id="424">424</span>
+<span id="425">425</span>
+<span id="426">426</span>
+<span id="427">427</span>
+<span id="428">428</span>
+<span id="429">429</span>
+<span id="430">430</span>
+<span id="431">431</span>
+<span id="432">432</span>
+<span id="433">433</span>
+<span id="434">434</span>
+<span id="435">435</span>
+<span id="436">436</span>
+<span id="437">437</span>
+<span id="438">438</span>
+<span id="439">439</span>
+<span id="440">440</span>
+<span id="441">441</span>
+<span id="442">442</span>
+<span id="443">443</span>
+<span id="444">444</span>
+<span id="445">445</span>
+<span id="446">446</span>
+<span id="447">447</span>
+<span id="448">448</span>
+<span id="449">449</span>
+<span id="450">450</span>
+<span id="451">451</span>
+<span id="452">452</span>
+<span id="453">453</span>
+<span id="454">454</span>
+<span id="455">455</span>
+<span id="456">456</span>
+<span id="457">457</span>
+<span id="458">458</span>
+<span id="459">459</span>
+<span id="460">460</span>
+<span id="461">461</span>
+<span id="462">462</span>
+<span id="463">463</span>
+<span id="464">464</span>
+<span id="465">465</span>
+<span id="466">466</span>
+<span id="467">467</span>
+<span id="468">468</span>
+<span id="469">469</span>
+<span id="470">470</span>
+<span id="471">471</span>
+<span id="472">472</span>
+<span id="473">473</span>
+<span id="474">474</span>
+<span id="475">475</span>
+<span id="476">476</span>
+<span id="477">477</span>
+<span id="478">478</span>
+<span id="479">479</span>
+<span id="480">480</span>
+<span id="481">481</span>
+<span id="482">482</span>
+<span id="483">483</span>
+<span id="484">484</span>
+<span id="485">485</span>
+<span id="486">486</span>
+<span id="487">487</span>
+<span id="488">488</span>
+<span id="489">489</span>
+<span id="490">490</span>
+<span id="491">491</span>
+<span id="492">492</span>
+<span id="493">493</span>
+<span id="494">494</span>
+<span id="495">495</span>
+<span id="496">496</span>
+<span id="497">497</span>
+<span id="498">498</span>
+<span id="499">499</span>
+<span id="500">500</span>
+<span id="501">501</span>
+<span id="502">502</span>
+<span id="503">503</span>
+<span id="504">504</span>
+<span id="505">505</span>
+<span id="506">506</span>
+<span id="507">507</span>
+<span id="508">508</span>
+<span id="509">509</span>
+<span id="510">510</span>
+<span id="511">511</span>
+<span id="512">512</span>
+<span id="513">513</span>
+<span id="514">514</span>
+<span id="515">515</span>
+<span id="516">516</span>
+<span id="517">517</span>
+<span id="518">518</span>
+<span id="519">519</span>
+<span id="520">520</span>
+<span id="521">521</span>
+<span id="522">522</span>
+<span id="523">523</span>
+<span id="524">524</span>
+<span id="525">525</span>
+<span id="526">526</span>
+<span id="527">527</span>
+<span id="528">528</span>
+<span id="529">529</span>
+<span id="530">530</span>
+<span id="531">531</span>
+<span id="532">532</span>
+<span id="533">533</span>
+<span id="534">534</span>
+<span id="535">535</span>
+<span id="536">536</span>
+<span id="537">537</span>
+<span id="538">538</span>
+<span id="539">539</span>
+<span id="540">540</span>
+<span id="541">541</span>
+<span id="542">542</span>
+<span id="543">543</span>
+<span id="544">544</span>
+<span id="545">545</span>
+<span id="546">546</span>
+<span id="547">547</span>
+<span id="548">548</span>
+<span id="549">549</span>
+<span id="550">550</span>
+<span id="551">551</span>
+<span id="552">552</span>
+<span id="553">553</span>
+<span id="554">554</span>
+<span id="555">555</span>
+<span id="556">556</span>
+<span id="557">557</span>
+<span id="558">558</span>
+<span id="559">559</span>
+<span id="560">560</span>
+<span id="561">561</span>
+<span id="562">562</span>
+<span id="563">563</span>
+<span id="564">564</span>
+<span id="565">565</span>
+<span id="566">566</span>
+<span id="567">567</span>
+<span id="568">568</span>
+<span id="569">569</span>
+<span id="570">570</span>
+<span id="571">571</span>
+<span id="572">572</span>
+<span id="573">573</span>
+<span id="574">574</span>
+<span id="575">575</span>
+<span id="576">576</span>
+<span id="577">577</span>
+<span id="578">578</span>
+<span id="579">579</span>
+<span id="580">580</span>
+<span id="581">581</span>
+<span id="582">582</span>
+<span id="583">583</span>
+<span id="584">584</span>
+<span id="585">585</span>
+<span id="586">586</span>
+<span id="587">587</span>
+<span id="588">588</span>
+<span id="589">589</span>
+<span id="590">590</span>
+<span id="591">591</span>
+<span id="592">592</span>
+<span id="593">593</span>
+<span id="594">594</span>
+<span id="595">595</span>
+<span id="596">596</span>
+<span id="597">597</span>
+<span id="598">598</span>
+<span id="599">599</span>
+<span id="600">600</span>
+<span id="601">601</span>
+<span id="602">602</span>
+<span id="603">603</span>
+<span id="604">604</span>
+<span id="605">605</span>
+<span id="606">606</span>
+<span id="607">607</span>
+<span id="608">608</span>
+<span id="609">609</span>
+<span id="610">610</span>
+<span id="611">611</span>
+<span id="612">612</span>
+<span id="613">613</span>
+<span id="614">614</span>
+<span id="615">615</span>
+<span id="616">616</span>
+<span id="617">617</span>
+<span id="618">618</span>
+<span id="619">619</span>
+<span id="620">620</span>
+<span id="621">621</span>
+<span id="622">622</span>
+<span id="623">623</span>
+<span id="624">624</span>
+<span id="625">625</span>
+<span id="626">626</span>
+<span id="627">627</span>
+<span id="628">628</span>
+<span id="629">629</span>
+<span id="630">630</span>
+<span id="631">631</span>
+<span id="632">632</span>
+<span id="633">633</span>
+<span id="634">634</span>
+<span id="635">635</span>
+<span id="636">636</span>
+<span id="637">637</span>
+<span id="638">638</span>
+<span id="639">639</span>
+<span id="640">640</span>
+<span id="641">641</span>
+<span id="642">642</span>
+<span id="643">643</span>
+<span id="644">644</span>
+<span id="645">645</span>
+<span id="646">646</span>
+<span id="647">647</span>
+<span id="648">648</span>
+<span id="649">649</span>
+<span id="650">650</span>
+<span id="651">651</span>
+<span id="652">652</span>
+<span id="653">653</span>
+<span id="654">654</span>
+<span id="655">655</span>
+<span id="656">656</span>
+<span id="657">657</span>
+<span id="658">658</span>
+<span id="659">659</span>
+<span id="660">660</span>
+<span id="661">661</span>
+<span id="662">662</span>
+<span id="663">663</span>
+<span id="664">664</span>
+<span id="665">665</span>
+<span id="666">666</span>
+<span id="667">667</span>
+<span id="668">668</span>
+<span id="669">669</span>
+<span id="670">670</span>
+<span id="671">671</span>
+<span id="672">672</span>
+<span id="673">673</span>
+<span id="674">674</span>
+<span id="675">675</span>
+<span id="676">676</span>
+<span id="677">677</span>
+<span id="678">678</span>
+<span id="679">679</span>
+<span id="680">680</span>
+<span id="681">681</span>
+<span id="682">682</span>
+<span id="683">683</span>
+<span id="684">684</span>
+<span id="685">685</span>
+<span id="686">686</span>
+<span id="687">687</span>
+<span id="688">688</span>
+<span id="689">689</span>
+<span id="690">690</span>
+<span id="691">691</span>
+<span id="692">692</span>
+<span id="693">693</span>
+<span id="694">694</span>
+<span id="695">695</span>
+<span id="696">696</span>
+<span id="697">697</span>
+<span id="698">698</span>
+<span id="699">699</span>
+<span id="700">700</span>
+<span id="701">701</span>
+<span id="702">702</span>
+<span id="703">703</span>
+<span id="704">704</span>
+<span id="705">705</span>
+<span id="706">706</span>
+<span id="707">707</span>
+<span id="708">708</span>
+<span id="709">709</span>
+<span id="710">710</span>
+<span id="711">711</span>
+<span id="712">712</span>
+<span id="713">713</span>
+<span id="714">714</span>
+<span id="715">715</span>
+<span id="716">716</span>
+<span id="717">717</span>
+<span id="718">718</span>
+<span id="719">719</span>
+<span id="720">720</span>
+<span id="721">721</span>
+<span id="722">722</span>
+<span id="723">723</span>
+<span id="724">724</span>
+<span id="725">725</span>
+<span id="726">726</span>
+<span id="727">727</span>
+<span id="728">728</span>
+<span id="729">729</span>
+<span id="730">730</span>
+<span id="731">731</span>
+<span id="732">732</span>
+<span id="733">733</span>
+<span id="734">734</span>
+<span id="735">735</span>
+<span id="736">736</span>
+<span id="737">737</span>
+<span id="738">738</span>
+<span id="739">739</span>
+<span id="740">740</span>
+<span id="741">741</span>
+<span id="742">742</span>
+<span id="743">743</span>
+<span id="744">744</span>
+<span id="745">745</span>
+<span id="746">746</span>
+<span id="747">747</span>
+<span id="748">748</span>
+<span id="749">749</span>
+<span id="750">750</span>
+<span id="751">751</span>
+<span id="752">752</span>
+<span id="753">753</span>
+<span id="754">754</span>
+<span id="755">755</span>
+<span id="756">756</span>
+<span id="757">757</span>
+<span id="758">758</span>
+<span id="759">759</span>
+<span id="760">760</span>
+<span id="761">761</span>
+<span id="762">762</span>
+<span id="763">763</span>
+<span id="764">764</span>
+<span id="765">765</span>
+<span id="766">766</span>
+<span id="767">767</span>
+<span id="768">768</span>
+<span id="769">769</span>
+<span id="770">770</span>
+<span id="771">771</span>
+<span id="772">772</span>
+<span id="773">773</span>
+<span id="774">774</span>
+<span id="775">775</span>
+<span id="776">776</span>
+<span id="777">777</span>
+<span id="778">778</span>
+<span id="779">779</span>
+<span id="780">780</span>
+<span id="781">781</span>
+<span id="782">782</span>
+<span id="783">783</span>
+<span id="784">784</span>
+<span id="785">785</span>
+<span id="786">786</span>
+<span id="787">787</span>
+<span id="788">788</span>
+<span id="789">789</span>
+<span id="790">790</span>
+<span id="791">791</span>
+<span id="792">792</span>
+<span id="793">793</span>
+<span id="794">794</span>
+<span id="795">795</span>
+<span id="796">796</span>
+<span id="797">797</span>
+<span id="798">798</span>
+<span id="799">799</span>
+<span id="800">800</span>
+<span id="801">801</span>
+<span id="802">802</span>
+<span id="803">803</span>
+<span id="804">804</span>
+<span id="805">805</span>
+<span id="806">806</span>
+<span id="807">807</span>
+<span id="808">808</span>
+<span id="809">809</span>
+<span id="810">810</span>
+<span id="811">811</span>
+<span id="812">812</span>
+<span id="813">813</span>
+<span id="814">814</span>
+<span id="815">815</span>
+<span id="816">816</span>
+<span id="817">817</span>
+<span id="818">818</span>
+<span id="819">819</span>
+<span id="820">820</span>
+<span id="821">821</span>
+<span id="822">822</span>
+<span id="823">823</span>
+<span id="824">824</span>
+<span id="825">825</span>
+<span id="826">826</span>
+<span id="827">827</span>
+<span id="828">828</span>
+<span id="829">829</span>
+<span id="830">830</span>
+<span id="831">831</span>
+<span id="832">832</span>
+<span id="833">833</span>
+<span id="834">834</span>
+<span id="835">835</span>
+<span id="836">836</span>
+<span id="837">837</span>
+<span id="838">838</span>
+<span id="839">839</span>
+<span id="840">840</span>
+<span id="841">841</span>
+<span id="842">842</span>
+<span id="843">843</span>
+<span id="844">844</span>
+<span id="845">845</span>
+<span id="846">846</span>
+<span id="847">847</span>
+<span id="848">848</span>
+<span id="849">849</span>
+<span id="850">850</span>
+<span id="851">851</span>
+<span id="852">852</span>
+<span id="853">853</span>
+<span id="854">854</span>
+<span id="855">855</span>
+<span id="856">856</span>
+<span id="857">857</span>
+<span id="858">858</span>
+<span id="859">859</span>
+<span id="860">860</span>
+<span id="861">861</span>
+<span id="862">862</span>
+<span id="863">863</span>
+<span id="864">864</span>
+<span id="865">865</span>
+<span id="866">866</span>
+<span id="867">867</span>
+<span id="868">868</span>
+<span id="869">869</span>
+<span id="870">870</span>
+<span id="871">871</span>
+<span id="872">872</span>
+<span id="873">873</span>
+<span id="874">874</span>
+<span id="875">875</span>
+<span id="876">876</span>
+<span id="877">877</span>
+<span id="878">878</span>
+<span id="879">879</span>
+<span id="880">880</span>
+<span id="881">881</span>
+<span id="882">882</span>
+<span id="883">883</span>
+<span id="884">884</span>
+<span id="885">885</span>
+<span id="886">886</span>
+<span id="887">887</span>
+<span id="888">888</span>
+<span id="889">889</span>
+<span id="890">890</span>
+<span id="891">891</span>
+<span id="892">892</span>
+<span id="893">893</span>
+<span id="894">894</span>
+<span id="895">895</span>
+<span id="896">896</span>
+<span id="897">897</span>
+<span id="898">898</span>
+<span id="899">899</span>
+<span id="900">900</span>
+<span id="901">901</span>
+<span id="902">902</span>
+<span id="903">903</span>
+<span id="904">904</span>
+<span id="905">905</span>
+<span id="906">906</span>
+<span id="907">907</span>
+<span id="908">908</span>
+<span id="909">909</span>
+<span id="910">910</span>
+<span id="911">911</span>
+<span id="912">912</span>
+<span id="913">913</span>
+<span id="914">914</span>
+<span id="915">915</span>
+<span id="916">916</span>
+<span id="917">917</span>
+<span id="918">918</span>
+<span id="919">919</span>
+<span id="920">920</span>
+<span id="921">921</span>
+<span id="922">922</span>
+<span id="923">923</span>
+<span id="924">924</span>
+<span id="925">925</span>
+<span id="926">926</span>
+<span id="927">927</span>
+<span id="928">928</span>
+<span id="929">929</span>
+<span id="930">930</span>
+<span id="931">931</span>
+<span id="932">932</span>
+<span id="933">933</span>
+<span id="934">934</span>
+<span id="935">935</span>
+<span id="936">936</span>
+<span id="937">937</span>
+<span id="938">938</span>
+<span id="939">939</span>
+<span id="940">940</span>
+<span id="941">941</span>
+<span id="942">942</span>
+<span id="943">943</span>
+<span id="944">944</span>
+<span id="945">945</span>
+<span id="946">946</span>
+<span id="947">947</span>
+<span id="948">948</span>
+<span id="949">949</span>
+<span id="950">950</span>
+<span id="951">951</span>
+<span id="952">952</span>
+<span id="953">953</span>
+<span id="954">954</span>
+<span id="955">955</span>
+<span id="956">956</span>
+<span id="957">957</span>
+<span id="958">958</span>
+<span id="959">959</span>
+<span id="960">960</span>
+<span id="961">961</span>
+<span id="962">962</span>
+<span id="963">963</span>
+<span id="964">964</span>
+<span id="965">965</span>
+<span id="966">966</span>
+<span id="967">967</span>
+<span id="968">968</span>
+<span id="969">969</span>
+<span id="970">970</span>
+<span id="971">971</span>
+<span id="972">972</span>
+<span id="973">973</span>
+<span id="974">974</span>
+<span id="975">975</span>
+<span id="976">976</span>
+<span id="977">977</span>
+<span id="978">978</span>
+<span id="979">979</span>
+<span id="980">980</span>
+<span id="981">981</span>
+<span id="982">982</span>
+<span id="983">983</span>
+<span id="984">984</span>
+<span id="985">985</span>
+<span id="986">986</span>
+<span id="987">987</span>
+<span id="988">988</span>
+<span id="989">989</span>
+<span id="990">990</span>
+<span id="991">991</span>
+<span id="992">992</span>
+<span id="993">993</span>
+<span id="994">994</span>
+<span id="995">995</span>
+<span id="996">996</span>
+<span id="997">997</span>
+<span id="998">998</span>
+<span id="999">999</span>
+<span id="1000">1000</span>
+<span id="1001">1001</span>
+<span id="1002">1002</span>
+<span id="1003">1003</span>
+<span id="1004">1004</span>
+<span id="1005">1005</span>
+<span id="1006">1006</span>
+<span id="1007">1007</span>
+<span id="1008">1008</span>
+<span id="1009">1009</span>
+<span id="1010">1010</span>
+<span id="1011">1011</span>
+<span id="1012">1012</span>
+<span id="1013">1013</span>
+<span id="1014">1014</span>
+<span id="1015">1015</span>
+<span id="1016">1016</span>
+<span id="1017">1017</span>
+<span id="1018">1018</span>
+<span id="1019">1019</span>
+<span id="1020">1020</span>
+<span id="1021">1021</span>
+<span id="1022">1022</span>
+<span id="1023">1023</span>
+<span id="1024">1024</span>
+<span id="1025">1025</span>
+<span id="1026">1026</span>
+<span id="1027">1027</span>
+<span id="1028">1028</span>
+<span id="1029">1029</span>
+<span id="1030">1030</span>
+<span id="1031">1031</span>
+<span id="1032">1032</span>
+<span id="1033">1033</span>
+<span id="1034">1034</span>
+<span id="1035">1035</span>
+<span id="1036">1036</span>
+<span id="1037">1037</span>
+<span id="1038">1038</span>
+<span id="1039">1039</span>
+<span id="1040">1040</span>
+<span id="1041">1041</span>
+<span id="1042">1042</span>
+<span id="1043">1043</span>
+<span id="1044">1044</span>
+<span id="1045">1045</span>
+<span id="1046">1046</span>
+<span id="1047">1047</span>
+<span id="1048">1048</span>
+<span id="1049">1049</span>
+<span id="1050">1050</span>
+<span id="1051">1051</span>
+<span id="1052">1052</span>
+<span id="1053">1053</span>
+<span id="1054">1054</span>
+<span id="1055">1055</span>
+<span id="1056">1056</span>
+<span id="1057">1057</span>
+<span id="1058">1058</span>
+<span id="1059">1059</span>
+<span id="1060">1060</span>
+<span id="1061">1061</span>
+<span id="1062">1062</span>
+<span id="1063">1063</span>
+<span id="1064">1064</span>
+<span id="1065">1065</span>
+<span id="1066">1066</span>
+<span id="1067">1067</span>
+<span id="1068">1068</span>
+<span id="1069">1069</span>
+<span id="1070">1070</span>
+<span id="1071">1071</span>
+<span id="1072">1072</span>
+<span id="1073">1073</span>
+<span id="1074">1074</span>
+<span id="1075">1075</span>
+<span id="1076">1076</span>
+<span id="1077">1077</span>
+<span id="1078">1078</span>
+<span id="1079">1079</span>
+<span id="1080">1080</span>
+<span id="1081">1081</span>
+<span id="1082">1082</span>
+<span id="1083">1083</span>
+<span id="1084">1084</span>
+<span id="1085">1085</span>
+<span id="1086">1086</span>
+<span id="1087">1087</span>
+<span id="1088">1088</span>
+<span id="1089">1089</span>
+<span id="1090">1090</span>
+<span id="1091">1091</span>
+<span id="1092">1092</span>
+<span id="1093">1093</span>
+<span id="1094">1094</span>
+<span id="1095">1095</span>
+<span id="1096">1096</span>
+<span id="1097">1097</span>
+<span id="1098">1098</span>
+<span id="1099">1099</span>
+<span id="1100">1100</span>
+<span id="1101">1101</span>
+<span id="1102">1102</span>
+<span id="1103">1103</span>
+<span id="1104">1104</span>
+<span id="1105">1105</span>
+<span id="1106">1106</span>
+<span id="1107">1107</span>
+<span id="1108">1108</span>
+<span id="1109">1109</span>
+<span id="1110">1110</span>
+<span id="1111">1111</span>
+<span id="1112">1112</span>
+<span id="1113">1113</span>
+<span id="1114">1114</span>
+<span id="1115">1115</span>
+<span id="1116">1116</span>
+<span id="1117">1117</span>
+<span id="1118">1118</span>
+<span id="1119">1119</span>
+<span id="1120">1120</span>
+<span id="1121">1121</span>
+<span id="1122">1122</span>
+<span id="1123">1123</span>
+<span id="1124">1124</span>
+<span id="1125">1125</span>
+<span id="1126">1126</span>
+<span id="1127">1127</span>
+<span id="1128">1128</span>
+<span id="1129">1129</span>
+<span id="1130">1130</span>
+<span id="1131">1131</span>
+<span id="1132">1132</span>
+<span id="1133">1133</span>
+<span id="1134">1134</span>
+<span id="1135">1135</span>
+<span id="1136">1136</span>
+<span id="1137">1137</span>
+<span id="1138">1138</span>
+<span id="1139">1139</span>
+<span id="1140">1140</span>
+<span id="1141">1141</span>
+<span id="1142">1142</span>
+<span id="1143">1143</span>
+<span id="1144">1144</span>
+<span id="1145">1145</span>
+<span id="1146">1146</span>
+<span id="1147">1147</span>
+<span id="1148">1148</span>
+<span id="1149">1149</span>
+<span id="1150">1150</span>
+<span id="1151">1151</span>
+<span id="1152">1152</span>
+<span id="1153">1153</span>
+<span id="1154">1154</span>
+<span id="1155">1155</span>
+<span id="1156">1156</span>
+<span id="1157">1157</span>
+<span id="1158">1158</span>
+<span id="1159">1159</span>
+<span id="1160">1160</span>
+<span id="1161">1161</span>
+<span id="1162">1162</span>
+<span id="1163">1163</span>
+<span id="1164">1164</span>
+<span id="1165">1165</span>
+<span id="1166">1166</span>
+<span id="1167">1167</span>
+<span id="1168">1168</span>
+<span id="1169">1169</span>
+<span id="1170">1170</span>
+<span id="1171">1171</span>
+<span id="1172">1172</span>
+<span id="1173">1173</span>
+<span id="1174">1174</span>
+<span id="1175">1175</span>
+<span id="1176">1176</span>
+<span id="1177">1177</span>
+<span id="1178">1178</span>
+<span id="1179">1179</span>
+<span id="1180">1180</span>
+<span id="1181">1181</span>
+<span id="1182">1182</span>
+<span id="1183">1183</span>
+<span id="1184">1184</span>
+<span id="1185">1185</span>
+<span id="1186">1186</span>
+<span id="1187">1187</span>
+<span id="1188">1188</span>
+<span id="1189">1189</span>
+<span id="1190">1190</span>
+<span id="1191">1191</span>
+<span id="1192">1192</span>
+<span id="1193">1193</span>
+<span id="1194">1194</span>
+<span id="1195">1195</span>
+<span id="1196">1196</span>
+<span id="1197">1197</span>
+<span id="1198">1198</span>
+<span id="1199">1199</span>
+<span id="1200">1200</span>
+<span id="1201">1201</span>
+<span id="1202">1202</span>
+<span id="1203">1203</span>
+<span id="1204">1204</span>
+<span id="1205">1205</span>
+<span id="1206">1206</span>
+<span id="1207">1207</span>
+<span id="1208">1208</span>
+<span id="1209">1209</span>
+<span id="1210">1210</span>
+<span id="1211">1211</span>
+<span id="1212">1212</span>
+<span id="1213">1213</span>
+<span id="1214">1214</span>
+<span id="1215">1215</span>
+<span id="1216">1216</span>
+<span id="1217">1217</span>
+<span id="1218">1218</span>
+<span id="1219">1219</span>
+<span id="1220">1220</span>
+<span id="1221">1221</span>
+<span id="1222">1222</span>
+<span id="1223">1223</span>
+<span id="1224">1224</span>
+<span id="1225">1225</span>
+<span id="1226">1226</span>
+<span id="1227">1227</span>
+<span id="1228">1228</span>
+<span id="1229">1229</span>
+<span id="1230">1230</span>
+<span id="1231">1231</span>
+<span id="1232">1232</span>
+<span id="1233">1233</span>
+<span id="1234">1234</span>
+<span id="1235">1235</span>
+<span id="1236">1236</span>
+<span id="1237">1237</span>
+<span id="1238">1238</span>
+<span id="1239">1239</span>
+<span id="1240">1240</span>
+<span id="1241">1241</span>
+<span id="1242">1242</span>
+<span id="1243">1243</span>
+<span id="1244">1244</span>
+<span id="1245">1245</span>
+<span id="1246">1246</span>
+<span id="1247">1247</span>
+<span id="1248">1248</span>
+<span id="1249">1249</span>
+<span id="1250">1250</span>
+<span id="1251">1251</span>
+<span id="1252">1252</span>
+<span id="1253">1253</span>
+<span id="1254">1254</span>
+<span id="1255">1255</span>
+<span id="1256">1256</span>
+<span id="1257">1257</span>
+<span id="1258">1258</span>
+<span id="1259">1259</span>
+<span id="1260">1260</span>
+<span id="1261">1261</span>
+<span id="1262">1262</span>
+<span id="1263">1263</span>
+<span id="1264">1264</span>
+<span id="1265">1265</span>
+<span id="1266">1266</span>
+<span id="1267">1267</span>
+<span id="1268">1268</span>
+<span id="1269">1269</span>
+<span id="1270">1270</span>
+<span id="1271">1271</span>
+<span id="1272">1272</span>
+<span id="1273">1273</span>
+<span id="1274">1274</span>
+<span id="1275">1275</span>
+<span id="1276">1276</span>
+<span id="1277">1277</span>
+<span id="1278">1278</span>
+<span id="1279">1279</span>
+<span id="1280">1280</span>
+<span id="1281">1281</span>
+<span id="1282">1282</span>
+<span id="1283">1283</span>
+<span id="1284">1284</span>
+<span id="1285">1285</span>
+<span id="1286">1286</span>
+<span id="1287">1287</span>
+<span id="1288">1288</span>
+<span id="1289">1289</span>
+<span id="1290">1290</span>
+<span id="1291">1291</span>
+<span id="1292">1292</span>
+<span id="1293">1293</span>
+<span id="1294">1294</span>
+<span id="1295">1295</span>
+<span id="1296">1296</span>
+<span id="1297">1297</span>
+<span id="1298">1298</span>
+<span id="1299">1299</span>
+<span id="1300">1300</span>
+<span id="1301">1301</span>
+<span id="1302">1302</span>
+<span id="1303">1303</span>
+<span id="1304">1304</span>
+<span id="1305">1305</span>
+<span id="1306">1306</span>
+<span id="1307">1307</span>
+<span id="1308">1308</span>
+<span id="1309">1309</span>
+<span id="1310">1310</span>
+<span id="1311">1311</span>
+<span id="1312">1312</span>
+<span id="1313">1313</span>
+<span id="1314">1314</span>
+<span id="1315">1315</span>
+<span id="1316">1316</span>
+<span id="1317">1317</span>
+<span id="1318">1318</span>
+<span id="1319">1319</span>
+<span id="1320">1320</span>
+<span id="1321">1321</span>
+<span id="1322">1322</span>
+<span id="1323">1323</span>
+<span id="1324">1324</span>
+<span id="1325">1325</span>
+<span id="1326">1326</span>
+<span id="1327">1327</span>
+<span id="1328">1328</span>
+<span id="1329">1329</span>
+<span id="1330">1330</span>
+<span id="1331">1331</span>
+<span id="1332">1332</span>
+<span id="1333">1333</span>
+<span id="1334">1334</span>
+<span id="1335">1335</span>
+<span id="1336">1336</span>
+<span id="1337">1337</span>
+<span id="1338">1338</span>
+<span id="1339">1339</span>
+<span id="1340">1340</span>
+<span id="1341">1341</span>
+<span id="1342">1342</span>
+<span id="1343">1343</span>
+<span id="1344">1344</span>
+<span id="1345">1345</span>
+<span id="1346">1346</span>
+<span id="1347">1347</span>
+<span id="1348">1348</span>
+<span id="1349">1349</span>
+<span id="1350">1350</span>
+<span id="1351">1351</span>
+<span id="1352">1352</span>
+<span id="1353">1353</span>
+<span id="1354">1354</span>
+<span id="1355">1355</span>
+<span id="1356">1356</span>
+<span id="1357">1357</span>
+<span id="1358">1358</span>
+<span id="1359">1359</span>
+<span id="1360">1360</span>
+<span id="1361">1361</span>
+<span id="1362">1362</span>
+<span id="1363">1363</span>
+<span id="1364">1364</span>
+<span id="1365">1365</span>
+<span id="1366">1366</span>
+<span id="1367">1367</span>
+<span id="1368">1368</span>
+<span id="1369">1369</span>
+<span id="1370">1370</span>
+<span id="1371">1371</span>
+<span id="1372">1372</span>
+<span id="1373">1373</span>
+<span id="1374">1374</span>
+<span id="1375">1375</span>
+<span id="1376">1376</span>
+<span id="1377">1377</span>
+<span id="1378">1378</span>
+<span id="1379">1379</span>
+<span id="1380">1380</span>
+<span id="1381">1381</span>
+<span id="1382">1382</span>
+<span id="1383">1383</span>
+<span id="1384">1384</span>
+<span id="1385">1385</span>
+<span id="1386">1386</span>
+<span id="1387">1387</span>
+<span id="1388">1388</span>
+<span id="1389">1389</span>
+<span id="1390">1390</span>
+<span id="1391">1391</span>
+<span id="1392">1392</span>
+<span id="1393">1393</span>
+<span id="1394">1394</span>
+<span id="1395">1395</span>
+<span id="1396">1396</span>
+<span id="1397">1397</span>
+<span id="1398">1398</span>
+<span id="1399">1399</span>
+<span id="1400">1400</span>
+<span id="1401">1401</span>
+<span id="1402">1402</span>
+<span id="1403">1403</span>
+<span id="1404">1404</span>
+<span id="1405">1405</span>
+<span id="1406">1406</span>
+<span id="1407">1407</span>
+<span id="1408">1408</span>
+<span id="1409">1409</span>
+<span id="1410">1410</span>
+<span id="1411">1411</span>
+<span id="1412">1412</span>
+<span id="1413">1413</span>
+<span id="1414">1414</span>
+<span id="1415">1415</span>
+<span id="1416">1416</span>
+<span id="1417">1417</span>
+<span id="1418">1418</span>
+<span id="1419">1419</span>
+<span id="1420">1420</span>
+<span id="1421">1421</span>
+<span id="1422">1422</span>
+<span id="1423">1423</span>
+<span id="1424">1424</span>
+<span id="1425">1425</span>
+<span id="1426">1426</span>
+<span id="1427">1427</span>
+<span id="1428">1428</span>
+<span id="1429">1429</span>
+<span id="1430">1430</span>
+<span id="1431">1431</span>
+<span id="1432">1432</span>
+<span id="1433">1433</span>
+<span id="1434">1434</span>
+<span id="1435">1435</span>
+<span id="1436">1436</span>
+<span id="1437">1437</span>
+<span id="1438">1438</span>
+<span id="1439">1439</span>
+<span id="1440">1440</span>
+<span id="1441">1441</span>
+<span id="1442">1442</span>
+<span id="1443">1443</span>
+<span id="1444">1444</span>
+<span id="1445">1445</span>
+<span id="1446">1446</span>
+<span id="1447">1447</span>
+<span id="1448">1448</span>
+<span id="1449">1449</span>
+<span id="1450">1450</span>
+<span id="1451">1451</span>
+<span id="1452">1452</span>
+<span id="1453">1453</span>
+<span id="1454">1454</span>
+<span id="1455">1455</span>
+<span id="1456">1456</span>
+<span id="1457">1457</span>
+<span id="1458">1458</span>
+<span id="1459">1459</span>
+<span id="1460">1460</span>
+<span id="1461">1461</span>
+<span id="1462">1462</span>
+<span id="1463">1463</span>
+<span id="1464">1464</span>
+</pre><pre class="rust"><code><span class="attr">#[cfg(feature = <span class="string">&quot;std&quot;</span>)]
+</span><span class="kw">use </span><span class="kw">crate</span>::buf::{reader, Reader};
+<span class="kw">use </span><span class="kw">crate</span>::buf::{take, Chain, Take};
+<span class="attr">#[cfg(feature = <span class="string">&quot;std&quot;</span>)]
+</span><span class="kw">use crate</span>::{min_u64_usize, saturating_sub_usize_u64};
+<span class="kw">use crate</span>::{panic_advance, panic_does_not_fit};
+
+<span class="attr">#[cfg(feature = <span class="string">&quot;std&quot;</span>)]
+</span><span class="kw">use </span>std::io::IoSlice;
+
+<span class="kw">use </span>alloc::boxed::Box;
+
+<span class="macro">macro_rules! </span>buf_get_impl {
+ (<span class="macro-nonterminal">$this</span>:ident, <span class="macro-nonterminal">$typ</span>:tt::<span class="macro-nonterminal">$conv</span>:tt) =&gt; {{
+ <span class="kw">const </span>SIZE: usize = core::mem::size_of::&lt;<span class="macro-nonterminal">$typ</span>&gt;();
+
+ <span class="kw">if </span><span class="macro-nonterminal">$this</span>.remaining() &lt; SIZE {
+ panic_advance(SIZE, <span class="macro-nonterminal">$this</span>.remaining());
+ }
+
+ <span class="comment">// try to convert directly from the bytes
+ // this Option&lt;ret&gt; trick is to avoid keeping a borrow on self
+ // when advance() is called (mut borrow) and to call bytes() only once
+ </span><span class="kw">let </span>ret = <span class="macro-nonterminal">$this
+ </span>.chunk()
+ .get(..SIZE)
+ .map(|src| <span class="kw">unsafe </span>{ <span class="macro-nonterminal">$typ</span>::<span class="macro-nonterminal">$conv</span>(<span class="kw-2">*</span>(src <span class="kw">as </span><span class="kw-2">*const </span><span class="kw">_ as </span><span class="kw-2">*const </span>[<span class="kw">_</span>; SIZE])) });
+
+ <span class="kw">if let </span><span class="prelude-val">Some</span>(ret) = ret {
+ <span class="comment">// if the direct conversion was possible, advance and return
+ </span><span class="macro-nonterminal">$this</span>.advance(SIZE);
+ <span class="kw">return </span>ret;
+ } <span class="kw">else </span>{
+ <span class="comment">// if not we copy the bytes in a temp buffer then convert
+ </span><span class="kw">let </span><span class="kw-2">mut </span>buf = [<span class="number">0</span>; SIZE];
+ <span class="macro-nonterminal">$this</span>.copy_to_slice(<span class="kw-2">&amp;mut </span>buf); <span class="comment">// (do the advance)
+ </span><span class="kw">return </span><span class="macro-nonterminal">$typ</span>::<span class="macro-nonterminal">$conv</span>(buf);
+ }
+ }};
+ (le =&gt; <span class="macro-nonterminal">$this</span>:ident, <span class="macro-nonterminal">$typ</span>:tt, <span class="macro-nonterminal">$len_to_read</span>:expr) =&gt; {{
+ <span class="kw">const </span>SIZE: usize = core::mem::size_of::&lt;<span class="macro-nonterminal">$typ</span>&gt;();
+
+ <span class="comment">// The same trick as above does not improve the best case speed.
+ // It seems to be linked to the way the method is optimised by the compiler
+ </span><span class="kw">let </span><span class="kw-2">mut </span>buf = [<span class="number">0</span>; SIZE];
+
+ <span class="kw">let </span>subslice = <span class="kw">match </span>buf.get_mut(..<span class="macro-nonterminal">$len_to_read</span>) {
+ <span class="prelude-val">Some</span>(subslice) =&gt; subslice,
+ <span class="prelude-val">None </span>=&gt; panic_does_not_fit(SIZE, <span class="macro-nonterminal">$len_to_read</span>),
+ };
+
+ <span class="macro-nonterminal">$this</span>.copy_to_slice(subslice);
+ <span class="kw">return </span><span class="macro-nonterminal">$typ::from_le_bytes</span>(buf);
+ }};
+ (be =&gt; <span class="macro-nonterminal">$this</span>:ident, <span class="macro-nonterminal">$typ</span>:tt, <span class="macro-nonterminal">$len_to_read</span>:expr) =&gt; {{
+ <span class="kw">const </span>SIZE: usize = core::mem::size_of::&lt;<span class="macro-nonterminal">$typ</span>&gt;();
+
+ <span class="kw">let </span>slice_at = <span class="kw">match </span>SIZE.checked_sub(<span class="macro-nonterminal">$len_to_read</span>) {
+ <span class="prelude-val">Some</span>(slice_at) =&gt; slice_at,
+ <span class="prelude-val">None </span>=&gt; panic_does_not_fit(SIZE, <span class="macro-nonterminal">$len_to_read</span>),
+ };
+
+ <span class="kw">let </span><span class="kw-2">mut </span>buf = [<span class="number">0</span>; SIZE];
+ <span class="macro-nonterminal">$this</span>.copy_to_slice(<span class="kw-2">&amp;mut </span>buf[slice_at..]);
+ <span class="kw">return </span><span class="macro-nonterminal">$typ::from_be_bytes</span>(buf);
+ }};
+}
+
+<span class="doccomment">/// Read bytes from a buffer.
+///
+/// A buffer stores bytes in memory such that read operations are infallible.
+/// The underlying storage may or may not be in contiguous memory. A `Buf` value
+/// is a cursor into the buffer. Reading from `Buf` advances the cursor
+/// position. It can be thought of as an efficient `Iterator` for collections of
+/// bytes.
+///
+/// The simplest `Buf` is a `&amp;[u8]`.
+///
+/// ```
+/// use bytes::Buf;
+///
+/// let mut buf = &amp;b&quot;hello world&quot;[..];
+///
+/// assert_eq!(b&#39;h&#39;, buf.get_u8());
+/// assert_eq!(b&#39;e&#39;, buf.get_u8());
+/// assert_eq!(b&#39;l&#39;, buf.get_u8());
+///
+/// let mut rest = [0; 8];
+/// buf.copy_to_slice(&amp;mut rest);
+///
+/// assert_eq!(&amp;rest[..], &amp;b&quot;lo world&quot;[..]);
+/// ```
+</span><span class="kw">pub trait </span>Buf {
+ <span class="doccomment">/// Returns the number of bytes between the current position and the end of
+ /// the buffer.
+ ///
+ /// This value is greater than or equal to the length of the slice returned
+ /// by `chunk()`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;hello world&quot;[..];
+ ///
+ /// assert_eq!(buf.remaining(), 11);
+ ///
+ /// buf.get_u8();
+ ///
+ /// assert_eq!(buf.remaining(), 10);
+ /// ```
+ ///
+ /// # Implementer notes
+ ///
+ /// Implementations of `remaining` should ensure that the return value does
+ /// not change unless a call is made to `advance` or any other function that
+ /// is documented to change the `Buf`&#39;s current position.
+ </span><span class="kw">fn </span>remaining(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize;
+
+ <span class="doccomment">/// Returns a slice starting at the current position and of length between 0
+ /// and `Buf::remaining()`. Note that this *can* return shorter slice (this allows
+ /// non-continuous internal representation).
+ ///
+ /// This is a lower level function. Most operations are done with other
+ /// functions.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;hello world&quot;[..];
+ ///
+ /// assert_eq!(buf.chunk(), &amp;b&quot;hello world&quot;[..]);
+ ///
+ /// buf.advance(6);
+ ///
+ /// assert_eq!(buf.chunk(), &amp;b&quot;world&quot;[..]);
+ /// ```
+ ///
+ /// # Implementer notes
+ ///
+ /// This function should never panic. Once the end of the buffer is reached,
+ /// i.e., `Buf::remaining` returns 0, calls to `chunk()` should return an
+ /// empty slice.
+ </span><span class="comment">// The `chunk` method was previously called `bytes`. This alias makes the rename
+ // more easily discoverable.
+ </span><span class="attr">#[cfg_attr(docsrs, doc(alias = <span class="string">&quot;bytes&quot;</span>))]
+ </span><span class="kw">fn </span>chunk(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>[u8];
+
+ <span class="doccomment">/// Fills `dst` with potentially multiple slices starting at `self`&#39;s
+ /// current position.
+ ///
+ /// If the `Buf` is backed by disjoint slices of bytes, `chunk_vectored` enables
+ /// fetching more than one slice at once. `dst` is a slice of `IoSlice`
+ /// references, enabling the slice to be directly used with [`writev`]
+ /// without any further conversion. The sum of the lengths of all the
+ /// buffers in `dst` will be less than or equal to `Buf::remaining()`.
+ ///
+ /// The entries in `dst` will be overwritten, but the data **contained** by
+ /// the slices **will not** be modified. If `chunk_vectored` does not fill every
+ /// entry in `dst`, then `dst` is guaranteed to contain all remaining slices
+ /// in `self.
+ ///
+ /// This is a lower level function. Most operations are done with other
+ /// functions.
+ ///
+ /// # Implementer notes
+ ///
+ /// This function should never panic. Once the end of the buffer is reached,
+ /// i.e., `Buf::remaining` returns 0, calls to `chunk_vectored` must return 0
+ /// without mutating `dst`.
+ ///
+ /// Implementations should also take care to properly handle being called
+ /// with `dst` being a zero length slice.
+ ///
+ /// [`writev`]: http://man7.org/linux/man-pages/man2/readv.2.html
+ </span><span class="attr">#[cfg(feature = <span class="string">&quot;std&quot;</span>)]
+ #[cfg_attr(docsrs, doc(cfg(feature = <span class="string">&quot;std&quot;</span>)))]
+ </span><span class="kw">fn </span>chunks_vectored&lt;<span class="lifetime">&#39;a</span>&gt;(<span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span><span class="self">self</span>, dst: <span class="kw-2">&amp;mut </span>[IoSlice&lt;<span class="lifetime">&#39;a</span>&gt;]) -&gt; usize {
+ <span class="kw">if </span>dst.is_empty() {
+ <span class="kw">return </span><span class="number">0</span>;
+ }
+
+ <span class="kw">if </span><span class="self">self</span>.has_remaining() {
+ dst[<span class="number">0</span>] = IoSlice::new(<span class="self">self</span>.chunk());
+ <span class="number">1
+ </span>} <span class="kw">else </span>{
+ <span class="number">0
+ </span>}
+ }
+
+ <span class="doccomment">/// Advance the internal cursor of the Buf
+ ///
+ /// The next call to `chunk()` will return a slice starting `cnt` bytes
+ /// further into the underlying buffer.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;hello world&quot;[..];
+ ///
+ /// assert_eq!(buf.chunk(), &amp;b&quot;hello world&quot;[..]);
+ ///
+ /// buf.advance(6);
+ ///
+ /// assert_eq!(buf.chunk(), &amp;b&quot;world&quot;[..]);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function **may** panic if `cnt &gt; self.remaining()`.
+ ///
+ /// # Implementer notes
+ ///
+ /// It is recommended for implementations of `advance` to panic if `cnt &gt;
+ /// self.remaining()`. If the implementation does not panic, the call must
+ /// behave as if `cnt == self.remaining()`.
+ ///
+ /// A call with `cnt == 0` should never panic and be a no-op.
+ </span><span class="kw">fn </span>advance(<span class="kw-2">&amp;mut </span><span class="self">self</span>, cnt: usize);
+
+ <span class="doccomment">/// Returns true if there are any more bytes to consume
+ ///
+ /// This is equivalent to `self.remaining() != 0`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;a&quot;[..];
+ ///
+ /// assert!(buf.has_remaining());
+ ///
+ /// buf.get_u8();
+ ///
+ /// assert!(!buf.has_remaining());
+ /// ```
+ </span><span class="kw">fn </span>has_remaining(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; bool {
+ <span class="self">self</span>.remaining() &gt; <span class="number">0
+ </span>}
+
+ <span class="doccomment">/// Copies bytes from `self` into `dst`.
+ ///
+ /// The cursor is advanced by the number of bytes copied. `self` must have
+ /// enough remaining bytes to fill `dst`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;hello world&quot;[..];
+ /// let mut dst = [0; 5];
+ ///
+ /// buf.copy_to_slice(&amp;mut dst);
+ /// assert_eq!(&amp;b&quot;hello&quot;[..], &amp;dst);
+ /// assert_eq!(6, buf.remaining());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if `self.remaining() &lt; dst.len()`.
+ </span><span class="kw">fn </span>copy_to_slice(<span class="kw-2">&amp;mut </span><span class="self">self</span>, <span class="kw-2">mut </span>dst: <span class="kw-2">&amp;mut </span>[u8]) {
+ <span class="kw">if </span><span class="self">self</span>.remaining() &lt; dst.len() {
+ panic_advance(dst.len(), <span class="self">self</span>.remaining());
+ }
+
+ <span class="kw">while </span>!dst.is_empty() {
+ <span class="kw">let </span>src = <span class="self">self</span>.chunk();
+ <span class="kw">let </span>cnt = usize::min(src.len(), dst.len());
+
+ dst[..cnt].copy_from_slice(<span class="kw-2">&amp;</span>src[..cnt]);
+ dst = <span class="kw-2">&amp;mut </span>dst[cnt..];
+
+ <span class="self">self</span>.advance(cnt);
+ }
+ }
+
+ <span class="doccomment">/// Gets an unsigned 8 bit integer from `self`.
+ ///
+ /// The current position is advanced by 1.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x08 hello&quot;[..];
+ /// assert_eq!(8, buf.get_u8());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is no more remaining data in `self`.
+ </span><span class="kw">fn </span>get_u8(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u8 {
+ <span class="kw">if </span><span class="self">self</span>.remaining() &lt; <span class="number">1 </span>{
+ panic_advance(<span class="number">1</span>, <span class="number">0</span>);
+ }
+ <span class="kw">let </span>ret = <span class="self">self</span>.chunk()[<span class="number">0</span>];
+ <span class="self">self</span>.advance(<span class="number">1</span>);
+ ret
+ }
+
+ <span class="doccomment">/// Gets a signed 8 bit integer from `self`.
+ ///
+ /// The current position is advanced by 1.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x08 hello&quot;[..];
+ /// assert_eq!(8, buf.get_i8());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is no more remaining data in `self`.
+ </span><span class="kw">fn </span>get_i8(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; i8 {
+ <span class="kw">if </span><span class="self">self</span>.remaining() &lt; <span class="number">1 </span>{
+ panic_advance(<span class="number">1</span>, <span class="number">0</span>);
+ }
+ <span class="kw">let </span>ret = <span class="self">self</span>.chunk()[<span class="number">0</span>] <span class="kw">as </span>i8;
+ <span class="self">self</span>.advance(<span class="number">1</span>);
+ ret
+ }
+
+ <span class="doccomment">/// Gets an unsigned 16 bit integer from `self` in big-endian byte order.
+ ///
+ /// The current position is advanced by 2.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x08\x09 hello&quot;[..];
+ /// assert_eq!(0x0809, buf.get_u16());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_u16(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u16 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, u16::from_be_bytes);
+ }
+
+ <span class="doccomment">/// Gets an unsigned 16 bit integer from `self` in little-endian byte order.
+ ///
+ /// The current position is advanced by 2.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x09\x08 hello&quot;[..];
+ /// assert_eq!(0x0809, buf.get_u16_le());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_u16_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u16 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, u16::from_le_bytes);
+ }
+
+ <span class="doccomment">/// Gets an unsigned 16 bit integer from `self` in native-endian byte order.
+ ///
+ /// The current position is advanced by 2.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf: &amp;[u8] = match cfg!(target_endian = &quot;big&quot;) {
+ /// true =&gt; b&quot;\x08\x09 hello&quot;,
+ /// false =&gt; b&quot;\x09\x08 hello&quot;,
+ /// };
+ /// assert_eq!(0x0809, buf.get_u16_ne());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_u16_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u16 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, u16::from_ne_bytes);
+ }
+
+ <span class="doccomment">/// Gets a signed 16 bit integer from `self` in big-endian byte order.
+ ///
+ /// The current position is advanced by 2.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x08\x09 hello&quot;[..];
+ /// assert_eq!(0x0809, buf.get_i16());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_i16(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; i16 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, i16::from_be_bytes);
+ }
+
+ <span class="doccomment">/// Gets a signed 16 bit integer from `self` in little-endian byte order.
+ ///
+ /// The current position is advanced by 2.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x09\x08 hello&quot;[..];
+ /// assert_eq!(0x0809, buf.get_i16_le());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_i16_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; i16 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, i16::from_le_bytes);
+ }
+
+ <span class="doccomment">/// Gets a signed 16 bit integer from `self` in native-endian byte order.
+ ///
+ /// The current position is advanced by 2.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf: &amp;[u8] = match cfg!(target_endian = &quot;big&quot;) {
+ /// true =&gt; b&quot;\x08\x09 hello&quot;,
+ /// false =&gt; b&quot;\x09\x08 hello&quot;,
+ /// };
+ /// assert_eq!(0x0809, buf.get_i16_ne());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_i16_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; i16 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, i16::from_ne_bytes);
+ }
+
+ <span class="doccomment">/// Gets an unsigned 32 bit integer from `self` in the big-endian byte order.
+ ///
+ /// The current position is advanced by 4.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x08\x09\xA0\xA1 hello&quot;[..];
+ /// assert_eq!(0x0809A0A1, buf.get_u32());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_u32(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u32 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, u32::from_be_bytes);
+ }
+
+ <span class="doccomment">/// Gets an unsigned 32 bit integer from `self` in the little-endian byte order.
+ ///
+ /// The current position is advanced by 4.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\xA1\xA0\x09\x08 hello&quot;[..];
+ /// assert_eq!(0x0809A0A1, buf.get_u32_le());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_u32_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u32 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, u32::from_le_bytes);
+ }
+
+ <span class="doccomment">/// Gets an unsigned 32 bit integer from `self` in native-endian byte order.
+ ///
+ /// The current position is advanced by 4.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf: &amp;[u8] = match cfg!(target_endian = &quot;big&quot;) {
+ /// true =&gt; b&quot;\x08\x09\xA0\xA1 hello&quot;,
+ /// false =&gt; b&quot;\xA1\xA0\x09\x08 hello&quot;,
+ /// };
+ /// assert_eq!(0x0809A0A1, buf.get_u32_ne());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_u32_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u32 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, u32::from_ne_bytes);
+ }
+
+ <span class="doccomment">/// Gets a signed 32 bit integer from `self` in big-endian byte order.
+ ///
+ /// The current position is advanced by 4.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x08\x09\xA0\xA1 hello&quot;[..];
+ /// assert_eq!(0x0809A0A1, buf.get_i32());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_i32(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; i32 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, i32::from_be_bytes);
+ }
+
+ <span class="doccomment">/// Gets a signed 32 bit integer from `self` in little-endian byte order.
+ ///
+ /// The current position is advanced by 4.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\xA1\xA0\x09\x08 hello&quot;[..];
+ /// assert_eq!(0x0809A0A1, buf.get_i32_le());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_i32_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; i32 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, i32::from_le_bytes);
+ }
+
+ <span class="doccomment">/// Gets a signed 32 bit integer from `self` in native-endian byte order.
+ ///
+ /// The current position is advanced by 4.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf: &amp;[u8] = match cfg!(target_endian = &quot;big&quot;) {
+ /// true =&gt; b&quot;\x08\x09\xA0\xA1 hello&quot;,
+ /// false =&gt; b&quot;\xA1\xA0\x09\x08 hello&quot;,
+ /// };
+ /// assert_eq!(0x0809A0A1, buf.get_i32_ne());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_i32_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; i32 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, i32::from_ne_bytes);
+ }
+
+ <span class="doccomment">/// Gets an unsigned 64 bit integer from `self` in big-endian byte order.
+ ///
+ /// The current position is advanced by 8.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x01\x02\x03\x04\x05\x06\x07\x08 hello&quot;[..];
+ /// assert_eq!(0x0102030405060708, buf.get_u64());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_u64(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u64 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, u64::from_be_bytes);
+ }
+
+ <span class="doccomment">/// Gets an unsigned 64 bit integer from `self` in little-endian byte order.
+ ///
+ /// The current position is advanced by 8.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x08\x07\x06\x05\x04\x03\x02\x01 hello&quot;[..];
+ /// assert_eq!(0x0102030405060708, buf.get_u64_le());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_u64_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u64 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, u64::from_le_bytes);
+ }
+
+ <span class="doccomment">/// Gets an unsigned 64 bit integer from `self` in native-endian byte order.
+ ///
+ /// The current position is advanced by 8.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf: &amp;[u8] = match cfg!(target_endian = &quot;big&quot;) {
+ /// true =&gt; b&quot;\x01\x02\x03\x04\x05\x06\x07\x08 hello&quot;,
+ /// false =&gt; b&quot;\x08\x07\x06\x05\x04\x03\x02\x01 hello&quot;,
+ /// };
+ /// assert_eq!(0x0102030405060708, buf.get_u64_ne());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_u64_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u64 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, u64::from_ne_bytes);
+ }
+
+ <span class="doccomment">/// Gets a signed 64 bit integer from `self` in big-endian byte order.
+ ///
+ /// The current position is advanced by 8.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x01\x02\x03\x04\x05\x06\x07\x08 hello&quot;[..];
+ /// assert_eq!(0x0102030405060708, buf.get_i64());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_i64(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; i64 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, i64::from_be_bytes);
+ }
+
+ <span class="doccomment">/// Gets a signed 64 bit integer from `self` in little-endian byte order.
+ ///
+ /// The current position is advanced by 8.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x08\x07\x06\x05\x04\x03\x02\x01 hello&quot;[..];
+ /// assert_eq!(0x0102030405060708, buf.get_i64_le());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_i64_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; i64 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, i64::from_le_bytes);
+ }
+
+ <span class="doccomment">/// Gets a signed 64 bit integer from `self` in native-endian byte order.
+ ///
+ /// The current position is advanced by 8.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf: &amp;[u8] = match cfg!(target_endian = &quot;big&quot;) {
+ /// true =&gt; b&quot;\x01\x02\x03\x04\x05\x06\x07\x08 hello&quot;,
+ /// false =&gt; b&quot;\x08\x07\x06\x05\x04\x03\x02\x01 hello&quot;,
+ /// };
+ /// assert_eq!(0x0102030405060708, buf.get_i64_ne());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_i64_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; i64 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, i64::from_ne_bytes);
+ }
+
+ <span class="doccomment">/// Gets an unsigned 128 bit integer from `self` in big-endian byte order.
+ ///
+ /// The current position is advanced by 16.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello&quot;[..];
+ /// assert_eq!(0x01020304050607080910111213141516, buf.get_u128());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_u128(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u128 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, u128::from_be_bytes);
+ }
+
+ <span class="doccomment">/// Gets an unsigned 128 bit integer from `self` in little-endian byte order.
+ ///
+ /// The current position is advanced by 16.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello&quot;[..];
+ /// assert_eq!(0x01020304050607080910111213141516, buf.get_u128_le());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_u128_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u128 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, u128::from_le_bytes);
+ }
+
+ <span class="doccomment">/// Gets an unsigned 128 bit integer from `self` in native-endian byte order.
+ ///
+ /// The current position is advanced by 16.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf: &amp;[u8] = match cfg!(target_endian = &quot;big&quot;) {
+ /// true =&gt; b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello&quot;,
+ /// false =&gt; b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello&quot;,
+ /// };
+ /// assert_eq!(0x01020304050607080910111213141516, buf.get_u128_ne());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_u128_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u128 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, u128::from_ne_bytes);
+ }
+
+ <span class="doccomment">/// Gets a signed 128 bit integer from `self` in big-endian byte order.
+ ///
+ /// The current position is advanced by 16.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello&quot;[..];
+ /// assert_eq!(0x01020304050607080910111213141516, buf.get_i128());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_i128(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; i128 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, i128::from_be_bytes);
+ }
+
+ <span class="doccomment">/// Gets a signed 128 bit integer from `self` in little-endian byte order.
+ ///
+ /// The current position is advanced by 16.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello&quot;[..];
+ /// assert_eq!(0x01020304050607080910111213141516, buf.get_i128_le());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_i128_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; i128 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, i128::from_le_bytes);
+ }
+
+ <span class="doccomment">/// Gets a signed 128 bit integer from `self` in native-endian byte order.
+ ///
+ /// The current position is advanced by 16.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf: &amp;[u8] = match cfg!(target_endian = &quot;big&quot;) {
+ /// true =&gt; b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello&quot;,
+ /// false =&gt; b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello&quot;,
+ /// };
+ /// assert_eq!(0x01020304050607080910111213141516, buf.get_i128_ne());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_i128_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; i128 {
+ <span class="macro">buf_get_impl!</span>(<span class="self">self</span>, i128::from_ne_bytes);
+ }
+
+ <span class="doccomment">/// Gets an unsigned n-byte integer from `self` in big-endian byte order.
+ ///
+ /// The current position is advanced by `nbytes`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x01\x02\x03 hello&quot;[..];
+ /// assert_eq!(0x010203, buf.get_uint(3));
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_uint(<span class="kw-2">&amp;mut </span><span class="self">self</span>, nbytes: usize) -&gt; u64 {
+ <span class="macro">buf_get_impl!</span>(be =&gt; <span class="self">self</span>, u64, nbytes);
+ }
+
+ <span class="doccomment">/// Gets an unsigned n-byte integer from `self` in little-endian byte order.
+ ///
+ /// The current position is advanced by `nbytes`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x03\x02\x01 hello&quot;[..];
+ /// assert_eq!(0x010203, buf.get_uint_le(3));
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_uint_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>, nbytes: usize) -&gt; u64 {
+ <span class="macro">buf_get_impl!</span>(le =&gt; <span class="self">self</span>, u64, nbytes);
+ }
+
+ <span class="doccomment">/// Gets an unsigned n-byte integer from `self` in native-endian byte order.
+ ///
+ /// The current position is advanced by `nbytes`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf: &amp;[u8] = match cfg!(target_endian = &quot;big&quot;) {
+ /// true =&gt; b&quot;\x01\x02\x03 hello&quot;,
+ /// false =&gt; b&quot;\x03\x02\x01 hello&quot;,
+ /// };
+ /// assert_eq!(0x010203, buf.get_uint_ne(3));
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`, or
+ /// if `nbytes` is greater than 8.
+ </span><span class="kw">fn </span>get_uint_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>, nbytes: usize) -&gt; u64 {
+ <span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="self">self</span>.get_uint(nbytes)
+ } <span class="kw">else </span>{
+ <span class="self">self</span>.get_uint_le(nbytes)
+ }
+ }
+
+ <span class="doccomment">/// Gets a signed n-byte integer from `self` in big-endian byte order.
+ ///
+ /// The current position is advanced by `nbytes`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x01\x02\x03 hello&quot;[..];
+ /// assert_eq!(0x010203, buf.get_int(3));
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`, or
+ /// if `nbytes` is greater than 8.
+ </span><span class="kw">fn </span>get_int(<span class="kw-2">&amp;mut </span><span class="self">self</span>, nbytes: usize) -&gt; i64 {
+ <span class="macro">buf_get_impl!</span>(be =&gt; <span class="self">self</span>, i64, nbytes);
+ }
+
+ <span class="doccomment">/// Gets a signed n-byte integer from `self` in little-endian byte order.
+ ///
+ /// The current position is advanced by `nbytes`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x03\x02\x01 hello&quot;[..];
+ /// assert_eq!(0x010203, buf.get_int_le(3));
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`, or
+ /// if `nbytes` is greater than 8.
+ </span><span class="kw">fn </span>get_int_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>, nbytes: usize) -&gt; i64 {
+ <span class="macro">buf_get_impl!</span>(le =&gt; <span class="self">self</span>, i64, nbytes);
+ }
+
+ <span class="doccomment">/// Gets a signed n-byte integer from `self` in native-endian byte order.
+ ///
+ /// The current position is advanced by `nbytes`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf: &amp;[u8] = match cfg!(target_endian = &quot;big&quot;) {
+ /// true =&gt; b&quot;\x01\x02\x03 hello&quot;,
+ /// false =&gt; b&quot;\x03\x02\x01 hello&quot;,
+ /// };
+ /// assert_eq!(0x010203, buf.get_int_ne(3));
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`, or
+ /// if `nbytes` is greater than 8.
+ </span><span class="kw">fn </span>get_int_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>, nbytes: usize) -&gt; i64 {
+ <span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="self">self</span>.get_int(nbytes)
+ } <span class="kw">else </span>{
+ <span class="self">self</span>.get_int_le(nbytes)
+ }
+ }
+
+ <span class="doccomment">/// Gets an IEEE754 single-precision (4 bytes) floating point number from
+ /// `self` in big-endian byte order.
+ ///
+ /// The current position is advanced by 4.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x3F\x99\x99\x9A hello&quot;[..];
+ /// assert_eq!(1.2f32, buf.get_f32());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_f32(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; f32 {
+ f32::from_bits(<span class="self">self</span>.get_u32())
+ }
+
+ <span class="doccomment">/// Gets an IEEE754 single-precision (4 bytes) floating point number from
+ /// `self` in little-endian byte order.
+ ///
+ /// The current position is advanced by 4.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x9A\x99\x99\x3F hello&quot;[..];
+ /// assert_eq!(1.2f32, buf.get_f32_le());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_f32_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; f32 {
+ f32::from_bits(<span class="self">self</span>.get_u32_le())
+ }
+
+ <span class="doccomment">/// Gets an IEEE754 single-precision (4 bytes) floating point number from
+ /// `self` in native-endian byte order.
+ ///
+ /// The current position is advanced by 4.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf: &amp;[u8] = match cfg!(target_endian = &quot;big&quot;) {
+ /// true =&gt; b&quot;\x3F\x99\x99\x9A hello&quot;,
+ /// false =&gt; b&quot;\x9A\x99\x99\x3F hello&quot;,
+ /// };
+ /// assert_eq!(1.2f32, buf.get_f32_ne());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_f32_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; f32 {
+ f32::from_bits(<span class="self">self</span>.get_u32_ne())
+ }
+
+ <span class="doccomment">/// Gets an IEEE754 double-precision (8 bytes) floating point number from
+ /// `self` in big-endian byte order.
+ ///
+ /// The current position is advanced by 8.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x3F\xF3\x33\x33\x33\x33\x33\x33 hello&quot;[..];
+ /// assert_eq!(1.2f64, buf.get_f64());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_f64(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; f64 {
+ f64::from_bits(<span class="self">self</span>.get_u64())
+ }
+
+ <span class="doccomment">/// Gets an IEEE754 double-precision (8 bytes) floating point number from
+ /// `self` in little-endian byte order.
+ ///
+ /// The current position is advanced by 8.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = &amp;b&quot;\x33\x33\x33\x33\x33\x33\xF3\x3F hello&quot;[..];
+ /// assert_eq!(1.2f64, buf.get_f64_le());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_f64_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; f64 {
+ f64::from_bits(<span class="self">self</span>.get_u64_le())
+ }
+
+ <span class="doccomment">/// Gets an IEEE754 double-precision (8 bytes) floating point number from
+ /// `self` in native-endian byte order.
+ ///
+ /// The current position is advanced by 8.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf: &amp;[u8] = match cfg!(target_endian = &quot;big&quot;) {
+ /// true =&gt; b&quot;\x3F\xF3\x33\x33\x33\x33\x33\x33 hello&quot;,
+ /// false =&gt; b&quot;\x33\x33\x33\x33\x33\x33\xF3\x3F hello&quot;,
+ /// };
+ /// assert_eq!(1.2f64, buf.get_f64_ne());
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining data in `self`.
+ </span><span class="kw">fn </span>get_f64_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; f64 {
+ f64::from_bits(<span class="self">self</span>.get_u64_ne())
+ }
+
+ <span class="doccomment">/// Consumes `len` bytes inside self and returns new instance of `Bytes`
+ /// with this data.
+ ///
+ /// This function may be optimized by the underlying type to avoid actual
+ /// copies. For example, `Bytes` implementation will do a shallow copy
+ /// (ref-count increment).
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let bytes = (&amp;b&quot;hello world&quot;[..]).copy_to_bytes(5);
+ /// assert_eq!(&amp;bytes[..], &amp;b&quot;hello&quot;[..]);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if `len &gt; self.remaining()`.
+ </span><span class="kw">fn </span>copy_to_bytes(<span class="kw-2">&amp;mut </span><span class="self">self</span>, len: usize) -&gt; <span class="kw">crate</span>::Bytes {
+ <span class="kw">use </span><span class="kw">super</span>::BufMut;
+
+ <span class="kw">if </span><span class="self">self</span>.remaining() &lt; len {
+ panic_advance(len, <span class="self">self</span>.remaining());
+ }
+
+ <span class="kw">let </span><span class="kw-2">mut </span>ret = <span class="kw">crate</span>::BytesMut::with_capacity(len);
+ ret.put(<span class="self">self</span>.take(len));
+ ret.freeze()
+ }
+
+ <span class="doccomment">/// Creates an adaptor which will read at most `limit` bytes from `self`.
+ ///
+ /// This function returns a new instance of `Buf` which will read at most
+ /// `limit` bytes.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::{Buf, BufMut};
+ ///
+ /// let mut buf = b&quot;hello world&quot;[..].take(5);
+ /// let mut dst = vec![];
+ ///
+ /// dst.put(&amp;mut buf);
+ /// assert_eq!(dst, b&quot;hello&quot;);
+ ///
+ /// let mut buf = buf.into_inner();
+ /// dst.clear();
+ /// dst.put(&amp;mut buf);
+ /// assert_eq!(dst, b&quot; world&quot;);
+ /// ```
+ </span><span class="kw">fn </span>take(<span class="self">self</span>, limit: usize) -&gt; Take&lt;<span class="self">Self</span>&gt;
+ <span class="kw">where
+ </span><span class="self">Self</span>: Sized,
+ {
+ take::new(<span class="self">self</span>, limit)
+ }
+
+ <span class="doccomment">/// Creates an adaptor which will chain this buffer with another.
+ ///
+ /// The returned `Buf` instance will first consume all bytes from `self`.
+ /// Afterwards the output is equivalent to the output of next.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut chain = b&quot;hello &quot;[..].chain(&amp;b&quot;world&quot;[..]);
+ ///
+ /// let full = chain.copy_to_bytes(11);
+ /// assert_eq!(full.chunk(), b&quot;hello world&quot;);
+ /// ```
+ </span><span class="kw">fn </span>chain&lt;U: Buf&gt;(<span class="self">self</span>, next: U) -&gt; Chain&lt;<span class="self">Self</span>, U&gt;
+ <span class="kw">where
+ </span><span class="self">Self</span>: Sized,
+ {
+ Chain::new(<span class="self">self</span>, next)
+ }
+
+ <span class="doccomment">/// Creates an adaptor which implements the `Read` trait for `self`.
+ ///
+ /// This function returns a new value which implements `Read` by adapting
+ /// the `Read` trait functions to the `Buf` trait functions. Given that
+ /// `Buf` operations are infallible, none of the `Read` functions will
+ /// return with `Err`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::{Bytes, Buf};
+ /// use std::io::Read;
+ ///
+ /// let buf = Bytes::from(&quot;hello world&quot;);
+ ///
+ /// let mut reader = buf.reader();
+ /// let mut dst = [0; 1024];
+ ///
+ /// let num = reader.read(&amp;mut dst).unwrap();
+ ///
+ /// assert_eq!(11, num);
+ /// assert_eq!(&amp;dst[..11], &amp;b&quot;hello world&quot;[..]);
+ /// ```
+ </span><span class="attr">#[cfg(feature = <span class="string">&quot;std&quot;</span>)]
+ #[cfg_attr(docsrs, doc(cfg(feature = <span class="string">&quot;std&quot;</span>)))]
+ </span><span class="kw">fn </span>reader(<span class="self">self</span>) -&gt; Reader&lt;<span class="self">Self</span>&gt;
+ <span class="kw">where
+ </span><span class="self">Self</span>: Sized,
+ {
+ reader::new(<span class="self">self</span>)
+ }
+}
+
+<span class="macro">macro_rules! </span>deref_forward_buf {
+ () =&gt; {
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>remaining(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
+ (<span class="kw-2">**</span><span class="self">self</span>).remaining()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>chunk(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>[u8] {
+ (<span class="kw-2">**</span><span class="self">self</span>).chunk()
+ }
+
+ <span class="attr">#[cfg(feature = <span class="string">&quot;std&quot;</span>)]
+ #[inline]
+ </span><span class="kw">fn </span>chunks_vectored&lt;<span class="lifetime">&#39;b</span>&gt;(<span class="kw-2">&amp;</span><span class="lifetime">&#39;b </span><span class="self">self</span>, dst: <span class="kw-2">&amp;mut </span>[IoSlice&lt;<span class="lifetime">&#39;b</span>&gt;]) -&gt; usize {
+ (<span class="kw-2">**</span><span class="self">self</span>).chunks_vectored(dst)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>advance(<span class="kw-2">&amp;mut </span><span class="self">self</span>, cnt: usize) {
+ (<span class="kw-2">**</span><span class="self">self</span>).advance(cnt)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>has_remaining(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; bool {
+ (<span class="kw-2">**</span><span class="self">self</span>).has_remaining()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>copy_to_slice(<span class="kw-2">&amp;mut </span><span class="self">self</span>, dst: <span class="kw-2">&amp;mut </span>[u8]) {
+ (<span class="kw-2">**</span><span class="self">self</span>).copy_to_slice(dst)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_u8(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u8 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_u8()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_i8(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; i8 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_i8()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_u16(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u16 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_u16()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_u16_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u16 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_u16_le()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_u16_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u16 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_u16_ne()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_i16(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; i16 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_i16()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_i16_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; i16 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_i16_le()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_i16_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; i16 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_i16_ne()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_u32(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u32 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_u32()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_u32_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u32 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_u32_le()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_u32_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u32 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_u32_ne()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_i32(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; i32 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_i32()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_i32_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; i32 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_i32_le()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_i32_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; i32 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_i32_ne()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_u64(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u64 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_u64()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_u64_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u64 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_u64_le()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_u64_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u64 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_u64_ne()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_i64(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; i64 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_i64()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_i64_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; i64 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_i64_le()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_i64_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; i64 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_i64_ne()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_uint(<span class="kw-2">&amp;mut </span><span class="self">self</span>, nbytes: usize) -&gt; u64 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_uint(nbytes)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_uint_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>, nbytes: usize) -&gt; u64 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_uint_le(nbytes)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_uint_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>, nbytes: usize) -&gt; u64 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_uint_ne(nbytes)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_int(<span class="kw-2">&amp;mut </span><span class="self">self</span>, nbytes: usize) -&gt; i64 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_int(nbytes)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_int_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>, nbytes: usize) -&gt; i64 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_int_le(nbytes)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>get_int_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>, nbytes: usize) -&gt; i64 {
+ (<span class="kw-2">**</span><span class="self">self</span>).get_int_ne(nbytes)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>copy_to_bytes(<span class="kw-2">&amp;mut </span><span class="self">self</span>, len: usize) -&gt; <span class="kw">crate</span>::Bytes {
+ (<span class="kw-2">**</span><span class="self">self</span>).copy_to_bytes(len)
+ }
+ };
+}
+
+<span class="kw">impl</span>&lt;T: Buf + <span class="question-mark">?</span>Sized&gt; Buf <span class="kw">for </span><span class="kw-2">&amp;mut </span>T {
+ <span class="macro">deref_forward_buf!</span>();
+}
+
+<span class="kw">impl</span>&lt;T: Buf + <span class="question-mark">?</span>Sized&gt; Buf <span class="kw">for </span>Box&lt;T&gt; {
+ <span class="macro">deref_forward_buf!</span>();
+}
+
+<span class="kw">impl </span>Buf <span class="kw">for </span><span class="kw-2">&amp;</span>[u8] {
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>remaining(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
+ <span class="self">self</span>.len()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>chunk(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>[u8] {
+ <span class="self">self
+ </span>}
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>advance(<span class="kw-2">&amp;mut </span><span class="self">self</span>, cnt: usize) {
+ <span class="kw">if </span><span class="self">self</span>.len() &lt; cnt {
+ panic_advance(cnt, <span class="self">self</span>.len());
+ }
+
+ <span class="kw-2">*</span><span class="self">self </span>= <span class="kw-2">&amp;</span><span class="self">self</span>[cnt..];
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>copy_to_slice(<span class="kw-2">&amp;mut </span><span class="self">self</span>, dst: <span class="kw-2">&amp;mut </span>[u8]) {
+ <span class="kw">if </span><span class="self">self</span>.len() &lt; dst.len() {
+ panic_advance(dst.len(), <span class="self">self</span>.len());
+ }
+
+ dst.copy_from_slice(<span class="kw-2">&amp;</span><span class="self">self</span>[..dst.len()]);
+ <span class="self">self</span>.advance(dst.len());
+ }
+}
+
+<span class="attr">#[cfg(feature = <span class="string">&quot;std&quot;</span>)]
+</span><span class="kw">impl</span>&lt;T: AsRef&lt;[u8]&gt;&gt; Buf <span class="kw">for </span>std::io::Cursor&lt;T&gt; {
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>remaining(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
+ saturating_sub_usize_u64(<span class="self">self</span>.get_ref().as_ref().len(), <span class="self">self</span>.position())
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>chunk(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>[u8] {
+ <span class="kw">let </span>slice = <span class="self">self</span>.get_ref().as_ref();
+ <span class="kw">let </span>pos = min_u64_usize(<span class="self">self</span>.position(), slice.len());
+ <span class="kw-2">&amp;</span>slice[pos..]
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>advance(<span class="kw-2">&amp;mut </span><span class="self">self</span>, cnt: usize) {
+ <span class="kw">let </span>len = <span class="self">self</span>.get_ref().as_ref().len();
+ <span class="kw">let </span>pos = <span class="self">self</span>.position();
+
+ <span class="comment">// We intentionally allow `cnt == 0` here even if `pos &gt; len`.
+ </span><span class="kw">let </span>max_cnt = saturating_sub_usize_u64(len, pos);
+ <span class="kw">if </span>cnt &gt; max_cnt {
+ panic_advance(cnt, max_cnt);
+ }
+
+ <span class="comment">// This will not overflow because either `cnt == 0` or the sum is not
+ // greater than `len`.
+ </span><span class="self">self</span>.set_position(pos + cnt <span class="kw">as </span>u64);
+ }
+}
+
+<span class="comment">// The existence of this function makes the compiler catch if the Buf
+// trait is &quot;object-safe&quot; or not.
+</span><span class="kw">fn </span>_assert_trait_object(_b: <span class="kw-2">&amp;</span><span class="kw">dyn </span>Buf) {}
+</code></pre></div>
+</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/src/bytes/buf/buf_mut.rs.html b/src/bytes/buf/buf_mut.rs.html
new file mode 100644
index 0000000..d072b8d
--- /dev/null
+++ b/src/bytes/buf/buf_mut.rs.html
@@ -0,0 +1,3284 @@
+<!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="Source of the Rust file `src/buf/buf_mut.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>buf_mut.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../../../static.files/source-script-74087aa2e88f4475.js"></script><script defer src="../../../source-files.js"></script><script defer src="../../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><div class="width-limiter"><nav class="sub"><a class="sub-logo-container" href="../../../bytes/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><pre class="src-line-numbers"><span id="1">1</span>
+<span id="2">2</span>
+<span id="3">3</span>
+<span id="4">4</span>
+<span id="5">5</span>
+<span id="6">6</span>
+<span id="7">7</span>
+<span id="8">8</span>
+<span id="9">9</span>
+<span id="10">10</span>
+<span id="11">11</span>
+<span id="12">12</span>
+<span id="13">13</span>
+<span id="14">14</span>
+<span id="15">15</span>
+<span id="16">16</span>
+<span id="17">17</span>
+<span id="18">18</span>
+<span id="19">19</span>
+<span id="20">20</span>
+<span id="21">21</span>
+<span id="22">22</span>
+<span id="23">23</span>
+<span id="24">24</span>
+<span id="25">25</span>
+<span id="26">26</span>
+<span id="27">27</span>
+<span id="28">28</span>
+<span id="29">29</span>
+<span id="30">30</span>
+<span id="31">31</span>
+<span id="32">32</span>
+<span id="33">33</span>
+<span id="34">34</span>
+<span id="35">35</span>
+<span id="36">36</span>
+<span id="37">37</span>
+<span id="38">38</span>
+<span id="39">39</span>
+<span id="40">40</span>
+<span id="41">41</span>
+<span id="42">42</span>
+<span id="43">43</span>
+<span id="44">44</span>
+<span id="45">45</span>
+<span id="46">46</span>
+<span id="47">47</span>
+<span id="48">48</span>
+<span id="49">49</span>
+<span id="50">50</span>
+<span id="51">51</span>
+<span id="52">52</span>
+<span id="53">53</span>
+<span id="54">54</span>
+<span id="55">55</span>
+<span id="56">56</span>
+<span id="57">57</span>
+<span id="58">58</span>
+<span id="59">59</span>
+<span id="60">60</span>
+<span id="61">61</span>
+<span id="62">62</span>
+<span id="63">63</span>
+<span id="64">64</span>
+<span id="65">65</span>
+<span id="66">66</span>
+<span id="67">67</span>
+<span id="68">68</span>
+<span id="69">69</span>
+<span id="70">70</span>
+<span id="71">71</span>
+<span id="72">72</span>
+<span id="73">73</span>
+<span id="74">74</span>
+<span id="75">75</span>
+<span id="76">76</span>
+<span id="77">77</span>
+<span id="78">78</span>
+<span id="79">79</span>
+<span id="80">80</span>
+<span id="81">81</span>
+<span id="82">82</span>
+<span id="83">83</span>
+<span id="84">84</span>
+<span id="85">85</span>
+<span id="86">86</span>
+<span id="87">87</span>
+<span id="88">88</span>
+<span id="89">89</span>
+<span id="90">90</span>
+<span id="91">91</span>
+<span id="92">92</span>
+<span id="93">93</span>
+<span id="94">94</span>
+<span id="95">95</span>
+<span id="96">96</span>
+<span id="97">97</span>
+<span id="98">98</span>
+<span id="99">99</span>
+<span id="100">100</span>
+<span id="101">101</span>
+<span id="102">102</span>
+<span id="103">103</span>
+<span id="104">104</span>
+<span id="105">105</span>
+<span id="106">106</span>
+<span id="107">107</span>
+<span id="108">108</span>
+<span id="109">109</span>
+<span id="110">110</span>
+<span id="111">111</span>
+<span id="112">112</span>
+<span id="113">113</span>
+<span id="114">114</span>
+<span id="115">115</span>
+<span id="116">116</span>
+<span id="117">117</span>
+<span id="118">118</span>
+<span id="119">119</span>
+<span id="120">120</span>
+<span id="121">121</span>
+<span id="122">122</span>
+<span id="123">123</span>
+<span id="124">124</span>
+<span id="125">125</span>
+<span id="126">126</span>
+<span id="127">127</span>
+<span id="128">128</span>
+<span id="129">129</span>
+<span id="130">130</span>
+<span id="131">131</span>
+<span id="132">132</span>
+<span id="133">133</span>
+<span id="134">134</span>
+<span id="135">135</span>
+<span id="136">136</span>
+<span id="137">137</span>
+<span id="138">138</span>
+<span id="139">139</span>
+<span id="140">140</span>
+<span id="141">141</span>
+<span id="142">142</span>
+<span id="143">143</span>
+<span id="144">144</span>
+<span id="145">145</span>
+<span id="146">146</span>
+<span id="147">147</span>
+<span id="148">148</span>
+<span id="149">149</span>
+<span id="150">150</span>
+<span id="151">151</span>
+<span id="152">152</span>
+<span id="153">153</span>
+<span id="154">154</span>
+<span id="155">155</span>
+<span id="156">156</span>
+<span id="157">157</span>
+<span id="158">158</span>
+<span id="159">159</span>
+<span id="160">160</span>
+<span id="161">161</span>
+<span id="162">162</span>
+<span id="163">163</span>
+<span id="164">164</span>
+<span id="165">165</span>
+<span id="166">166</span>
+<span id="167">167</span>
+<span id="168">168</span>
+<span id="169">169</span>
+<span id="170">170</span>
+<span id="171">171</span>
+<span id="172">172</span>
+<span id="173">173</span>
+<span id="174">174</span>
+<span id="175">175</span>
+<span id="176">176</span>
+<span id="177">177</span>
+<span id="178">178</span>
+<span id="179">179</span>
+<span id="180">180</span>
+<span id="181">181</span>
+<span id="182">182</span>
+<span id="183">183</span>
+<span id="184">184</span>
+<span id="185">185</span>
+<span id="186">186</span>
+<span id="187">187</span>
+<span id="188">188</span>
+<span id="189">189</span>
+<span id="190">190</span>
+<span id="191">191</span>
+<span id="192">192</span>
+<span id="193">193</span>
+<span id="194">194</span>
+<span id="195">195</span>
+<span id="196">196</span>
+<span id="197">197</span>
+<span id="198">198</span>
+<span id="199">199</span>
+<span id="200">200</span>
+<span id="201">201</span>
+<span id="202">202</span>
+<span id="203">203</span>
+<span id="204">204</span>
+<span id="205">205</span>
+<span id="206">206</span>
+<span id="207">207</span>
+<span id="208">208</span>
+<span id="209">209</span>
+<span id="210">210</span>
+<span id="211">211</span>
+<span id="212">212</span>
+<span id="213">213</span>
+<span id="214">214</span>
+<span id="215">215</span>
+<span id="216">216</span>
+<span id="217">217</span>
+<span id="218">218</span>
+<span id="219">219</span>
+<span id="220">220</span>
+<span id="221">221</span>
+<span id="222">222</span>
+<span id="223">223</span>
+<span id="224">224</span>
+<span id="225">225</span>
+<span id="226">226</span>
+<span id="227">227</span>
+<span id="228">228</span>
+<span id="229">229</span>
+<span id="230">230</span>
+<span id="231">231</span>
+<span id="232">232</span>
+<span id="233">233</span>
+<span id="234">234</span>
+<span id="235">235</span>
+<span id="236">236</span>
+<span id="237">237</span>
+<span id="238">238</span>
+<span id="239">239</span>
+<span id="240">240</span>
+<span id="241">241</span>
+<span id="242">242</span>
+<span id="243">243</span>
+<span id="244">244</span>
+<span id="245">245</span>
+<span id="246">246</span>
+<span id="247">247</span>
+<span id="248">248</span>
+<span id="249">249</span>
+<span id="250">250</span>
+<span id="251">251</span>
+<span id="252">252</span>
+<span id="253">253</span>
+<span id="254">254</span>
+<span id="255">255</span>
+<span id="256">256</span>
+<span id="257">257</span>
+<span id="258">258</span>
+<span id="259">259</span>
+<span id="260">260</span>
+<span id="261">261</span>
+<span id="262">262</span>
+<span id="263">263</span>
+<span id="264">264</span>
+<span id="265">265</span>
+<span id="266">266</span>
+<span id="267">267</span>
+<span id="268">268</span>
+<span id="269">269</span>
+<span id="270">270</span>
+<span id="271">271</span>
+<span id="272">272</span>
+<span id="273">273</span>
+<span id="274">274</span>
+<span id="275">275</span>
+<span id="276">276</span>
+<span id="277">277</span>
+<span id="278">278</span>
+<span id="279">279</span>
+<span id="280">280</span>
+<span id="281">281</span>
+<span id="282">282</span>
+<span id="283">283</span>
+<span id="284">284</span>
+<span id="285">285</span>
+<span id="286">286</span>
+<span id="287">287</span>
+<span id="288">288</span>
+<span id="289">289</span>
+<span id="290">290</span>
+<span id="291">291</span>
+<span id="292">292</span>
+<span id="293">293</span>
+<span id="294">294</span>
+<span id="295">295</span>
+<span id="296">296</span>
+<span id="297">297</span>
+<span id="298">298</span>
+<span id="299">299</span>
+<span id="300">300</span>
+<span id="301">301</span>
+<span id="302">302</span>
+<span id="303">303</span>
+<span id="304">304</span>
+<span id="305">305</span>
+<span id="306">306</span>
+<span id="307">307</span>
+<span id="308">308</span>
+<span id="309">309</span>
+<span id="310">310</span>
+<span id="311">311</span>
+<span id="312">312</span>
+<span id="313">313</span>
+<span id="314">314</span>
+<span id="315">315</span>
+<span id="316">316</span>
+<span id="317">317</span>
+<span id="318">318</span>
+<span id="319">319</span>
+<span id="320">320</span>
+<span id="321">321</span>
+<span id="322">322</span>
+<span id="323">323</span>
+<span id="324">324</span>
+<span id="325">325</span>
+<span id="326">326</span>
+<span id="327">327</span>
+<span id="328">328</span>
+<span id="329">329</span>
+<span id="330">330</span>
+<span id="331">331</span>
+<span id="332">332</span>
+<span id="333">333</span>
+<span id="334">334</span>
+<span id="335">335</span>
+<span id="336">336</span>
+<span id="337">337</span>
+<span id="338">338</span>
+<span id="339">339</span>
+<span id="340">340</span>
+<span id="341">341</span>
+<span id="342">342</span>
+<span id="343">343</span>
+<span id="344">344</span>
+<span id="345">345</span>
+<span id="346">346</span>
+<span id="347">347</span>
+<span id="348">348</span>
+<span id="349">349</span>
+<span id="350">350</span>
+<span id="351">351</span>
+<span id="352">352</span>
+<span id="353">353</span>
+<span id="354">354</span>
+<span id="355">355</span>
+<span id="356">356</span>
+<span id="357">357</span>
+<span id="358">358</span>
+<span id="359">359</span>
+<span id="360">360</span>
+<span id="361">361</span>
+<span id="362">362</span>
+<span id="363">363</span>
+<span id="364">364</span>
+<span id="365">365</span>
+<span id="366">366</span>
+<span id="367">367</span>
+<span id="368">368</span>
+<span id="369">369</span>
+<span id="370">370</span>
+<span id="371">371</span>
+<span id="372">372</span>
+<span id="373">373</span>
+<span id="374">374</span>
+<span id="375">375</span>
+<span id="376">376</span>
+<span id="377">377</span>
+<span id="378">378</span>
+<span id="379">379</span>
+<span id="380">380</span>
+<span id="381">381</span>
+<span id="382">382</span>
+<span id="383">383</span>
+<span id="384">384</span>
+<span id="385">385</span>
+<span id="386">386</span>
+<span id="387">387</span>
+<span id="388">388</span>
+<span id="389">389</span>
+<span id="390">390</span>
+<span id="391">391</span>
+<span id="392">392</span>
+<span id="393">393</span>
+<span id="394">394</span>
+<span id="395">395</span>
+<span id="396">396</span>
+<span id="397">397</span>
+<span id="398">398</span>
+<span id="399">399</span>
+<span id="400">400</span>
+<span id="401">401</span>
+<span id="402">402</span>
+<span id="403">403</span>
+<span id="404">404</span>
+<span id="405">405</span>
+<span id="406">406</span>
+<span id="407">407</span>
+<span id="408">408</span>
+<span id="409">409</span>
+<span id="410">410</span>
+<span id="411">411</span>
+<span id="412">412</span>
+<span id="413">413</span>
+<span id="414">414</span>
+<span id="415">415</span>
+<span id="416">416</span>
+<span id="417">417</span>
+<span id="418">418</span>
+<span id="419">419</span>
+<span id="420">420</span>
+<span id="421">421</span>
+<span id="422">422</span>
+<span id="423">423</span>
+<span id="424">424</span>
+<span id="425">425</span>
+<span id="426">426</span>
+<span id="427">427</span>
+<span id="428">428</span>
+<span id="429">429</span>
+<span id="430">430</span>
+<span id="431">431</span>
+<span id="432">432</span>
+<span id="433">433</span>
+<span id="434">434</span>
+<span id="435">435</span>
+<span id="436">436</span>
+<span id="437">437</span>
+<span id="438">438</span>
+<span id="439">439</span>
+<span id="440">440</span>
+<span id="441">441</span>
+<span id="442">442</span>
+<span id="443">443</span>
+<span id="444">444</span>
+<span id="445">445</span>
+<span id="446">446</span>
+<span id="447">447</span>
+<span id="448">448</span>
+<span id="449">449</span>
+<span id="450">450</span>
+<span id="451">451</span>
+<span id="452">452</span>
+<span id="453">453</span>
+<span id="454">454</span>
+<span id="455">455</span>
+<span id="456">456</span>
+<span id="457">457</span>
+<span id="458">458</span>
+<span id="459">459</span>
+<span id="460">460</span>
+<span id="461">461</span>
+<span id="462">462</span>
+<span id="463">463</span>
+<span id="464">464</span>
+<span id="465">465</span>
+<span id="466">466</span>
+<span id="467">467</span>
+<span id="468">468</span>
+<span id="469">469</span>
+<span id="470">470</span>
+<span id="471">471</span>
+<span id="472">472</span>
+<span id="473">473</span>
+<span id="474">474</span>
+<span id="475">475</span>
+<span id="476">476</span>
+<span id="477">477</span>
+<span id="478">478</span>
+<span id="479">479</span>
+<span id="480">480</span>
+<span id="481">481</span>
+<span id="482">482</span>
+<span id="483">483</span>
+<span id="484">484</span>
+<span id="485">485</span>
+<span id="486">486</span>
+<span id="487">487</span>
+<span id="488">488</span>
+<span id="489">489</span>
+<span id="490">490</span>
+<span id="491">491</span>
+<span id="492">492</span>
+<span id="493">493</span>
+<span id="494">494</span>
+<span id="495">495</span>
+<span id="496">496</span>
+<span id="497">497</span>
+<span id="498">498</span>
+<span id="499">499</span>
+<span id="500">500</span>
+<span id="501">501</span>
+<span id="502">502</span>
+<span id="503">503</span>
+<span id="504">504</span>
+<span id="505">505</span>
+<span id="506">506</span>
+<span id="507">507</span>
+<span id="508">508</span>
+<span id="509">509</span>
+<span id="510">510</span>
+<span id="511">511</span>
+<span id="512">512</span>
+<span id="513">513</span>
+<span id="514">514</span>
+<span id="515">515</span>
+<span id="516">516</span>
+<span id="517">517</span>
+<span id="518">518</span>
+<span id="519">519</span>
+<span id="520">520</span>
+<span id="521">521</span>
+<span id="522">522</span>
+<span id="523">523</span>
+<span id="524">524</span>
+<span id="525">525</span>
+<span id="526">526</span>
+<span id="527">527</span>
+<span id="528">528</span>
+<span id="529">529</span>
+<span id="530">530</span>
+<span id="531">531</span>
+<span id="532">532</span>
+<span id="533">533</span>
+<span id="534">534</span>
+<span id="535">535</span>
+<span id="536">536</span>
+<span id="537">537</span>
+<span id="538">538</span>
+<span id="539">539</span>
+<span id="540">540</span>
+<span id="541">541</span>
+<span id="542">542</span>
+<span id="543">543</span>
+<span id="544">544</span>
+<span id="545">545</span>
+<span id="546">546</span>
+<span id="547">547</span>
+<span id="548">548</span>
+<span id="549">549</span>
+<span id="550">550</span>
+<span id="551">551</span>
+<span id="552">552</span>
+<span id="553">553</span>
+<span id="554">554</span>
+<span id="555">555</span>
+<span id="556">556</span>
+<span id="557">557</span>
+<span id="558">558</span>
+<span id="559">559</span>
+<span id="560">560</span>
+<span id="561">561</span>
+<span id="562">562</span>
+<span id="563">563</span>
+<span id="564">564</span>
+<span id="565">565</span>
+<span id="566">566</span>
+<span id="567">567</span>
+<span id="568">568</span>
+<span id="569">569</span>
+<span id="570">570</span>
+<span id="571">571</span>
+<span id="572">572</span>
+<span id="573">573</span>
+<span id="574">574</span>
+<span id="575">575</span>
+<span id="576">576</span>
+<span id="577">577</span>
+<span id="578">578</span>
+<span id="579">579</span>
+<span id="580">580</span>
+<span id="581">581</span>
+<span id="582">582</span>
+<span id="583">583</span>
+<span id="584">584</span>
+<span id="585">585</span>
+<span id="586">586</span>
+<span id="587">587</span>
+<span id="588">588</span>
+<span id="589">589</span>
+<span id="590">590</span>
+<span id="591">591</span>
+<span id="592">592</span>
+<span id="593">593</span>
+<span id="594">594</span>
+<span id="595">595</span>
+<span id="596">596</span>
+<span id="597">597</span>
+<span id="598">598</span>
+<span id="599">599</span>
+<span id="600">600</span>
+<span id="601">601</span>
+<span id="602">602</span>
+<span id="603">603</span>
+<span id="604">604</span>
+<span id="605">605</span>
+<span id="606">606</span>
+<span id="607">607</span>
+<span id="608">608</span>
+<span id="609">609</span>
+<span id="610">610</span>
+<span id="611">611</span>
+<span id="612">612</span>
+<span id="613">613</span>
+<span id="614">614</span>
+<span id="615">615</span>
+<span id="616">616</span>
+<span id="617">617</span>
+<span id="618">618</span>
+<span id="619">619</span>
+<span id="620">620</span>
+<span id="621">621</span>
+<span id="622">622</span>
+<span id="623">623</span>
+<span id="624">624</span>
+<span id="625">625</span>
+<span id="626">626</span>
+<span id="627">627</span>
+<span id="628">628</span>
+<span id="629">629</span>
+<span id="630">630</span>
+<span id="631">631</span>
+<span id="632">632</span>
+<span id="633">633</span>
+<span id="634">634</span>
+<span id="635">635</span>
+<span id="636">636</span>
+<span id="637">637</span>
+<span id="638">638</span>
+<span id="639">639</span>
+<span id="640">640</span>
+<span id="641">641</span>
+<span id="642">642</span>
+<span id="643">643</span>
+<span id="644">644</span>
+<span id="645">645</span>
+<span id="646">646</span>
+<span id="647">647</span>
+<span id="648">648</span>
+<span id="649">649</span>
+<span id="650">650</span>
+<span id="651">651</span>
+<span id="652">652</span>
+<span id="653">653</span>
+<span id="654">654</span>
+<span id="655">655</span>
+<span id="656">656</span>
+<span id="657">657</span>
+<span id="658">658</span>
+<span id="659">659</span>
+<span id="660">660</span>
+<span id="661">661</span>
+<span id="662">662</span>
+<span id="663">663</span>
+<span id="664">664</span>
+<span id="665">665</span>
+<span id="666">666</span>
+<span id="667">667</span>
+<span id="668">668</span>
+<span id="669">669</span>
+<span id="670">670</span>
+<span id="671">671</span>
+<span id="672">672</span>
+<span id="673">673</span>
+<span id="674">674</span>
+<span id="675">675</span>
+<span id="676">676</span>
+<span id="677">677</span>
+<span id="678">678</span>
+<span id="679">679</span>
+<span id="680">680</span>
+<span id="681">681</span>
+<span id="682">682</span>
+<span id="683">683</span>
+<span id="684">684</span>
+<span id="685">685</span>
+<span id="686">686</span>
+<span id="687">687</span>
+<span id="688">688</span>
+<span id="689">689</span>
+<span id="690">690</span>
+<span id="691">691</span>
+<span id="692">692</span>
+<span id="693">693</span>
+<span id="694">694</span>
+<span id="695">695</span>
+<span id="696">696</span>
+<span id="697">697</span>
+<span id="698">698</span>
+<span id="699">699</span>
+<span id="700">700</span>
+<span id="701">701</span>
+<span id="702">702</span>
+<span id="703">703</span>
+<span id="704">704</span>
+<span id="705">705</span>
+<span id="706">706</span>
+<span id="707">707</span>
+<span id="708">708</span>
+<span id="709">709</span>
+<span id="710">710</span>
+<span id="711">711</span>
+<span id="712">712</span>
+<span id="713">713</span>
+<span id="714">714</span>
+<span id="715">715</span>
+<span id="716">716</span>
+<span id="717">717</span>
+<span id="718">718</span>
+<span id="719">719</span>
+<span id="720">720</span>
+<span id="721">721</span>
+<span id="722">722</span>
+<span id="723">723</span>
+<span id="724">724</span>
+<span id="725">725</span>
+<span id="726">726</span>
+<span id="727">727</span>
+<span id="728">728</span>
+<span id="729">729</span>
+<span id="730">730</span>
+<span id="731">731</span>
+<span id="732">732</span>
+<span id="733">733</span>
+<span id="734">734</span>
+<span id="735">735</span>
+<span id="736">736</span>
+<span id="737">737</span>
+<span id="738">738</span>
+<span id="739">739</span>
+<span id="740">740</span>
+<span id="741">741</span>
+<span id="742">742</span>
+<span id="743">743</span>
+<span id="744">744</span>
+<span id="745">745</span>
+<span id="746">746</span>
+<span id="747">747</span>
+<span id="748">748</span>
+<span id="749">749</span>
+<span id="750">750</span>
+<span id="751">751</span>
+<span id="752">752</span>
+<span id="753">753</span>
+<span id="754">754</span>
+<span id="755">755</span>
+<span id="756">756</span>
+<span id="757">757</span>
+<span id="758">758</span>
+<span id="759">759</span>
+<span id="760">760</span>
+<span id="761">761</span>
+<span id="762">762</span>
+<span id="763">763</span>
+<span id="764">764</span>
+<span id="765">765</span>
+<span id="766">766</span>
+<span id="767">767</span>
+<span id="768">768</span>
+<span id="769">769</span>
+<span id="770">770</span>
+<span id="771">771</span>
+<span id="772">772</span>
+<span id="773">773</span>
+<span id="774">774</span>
+<span id="775">775</span>
+<span id="776">776</span>
+<span id="777">777</span>
+<span id="778">778</span>
+<span id="779">779</span>
+<span id="780">780</span>
+<span id="781">781</span>
+<span id="782">782</span>
+<span id="783">783</span>
+<span id="784">784</span>
+<span id="785">785</span>
+<span id="786">786</span>
+<span id="787">787</span>
+<span id="788">788</span>
+<span id="789">789</span>
+<span id="790">790</span>
+<span id="791">791</span>
+<span id="792">792</span>
+<span id="793">793</span>
+<span id="794">794</span>
+<span id="795">795</span>
+<span id="796">796</span>
+<span id="797">797</span>
+<span id="798">798</span>
+<span id="799">799</span>
+<span id="800">800</span>
+<span id="801">801</span>
+<span id="802">802</span>
+<span id="803">803</span>
+<span id="804">804</span>
+<span id="805">805</span>
+<span id="806">806</span>
+<span id="807">807</span>
+<span id="808">808</span>
+<span id="809">809</span>
+<span id="810">810</span>
+<span id="811">811</span>
+<span id="812">812</span>
+<span id="813">813</span>
+<span id="814">814</span>
+<span id="815">815</span>
+<span id="816">816</span>
+<span id="817">817</span>
+<span id="818">818</span>
+<span id="819">819</span>
+<span id="820">820</span>
+<span id="821">821</span>
+<span id="822">822</span>
+<span id="823">823</span>
+<span id="824">824</span>
+<span id="825">825</span>
+<span id="826">826</span>
+<span id="827">827</span>
+<span id="828">828</span>
+<span id="829">829</span>
+<span id="830">830</span>
+<span id="831">831</span>
+<span id="832">832</span>
+<span id="833">833</span>
+<span id="834">834</span>
+<span id="835">835</span>
+<span id="836">836</span>
+<span id="837">837</span>
+<span id="838">838</span>
+<span id="839">839</span>
+<span id="840">840</span>
+<span id="841">841</span>
+<span id="842">842</span>
+<span id="843">843</span>
+<span id="844">844</span>
+<span id="845">845</span>
+<span id="846">846</span>
+<span id="847">847</span>
+<span id="848">848</span>
+<span id="849">849</span>
+<span id="850">850</span>
+<span id="851">851</span>
+<span id="852">852</span>
+<span id="853">853</span>
+<span id="854">854</span>
+<span id="855">855</span>
+<span id="856">856</span>
+<span id="857">857</span>
+<span id="858">858</span>
+<span id="859">859</span>
+<span id="860">860</span>
+<span id="861">861</span>
+<span id="862">862</span>
+<span id="863">863</span>
+<span id="864">864</span>
+<span id="865">865</span>
+<span id="866">866</span>
+<span id="867">867</span>
+<span id="868">868</span>
+<span id="869">869</span>
+<span id="870">870</span>
+<span id="871">871</span>
+<span id="872">872</span>
+<span id="873">873</span>
+<span id="874">874</span>
+<span id="875">875</span>
+<span id="876">876</span>
+<span id="877">877</span>
+<span id="878">878</span>
+<span id="879">879</span>
+<span id="880">880</span>
+<span id="881">881</span>
+<span id="882">882</span>
+<span id="883">883</span>
+<span id="884">884</span>
+<span id="885">885</span>
+<span id="886">886</span>
+<span id="887">887</span>
+<span id="888">888</span>
+<span id="889">889</span>
+<span id="890">890</span>
+<span id="891">891</span>
+<span id="892">892</span>
+<span id="893">893</span>
+<span id="894">894</span>
+<span id="895">895</span>
+<span id="896">896</span>
+<span id="897">897</span>
+<span id="898">898</span>
+<span id="899">899</span>
+<span id="900">900</span>
+<span id="901">901</span>
+<span id="902">902</span>
+<span id="903">903</span>
+<span id="904">904</span>
+<span id="905">905</span>
+<span id="906">906</span>
+<span id="907">907</span>
+<span id="908">908</span>
+<span id="909">909</span>
+<span id="910">910</span>
+<span id="911">911</span>
+<span id="912">912</span>
+<span id="913">913</span>
+<span id="914">914</span>
+<span id="915">915</span>
+<span id="916">916</span>
+<span id="917">917</span>
+<span id="918">918</span>
+<span id="919">919</span>
+<span id="920">920</span>
+<span id="921">921</span>
+<span id="922">922</span>
+<span id="923">923</span>
+<span id="924">924</span>
+<span id="925">925</span>
+<span id="926">926</span>
+<span id="927">927</span>
+<span id="928">928</span>
+<span id="929">929</span>
+<span id="930">930</span>
+<span id="931">931</span>
+<span id="932">932</span>
+<span id="933">933</span>
+<span id="934">934</span>
+<span id="935">935</span>
+<span id="936">936</span>
+<span id="937">937</span>
+<span id="938">938</span>
+<span id="939">939</span>
+<span id="940">940</span>
+<span id="941">941</span>
+<span id="942">942</span>
+<span id="943">943</span>
+<span id="944">944</span>
+<span id="945">945</span>
+<span id="946">946</span>
+<span id="947">947</span>
+<span id="948">948</span>
+<span id="949">949</span>
+<span id="950">950</span>
+<span id="951">951</span>
+<span id="952">952</span>
+<span id="953">953</span>
+<span id="954">954</span>
+<span id="955">955</span>
+<span id="956">956</span>
+<span id="957">957</span>
+<span id="958">958</span>
+<span id="959">959</span>
+<span id="960">960</span>
+<span id="961">961</span>
+<span id="962">962</span>
+<span id="963">963</span>
+<span id="964">964</span>
+<span id="965">965</span>
+<span id="966">966</span>
+<span id="967">967</span>
+<span id="968">968</span>
+<span id="969">969</span>
+<span id="970">970</span>
+<span id="971">971</span>
+<span id="972">972</span>
+<span id="973">973</span>
+<span id="974">974</span>
+<span id="975">975</span>
+<span id="976">976</span>
+<span id="977">977</span>
+<span id="978">978</span>
+<span id="979">979</span>
+<span id="980">980</span>
+<span id="981">981</span>
+<span id="982">982</span>
+<span id="983">983</span>
+<span id="984">984</span>
+<span id="985">985</span>
+<span id="986">986</span>
+<span id="987">987</span>
+<span id="988">988</span>
+<span id="989">989</span>
+<span id="990">990</span>
+<span id="991">991</span>
+<span id="992">992</span>
+<span id="993">993</span>
+<span id="994">994</span>
+<span id="995">995</span>
+<span id="996">996</span>
+<span id="997">997</span>
+<span id="998">998</span>
+<span id="999">999</span>
+<span id="1000">1000</span>
+<span id="1001">1001</span>
+<span id="1002">1002</span>
+<span id="1003">1003</span>
+<span id="1004">1004</span>
+<span id="1005">1005</span>
+<span id="1006">1006</span>
+<span id="1007">1007</span>
+<span id="1008">1008</span>
+<span id="1009">1009</span>
+<span id="1010">1010</span>
+<span id="1011">1011</span>
+<span id="1012">1012</span>
+<span id="1013">1013</span>
+<span id="1014">1014</span>
+<span id="1015">1015</span>
+<span id="1016">1016</span>
+<span id="1017">1017</span>
+<span id="1018">1018</span>
+<span id="1019">1019</span>
+<span id="1020">1020</span>
+<span id="1021">1021</span>
+<span id="1022">1022</span>
+<span id="1023">1023</span>
+<span id="1024">1024</span>
+<span id="1025">1025</span>
+<span id="1026">1026</span>
+<span id="1027">1027</span>
+<span id="1028">1028</span>
+<span id="1029">1029</span>
+<span id="1030">1030</span>
+<span id="1031">1031</span>
+<span id="1032">1032</span>
+<span id="1033">1033</span>
+<span id="1034">1034</span>
+<span id="1035">1035</span>
+<span id="1036">1036</span>
+<span id="1037">1037</span>
+<span id="1038">1038</span>
+<span id="1039">1039</span>
+<span id="1040">1040</span>
+<span id="1041">1041</span>
+<span id="1042">1042</span>
+<span id="1043">1043</span>
+<span id="1044">1044</span>
+<span id="1045">1045</span>
+<span id="1046">1046</span>
+<span id="1047">1047</span>
+<span id="1048">1048</span>
+<span id="1049">1049</span>
+<span id="1050">1050</span>
+<span id="1051">1051</span>
+<span id="1052">1052</span>
+<span id="1053">1053</span>
+<span id="1054">1054</span>
+<span id="1055">1055</span>
+<span id="1056">1056</span>
+<span id="1057">1057</span>
+<span id="1058">1058</span>
+<span id="1059">1059</span>
+<span id="1060">1060</span>
+<span id="1061">1061</span>
+<span id="1062">1062</span>
+<span id="1063">1063</span>
+<span id="1064">1064</span>
+<span id="1065">1065</span>
+<span id="1066">1066</span>
+<span id="1067">1067</span>
+<span id="1068">1068</span>
+<span id="1069">1069</span>
+<span id="1070">1070</span>
+<span id="1071">1071</span>
+<span id="1072">1072</span>
+<span id="1073">1073</span>
+<span id="1074">1074</span>
+<span id="1075">1075</span>
+<span id="1076">1076</span>
+<span id="1077">1077</span>
+<span id="1078">1078</span>
+<span id="1079">1079</span>
+<span id="1080">1080</span>
+<span id="1081">1081</span>
+<span id="1082">1082</span>
+<span id="1083">1083</span>
+<span id="1084">1084</span>
+<span id="1085">1085</span>
+<span id="1086">1086</span>
+<span id="1087">1087</span>
+<span id="1088">1088</span>
+<span id="1089">1089</span>
+<span id="1090">1090</span>
+<span id="1091">1091</span>
+<span id="1092">1092</span>
+<span id="1093">1093</span>
+<span id="1094">1094</span>
+<span id="1095">1095</span>
+<span id="1096">1096</span>
+<span id="1097">1097</span>
+<span id="1098">1098</span>
+<span id="1099">1099</span>
+<span id="1100">1100</span>
+<span id="1101">1101</span>
+<span id="1102">1102</span>
+<span id="1103">1103</span>
+<span id="1104">1104</span>
+<span id="1105">1105</span>
+<span id="1106">1106</span>
+<span id="1107">1107</span>
+<span id="1108">1108</span>
+<span id="1109">1109</span>
+<span id="1110">1110</span>
+<span id="1111">1111</span>
+<span id="1112">1112</span>
+<span id="1113">1113</span>
+<span id="1114">1114</span>
+<span id="1115">1115</span>
+<span id="1116">1116</span>
+<span id="1117">1117</span>
+<span id="1118">1118</span>
+<span id="1119">1119</span>
+<span id="1120">1120</span>
+<span id="1121">1121</span>
+<span id="1122">1122</span>
+<span id="1123">1123</span>
+<span id="1124">1124</span>
+<span id="1125">1125</span>
+<span id="1126">1126</span>
+<span id="1127">1127</span>
+<span id="1128">1128</span>
+<span id="1129">1129</span>
+<span id="1130">1130</span>
+<span id="1131">1131</span>
+<span id="1132">1132</span>
+<span id="1133">1133</span>
+<span id="1134">1134</span>
+<span id="1135">1135</span>
+<span id="1136">1136</span>
+<span id="1137">1137</span>
+<span id="1138">1138</span>
+<span id="1139">1139</span>
+<span id="1140">1140</span>
+<span id="1141">1141</span>
+<span id="1142">1142</span>
+<span id="1143">1143</span>
+<span id="1144">1144</span>
+<span id="1145">1145</span>
+<span id="1146">1146</span>
+<span id="1147">1147</span>
+<span id="1148">1148</span>
+<span id="1149">1149</span>
+<span id="1150">1150</span>
+<span id="1151">1151</span>
+<span id="1152">1152</span>
+<span id="1153">1153</span>
+<span id="1154">1154</span>
+<span id="1155">1155</span>
+<span id="1156">1156</span>
+<span id="1157">1157</span>
+<span id="1158">1158</span>
+<span id="1159">1159</span>
+<span id="1160">1160</span>
+<span id="1161">1161</span>
+<span id="1162">1162</span>
+<span id="1163">1163</span>
+<span id="1164">1164</span>
+<span id="1165">1165</span>
+<span id="1166">1166</span>
+<span id="1167">1167</span>
+<span id="1168">1168</span>
+<span id="1169">1169</span>
+<span id="1170">1170</span>
+<span id="1171">1171</span>
+<span id="1172">1172</span>
+<span id="1173">1173</span>
+<span id="1174">1174</span>
+<span id="1175">1175</span>
+<span id="1176">1176</span>
+<span id="1177">1177</span>
+<span id="1178">1178</span>
+<span id="1179">1179</span>
+<span id="1180">1180</span>
+<span id="1181">1181</span>
+<span id="1182">1182</span>
+<span id="1183">1183</span>
+<span id="1184">1184</span>
+<span id="1185">1185</span>
+<span id="1186">1186</span>
+<span id="1187">1187</span>
+<span id="1188">1188</span>
+<span id="1189">1189</span>
+<span id="1190">1190</span>
+<span id="1191">1191</span>
+<span id="1192">1192</span>
+<span id="1193">1193</span>
+<span id="1194">1194</span>
+<span id="1195">1195</span>
+<span id="1196">1196</span>
+<span id="1197">1197</span>
+<span id="1198">1198</span>
+<span id="1199">1199</span>
+<span id="1200">1200</span>
+<span id="1201">1201</span>
+<span id="1202">1202</span>
+<span id="1203">1203</span>
+<span id="1204">1204</span>
+<span id="1205">1205</span>
+<span id="1206">1206</span>
+<span id="1207">1207</span>
+<span id="1208">1208</span>
+<span id="1209">1209</span>
+<span id="1210">1210</span>
+<span id="1211">1211</span>
+<span id="1212">1212</span>
+<span id="1213">1213</span>
+<span id="1214">1214</span>
+<span id="1215">1215</span>
+<span id="1216">1216</span>
+<span id="1217">1217</span>
+<span id="1218">1218</span>
+<span id="1219">1219</span>
+<span id="1220">1220</span>
+<span id="1221">1221</span>
+<span id="1222">1222</span>
+<span id="1223">1223</span>
+<span id="1224">1224</span>
+<span id="1225">1225</span>
+<span id="1226">1226</span>
+<span id="1227">1227</span>
+<span id="1228">1228</span>
+<span id="1229">1229</span>
+<span id="1230">1230</span>
+<span id="1231">1231</span>
+<span id="1232">1232</span>
+<span id="1233">1233</span>
+<span id="1234">1234</span>
+<span id="1235">1235</span>
+<span id="1236">1236</span>
+<span id="1237">1237</span>
+<span id="1238">1238</span>
+<span id="1239">1239</span>
+<span id="1240">1240</span>
+<span id="1241">1241</span>
+<span id="1242">1242</span>
+<span id="1243">1243</span>
+<span id="1244">1244</span>
+<span id="1245">1245</span>
+<span id="1246">1246</span>
+<span id="1247">1247</span>
+<span id="1248">1248</span>
+<span id="1249">1249</span>
+<span id="1250">1250</span>
+<span id="1251">1251</span>
+<span id="1252">1252</span>
+<span id="1253">1253</span>
+<span id="1254">1254</span>
+<span id="1255">1255</span>
+<span id="1256">1256</span>
+<span id="1257">1257</span>
+<span id="1258">1258</span>
+<span id="1259">1259</span>
+<span id="1260">1260</span>
+<span id="1261">1261</span>
+<span id="1262">1262</span>
+<span id="1263">1263</span>
+<span id="1264">1264</span>
+<span id="1265">1265</span>
+<span id="1266">1266</span>
+<span id="1267">1267</span>
+<span id="1268">1268</span>
+<span id="1269">1269</span>
+<span id="1270">1270</span>
+<span id="1271">1271</span>
+<span id="1272">1272</span>
+<span id="1273">1273</span>
+<span id="1274">1274</span>
+<span id="1275">1275</span>
+<span id="1276">1276</span>
+<span id="1277">1277</span>
+<span id="1278">1278</span>
+<span id="1279">1279</span>
+<span id="1280">1280</span>
+<span id="1281">1281</span>
+<span id="1282">1282</span>
+<span id="1283">1283</span>
+<span id="1284">1284</span>
+<span id="1285">1285</span>
+<span id="1286">1286</span>
+<span id="1287">1287</span>
+<span id="1288">1288</span>
+<span id="1289">1289</span>
+<span id="1290">1290</span>
+<span id="1291">1291</span>
+<span id="1292">1292</span>
+<span id="1293">1293</span>
+<span id="1294">1294</span>
+<span id="1295">1295</span>
+<span id="1296">1296</span>
+<span id="1297">1297</span>
+<span id="1298">1298</span>
+<span id="1299">1299</span>
+<span id="1300">1300</span>
+<span id="1301">1301</span>
+<span id="1302">1302</span>
+<span id="1303">1303</span>
+<span id="1304">1304</span>
+<span id="1305">1305</span>
+<span id="1306">1306</span>
+<span id="1307">1307</span>
+<span id="1308">1308</span>
+<span id="1309">1309</span>
+<span id="1310">1310</span>
+<span id="1311">1311</span>
+<span id="1312">1312</span>
+<span id="1313">1313</span>
+<span id="1314">1314</span>
+<span id="1315">1315</span>
+<span id="1316">1316</span>
+<span id="1317">1317</span>
+<span id="1318">1318</span>
+<span id="1319">1319</span>
+<span id="1320">1320</span>
+<span id="1321">1321</span>
+<span id="1322">1322</span>
+<span id="1323">1323</span>
+<span id="1324">1324</span>
+<span id="1325">1325</span>
+<span id="1326">1326</span>
+<span id="1327">1327</span>
+<span id="1328">1328</span>
+<span id="1329">1329</span>
+<span id="1330">1330</span>
+<span id="1331">1331</span>
+<span id="1332">1332</span>
+<span id="1333">1333</span>
+<span id="1334">1334</span>
+<span id="1335">1335</span>
+<span id="1336">1336</span>
+<span id="1337">1337</span>
+<span id="1338">1338</span>
+<span id="1339">1339</span>
+<span id="1340">1340</span>
+<span id="1341">1341</span>
+<span id="1342">1342</span>
+<span id="1343">1343</span>
+<span id="1344">1344</span>
+<span id="1345">1345</span>
+<span id="1346">1346</span>
+<span id="1347">1347</span>
+<span id="1348">1348</span>
+<span id="1349">1349</span>
+<span id="1350">1350</span>
+<span id="1351">1351</span>
+<span id="1352">1352</span>
+<span id="1353">1353</span>
+<span id="1354">1354</span>
+<span id="1355">1355</span>
+<span id="1356">1356</span>
+<span id="1357">1357</span>
+<span id="1358">1358</span>
+<span id="1359">1359</span>
+<span id="1360">1360</span>
+<span id="1361">1361</span>
+<span id="1362">1362</span>
+<span id="1363">1363</span>
+<span id="1364">1364</span>
+<span id="1365">1365</span>
+<span id="1366">1366</span>
+<span id="1367">1367</span>
+<span id="1368">1368</span>
+<span id="1369">1369</span>
+<span id="1370">1370</span>
+<span id="1371">1371</span>
+<span id="1372">1372</span>
+<span id="1373">1373</span>
+<span id="1374">1374</span>
+<span id="1375">1375</span>
+<span id="1376">1376</span>
+<span id="1377">1377</span>
+<span id="1378">1378</span>
+<span id="1379">1379</span>
+<span id="1380">1380</span>
+<span id="1381">1381</span>
+<span id="1382">1382</span>
+<span id="1383">1383</span>
+<span id="1384">1384</span>
+<span id="1385">1385</span>
+<span id="1386">1386</span>
+<span id="1387">1387</span>
+<span id="1388">1388</span>
+<span id="1389">1389</span>
+<span id="1390">1390</span>
+<span id="1391">1391</span>
+<span id="1392">1392</span>
+<span id="1393">1393</span>
+<span id="1394">1394</span>
+<span id="1395">1395</span>
+<span id="1396">1396</span>
+<span id="1397">1397</span>
+<span id="1398">1398</span>
+<span id="1399">1399</span>
+<span id="1400">1400</span>
+<span id="1401">1401</span>
+<span id="1402">1402</span>
+<span id="1403">1403</span>
+<span id="1404">1404</span>
+<span id="1405">1405</span>
+<span id="1406">1406</span>
+<span id="1407">1407</span>
+<span id="1408">1408</span>
+<span id="1409">1409</span>
+<span id="1410">1410</span>
+<span id="1411">1411</span>
+<span id="1412">1412</span>
+<span id="1413">1413</span>
+<span id="1414">1414</span>
+<span id="1415">1415</span>
+<span id="1416">1416</span>
+<span id="1417">1417</span>
+<span id="1418">1418</span>
+<span id="1419">1419</span>
+<span id="1420">1420</span>
+<span id="1421">1421</span>
+<span id="1422">1422</span>
+<span id="1423">1423</span>
+<span id="1424">1424</span>
+<span id="1425">1425</span>
+<span id="1426">1426</span>
+<span id="1427">1427</span>
+<span id="1428">1428</span>
+<span id="1429">1429</span>
+<span id="1430">1430</span>
+<span id="1431">1431</span>
+<span id="1432">1432</span>
+<span id="1433">1433</span>
+<span id="1434">1434</span>
+<span id="1435">1435</span>
+<span id="1436">1436</span>
+<span id="1437">1437</span>
+<span id="1438">1438</span>
+<span id="1439">1439</span>
+<span id="1440">1440</span>
+<span id="1441">1441</span>
+<span id="1442">1442</span>
+<span id="1443">1443</span>
+<span id="1444">1444</span>
+<span id="1445">1445</span>
+<span id="1446">1446</span>
+<span id="1447">1447</span>
+<span id="1448">1448</span>
+<span id="1449">1449</span>
+<span id="1450">1450</span>
+<span id="1451">1451</span>
+<span id="1452">1452</span>
+<span id="1453">1453</span>
+<span id="1454">1454</span>
+<span id="1455">1455</span>
+<span id="1456">1456</span>
+<span id="1457">1457</span>
+<span id="1458">1458</span>
+<span id="1459">1459</span>
+<span id="1460">1460</span>
+<span id="1461">1461</span>
+<span id="1462">1462</span>
+<span id="1463">1463</span>
+<span id="1464">1464</span>
+<span id="1465">1465</span>
+<span id="1466">1466</span>
+<span id="1467">1467</span>
+<span id="1468">1468</span>
+<span id="1469">1469</span>
+<span id="1470">1470</span>
+<span id="1471">1471</span>
+<span id="1472">1472</span>
+<span id="1473">1473</span>
+<span id="1474">1474</span>
+<span id="1475">1475</span>
+<span id="1476">1476</span>
+<span id="1477">1477</span>
+<span id="1478">1478</span>
+<span id="1479">1479</span>
+<span id="1480">1480</span>
+<span id="1481">1481</span>
+<span id="1482">1482</span>
+<span id="1483">1483</span>
+<span id="1484">1484</span>
+<span id="1485">1485</span>
+<span id="1486">1486</span>
+<span id="1487">1487</span>
+<span id="1488">1488</span>
+<span id="1489">1489</span>
+<span id="1490">1490</span>
+<span id="1491">1491</span>
+<span id="1492">1492</span>
+<span id="1493">1493</span>
+<span id="1494">1494</span>
+<span id="1495">1495</span>
+<span id="1496">1496</span>
+<span id="1497">1497</span>
+<span id="1498">1498</span>
+<span id="1499">1499</span>
+<span id="1500">1500</span>
+<span id="1501">1501</span>
+<span id="1502">1502</span>
+<span id="1503">1503</span>
+<span id="1504">1504</span>
+<span id="1505">1505</span>
+<span id="1506">1506</span>
+<span id="1507">1507</span>
+<span id="1508">1508</span>
+<span id="1509">1509</span>
+<span id="1510">1510</span>
+<span id="1511">1511</span>
+<span id="1512">1512</span>
+<span id="1513">1513</span>
+<span id="1514">1514</span>
+<span id="1515">1515</span>
+<span id="1516">1516</span>
+<span id="1517">1517</span>
+<span id="1518">1518</span>
+<span id="1519">1519</span>
+<span id="1520">1520</span>
+<span id="1521">1521</span>
+<span id="1522">1522</span>
+<span id="1523">1523</span>
+<span id="1524">1524</span>
+<span id="1525">1525</span>
+<span id="1526">1526</span>
+<span id="1527">1527</span>
+<span id="1528">1528</span>
+<span id="1529">1529</span>
+<span id="1530">1530</span>
+<span id="1531">1531</span>
+<span id="1532">1532</span>
+<span id="1533">1533</span>
+<span id="1534">1534</span>
+<span id="1535">1535</span>
+<span id="1536">1536</span>
+<span id="1537">1537</span>
+<span id="1538">1538</span>
+<span id="1539">1539</span>
+<span id="1540">1540</span>
+<span id="1541">1541</span>
+<span id="1542">1542</span>
+<span id="1543">1543</span>
+<span id="1544">1544</span>
+<span id="1545">1545</span>
+<span id="1546">1546</span>
+<span id="1547">1547</span>
+<span id="1548">1548</span>
+<span id="1549">1549</span>
+<span id="1550">1550</span>
+<span id="1551">1551</span>
+<span id="1552">1552</span>
+<span id="1553">1553</span>
+<span id="1554">1554</span>
+<span id="1555">1555</span>
+<span id="1556">1556</span>
+<span id="1557">1557</span>
+<span id="1558">1558</span>
+<span id="1559">1559</span>
+<span id="1560">1560</span>
+<span id="1561">1561</span>
+<span id="1562">1562</span>
+<span id="1563">1563</span>
+<span id="1564">1564</span>
+<span id="1565">1565</span>
+<span id="1566">1566</span>
+<span id="1567">1567</span>
+<span id="1568">1568</span>
+<span id="1569">1569</span>
+<span id="1570">1570</span>
+<span id="1571">1571</span>
+<span id="1572">1572</span>
+<span id="1573">1573</span>
+<span id="1574">1574</span>
+<span id="1575">1575</span>
+<span id="1576">1576</span>
+<span id="1577">1577</span>
+<span id="1578">1578</span>
+<span id="1579">1579</span>
+<span id="1580">1580</span>
+<span id="1581">1581</span>
+<span id="1582">1582</span>
+<span id="1583">1583</span>
+<span id="1584">1584</span>
+<span id="1585">1585</span>
+<span id="1586">1586</span>
+<span id="1587">1587</span>
+<span id="1588">1588</span>
+<span id="1589">1589</span>
+<span id="1590">1590</span>
+<span id="1591">1591</span>
+<span id="1592">1592</span>
+<span id="1593">1593</span>
+<span id="1594">1594</span>
+<span id="1595">1595</span>
+<span id="1596">1596</span>
+<span id="1597">1597</span>
+<span id="1598">1598</span>
+<span id="1599">1599</span>
+<span id="1600">1600</span>
+<span id="1601">1601</span>
+<span id="1602">1602</span>
+<span id="1603">1603</span>
+<span id="1604">1604</span>
+<span id="1605">1605</span>
+<span id="1606">1606</span>
+<span id="1607">1607</span>
+<span id="1608">1608</span>
+<span id="1609">1609</span>
+<span id="1610">1610</span>
+<span id="1611">1611</span>
+<span id="1612">1612</span>
+<span id="1613">1613</span>
+<span id="1614">1614</span>
+<span id="1615">1615</span>
+<span id="1616">1616</span>
+<span id="1617">1617</span>
+<span id="1618">1618</span>
+<span id="1619">1619</span>
+<span id="1620">1620</span>
+<span id="1621">1621</span>
+<span id="1622">1622</span>
+<span id="1623">1623</span>
+<span id="1624">1624</span>
+<span id="1625">1625</span>
+<span id="1626">1626</span>
+<span id="1627">1627</span>
+<span id="1628">1628</span>
+<span id="1629">1629</span>
+<span id="1630">1630</span>
+<span id="1631">1631</span>
+<span id="1632">1632</span>
+<span id="1633">1633</span>
+<span id="1634">1634</span>
+<span id="1635">1635</span>
+<span id="1636">1636</span>
+<span id="1637">1637</span>
+<span id="1638">1638</span>
+<span id="1639">1639</span>
+<span id="1640">1640</span>
+<span id="1641">1641</span>
+</pre><pre class="rust"><code><span class="kw">use </span><span class="kw">crate</span>::buf::{limit, Chain, Limit, UninitSlice};
+<span class="attr">#[cfg(feature = <span class="string">&quot;std&quot;</span>)]
+</span><span class="kw">use </span><span class="kw">crate</span>::buf::{writer, Writer};
+<span class="kw">use crate</span>::{panic_advance, panic_does_not_fit};
+
+<span class="kw">use </span>core::{mem, ptr, usize};
+
+<span class="kw">use </span>alloc::{boxed::Box, vec::Vec};
+
+<span class="doccomment">/// A trait for values that provide sequential write access to bytes.
+///
+/// Write bytes to a buffer
+///
+/// A buffer stores bytes in memory such that write operations are infallible.
+/// The underlying storage may or may not be in contiguous memory. A `BufMut`
+/// value is a cursor into the buffer. Writing to `BufMut` advances the cursor
+/// position.
+///
+/// The simplest `BufMut` is a `Vec&lt;u8&gt;`.
+///
+/// ```
+/// use bytes::BufMut;
+///
+/// let mut buf = vec![];
+///
+/// buf.put(&amp;b&quot;hello world&quot;[..]);
+///
+/// assert_eq!(buf, b&quot;hello world&quot;);
+/// ```
+</span><span class="kw">pub unsafe trait </span>BufMut {
+ <span class="doccomment">/// Returns the number of bytes that can be written from the current
+ /// position until the end of the buffer is reached.
+ ///
+ /// This value is greater than or equal to the length of the slice returned
+ /// by `chunk_mut()`.
+ ///
+ /// Writing to a `BufMut` may involve allocating more memory on the fly.
+ /// Implementations may fail before reaching the number of bytes indicated
+ /// by this method if they encounter an allocation failure.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut dst = [0; 10];
+ /// let mut buf = &amp;mut dst[..];
+ ///
+ /// let original_remaining = buf.remaining_mut();
+ /// buf.put(&amp;b&quot;hello&quot;[..]);
+ ///
+ /// assert_eq!(original_remaining - 5, buf.remaining_mut());
+ /// ```
+ ///
+ /// # Implementer notes
+ ///
+ /// Implementations of `remaining_mut` should ensure that the return value
+ /// does not change unless a call is made to `advance_mut` or any other
+ /// function that is documented to change the `BufMut`&#39;s current position.
+ ///
+ /// # Note
+ ///
+ /// `remaining_mut` may return value smaller than actual available space.
+ </span><span class="kw">fn </span>remaining_mut(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize;
+
+ <span class="doccomment">/// Advance the internal cursor of the BufMut
+ ///
+ /// The next call to `chunk_mut` will return a slice starting `cnt` bytes
+ /// further into the underlying buffer.
+ ///
+ /// # Safety
+ ///
+ /// The caller must ensure that the next `cnt` bytes of `chunk` are
+ /// initialized.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = Vec::with_capacity(16);
+ ///
+ /// // Write some data
+ /// buf.chunk_mut()[0..2].copy_from_slice(b&quot;he&quot;);
+ /// unsafe { buf.advance_mut(2) };
+ ///
+ /// // write more bytes
+ /// buf.chunk_mut()[0..3].copy_from_slice(b&quot;llo&quot;);
+ ///
+ /// unsafe { buf.advance_mut(3); }
+ ///
+ /// assert_eq!(5, buf.len());
+ /// assert_eq!(buf, b&quot;hello&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function **may** panic if `cnt &gt; self.remaining_mut()`.
+ ///
+ /// # Implementer notes
+ ///
+ /// It is recommended for implementations of `advance_mut` to panic if
+ /// `cnt &gt; self.remaining_mut()`. If the implementation does not panic,
+ /// the call must behave as if `cnt == self.remaining_mut()`.
+ ///
+ /// A call with `cnt == 0` should never panic and be a no-op.
+ </span><span class="kw">unsafe fn </span>advance_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>, cnt: usize);
+
+ <span class="doccomment">/// Returns true if there is space in `self` for more bytes.
+ ///
+ /// This is equivalent to `self.remaining_mut() != 0`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut dst = [0; 5];
+ /// let mut buf = &amp;mut dst[..];
+ ///
+ /// assert!(buf.has_remaining_mut());
+ ///
+ /// buf.put(&amp;b&quot;hello&quot;[..]);
+ ///
+ /// assert!(!buf.has_remaining_mut());
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>has_remaining_mut(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; bool {
+ <span class="self">self</span>.remaining_mut() &gt; <span class="number">0
+ </span>}
+
+ <span class="doccomment">/// Returns a mutable slice starting at the current BufMut position and of
+ /// length between 0 and `BufMut::remaining_mut()`. Note that this *can* be shorter than the
+ /// whole remainder of the buffer (this allows non-continuous implementation).
+ ///
+ /// This is a lower level function. Most operations are done with other
+ /// functions.
+ ///
+ /// The returned byte slice may represent uninitialized memory.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = Vec::with_capacity(16);
+ ///
+ /// unsafe {
+ /// // MaybeUninit::as_mut_ptr
+ /// buf.chunk_mut()[0..].as_mut_ptr().write(b&#39;h&#39;);
+ /// buf.chunk_mut()[1..].as_mut_ptr().write(b&#39;e&#39;);
+ ///
+ /// buf.advance_mut(2);
+ ///
+ /// buf.chunk_mut()[0..].as_mut_ptr().write(b&#39;l&#39;);
+ /// buf.chunk_mut()[1..].as_mut_ptr().write(b&#39;l&#39;);
+ /// buf.chunk_mut()[2..].as_mut_ptr().write(b&#39;o&#39;);
+ ///
+ /// buf.advance_mut(3);
+ /// }
+ ///
+ /// assert_eq!(5, buf.len());
+ /// assert_eq!(buf, b&quot;hello&quot;);
+ /// ```
+ ///
+ /// # Implementer notes
+ ///
+ /// This function should never panic. `chunk_mut` should return an empty
+ /// slice **if and only if** `remaining_mut()` returns 0. In other words,
+ /// `chunk_mut()` returning an empty slice implies that `remaining_mut()` will
+ /// return 0 and `remaining_mut()` returning 0 implies that `chunk_mut()` will
+ /// return an empty slice.
+ ///
+ /// This function may trigger an out-of-memory abort if it tries to allocate
+ /// memory and fails to do so.
+ </span><span class="comment">// The `chunk_mut` method was previously called `bytes_mut`. This alias makes the
+ // rename more easily discoverable.
+ </span><span class="attr">#[cfg_attr(docsrs, doc(alias = <span class="string">&quot;bytes_mut&quot;</span>))]
+ </span><span class="kw">fn </span>chunk_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;mut </span>UninitSlice;
+
+ <span class="doccomment">/// Transfer bytes into `self` from `src` and advance the cursor by the
+ /// number of bytes written.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ ///
+ /// buf.put_u8(b&#39;h&#39;);
+ /// buf.put(&amp;b&quot;ello&quot;[..]);
+ /// buf.put(&amp;b&quot; world&quot;[..]);
+ ///
+ /// assert_eq!(buf, b&quot;hello world&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// Panics if `self` does not have enough capacity to contain `src`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put&lt;T: <span class="kw">super</span>::Buf&gt;(<span class="kw-2">&amp;mut </span><span class="self">self</span>, <span class="kw-2">mut </span>src: T)
+ <span class="kw">where
+ </span><span class="self">Self</span>: Sized,
+ {
+ <span class="kw">if </span><span class="self">self</span>.remaining_mut() &lt; src.remaining() {
+ panic_advance(src.remaining(), <span class="self">self</span>.remaining_mut());
+ }
+
+ <span class="kw">while </span>src.has_remaining() {
+ <span class="kw">let </span>s = src.chunk();
+ <span class="kw">let </span>d = <span class="self">self</span>.chunk_mut();
+ <span class="kw">let </span>cnt = usize::min(s.len(), d.len());
+
+ d[..cnt].copy_from_slice(<span class="kw-2">&amp;</span>s[..cnt]);
+
+ <span class="comment">// SAFETY: We just initialized `cnt` bytes in `self`.
+ </span><span class="kw">unsafe </span>{ <span class="self">self</span>.advance_mut(cnt) };
+ src.advance(cnt);
+ }
+ }
+
+ <span class="doccomment">/// Transfer bytes into `self` from `src` and advance the cursor by the
+ /// number of bytes written.
+ ///
+ /// `self` must have enough remaining capacity to contain all of `src`.
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut dst = [0; 6];
+ ///
+ /// {
+ /// let mut buf = &amp;mut dst[..];
+ /// buf.put_slice(b&quot;hello&quot;);
+ ///
+ /// assert_eq!(1, buf.remaining_mut());
+ /// }
+ ///
+ /// assert_eq!(b&quot;hello\0&quot;, &amp;dst);
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_slice(<span class="kw-2">&amp;mut </span><span class="self">self</span>, <span class="kw-2">mut </span>src: <span class="kw-2">&amp;</span>[u8]) {
+ <span class="kw">if </span><span class="self">self</span>.remaining_mut() &lt; src.len() {
+ panic_advance(src.len(), <span class="self">self</span>.remaining_mut());
+ }
+
+ <span class="kw">while </span>!src.is_empty() {
+ <span class="kw">let </span>dst = <span class="self">self</span>.chunk_mut();
+ <span class="kw">let </span>cnt = usize::min(src.len(), dst.len());
+
+ dst[..cnt].copy_from_slice(<span class="kw-2">&amp;</span>src[..cnt]);
+ src = <span class="kw-2">&amp;</span>src[cnt..];
+
+ <span class="comment">// SAFETY: We just initialized `cnt` bytes in `self`.
+ </span><span class="kw">unsafe </span>{ <span class="self">self</span>.advance_mut(cnt) };
+ }
+ }
+
+ <span class="doccomment">/// Put `cnt` bytes `val` into `self`.
+ ///
+ /// Logically equivalent to calling `self.put_u8(val)` `cnt` times, but may work faster.
+ ///
+ /// `self` must have at least `cnt` remaining capacity.
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut dst = [0; 6];
+ ///
+ /// {
+ /// let mut buf = &amp;mut dst[..];
+ /// buf.put_bytes(b&#39;a&#39;, 4);
+ ///
+ /// assert_eq!(2, buf.remaining_mut());
+ /// }
+ ///
+ /// assert_eq!(b&quot;aaaa\0\0&quot;, &amp;dst);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_bytes(<span class="kw-2">&amp;mut </span><span class="self">self</span>, val: u8, <span class="kw-2">mut </span>cnt: usize) {
+ <span class="kw">if </span><span class="self">self</span>.remaining_mut() &lt; cnt {
+ panic_advance(cnt, <span class="self">self</span>.remaining_mut());
+ }
+
+ <span class="kw">while </span>cnt &gt; <span class="number">0 </span>{
+ <span class="kw">let </span>dst = <span class="self">self</span>.chunk_mut();
+ <span class="kw">let </span>dst_len = usize::min(dst.len(), cnt);
+ <span class="comment">// SAFETY: The pointer is valid for `dst_len &lt;= dst.len()` bytes.
+ </span><span class="kw">unsafe </span>{ core::ptr::write_bytes(dst.as_mut_ptr(), val, dst_len) };
+ <span class="comment">// SAFETY: We just initialized `dst_len` bytes in `self`.
+ </span><span class="kw">unsafe </span>{ <span class="self">self</span>.advance_mut(dst_len) };
+ cnt -= dst_len;
+ }
+ }
+
+ <span class="doccomment">/// Writes an unsigned 8 bit integer to `self`.
+ ///
+ /// The current position is advanced by 1.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_u8(0x01);
+ /// assert_eq!(buf, b&quot;\x01&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_u8(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u8) {
+ <span class="kw">let </span>src = [n];
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>src);
+ }
+
+ <span class="doccomment">/// Writes a signed 8 bit integer to `self`.
+ ///
+ /// The current position is advanced by 1.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_i8(0x01);
+ /// assert_eq!(buf, b&quot;\x01&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_i8(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i8) {
+ <span class="kw">let </span>src = [n <span class="kw">as </span>u8];
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>src)
+ }
+
+ <span class="doccomment">/// Writes an unsigned 16 bit integer to `self` in big-endian byte order.
+ ///
+ /// The current position is advanced by 2.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_u16(0x0809);
+ /// assert_eq!(buf, b&quot;\x08\x09&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_u16(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u16) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_be_bytes())
+ }
+
+ <span class="doccomment">/// Writes an unsigned 16 bit integer to `self` in little-endian byte order.
+ ///
+ /// The current position is advanced by 2.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_u16_le(0x0809);
+ /// assert_eq!(buf, b&quot;\x09\x08&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_u16_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u16) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_le_bytes())
+ }
+
+ <span class="doccomment">/// Writes an unsigned 16 bit integer to `self` in native-endian byte order.
+ ///
+ /// The current position is advanced by 2.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_u16_ne(0x0809);
+ /// if cfg!(target_endian = &quot;big&quot;) {
+ /// assert_eq!(buf, b&quot;\x08\x09&quot;);
+ /// } else {
+ /// assert_eq!(buf, b&quot;\x09\x08&quot;);
+ /// }
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_u16_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u16) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_ne_bytes())
+ }
+
+ <span class="doccomment">/// Writes a signed 16 bit integer to `self` in big-endian byte order.
+ ///
+ /// The current position is advanced by 2.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_i16(0x0809);
+ /// assert_eq!(buf, b&quot;\x08\x09&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_i16(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i16) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_be_bytes())
+ }
+
+ <span class="doccomment">/// Writes a signed 16 bit integer to `self` in little-endian byte order.
+ ///
+ /// The current position is advanced by 2.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_i16_le(0x0809);
+ /// assert_eq!(buf, b&quot;\x09\x08&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_i16_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i16) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_le_bytes())
+ }
+
+ <span class="doccomment">/// Writes a signed 16 bit integer to `self` in native-endian byte order.
+ ///
+ /// The current position is advanced by 2.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_i16_ne(0x0809);
+ /// if cfg!(target_endian = &quot;big&quot;) {
+ /// assert_eq!(buf, b&quot;\x08\x09&quot;);
+ /// } else {
+ /// assert_eq!(buf, b&quot;\x09\x08&quot;);
+ /// }
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_i16_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i16) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_ne_bytes())
+ }
+
+ <span class="doccomment">/// Writes an unsigned 32 bit integer to `self` in big-endian byte order.
+ ///
+ /// The current position is advanced by 4.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_u32(0x0809A0A1);
+ /// assert_eq!(buf, b&quot;\x08\x09\xA0\xA1&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_u32(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u32) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_be_bytes())
+ }
+
+ <span class="doccomment">/// Writes an unsigned 32 bit integer to `self` in little-endian byte order.
+ ///
+ /// The current position is advanced by 4.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_u32_le(0x0809A0A1);
+ /// assert_eq!(buf, b&quot;\xA1\xA0\x09\x08&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_u32_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u32) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_le_bytes())
+ }
+
+ <span class="doccomment">/// Writes an unsigned 32 bit integer to `self` in native-endian byte order.
+ ///
+ /// The current position is advanced by 4.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_u32_ne(0x0809A0A1);
+ /// if cfg!(target_endian = &quot;big&quot;) {
+ /// assert_eq!(buf, b&quot;\x08\x09\xA0\xA1&quot;);
+ /// } else {
+ /// assert_eq!(buf, b&quot;\xA1\xA0\x09\x08&quot;);
+ /// }
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_u32_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u32) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_ne_bytes())
+ }
+
+ <span class="doccomment">/// Writes a signed 32 bit integer to `self` in big-endian byte order.
+ ///
+ /// The current position is advanced by 4.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_i32(0x0809A0A1);
+ /// assert_eq!(buf, b&quot;\x08\x09\xA0\xA1&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_i32(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i32) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_be_bytes())
+ }
+
+ <span class="doccomment">/// Writes a signed 32 bit integer to `self` in little-endian byte order.
+ ///
+ /// The current position is advanced by 4.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_i32_le(0x0809A0A1);
+ /// assert_eq!(buf, b&quot;\xA1\xA0\x09\x08&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_i32_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i32) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_le_bytes())
+ }
+
+ <span class="doccomment">/// Writes a signed 32 bit integer to `self` in native-endian byte order.
+ ///
+ /// The current position is advanced by 4.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_i32_ne(0x0809A0A1);
+ /// if cfg!(target_endian = &quot;big&quot;) {
+ /// assert_eq!(buf, b&quot;\x08\x09\xA0\xA1&quot;);
+ /// } else {
+ /// assert_eq!(buf, b&quot;\xA1\xA0\x09\x08&quot;);
+ /// }
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_i32_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i32) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_ne_bytes())
+ }
+
+ <span class="doccomment">/// Writes an unsigned 64 bit integer to `self` in the big-endian byte order.
+ ///
+ /// The current position is advanced by 8.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_u64(0x0102030405060708);
+ /// assert_eq!(buf, b&quot;\x01\x02\x03\x04\x05\x06\x07\x08&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_u64(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u64) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_be_bytes())
+ }
+
+ <span class="doccomment">/// Writes an unsigned 64 bit integer to `self` in little-endian byte order.
+ ///
+ /// The current position is advanced by 8.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_u64_le(0x0102030405060708);
+ /// assert_eq!(buf, b&quot;\x08\x07\x06\x05\x04\x03\x02\x01&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_u64_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u64) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_le_bytes())
+ }
+
+ <span class="doccomment">/// Writes an unsigned 64 bit integer to `self` in native-endian byte order.
+ ///
+ /// The current position is advanced by 8.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_u64_ne(0x0102030405060708);
+ /// if cfg!(target_endian = &quot;big&quot;) {
+ /// assert_eq!(buf, b&quot;\x01\x02\x03\x04\x05\x06\x07\x08&quot;);
+ /// } else {
+ /// assert_eq!(buf, b&quot;\x08\x07\x06\x05\x04\x03\x02\x01&quot;);
+ /// }
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_u64_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u64) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_ne_bytes())
+ }
+
+ <span class="doccomment">/// Writes a signed 64 bit integer to `self` in the big-endian byte order.
+ ///
+ /// The current position is advanced by 8.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_i64(0x0102030405060708);
+ /// assert_eq!(buf, b&quot;\x01\x02\x03\x04\x05\x06\x07\x08&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_i64(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i64) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_be_bytes())
+ }
+
+ <span class="doccomment">/// Writes a signed 64 bit integer to `self` in little-endian byte order.
+ ///
+ /// The current position is advanced by 8.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_i64_le(0x0102030405060708);
+ /// assert_eq!(buf, b&quot;\x08\x07\x06\x05\x04\x03\x02\x01&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_i64_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i64) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_le_bytes())
+ }
+
+ <span class="doccomment">/// Writes a signed 64 bit integer to `self` in native-endian byte order.
+ ///
+ /// The current position is advanced by 8.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_i64_ne(0x0102030405060708);
+ /// if cfg!(target_endian = &quot;big&quot;) {
+ /// assert_eq!(buf, b&quot;\x01\x02\x03\x04\x05\x06\x07\x08&quot;);
+ /// } else {
+ /// assert_eq!(buf, b&quot;\x08\x07\x06\x05\x04\x03\x02\x01&quot;);
+ /// }
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_i64_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i64) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_ne_bytes())
+ }
+
+ <span class="doccomment">/// Writes an unsigned 128 bit integer to `self` in the big-endian byte order.
+ ///
+ /// The current position is advanced by 16.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_u128(0x01020304050607080910111213141516);
+ /// assert_eq!(buf, b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_u128(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u128) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_be_bytes())
+ }
+
+ <span class="doccomment">/// Writes an unsigned 128 bit integer to `self` in little-endian byte order.
+ ///
+ /// The current position is advanced by 16.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_u128_le(0x01020304050607080910111213141516);
+ /// assert_eq!(buf, b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_u128_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u128) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_le_bytes())
+ }
+
+ <span class="doccomment">/// Writes an unsigned 128 bit integer to `self` in native-endian byte order.
+ ///
+ /// The current position is advanced by 16.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_u128_ne(0x01020304050607080910111213141516);
+ /// if cfg!(target_endian = &quot;big&quot;) {
+ /// assert_eq!(buf, b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16&quot;);
+ /// } else {
+ /// assert_eq!(buf, b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01&quot;);
+ /// }
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_u128_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u128) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_ne_bytes())
+ }
+
+ <span class="doccomment">/// Writes a signed 128 bit integer to `self` in the big-endian byte order.
+ ///
+ /// The current position is advanced by 16.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_i128(0x01020304050607080910111213141516);
+ /// assert_eq!(buf, b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_i128(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i128) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_be_bytes())
+ }
+
+ <span class="doccomment">/// Writes a signed 128 bit integer to `self` in little-endian byte order.
+ ///
+ /// The current position is advanced by 16.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_i128_le(0x01020304050607080910111213141516);
+ /// assert_eq!(buf, b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_i128_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i128) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_le_bytes())
+ }
+
+ <span class="doccomment">/// Writes a signed 128 bit integer to `self` in native-endian byte order.
+ ///
+ /// The current position is advanced by 16.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_i128_ne(0x01020304050607080910111213141516);
+ /// if cfg!(target_endian = &quot;big&quot;) {
+ /// assert_eq!(buf, b&quot;\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16&quot;);
+ /// } else {
+ /// assert_eq!(buf, b&quot;\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01&quot;);
+ /// }
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_i128_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i128) {
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_ne_bytes())
+ }
+
+ <span class="doccomment">/// Writes an unsigned n-byte integer to `self` in big-endian byte order.
+ ///
+ /// The current position is advanced by `nbytes`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_uint(0x010203, 3);
+ /// assert_eq!(buf, b&quot;\x01\x02\x03&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self` or if `nbytes` is greater than 8.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_uint(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u64, nbytes: usize) {
+ <span class="kw">let </span>start = <span class="kw">match </span>mem::size_of_val(<span class="kw-2">&amp;</span>n).checked_sub(nbytes) {
+ <span class="prelude-val">Some</span>(start) =&gt; start,
+ <span class="prelude-val">None </span>=&gt; panic_does_not_fit(nbytes, mem::size_of_val(<span class="kw-2">&amp;</span>n)),
+ };
+
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_be_bytes()[start..]);
+ }
+
+ <span class="doccomment">/// Writes an unsigned n-byte integer to `self` in the little-endian byte order.
+ ///
+ /// The current position is advanced by `nbytes`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_uint_le(0x010203, 3);
+ /// assert_eq!(buf, b&quot;\x03\x02\x01&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self` or if `nbytes` is greater than 8.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_uint_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u64, nbytes: usize) {
+ <span class="kw">let </span>slice = n.to_le_bytes();
+ <span class="kw">let </span>slice = <span class="kw">match </span>slice.get(..nbytes) {
+ <span class="prelude-val">Some</span>(slice) =&gt; slice,
+ <span class="prelude-val">None </span>=&gt; panic_does_not_fit(nbytes, slice.len()),
+ };
+
+ <span class="self">self</span>.put_slice(slice);
+ }
+
+ <span class="doccomment">/// Writes an unsigned n-byte integer to `self` in the native-endian byte order.
+ ///
+ /// The current position is advanced by `nbytes`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_uint_ne(0x010203, 3);
+ /// if cfg!(target_endian = &quot;big&quot;) {
+ /// assert_eq!(buf, b&quot;\x01\x02\x03&quot;);
+ /// } else {
+ /// assert_eq!(buf, b&quot;\x03\x02\x01&quot;);
+ /// }
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self` or if `nbytes` is greater than 8.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_uint_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u64, nbytes: usize) {
+ <span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="self">self</span>.put_uint(n, nbytes)
+ } <span class="kw">else </span>{
+ <span class="self">self</span>.put_uint_le(n, nbytes)
+ }
+ }
+
+ <span class="doccomment">/// Writes low `nbytes` of a signed integer to `self` in big-endian byte order.
+ ///
+ /// The current position is advanced by `nbytes`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_int(0x0504010203, 3);
+ /// assert_eq!(buf, b&quot;\x01\x02\x03&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self` or if `nbytes` is greater than 8.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_int(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i64, nbytes: usize) {
+ <span class="kw">let </span>start = <span class="kw">match </span>mem::size_of_val(<span class="kw-2">&amp;</span>n).checked_sub(nbytes) {
+ <span class="prelude-val">Some</span>(start) =&gt; start,
+ <span class="prelude-val">None </span>=&gt; panic_does_not_fit(nbytes, mem::size_of_val(<span class="kw-2">&amp;</span>n)),
+ };
+
+ <span class="self">self</span>.put_slice(<span class="kw-2">&amp;</span>n.to_be_bytes()[start..]);
+ }
+
+ <span class="doccomment">/// Writes low `nbytes` of a signed integer to `self` in little-endian byte order.
+ ///
+ /// The current position is advanced by `nbytes`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_int_le(0x0504010203, 3);
+ /// assert_eq!(buf, b&quot;\x03\x02\x01&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self` or if `nbytes` is greater than 8.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_int_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i64, nbytes: usize) {
+ <span class="kw">let </span>slice = n.to_le_bytes();
+ <span class="kw">let </span>slice = <span class="kw">match </span>slice.get(..nbytes) {
+ <span class="prelude-val">Some</span>(slice) =&gt; slice,
+ <span class="prelude-val">None </span>=&gt; panic_does_not_fit(nbytes, slice.len()),
+ };
+
+ <span class="self">self</span>.put_slice(slice);
+ }
+
+ <span class="doccomment">/// Writes low `nbytes` of a signed integer to `self` in native-endian byte order.
+ ///
+ /// The current position is advanced by `nbytes`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_int_ne(0x010203, 3);
+ /// if cfg!(target_endian = &quot;big&quot;) {
+ /// assert_eq!(buf, b&quot;\x01\x02\x03&quot;);
+ /// } else {
+ /// assert_eq!(buf, b&quot;\x03\x02\x01&quot;);
+ /// }
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self` or if `nbytes` is greater than 8.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_int_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i64, nbytes: usize) {
+ <span class="kw">if </span><span class="macro">cfg!</span>(target_endian = <span class="string">&quot;big&quot;</span>) {
+ <span class="self">self</span>.put_int(n, nbytes)
+ } <span class="kw">else </span>{
+ <span class="self">self</span>.put_int_le(n, nbytes)
+ }
+ }
+
+ <span class="doccomment">/// Writes an IEEE754 single-precision (4 bytes) floating point number to
+ /// `self` in big-endian byte order.
+ ///
+ /// The current position is advanced by 4.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_f32(1.2f32);
+ /// assert_eq!(buf, b&quot;\x3F\x99\x99\x9A&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_f32(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: f32) {
+ <span class="self">self</span>.put_u32(n.to_bits());
+ }
+
+ <span class="doccomment">/// Writes an IEEE754 single-precision (4 bytes) floating point number to
+ /// `self` in little-endian byte order.
+ ///
+ /// The current position is advanced by 4.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_f32_le(1.2f32);
+ /// assert_eq!(buf, b&quot;\x9A\x99\x99\x3F&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_f32_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: f32) {
+ <span class="self">self</span>.put_u32_le(n.to_bits());
+ }
+
+ <span class="doccomment">/// Writes an IEEE754 single-precision (4 bytes) floating point number to
+ /// `self` in native-endian byte order.
+ ///
+ /// The current position is advanced by 4.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_f32_ne(1.2f32);
+ /// if cfg!(target_endian = &quot;big&quot;) {
+ /// assert_eq!(buf, b&quot;\x3F\x99\x99\x9A&quot;);
+ /// } else {
+ /// assert_eq!(buf, b&quot;\x9A\x99\x99\x3F&quot;);
+ /// }
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_f32_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: f32) {
+ <span class="self">self</span>.put_u32_ne(n.to_bits());
+ }
+
+ <span class="doccomment">/// Writes an IEEE754 double-precision (8 bytes) floating point number to
+ /// `self` in big-endian byte order.
+ ///
+ /// The current position is advanced by 8.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_f64(1.2f64);
+ /// assert_eq!(buf, b&quot;\x3F\xF3\x33\x33\x33\x33\x33\x33&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_f64(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: f64) {
+ <span class="self">self</span>.put_u64(n.to_bits());
+ }
+
+ <span class="doccomment">/// Writes an IEEE754 double-precision (8 bytes) floating point number to
+ /// `self` in little-endian byte order.
+ ///
+ /// The current position is advanced by 8.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_f64_le(1.2f64);
+ /// assert_eq!(buf, b&quot;\x33\x33\x33\x33\x33\x33\xF3\x3F&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_f64_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: f64) {
+ <span class="self">self</span>.put_u64_le(n.to_bits());
+ }
+
+ <span class="doccomment">/// Writes an IEEE754 double-precision (8 bytes) floating point number to
+ /// `self` in native-endian byte order.
+ ///
+ /// The current position is advanced by 8.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![];
+ /// buf.put_f64_ne(1.2f64);
+ /// if cfg!(target_endian = &quot;big&quot;) {
+ /// assert_eq!(buf, b&quot;\x3F\xF3\x33\x33\x33\x33\x33\x33&quot;);
+ /// } else {
+ /// assert_eq!(buf, b&quot;\x33\x33\x33\x33\x33\x33\xF3\x3F&quot;);
+ /// }
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// This function panics if there is not enough remaining capacity in
+ /// `self`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_f64_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: f64) {
+ <span class="self">self</span>.put_u64_ne(n.to_bits());
+ }
+
+ <span class="doccomment">/// Creates an adaptor which can write at most `limit` bytes to `self`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let arr = &amp;mut [0u8; 128][..];
+ /// assert_eq!(arr.remaining_mut(), 128);
+ ///
+ /// let dst = arr.limit(10);
+ /// assert_eq!(dst.remaining_mut(), 10);
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>limit(<span class="self">self</span>, limit: usize) -&gt; Limit&lt;<span class="self">Self</span>&gt;
+ <span class="kw">where
+ </span><span class="self">Self</span>: Sized,
+ {
+ limit::new(<span class="self">self</span>, limit)
+ }
+
+ <span class="doccomment">/// Creates an adaptor which implements the `Write` trait for `self`.
+ ///
+ /// This function returns a new value which implements `Write` by adapting
+ /// the `Write` trait functions to the `BufMut` trait functions. Given that
+ /// `BufMut` operations are infallible, none of the `Write` functions will
+ /// return with `Err`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ /// use std::io::Write;
+ ///
+ /// let mut buf = vec![].writer();
+ ///
+ /// let num = buf.write(&amp;b&quot;hello world&quot;[..]).unwrap();
+ /// assert_eq!(11, num);
+ ///
+ /// let buf = buf.into_inner();
+ ///
+ /// assert_eq!(*buf, b&quot;hello world&quot;[..]);
+ /// ```
+ </span><span class="attr">#[cfg(feature = <span class="string">&quot;std&quot;</span>)]
+ #[cfg_attr(docsrs, doc(cfg(feature = <span class="string">&quot;std&quot;</span>)))]
+ #[inline]
+ </span><span class="kw">fn </span>writer(<span class="self">self</span>) -&gt; Writer&lt;<span class="self">Self</span>&gt;
+ <span class="kw">where
+ </span><span class="self">Self</span>: Sized,
+ {
+ writer::new(<span class="self">self</span>)
+ }
+
+ <span class="doccomment">/// Creates an adapter which will chain this buffer with another.
+ ///
+ /// The returned `BufMut` instance will first write to all bytes from
+ /// `self`. Afterwards, it will write to `next`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut a = [0u8; 5];
+ /// let mut b = [0u8; 6];
+ ///
+ /// let mut chain = (&amp;mut a[..]).chain_mut(&amp;mut b[..]);
+ ///
+ /// chain.put_slice(b&quot;hello world&quot;);
+ ///
+ /// assert_eq!(&amp;a[..], b&quot;hello&quot;);
+ /// assert_eq!(&amp;b[..], b&quot; world&quot;);
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>chain_mut&lt;U: BufMut&gt;(<span class="self">self</span>, next: U) -&gt; Chain&lt;<span class="self">Self</span>, U&gt;
+ <span class="kw">where
+ </span><span class="self">Self</span>: Sized,
+ {
+ Chain::new(<span class="self">self</span>, next)
+ }
+}
+
+<span class="macro">macro_rules! </span>deref_forward_bufmut {
+ () =&gt; {
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>remaining_mut(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
+ (<span class="kw-2">**</span><span class="self">self</span>).remaining_mut()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>chunk_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;mut </span>UninitSlice {
+ (<span class="kw-2">**</span><span class="self">self</span>).chunk_mut()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">unsafe fn </span>advance_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>, cnt: usize) {
+ (<span class="kw-2">**</span><span class="self">self</span>).advance_mut(cnt)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_slice(<span class="kw-2">&amp;mut </span><span class="self">self</span>, src: <span class="kw-2">&amp;</span>[u8]) {
+ (<span class="kw-2">**</span><span class="self">self</span>).put_slice(src)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_u8(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u8) {
+ (<span class="kw-2">**</span><span class="self">self</span>).put_u8(n)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_i8(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i8) {
+ (<span class="kw-2">**</span><span class="self">self</span>).put_i8(n)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_u16(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u16) {
+ (<span class="kw-2">**</span><span class="self">self</span>).put_u16(n)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_u16_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u16) {
+ (<span class="kw-2">**</span><span class="self">self</span>).put_u16_le(n)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_u16_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u16) {
+ (<span class="kw-2">**</span><span class="self">self</span>).put_u16_ne(n)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_i16(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i16) {
+ (<span class="kw-2">**</span><span class="self">self</span>).put_i16(n)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_i16_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i16) {
+ (<span class="kw-2">**</span><span class="self">self</span>).put_i16_le(n)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_i16_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i16) {
+ (<span class="kw-2">**</span><span class="self">self</span>).put_i16_ne(n)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_u32(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u32) {
+ (<span class="kw-2">**</span><span class="self">self</span>).put_u32(n)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_u32_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u32) {
+ (<span class="kw-2">**</span><span class="self">self</span>).put_u32_le(n)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_u32_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u32) {
+ (<span class="kw-2">**</span><span class="self">self</span>).put_u32_ne(n)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_i32(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i32) {
+ (<span class="kw-2">**</span><span class="self">self</span>).put_i32(n)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_i32_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i32) {
+ (<span class="kw-2">**</span><span class="self">self</span>).put_i32_le(n)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_i32_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i32) {
+ (<span class="kw-2">**</span><span class="self">self</span>).put_i32_ne(n)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_u64(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u64) {
+ (<span class="kw-2">**</span><span class="self">self</span>).put_u64(n)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_u64_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u64) {
+ (<span class="kw-2">**</span><span class="self">self</span>).put_u64_le(n)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_u64_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: u64) {
+ (<span class="kw-2">**</span><span class="self">self</span>).put_u64_ne(n)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_i64(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i64) {
+ (<span class="kw-2">**</span><span class="self">self</span>).put_i64(n)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_i64_le(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i64) {
+ (<span class="kw-2">**</span><span class="self">self</span>).put_i64_le(n)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_i64_ne(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: i64) {
+ (<span class="kw-2">**</span><span class="self">self</span>).put_i64_ne(n)
+ }
+ };
+}
+
+<span class="kw">unsafe impl</span>&lt;T: BufMut + <span class="question-mark">?</span>Sized&gt; BufMut <span class="kw">for </span><span class="kw-2">&amp;mut </span>T {
+ <span class="macro">deref_forward_bufmut!</span>();
+}
+
+<span class="kw">unsafe impl</span>&lt;T: BufMut + <span class="question-mark">?</span>Sized&gt; BufMut <span class="kw">for </span>Box&lt;T&gt; {
+ <span class="macro">deref_forward_bufmut!</span>();
+}
+
+<span class="kw">unsafe impl </span>BufMut <span class="kw">for </span><span class="kw-2">&amp;mut </span>[u8] {
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>remaining_mut(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
+ <span class="self">self</span>.len()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>chunk_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;mut </span>UninitSlice {
+ UninitSlice::new(<span class="self">self</span>)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">unsafe fn </span>advance_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>, cnt: usize) {
+ <span class="kw">if </span><span class="self">self</span>.len() &lt; cnt {
+ panic_advance(cnt, <span class="self">self</span>.len());
+ }
+
+ <span class="comment">// Lifetime dance taken from `impl Write for &amp;mut [u8]`.
+ </span><span class="kw">let </span>(<span class="kw">_</span>, b) = core::mem::replace(<span class="self">self</span>, <span class="kw-2">&amp;mut </span>[]).split_at_mut(cnt);
+ <span class="kw-2">*</span><span class="self">self </span>= b;
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_slice(<span class="kw-2">&amp;mut </span><span class="self">self</span>, src: <span class="kw-2">&amp;</span>[u8]) {
+ <span class="kw">if </span><span class="self">self</span>.len() &lt; src.len() {
+ panic_advance(src.len(), <span class="self">self</span>.len());
+ }
+
+ <span class="self">self</span>[..src.len()].copy_from_slice(src);
+ <span class="comment">// SAFETY: We just initialized `src.len()` bytes.
+ </span><span class="kw">unsafe </span>{ <span class="self">self</span>.advance_mut(src.len()) };
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_bytes(<span class="kw-2">&amp;mut </span><span class="self">self</span>, val: u8, cnt: usize) {
+ <span class="kw">if </span><span class="self">self</span>.len() &lt; cnt {
+ panic_advance(cnt, <span class="self">self</span>.len());
+ }
+
+ <span class="comment">// SAFETY: We just checked that the pointer is valid for `cnt` bytes.
+ </span><span class="kw">unsafe </span>{
+ ptr::write_bytes(<span class="self">self</span>.as_mut_ptr(), val, cnt);
+ <span class="self">self</span>.advance_mut(cnt);
+ }
+ }
+}
+
+<span class="kw">unsafe impl </span>BufMut <span class="kw">for </span><span class="kw-2">&amp;mut </span>[core::mem::MaybeUninit&lt;u8&gt;] {
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>remaining_mut(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
+ <span class="self">self</span>.len()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>chunk_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;mut </span>UninitSlice {
+ UninitSlice::uninit(<span class="self">self</span>)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">unsafe fn </span>advance_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>, cnt: usize) {
+ <span class="kw">if </span><span class="self">self</span>.len() &lt; cnt {
+ panic_advance(cnt, <span class="self">self</span>.len());
+ }
+
+ <span class="comment">// Lifetime dance taken from `impl Write for &amp;mut [u8]`.
+ </span><span class="kw">let </span>(<span class="kw">_</span>, b) = core::mem::replace(<span class="self">self</span>, <span class="kw-2">&amp;mut </span>[]).split_at_mut(cnt);
+ <span class="kw-2">*</span><span class="self">self </span>= b;
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_slice(<span class="kw-2">&amp;mut </span><span class="self">self</span>, src: <span class="kw-2">&amp;</span>[u8]) {
+ <span class="kw">if </span><span class="self">self</span>.len() &lt; src.len() {
+ panic_advance(src.len(), <span class="self">self</span>.len());
+ }
+
+ <span class="comment">// SAFETY: We just checked that the pointer is valid for `src.len()` bytes.
+ </span><span class="kw">unsafe </span>{
+ ptr::copy_nonoverlapping(src.as_ptr(), <span class="self">self</span>.as_mut_ptr().cast(), src.len());
+ <span class="self">self</span>.advance_mut(src.len());
+ }
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_bytes(<span class="kw-2">&amp;mut </span><span class="self">self</span>, val: u8, cnt: usize) {
+ <span class="kw">if </span><span class="self">self</span>.len() &lt; cnt {
+ panic_advance(cnt, <span class="self">self</span>.len());
+ }
+
+ <span class="comment">// SAFETY: We just checked that the pointer is valid for `cnt` bytes.
+ </span><span class="kw">unsafe </span>{
+ ptr::write_bytes(<span class="self">self</span>.as_mut_ptr() <span class="kw">as </span><span class="kw-2">*mut </span>u8, val, cnt);
+ <span class="self">self</span>.advance_mut(cnt);
+ }
+ }
+}
+
+<span class="kw">unsafe impl </span>BufMut <span class="kw">for </span>Vec&lt;u8&gt; {
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>remaining_mut(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
+ <span class="comment">// A vector can never have more than isize::MAX bytes
+ </span>core::isize::MAX <span class="kw">as </span>usize - <span class="self">self</span>.len()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">unsafe fn </span>advance_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>, cnt: usize) {
+ <span class="kw">let </span>len = <span class="self">self</span>.len();
+ <span class="kw">let </span>remaining = <span class="self">self</span>.capacity() - len;
+
+ <span class="kw">if </span>remaining &lt; cnt {
+ panic_advance(cnt, remaining);
+ }
+
+ <span class="comment">// Addition will not overflow since the sum is at most the capacity.
+ </span><span class="self">self</span>.set_len(len + cnt);
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>chunk_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;mut </span>UninitSlice {
+ <span class="kw">if </span><span class="self">self</span>.capacity() == <span class="self">self</span>.len() {
+ <span class="self">self</span>.reserve(<span class="number">64</span>); <span class="comment">// Grow the vec
+ </span>}
+
+ <span class="kw">let </span>cap = <span class="self">self</span>.capacity();
+ <span class="kw">let </span>len = <span class="self">self</span>.len();
+
+ <span class="kw">let </span>ptr = <span class="self">self</span>.as_mut_ptr();
+ <span class="comment">// SAFETY: Since `ptr` is valid for `cap` bytes, `ptr.add(len)` must be
+ // valid for `cap - len` bytes. The subtraction will not underflow since
+ // `len &lt;= cap`.
+ </span><span class="kw">unsafe </span>{ UninitSlice::from_raw_parts_mut(ptr.add(len), cap - len) }
+ }
+
+ <span class="comment">// Specialize these methods so they can skip checking `remaining_mut`
+ // and `advance_mut`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>put&lt;T: <span class="kw">super</span>::Buf&gt;(<span class="kw-2">&amp;mut </span><span class="self">self</span>, <span class="kw-2">mut </span>src: T)
+ <span class="kw">where
+ </span><span class="self">Self</span>: Sized,
+ {
+ <span class="comment">// In case the src isn&#39;t contiguous, reserve upfront.
+ </span><span class="self">self</span>.reserve(src.remaining());
+
+ <span class="kw">while </span>src.has_remaining() {
+ <span class="kw">let </span>s = src.chunk();
+ <span class="kw">let </span>l = s.len();
+ <span class="self">self</span>.extend_from_slice(s);
+ src.advance(l);
+ }
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_slice(<span class="kw-2">&amp;mut </span><span class="self">self</span>, src: <span class="kw-2">&amp;</span>[u8]) {
+ <span class="self">self</span>.extend_from_slice(src);
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>put_bytes(<span class="kw-2">&amp;mut </span><span class="self">self</span>, val: u8, cnt: usize) {
+ <span class="comment">// If the addition overflows, then the `resize` will fail.
+ </span><span class="kw">let </span>new_len = <span class="self">self</span>.len().saturating_add(cnt);
+ <span class="self">self</span>.resize(new_len, val);
+ }
+}
+
+<span class="comment">// The existence of this function makes the compiler catch if the BufMut
+// trait is &quot;object-safe&quot; or not.
+</span><span class="kw">fn </span>_assert_trait_object(_b: <span class="kw-2">&amp;</span><span class="kw">dyn </span>BufMut) {}
+</code></pre></div>
+</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/src/bytes/buf/chain.rs.html b/src/bytes/buf/chain.rs.html
new file mode 100644
index 0000000..addd856
--- /dev/null
+++ b/src/bytes/buf/chain.rs.html
@@ -0,0 +1,482 @@
+<!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="Source of the Rust file `src/buf/chain.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>chain.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../../../static.files/source-script-74087aa2e88f4475.js"></script><script defer src="../../../source-files.js"></script><script defer src="../../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><div class="width-limiter"><nav class="sub"><a class="sub-logo-container" href="../../../bytes/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><pre class="src-line-numbers"><span id="1">1</span>
+<span id="2">2</span>
+<span id="3">3</span>
+<span id="4">4</span>
+<span id="5">5</span>
+<span id="6">6</span>
+<span id="7">7</span>
+<span id="8">8</span>
+<span id="9">9</span>
+<span id="10">10</span>
+<span id="11">11</span>
+<span id="12">12</span>
+<span id="13">13</span>
+<span id="14">14</span>
+<span id="15">15</span>
+<span id="16">16</span>
+<span id="17">17</span>
+<span id="18">18</span>
+<span id="19">19</span>
+<span id="20">20</span>
+<span id="21">21</span>
+<span id="22">22</span>
+<span id="23">23</span>
+<span id="24">24</span>
+<span id="25">25</span>
+<span id="26">26</span>
+<span id="27">27</span>
+<span id="28">28</span>
+<span id="29">29</span>
+<span id="30">30</span>
+<span id="31">31</span>
+<span id="32">32</span>
+<span id="33">33</span>
+<span id="34">34</span>
+<span id="35">35</span>
+<span id="36">36</span>
+<span id="37">37</span>
+<span id="38">38</span>
+<span id="39">39</span>
+<span id="40">40</span>
+<span id="41">41</span>
+<span id="42">42</span>
+<span id="43">43</span>
+<span id="44">44</span>
+<span id="45">45</span>
+<span id="46">46</span>
+<span id="47">47</span>
+<span id="48">48</span>
+<span id="49">49</span>
+<span id="50">50</span>
+<span id="51">51</span>
+<span id="52">52</span>
+<span id="53">53</span>
+<span id="54">54</span>
+<span id="55">55</span>
+<span id="56">56</span>
+<span id="57">57</span>
+<span id="58">58</span>
+<span id="59">59</span>
+<span id="60">60</span>
+<span id="61">61</span>
+<span id="62">62</span>
+<span id="63">63</span>
+<span id="64">64</span>
+<span id="65">65</span>
+<span id="66">66</span>
+<span id="67">67</span>
+<span id="68">68</span>
+<span id="69">69</span>
+<span id="70">70</span>
+<span id="71">71</span>
+<span id="72">72</span>
+<span id="73">73</span>
+<span id="74">74</span>
+<span id="75">75</span>
+<span id="76">76</span>
+<span id="77">77</span>
+<span id="78">78</span>
+<span id="79">79</span>
+<span id="80">80</span>
+<span id="81">81</span>
+<span id="82">82</span>
+<span id="83">83</span>
+<span id="84">84</span>
+<span id="85">85</span>
+<span id="86">86</span>
+<span id="87">87</span>
+<span id="88">88</span>
+<span id="89">89</span>
+<span id="90">90</span>
+<span id="91">91</span>
+<span id="92">92</span>
+<span id="93">93</span>
+<span id="94">94</span>
+<span id="95">95</span>
+<span id="96">96</span>
+<span id="97">97</span>
+<span id="98">98</span>
+<span id="99">99</span>
+<span id="100">100</span>
+<span id="101">101</span>
+<span id="102">102</span>
+<span id="103">103</span>
+<span id="104">104</span>
+<span id="105">105</span>
+<span id="106">106</span>
+<span id="107">107</span>
+<span id="108">108</span>
+<span id="109">109</span>
+<span id="110">110</span>
+<span id="111">111</span>
+<span id="112">112</span>
+<span id="113">113</span>
+<span id="114">114</span>
+<span id="115">115</span>
+<span id="116">116</span>
+<span id="117">117</span>
+<span id="118">118</span>
+<span id="119">119</span>
+<span id="120">120</span>
+<span id="121">121</span>
+<span id="122">122</span>
+<span id="123">123</span>
+<span id="124">124</span>
+<span id="125">125</span>
+<span id="126">126</span>
+<span id="127">127</span>
+<span id="128">128</span>
+<span id="129">129</span>
+<span id="130">130</span>
+<span id="131">131</span>
+<span id="132">132</span>
+<span id="133">133</span>
+<span id="134">134</span>
+<span id="135">135</span>
+<span id="136">136</span>
+<span id="137">137</span>
+<span id="138">138</span>
+<span id="139">139</span>
+<span id="140">140</span>
+<span id="141">141</span>
+<span id="142">142</span>
+<span id="143">143</span>
+<span id="144">144</span>
+<span id="145">145</span>
+<span id="146">146</span>
+<span id="147">147</span>
+<span id="148">148</span>
+<span id="149">149</span>
+<span id="150">150</span>
+<span id="151">151</span>
+<span id="152">152</span>
+<span id="153">153</span>
+<span id="154">154</span>
+<span id="155">155</span>
+<span id="156">156</span>
+<span id="157">157</span>
+<span id="158">158</span>
+<span id="159">159</span>
+<span id="160">160</span>
+<span id="161">161</span>
+<span id="162">162</span>
+<span id="163">163</span>
+<span id="164">164</span>
+<span id="165">165</span>
+<span id="166">166</span>
+<span id="167">167</span>
+<span id="168">168</span>
+<span id="169">169</span>
+<span id="170">170</span>
+<span id="171">171</span>
+<span id="172">172</span>
+<span id="173">173</span>
+<span id="174">174</span>
+<span id="175">175</span>
+<span id="176">176</span>
+<span id="177">177</span>
+<span id="178">178</span>
+<span id="179">179</span>
+<span id="180">180</span>
+<span id="181">181</span>
+<span id="182">182</span>
+<span id="183">183</span>
+<span id="184">184</span>
+<span id="185">185</span>
+<span id="186">186</span>
+<span id="187">187</span>
+<span id="188">188</span>
+<span id="189">189</span>
+<span id="190">190</span>
+<span id="191">191</span>
+<span id="192">192</span>
+<span id="193">193</span>
+<span id="194">194</span>
+<span id="195">195</span>
+<span id="196">196</span>
+<span id="197">197</span>
+<span id="198">198</span>
+<span id="199">199</span>
+<span id="200">200</span>
+<span id="201">201</span>
+<span id="202">202</span>
+<span id="203">203</span>
+<span id="204">204</span>
+<span id="205">205</span>
+<span id="206">206</span>
+<span id="207">207</span>
+<span id="208">208</span>
+<span id="209">209</span>
+<span id="210">210</span>
+<span id="211">211</span>
+<span id="212">212</span>
+<span id="213">213</span>
+<span id="214">214</span>
+<span id="215">215</span>
+<span id="216">216</span>
+<span id="217">217</span>
+<span id="218">218</span>
+<span id="219">219</span>
+<span id="220">220</span>
+<span id="221">221</span>
+<span id="222">222</span>
+<span id="223">223</span>
+<span id="224">224</span>
+<span id="225">225</span>
+<span id="226">226</span>
+<span id="227">227</span>
+<span id="228">228</span>
+<span id="229">229</span>
+<span id="230">230</span>
+<span id="231">231</span>
+<span id="232">232</span>
+<span id="233">233</span>
+<span id="234">234</span>
+<span id="235">235</span>
+<span id="236">236</span>
+<span id="237">237</span>
+<span id="238">238</span>
+<span id="239">239</span>
+<span id="240">240</span>
+</pre><pre class="rust"><code><span class="kw">use </span><span class="kw">crate</span>::buf::{IntoIter, UninitSlice};
+<span class="kw">use crate</span>::{Buf, BufMut, Bytes};
+
+<span class="attr">#[cfg(feature = <span class="string">&quot;std&quot;</span>)]
+</span><span class="kw">use </span>std::io::IoSlice;
+
+<span class="doccomment">/// A `Chain` sequences two buffers.
+///
+/// `Chain` is an adapter that links two underlying buffers and provides a
+/// continuous view across both buffers. It is able to sequence either immutable
+/// buffers ([`Buf`] values) or mutable buffers ([`BufMut`] values).
+///
+/// This struct is generally created by calling [`Buf::chain`]. Please see that
+/// function&#39;s documentation for more detail.
+///
+/// # Examples
+///
+/// ```
+/// use bytes::{Bytes, Buf};
+///
+/// let mut buf = (&amp;b&quot;hello &quot;[..])
+/// .chain(&amp;b&quot;world&quot;[..]);
+///
+/// let full: Bytes = buf.copy_to_bytes(11);
+/// assert_eq!(full[..], b&quot;hello world&quot;[..]);
+/// ```
+///
+/// [`Buf::chain`]: Buf::chain
+</span><span class="attr">#[derive(Debug)]
+</span><span class="kw">pub struct </span>Chain&lt;T, U&gt; {
+ a: T,
+ b: U,
+}
+
+<span class="kw">impl</span>&lt;T, U&gt; Chain&lt;T, U&gt; {
+ <span class="doccomment">/// Creates a new `Chain` sequencing the provided values.
+ </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>new(a: T, b: U) -&gt; Chain&lt;T, U&gt; {
+ Chain { a, b }
+ }
+
+ <span class="doccomment">/// Gets a reference to the first underlying `Buf`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let buf = (&amp;b&quot;hello&quot;[..])
+ /// .chain(&amp;b&quot;world&quot;[..]);
+ ///
+ /// assert_eq!(buf.first_ref()[..], b&quot;hello&quot;[..]);
+ /// ```
+ </span><span class="kw">pub fn </span>first_ref(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>T {
+ <span class="kw-2">&amp;</span><span class="self">self</span>.a
+ }
+
+ <span class="doccomment">/// Gets a mutable reference to the first underlying `Buf`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = (&amp;b&quot;hello&quot;[..])
+ /// .chain(&amp;b&quot;world&quot;[..]);
+ ///
+ /// buf.first_mut().advance(1);
+ ///
+ /// let full = buf.copy_to_bytes(9);
+ /// assert_eq!(full, b&quot;elloworld&quot;[..]);
+ /// ```
+ </span><span class="kw">pub fn </span>first_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;mut </span>T {
+ <span class="kw-2">&amp;mut </span><span class="self">self</span>.a
+ }
+
+ <span class="doccomment">/// Gets a reference to the last underlying `Buf`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let buf = (&amp;b&quot;hello&quot;[..])
+ /// .chain(&amp;b&quot;world&quot;[..]);
+ ///
+ /// assert_eq!(buf.last_ref()[..], b&quot;world&quot;[..]);
+ /// ```
+ </span><span class="kw">pub fn </span>last_ref(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>U {
+ <span class="kw-2">&amp;</span><span class="self">self</span>.b
+ }
+
+ <span class="doccomment">/// Gets a mutable reference to the last underlying `Buf`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = (&amp;b&quot;hello &quot;[..])
+ /// .chain(&amp;b&quot;world&quot;[..]);
+ ///
+ /// buf.last_mut().advance(1);
+ ///
+ /// let full = buf.copy_to_bytes(10);
+ /// assert_eq!(full, b&quot;hello orld&quot;[..]);
+ /// ```
+ </span><span class="kw">pub fn </span>last_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;mut </span>U {
+ <span class="kw-2">&amp;mut </span><span class="self">self</span>.b
+ }
+
+ <span class="doccomment">/// Consumes this `Chain`, returning the underlying values.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Buf;
+ ///
+ /// let chain = (&amp;b&quot;hello&quot;[..])
+ /// .chain(&amp;b&quot;world&quot;[..]);
+ ///
+ /// let (first, last) = chain.into_inner();
+ /// assert_eq!(first[..], b&quot;hello&quot;[..]);
+ /// assert_eq!(last[..], b&quot;world&quot;[..]);
+ /// ```
+ </span><span class="kw">pub fn </span>into_inner(<span class="self">self</span>) -&gt; (T, U) {
+ (<span class="self">self</span>.a, <span class="self">self</span>.b)
+ }
+}
+
+<span class="kw">impl</span>&lt;T, U&gt; Buf <span class="kw">for </span>Chain&lt;T, U&gt;
+<span class="kw">where
+ </span>T: Buf,
+ U: Buf,
+{
+ <span class="kw">fn </span>remaining(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
+ <span class="self">self</span>.a.remaining().saturating_add(<span class="self">self</span>.b.remaining())
+ }
+
+ <span class="kw">fn </span>chunk(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>[u8] {
+ <span class="kw">if </span><span class="self">self</span>.a.has_remaining() {
+ <span class="self">self</span>.a.chunk()
+ } <span class="kw">else </span>{
+ <span class="self">self</span>.b.chunk()
+ }
+ }
+
+ <span class="kw">fn </span>advance(<span class="kw-2">&amp;mut </span><span class="self">self</span>, <span class="kw-2">mut </span>cnt: usize) {
+ <span class="kw">let </span>a_rem = <span class="self">self</span>.a.remaining();
+
+ <span class="kw">if </span>a_rem != <span class="number">0 </span>{
+ <span class="kw">if </span>a_rem &gt;= cnt {
+ <span class="self">self</span>.a.advance(cnt);
+ <span class="kw">return</span>;
+ }
+
+ <span class="comment">// Consume what is left of a
+ </span><span class="self">self</span>.a.advance(a_rem);
+
+ cnt -= a_rem;
+ }
+
+ <span class="self">self</span>.b.advance(cnt);
+ }
+
+ <span class="attr">#[cfg(feature = <span class="string">&quot;std&quot;</span>)]
+ </span><span class="kw">fn </span>chunks_vectored&lt;<span class="lifetime">&#39;a</span>&gt;(<span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span><span class="self">self</span>, dst: <span class="kw-2">&amp;mut </span>[IoSlice&lt;<span class="lifetime">&#39;a</span>&gt;]) -&gt; usize {
+ <span class="kw">let </span><span class="kw-2">mut </span>n = <span class="self">self</span>.a.chunks_vectored(dst);
+ n += <span class="self">self</span>.b.chunks_vectored(<span class="kw-2">&amp;mut </span>dst[n..]);
+ n
+ }
+
+ <span class="kw">fn </span>copy_to_bytes(<span class="kw-2">&amp;mut </span><span class="self">self</span>, len: usize) -&gt; Bytes {
+ <span class="kw">let </span>a_rem = <span class="self">self</span>.a.remaining();
+ <span class="kw">if </span>a_rem &gt;= len {
+ <span class="self">self</span>.a.copy_to_bytes(len)
+ } <span class="kw">else if </span>a_rem == <span class="number">0 </span>{
+ <span class="self">self</span>.b.copy_to_bytes(len)
+ } <span class="kw">else </span>{
+ <span class="macro">assert!</span>(
+ len - a_rem &lt;= <span class="self">self</span>.b.remaining(),
+ <span class="string">&quot;`len` greater than remaining&quot;
+ </span>);
+ <span class="kw">let </span><span class="kw-2">mut </span>ret = <span class="kw">crate</span>::BytesMut::with_capacity(len);
+ ret.put(<span class="kw-2">&amp;mut </span><span class="self">self</span>.a);
+ ret.put((<span class="kw-2">&amp;mut </span><span class="self">self</span>.b).take(len - a_rem));
+ ret.freeze()
+ }
+ }
+}
+
+<span class="kw">unsafe impl</span>&lt;T, U&gt; BufMut <span class="kw">for </span>Chain&lt;T, U&gt;
+<span class="kw">where
+ </span>T: BufMut,
+ U: BufMut,
+{
+ <span class="kw">fn </span>remaining_mut(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
+ <span class="self">self</span>.a
+ .remaining_mut()
+ .saturating_add(<span class="self">self</span>.b.remaining_mut())
+ }
+
+ <span class="kw">fn </span>chunk_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;mut </span>UninitSlice {
+ <span class="kw">if </span><span class="self">self</span>.a.has_remaining_mut() {
+ <span class="self">self</span>.a.chunk_mut()
+ } <span class="kw">else </span>{
+ <span class="self">self</span>.b.chunk_mut()
+ }
+ }
+
+ <span class="kw">unsafe fn </span>advance_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>, <span class="kw-2">mut </span>cnt: usize) {
+ <span class="kw">let </span>a_rem = <span class="self">self</span>.a.remaining_mut();
+
+ <span class="kw">if </span>a_rem != <span class="number">0 </span>{
+ <span class="kw">if </span>a_rem &gt;= cnt {
+ <span class="self">self</span>.a.advance_mut(cnt);
+ <span class="kw">return</span>;
+ }
+
+ <span class="comment">// Consume what is left of a
+ </span><span class="self">self</span>.a.advance_mut(a_rem);
+
+ cnt -= a_rem;
+ }
+
+ <span class="self">self</span>.b.advance_mut(cnt);
+ }
+}
+
+<span class="kw">impl</span>&lt;T, U&gt; IntoIterator <span class="kw">for </span>Chain&lt;T, U&gt;
+<span class="kw">where
+ </span>T: Buf,
+ U: Buf,
+{
+ <span class="kw">type </span>Item = u8;
+ <span class="kw">type </span>IntoIter = IntoIter&lt;Chain&lt;T, U&gt;&gt;;
+
+ <span class="kw">fn </span>into_iter(<span class="self">self</span>) -&gt; <span class="self">Self</span>::IntoIter {
+ IntoIter::new(<span class="self">self</span>)
+ }
+}
+</code></pre></div>
+</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/src/bytes/buf/iter.rs.html b/src/bytes/buf/iter.rs.html
new file mode 100644
index 0000000..766cf21
--- /dev/null
+++ b/src/bytes/buf/iter.rs.html
@@ -0,0 +1,256 @@
+<!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="Source of the Rust file `src/buf/iter.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>iter.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../../../static.files/source-script-74087aa2e88f4475.js"></script><script defer src="../../../source-files.js"></script><script defer src="../../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><div class="width-limiter"><nav class="sub"><a class="sub-logo-container" href="../../../bytes/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><pre class="src-line-numbers"><span id="1">1</span>
+<span id="2">2</span>
+<span id="3">3</span>
+<span id="4">4</span>
+<span id="5">5</span>
+<span id="6">6</span>
+<span id="7">7</span>
+<span id="8">8</span>
+<span id="9">9</span>
+<span id="10">10</span>
+<span id="11">11</span>
+<span id="12">12</span>
+<span id="13">13</span>
+<span id="14">14</span>
+<span id="15">15</span>
+<span id="16">16</span>
+<span id="17">17</span>
+<span id="18">18</span>
+<span id="19">19</span>
+<span id="20">20</span>
+<span id="21">21</span>
+<span id="22">22</span>
+<span id="23">23</span>
+<span id="24">24</span>
+<span id="25">25</span>
+<span id="26">26</span>
+<span id="27">27</span>
+<span id="28">28</span>
+<span id="29">29</span>
+<span id="30">30</span>
+<span id="31">31</span>
+<span id="32">32</span>
+<span id="33">33</span>
+<span id="34">34</span>
+<span id="35">35</span>
+<span id="36">36</span>
+<span id="37">37</span>
+<span id="38">38</span>
+<span id="39">39</span>
+<span id="40">40</span>
+<span id="41">41</span>
+<span id="42">42</span>
+<span id="43">43</span>
+<span id="44">44</span>
+<span id="45">45</span>
+<span id="46">46</span>
+<span id="47">47</span>
+<span id="48">48</span>
+<span id="49">49</span>
+<span id="50">50</span>
+<span id="51">51</span>
+<span id="52">52</span>
+<span id="53">53</span>
+<span id="54">54</span>
+<span id="55">55</span>
+<span id="56">56</span>
+<span id="57">57</span>
+<span id="58">58</span>
+<span id="59">59</span>
+<span id="60">60</span>
+<span id="61">61</span>
+<span id="62">62</span>
+<span id="63">63</span>
+<span id="64">64</span>
+<span id="65">65</span>
+<span id="66">66</span>
+<span id="67">67</span>
+<span id="68">68</span>
+<span id="69">69</span>
+<span id="70">70</span>
+<span id="71">71</span>
+<span id="72">72</span>
+<span id="73">73</span>
+<span id="74">74</span>
+<span id="75">75</span>
+<span id="76">76</span>
+<span id="77">77</span>
+<span id="78">78</span>
+<span id="79">79</span>
+<span id="80">80</span>
+<span id="81">81</span>
+<span id="82">82</span>
+<span id="83">83</span>
+<span id="84">84</span>
+<span id="85">85</span>
+<span id="86">86</span>
+<span id="87">87</span>
+<span id="88">88</span>
+<span id="89">89</span>
+<span id="90">90</span>
+<span id="91">91</span>
+<span id="92">92</span>
+<span id="93">93</span>
+<span id="94">94</span>
+<span id="95">95</span>
+<span id="96">96</span>
+<span id="97">97</span>
+<span id="98">98</span>
+<span id="99">99</span>
+<span id="100">100</span>
+<span id="101">101</span>
+<span id="102">102</span>
+<span id="103">103</span>
+<span id="104">104</span>
+<span id="105">105</span>
+<span id="106">106</span>
+<span id="107">107</span>
+<span id="108">108</span>
+<span id="109">109</span>
+<span id="110">110</span>
+<span id="111">111</span>
+<span id="112">112</span>
+<span id="113">113</span>
+<span id="114">114</span>
+<span id="115">115</span>
+<span id="116">116</span>
+<span id="117">117</span>
+<span id="118">118</span>
+<span id="119">119</span>
+<span id="120">120</span>
+<span id="121">121</span>
+<span id="122">122</span>
+<span id="123">123</span>
+<span id="124">124</span>
+<span id="125">125</span>
+<span id="126">126</span>
+<span id="127">127</span>
+</pre><pre class="rust"><code><span class="kw">use </span><span class="kw">crate</span>::Buf;
+
+<span class="doccomment">/// Iterator over the bytes contained by the buffer.
+///
+/// # Examples
+///
+/// Basic usage:
+///
+/// ```
+/// use bytes::Bytes;
+///
+/// let buf = Bytes::from(&amp;b&quot;abc&quot;[..]);
+/// let mut iter = buf.into_iter();
+///
+/// assert_eq!(iter.next(), Some(b&#39;a&#39;));
+/// assert_eq!(iter.next(), Some(b&#39;b&#39;));
+/// assert_eq!(iter.next(), Some(b&#39;c&#39;));
+/// assert_eq!(iter.next(), None);
+/// ```
+</span><span class="attr">#[derive(Debug)]
+</span><span class="kw">pub struct </span>IntoIter&lt;T&gt; {
+ inner: T,
+}
+
+<span class="kw">impl</span>&lt;T&gt; IntoIter&lt;T&gt; {
+ <span class="doccomment">/// Creates an iterator over the bytes contained by the buffer.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Bytes;
+ ///
+ /// let buf = Bytes::from_static(b&quot;abc&quot;);
+ /// let mut iter = buf.into_iter();
+ ///
+ /// assert_eq!(iter.next(), Some(b&#39;a&#39;));
+ /// assert_eq!(iter.next(), Some(b&#39;b&#39;));
+ /// assert_eq!(iter.next(), Some(b&#39;c&#39;));
+ /// assert_eq!(iter.next(), None);
+ /// ```
+ </span><span class="kw">pub fn </span>new(inner: T) -&gt; IntoIter&lt;T&gt; {
+ IntoIter { inner }
+ }
+
+ <span class="doccomment">/// Consumes this `IntoIter`, returning the underlying value.
+ ///
+ /// # Examples
+ ///
+ /// ```rust
+ /// use bytes::{Buf, Bytes};
+ ///
+ /// let buf = Bytes::from(&amp;b&quot;abc&quot;[..]);
+ /// let mut iter = buf.into_iter();
+ ///
+ /// assert_eq!(iter.next(), Some(b&#39;a&#39;));
+ ///
+ /// let buf = iter.into_inner();
+ /// assert_eq!(2, buf.remaining());
+ /// ```
+ </span><span class="kw">pub fn </span>into_inner(<span class="self">self</span>) -&gt; T {
+ <span class="self">self</span>.inner
+ }
+
+ <span class="doccomment">/// Gets a reference to the underlying `Buf`.
+ ///
+ /// It is inadvisable to directly read from the underlying `Buf`.
+ ///
+ /// # Examples
+ ///
+ /// ```rust
+ /// use bytes::{Buf, Bytes};
+ ///
+ /// let buf = Bytes::from(&amp;b&quot;abc&quot;[..]);
+ /// let mut iter = buf.into_iter();
+ ///
+ /// assert_eq!(iter.next(), Some(b&#39;a&#39;));
+ ///
+ /// assert_eq!(2, iter.get_ref().remaining());
+ /// ```
+ </span><span class="kw">pub fn </span>get_ref(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>T {
+ <span class="kw-2">&amp;</span><span class="self">self</span>.inner
+ }
+
+ <span class="doccomment">/// Gets a mutable reference to the underlying `Buf`.
+ ///
+ /// It is inadvisable to directly read from the underlying `Buf`.
+ ///
+ /// # Examples
+ ///
+ /// ```rust
+ /// use bytes::{Buf, BytesMut};
+ ///
+ /// let buf = BytesMut::from(&amp;b&quot;abc&quot;[..]);
+ /// let mut iter = buf.into_iter();
+ ///
+ /// assert_eq!(iter.next(), Some(b&#39;a&#39;));
+ ///
+ /// iter.get_mut().advance(1);
+ ///
+ /// assert_eq!(iter.next(), Some(b&#39;c&#39;));
+ /// ```
+ </span><span class="kw">pub fn </span>get_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;mut </span>T {
+ <span class="kw-2">&amp;mut </span><span class="self">self</span>.inner
+ }
+}
+
+<span class="kw">impl</span>&lt;T: Buf&gt; Iterator <span class="kw">for </span>IntoIter&lt;T&gt; {
+ <span class="kw">type </span>Item = u8;
+
+ <span class="kw">fn </span>next(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="prelude-ty">Option</span>&lt;u8&gt; {
+ <span class="kw">if </span>!<span class="self">self</span>.inner.has_remaining() {
+ <span class="kw">return </span><span class="prelude-val">None</span>;
+ }
+
+ <span class="kw">let </span>b = <span class="self">self</span>.inner.chunk()[<span class="number">0</span>];
+ <span class="self">self</span>.inner.advance(<span class="number">1</span>);
+
+ <span class="prelude-val">Some</span>(b)
+ }
+
+ <span class="kw">fn </span>size_hint(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; (usize, <span class="prelude-ty">Option</span>&lt;usize&gt;) {
+ <span class="kw">let </span>rem = <span class="self">self</span>.inner.remaining();
+ (rem, <span class="prelude-val">Some</span>(rem))
+ }
+}
+
+<span class="kw">impl</span>&lt;T: Buf&gt; ExactSizeIterator <span class="kw">for </span>IntoIter&lt;T&gt; {}
+</code></pre></div>
+</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/src/bytes/buf/limit.rs.html b/src/bytes/buf/limit.rs.html
new file mode 100644
index 0000000..c4ed6d6
--- /dev/null
+++ b/src/bytes/buf/limit.rs.html
@@ -0,0 +1,152 @@
+<!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="Source of the Rust file `src/buf/limit.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>limit.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../../../static.files/source-script-74087aa2e88f4475.js"></script><script defer src="../../../source-files.js"></script><script defer src="../../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><div class="width-limiter"><nav class="sub"><a class="sub-logo-container" href="../../../bytes/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><pre class="src-line-numbers"><span id="1">1</span>
+<span id="2">2</span>
+<span id="3">3</span>
+<span id="4">4</span>
+<span id="5">5</span>
+<span id="6">6</span>
+<span id="7">7</span>
+<span id="8">8</span>
+<span id="9">9</span>
+<span id="10">10</span>
+<span id="11">11</span>
+<span id="12">12</span>
+<span id="13">13</span>
+<span id="14">14</span>
+<span id="15">15</span>
+<span id="16">16</span>
+<span id="17">17</span>
+<span id="18">18</span>
+<span id="19">19</span>
+<span id="20">20</span>
+<span id="21">21</span>
+<span id="22">22</span>
+<span id="23">23</span>
+<span id="24">24</span>
+<span id="25">25</span>
+<span id="26">26</span>
+<span id="27">27</span>
+<span id="28">28</span>
+<span id="29">29</span>
+<span id="30">30</span>
+<span id="31">31</span>
+<span id="32">32</span>
+<span id="33">33</span>
+<span id="34">34</span>
+<span id="35">35</span>
+<span id="36">36</span>
+<span id="37">37</span>
+<span id="38">38</span>
+<span id="39">39</span>
+<span id="40">40</span>
+<span id="41">41</span>
+<span id="42">42</span>
+<span id="43">43</span>
+<span id="44">44</span>
+<span id="45">45</span>
+<span id="46">46</span>
+<span id="47">47</span>
+<span id="48">48</span>
+<span id="49">49</span>
+<span id="50">50</span>
+<span id="51">51</span>
+<span id="52">52</span>
+<span id="53">53</span>
+<span id="54">54</span>
+<span id="55">55</span>
+<span id="56">56</span>
+<span id="57">57</span>
+<span id="58">58</span>
+<span id="59">59</span>
+<span id="60">60</span>
+<span id="61">61</span>
+<span id="62">62</span>
+<span id="63">63</span>
+<span id="64">64</span>
+<span id="65">65</span>
+<span id="66">66</span>
+<span id="67">67</span>
+<span id="68">68</span>
+<span id="69">69</span>
+<span id="70">70</span>
+<span id="71">71</span>
+<span id="72">72</span>
+<span id="73">73</span>
+<span id="74">74</span>
+<span id="75">75</span>
+</pre><pre class="rust"><code><span class="kw">use </span><span class="kw">crate</span>::buf::UninitSlice;
+<span class="kw">use </span><span class="kw">crate</span>::BufMut;
+
+<span class="kw">use </span>core::cmp;
+
+<span class="doccomment">/// A `BufMut` adapter which limits the amount of bytes that can be written
+/// to an underlying buffer.
+</span><span class="attr">#[derive(Debug)]
+</span><span class="kw">pub struct </span>Limit&lt;T&gt; {
+ inner: T,
+ limit: usize,
+}
+
+<span class="kw">pub</span>(<span class="kw">super</span>) <span class="kw">fn </span>new&lt;T&gt;(inner: T, limit: usize) -&gt; Limit&lt;T&gt; {
+ Limit { inner, limit }
+}
+
+<span class="kw">impl</span>&lt;T&gt; Limit&lt;T&gt; {
+ <span class="doccomment">/// Consumes this `Limit`, returning the underlying value.
+ </span><span class="kw">pub fn </span>into_inner(<span class="self">self</span>) -&gt; T {
+ <span class="self">self</span>.inner
+ }
+
+ <span class="doccomment">/// Gets a reference to the underlying `BufMut`.
+ ///
+ /// It is inadvisable to directly write to the underlying `BufMut`.
+ </span><span class="kw">pub fn </span>get_ref(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>T {
+ <span class="kw-2">&amp;</span><span class="self">self</span>.inner
+ }
+
+ <span class="doccomment">/// Gets a mutable reference to the underlying `BufMut`.
+ ///
+ /// It is inadvisable to directly write to the underlying `BufMut`.
+ </span><span class="kw">pub fn </span>get_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;mut </span>T {
+ <span class="kw-2">&amp;mut </span><span class="self">self</span>.inner
+ }
+
+ <span class="doccomment">/// Returns the maximum number of bytes that can be written
+ ///
+ /// # Note
+ ///
+ /// If the inner `BufMut` has fewer bytes than indicated by this method then
+ /// that is the actual number of available bytes.
+ </span><span class="kw">pub fn </span>limit(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
+ <span class="self">self</span>.limit
+ }
+
+ <span class="doccomment">/// Sets the maximum number of bytes that can be written.
+ ///
+ /// # Note
+ ///
+ /// If the inner `BufMut` has fewer bytes than `lim` then that is the actual
+ /// number of available bytes.
+ </span><span class="kw">pub fn </span>set_limit(<span class="kw-2">&amp;mut </span><span class="self">self</span>, lim: usize) {
+ <span class="self">self</span>.limit = lim
+ }
+}
+
+<span class="kw">unsafe impl</span>&lt;T: BufMut&gt; BufMut <span class="kw">for </span>Limit&lt;T&gt; {
+ <span class="kw">fn </span>remaining_mut(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
+ cmp::min(<span class="self">self</span>.inner.remaining_mut(), <span class="self">self</span>.limit)
+ }
+
+ <span class="kw">fn </span>chunk_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;mut </span>UninitSlice {
+ <span class="kw">let </span>bytes = <span class="self">self</span>.inner.chunk_mut();
+ <span class="kw">let </span>end = cmp::min(bytes.len(), <span class="self">self</span>.limit);
+ <span class="kw-2">&amp;mut </span>bytes[..end]
+ }
+
+ <span class="kw">unsafe fn </span>advance_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>, cnt: usize) {
+ <span class="macro">assert!</span>(cnt &lt;= <span class="self">self</span>.limit);
+ <span class="self">self</span>.inner.advance_mut(cnt);
+ <span class="self">self</span>.limit -= cnt;
+ }
+}
+</code></pre></div>
+</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/src/bytes/buf/mod.rs.html b/src/bytes/buf/mod.rs.html
new file mode 100644
index 0000000..fbd7ae7
--- /dev/null
+++ b/src/bytes/buf/mod.rs.html
@@ -0,0 +1,80 @@
+<!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="Source of the Rust file `src/buf/mod.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>mod.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../../../static.files/source-script-74087aa2e88f4475.js"></script><script defer src="../../../source-files.js"></script><script defer src="../../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><div class="width-limiter"><nav class="sub"><a class="sub-logo-container" href="../../../bytes/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><pre class="src-line-numbers"><span id="1">1</span>
+<span id="2">2</span>
+<span id="3">3</span>
+<span id="4">4</span>
+<span id="5">5</span>
+<span id="6">6</span>
+<span id="7">7</span>
+<span id="8">8</span>
+<span id="9">9</span>
+<span id="10">10</span>
+<span id="11">11</span>
+<span id="12">12</span>
+<span id="13">13</span>
+<span id="14">14</span>
+<span id="15">15</span>
+<span id="16">16</span>
+<span id="17">17</span>
+<span id="18">18</span>
+<span id="19">19</span>
+<span id="20">20</span>
+<span id="21">21</span>
+<span id="22">22</span>
+<span id="23">23</span>
+<span id="24">24</span>
+<span id="25">25</span>
+<span id="26">26</span>
+<span id="27">27</span>
+<span id="28">28</span>
+<span id="29">29</span>
+<span id="30">30</span>
+<span id="31">31</span>
+<span id="32">32</span>
+<span id="33">33</span>
+<span id="34">34</span>
+<span id="35">35</span>
+<span id="36">36</span>
+<span id="37">37</span>
+<span id="38">38</span>
+<span id="39">39</span>
+</pre><pre class="rust"><code><span class="doccomment">//! Utilities for working with buffers.
+//!
+//! A buffer is any structure that contains a sequence of bytes. The bytes may
+//! or may not be stored in contiguous memory. This module contains traits used
+//! to abstract over buffers as well as utilities for working with buffer types.
+//!
+//! # `Buf`, `BufMut`
+//!
+//! These are the two foundational traits for abstractly working with buffers.
+//! They can be thought as iterators for byte structures. They offer additional
+//! performance over `Iterator` by providing an API optimized for byte slices.
+//!
+//! See [`Buf`] and [`BufMut`] for more details.
+//!
+//! [rope]: https://en.wikipedia.org/wiki/Rope_(data_structure)
+
+</span><span class="kw">mod </span>buf_impl;
+<span class="kw">mod </span>buf_mut;
+<span class="kw">mod </span>chain;
+<span class="kw">mod </span>iter;
+<span class="kw">mod </span>limit;
+<span class="attr">#[cfg(feature = <span class="string">&quot;std&quot;</span>)]
+</span><span class="kw">mod </span>reader;
+<span class="kw">mod </span>take;
+<span class="kw">mod </span>uninit_slice;
+<span class="kw">mod </span>vec_deque;
+<span class="attr">#[cfg(feature = <span class="string">&quot;std&quot;</span>)]
+</span><span class="kw">mod </span>writer;
+
+<span class="kw">pub use </span><span class="self">self</span>::buf_impl::Buf;
+<span class="kw">pub use </span><span class="self">self</span>::buf_mut::BufMut;
+<span class="kw">pub use </span><span class="self">self</span>::chain::Chain;
+<span class="kw">pub use </span><span class="self">self</span>::iter::IntoIter;
+<span class="kw">pub use </span><span class="self">self</span>::limit::Limit;
+<span class="kw">pub use </span><span class="self">self</span>::take::Take;
+<span class="kw">pub use </span><span class="self">self</span>::uninit_slice::UninitSlice;
+
+<span class="attr">#[cfg(feature = <span class="string">&quot;std&quot;</span>)]
+</span><span class="kw">pub use </span><span class="self">self</span>::{reader::Reader, writer::Writer};
+</code></pre></div>
+</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/src/bytes/buf/reader.rs.html b/src/bytes/buf/reader.rs.html
new file mode 100644
index 0000000..a32bc56
--- /dev/null
+++ b/src/bytes/buf/reader.rs.html
@@ -0,0 +1,164 @@
+<!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="Source of the Rust file `src/buf/reader.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>reader.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../../../static.files/source-script-74087aa2e88f4475.js"></script><script defer src="../../../source-files.js"></script><script defer src="../../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><div class="width-limiter"><nav class="sub"><a class="sub-logo-container" href="../../../bytes/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><pre class="src-line-numbers"><span id="1">1</span>
+<span id="2">2</span>
+<span id="3">3</span>
+<span id="4">4</span>
+<span id="5">5</span>
+<span id="6">6</span>
+<span id="7">7</span>
+<span id="8">8</span>
+<span id="9">9</span>
+<span id="10">10</span>
+<span id="11">11</span>
+<span id="12">12</span>
+<span id="13">13</span>
+<span id="14">14</span>
+<span id="15">15</span>
+<span id="16">16</span>
+<span id="17">17</span>
+<span id="18">18</span>
+<span id="19">19</span>
+<span id="20">20</span>
+<span id="21">21</span>
+<span id="22">22</span>
+<span id="23">23</span>
+<span id="24">24</span>
+<span id="25">25</span>
+<span id="26">26</span>
+<span id="27">27</span>
+<span id="28">28</span>
+<span id="29">29</span>
+<span id="30">30</span>
+<span id="31">31</span>
+<span id="32">32</span>
+<span id="33">33</span>
+<span id="34">34</span>
+<span id="35">35</span>
+<span id="36">36</span>
+<span id="37">37</span>
+<span id="38">38</span>
+<span id="39">39</span>
+<span id="40">40</span>
+<span id="41">41</span>
+<span id="42">42</span>
+<span id="43">43</span>
+<span id="44">44</span>
+<span id="45">45</span>
+<span id="46">46</span>
+<span id="47">47</span>
+<span id="48">48</span>
+<span id="49">49</span>
+<span id="50">50</span>
+<span id="51">51</span>
+<span id="52">52</span>
+<span id="53">53</span>
+<span id="54">54</span>
+<span id="55">55</span>
+<span id="56">56</span>
+<span id="57">57</span>
+<span id="58">58</span>
+<span id="59">59</span>
+<span id="60">60</span>
+<span id="61">61</span>
+<span id="62">62</span>
+<span id="63">63</span>
+<span id="64">64</span>
+<span id="65">65</span>
+<span id="66">66</span>
+<span id="67">67</span>
+<span id="68">68</span>
+<span id="69">69</span>
+<span id="70">70</span>
+<span id="71">71</span>
+<span id="72">72</span>
+<span id="73">73</span>
+<span id="74">74</span>
+<span id="75">75</span>
+<span id="76">76</span>
+<span id="77">77</span>
+<span id="78">78</span>
+<span id="79">79</span>
+<span id="80">80</span>
+<span id="81">81</span>
+</pre><pre class="rust"><code><span class="kw">use </span><span class="kw">crate</span>::Buf;
+
+<span class="kw">use </span>std::{cmp, io};
+
+<span class="doccomment">/// A `Buf` adapter which implements `io::Read` for the inner value.
+///
+/// This struct is generally created by calling `reader()` on `Buf`. See
+/// documentation of [`reader()`](Buf::reader) for more
+/// details.
+</span><span class="attr">#[derive(Debug)]
+</span><span class="kw">pub struct </span>Reader&lt;B&gt; {
+ buf: B,
+}
+
+<span class="kw">pub fn </span>new&lt;B&gt;(buf: B) -&gt; Reader&lt;B&gt; {
+ Reader { buf }
+}
+
+<span class="kw">impl</span>&lt;B: Buf&gt; Reader&lt;B&gt; {
+ <span class="doccomment">/// Gets a reference to the underlying `Buf`.
+ ///
+ /// It is inadvisable to directly read from the underlying `Buf`.
+ ///
+ /// # Examples
+ ///
+ /// ```rust
+ /// use bytes::Buf;
+ ///
+ /// let buf = b&quot;hello world&quot;.reader();
+ ///
+ /// assert_eq!(b&quot;hello world&quot;, buf.get_ref());
+ /// ```
+ </span><span class="kw">pub fn </span>get_ref(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>B {
+ <span class="kw-2">&amp;</span><span class="self">self</span>.buf
+ }
+
+ <span class="doccomment">/// Gets a mutable reference to the underlying `Buf`.
+ ///
+ /// It is inadvisable to directly read from the underlying `Buf`.
+ </span><span class="kw">pub fn </span>get_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;mut </span>B {
+ <span class="kw-2">&amp;mut </span><span class="self">self</span>.buf
+ }
+
+ <span class="doccomment">/// Consumes this `Reader`, returning the underlying value.
+ ///
+ /// # Examples
+ ///
+ /// ```rust
+ /// use bytes::Buf;
+ /// use std::io;
+ ///
+ /// let mut buf = b&quot;hello world&quot;.reader();
+ /// let mut dst = vec![];
+ ///
+ /// io::copy(&amp;mut buf, &amp;mut dst).unwrap();
+ ///
+ /// let buf = buf.into_inner();
+ /// assert_eq!(0, buf.remaining());
+ /// ```
+ </span><span class="kw">pub fn </span>into_inner(<span class="self">self</span>) -&gt; B {
+ <span class="self">self</span>.buf
+ }
+}
+
+<span class="kw">impl</span>&lt;B: Buf + Sized&gt; io::Read <span class="kw">for </span>Reader&lt;B&gt; {
+ <span class="kw">fn </span>read(<span class="kw-2">&amp;mut </span><span class="self">self</span>, dst: <span class="kw-2">&amp;mut </span>[u8]) -&gt; io::Result&lt;usize&gt; {
+ <span class="kw">let </span>len = cmp::min(<span class="self">self</span>.buf.remaining(), dst.len());
+
+ Buf::copy_to_slice(<span class="kw-2">&amp;mut </span><span class="self">self</span>.buf, <span class="kw-2">&amp;mut </span>dst[<span class="number">0</span>..len]);
+ <span class="prelude-val">Ok</span>(len)
+ }
+}
+
+<span class="kw">impl</span>&lt;B: Buf + Sized&gt; io::BufRead <span class="kw">for </span>Reader&lt;B&gt; {
+ <span class="kw">fn </span>fill_buf(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; io::Result&lt;<span class="kw-2">&amp;</span>[u8]&gt; {
+ <span class="prelude-val">Ok</span>(<span class="self">self</span>.buf.chunk())
+ }
+ <span class="kw">fn </span>consume(<span class="kw-2">&amp;mut </span><span class="self">self</span>, amt: usize) {
+ <span class="self">self</span>.buf.advance(amt)
+ }
+}
+</code></pre></div>
+</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/src/bytes/buf/take.rs.html b/src/bytes/buf/take.rs.html
new file mode 100644
index 0000000..e1c5f52
--- /dev/null
+++ b/src/bytes/buf/take.rs.html
@@ -0,0 +1,312 @@
+<!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="Source of the Rust file `src/buf/take.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>take.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../../../static.files/source-script-74087aa2e88f4475.js"></script><script defer src="../../../source-files.js"></script><script defer src="../../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><div class="width-limiter"><nav class="sub"><a class="sub-logo-container" href="../../../bytes/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><pre class="src-line-numbers"><span id="1">1</span>
+<span id="2">2</span>
+<span id="3">3</span>
+<span id="4">4</span>
+<span id="5">5</span>
+<span id="6">6</span>
+<span id="7">7</span>
+<span id="8">8</span>
+<span id="9">9</span>
+<span id="10">10</span>
+<span id="11">11</span>
+<span id="12">12</span>
+<span id="13">13</span>
+<span id="14">14</span>
+<span id="15">15</span>
+<span id="16">16</span>
+<span id="17">17</span>
+<span id="18">18</span>
+<span id="19">19</span>
+<span id="20">20</span>
+<span id="21">21</span>
+<span id="22">22</span>
+<span id="23">23</span>
+<span id="24">24</span>
+<span id="25">25</span>
+<span id="26">26</span>
+<span id="27">27</span>
+<span id="28">28</span>
+<span id="29">29</span>
+<span id="30">30</span>
+<span id="31">31</span>
+<span id="32">32</span>
+<span id="33">33</span>
+<span id="34">34</span>
+<span id="35">35</span>
+<span id="36">36</span>
+<span id="37">37</span>
+<span id="38">38</span>
+<span id="39">39</span>
+<span id="40">40</span>
+<span id="41">41</span>
+<span id="42">42</span>
+<span id="43">43</span>
+<span id="44">44</span>
+<span id="45">45</span>
+<span id="46">46</span>
+<span id="47">47</span>
+<span id="48">48</span>
+<span id="49">49</span>
+<span id="50">50</span>
+<span id="51">51</span>
+<span id="52">52</span>
+<span id="53">53</span>
+<span id="54">54</span>
+<span id="55">55</span>
+<span id="56">56</span>
+<span id="57">57</span>
+<span id="58">58</span>
+<span id="59">59</span>
+<span id="60">60</span>
+<span id="61">61</span>
+<span id="62">62</span>
+<span id="63">63</span>
+<span id="64">64</span>
+<span id="65">65</span>
+<span id="66">66</span>
+<span id="67">67</span>
+<span id="68">68</span>
+<span id="69">69</span>
+<span id="70">70</span>
+<span id="71">71</span>
+<span id="72">72</span>
+<span id="73">73</span>
+<span id="74">74</span>
+<span id="75">75</span>
+<span id="76">76</span>
+<span id="77">77</span>
+<span id="78">78</span>
+<span id="79">79</span>
+<span id="80">80</span>
+<span id="81">81</span>
+<span id="82">82</span>
+<span id="83">83</span>
+<span id="84">84</span>
+<span id="85">85</span>
+<span id="86">86</span>
+<span id="87">87</span>
+<span id="88">88</span>
+<span id="89">89</span>
+<span id="90">90</span>
+<span id="91">91</span>
+<span id="92">92</span>
+<span id="93">93</span>
+<span id="94">94</span>
+<span id="95">95</span>
+<span id="96">96</span>
+<span id="97">97</span>
+<span id="98">98</span>
+<span id="99">99</span>
+<span id="100">100</span>
+<span id="101">101</span>
+<span id="102">102</span>
+<span id="103">103</span>
+<span id="104">104</span>
+<span id="105">105</span>
+<span id="106">106</span>
+<span id="107">107</span>
+<span id="108">108</span>
+<span id="109">109</span>
+<span id="110">110</span>
+<span id="111">111</span>
+<span id="112">112</span>
+<span id="113">113</span>
+<span id="114">114</span>
+<span id="115">115</span>
+<span id="116">116</span>
+<span id="117">117</span>
+<span id="118">118</span>
+<span id="119">119</span>
+<span id="120">120</span>
+<span id="121">121</span>
+<span id="122">122</span>
+<span id="123">123</span>
+<span id="124">124</span>
+<span id="125">125</span>
+<span id="126">126</span>
+<span id="127">127</span>
+<span id="128">128</span>
+<span id="129">129</span>
+<span id="130">130</span>
+<span id="131">131</span>
+<span id="132">132</span>
+<span id="133">133</span>
+<span id="134">134</span>
+<span id="135">135</span>
+<span id="136">136</span>
+<span id="137">137</span>
+<span id="138">138</span>
+<span id="139">139</span>
+<span id="140">140</span>
+<span id="141">141</span>
+<span id="142">142</span>
+<span id="143">143</span>
+<span id="144">144</span>
+<span id="145">145</span>
+<span id="146">146</span>
+<span id="147">147</span>
+<span id="148">148</span>
+<span id="149">149</span>
+<span id="150">150</span>
+<span id="151">151</span>
+<span id="152">152</span>
+<span id="153">153</span>
+<span id="154">154</span>
+<span id="155">155</span>
+</pre><pre class="rust"><code><span class="kw">use crate</span>::{Buf, Bytes};
+
+<span class="kw">use </span>core::cmp;
+
+<span class="doccomment">/// A `Buf` adapter which limits the bytes read from an underlying buffer.
+///
+/// This struct is generally created by calling `take()` on `Buf`. See
+/// documentation of [`take()`](Buf::take) for more details.
+</span><span class="attr">#[derive(Debug)]
+</span><span class="kw">pub struct </span>Take&lt;T&gt; {
+ inner: T,
+ limit: usize,
+}
+
+<span class="kw">pub fn </span>new&lt;T&gt;(inner: T, limit: usize) -&gt; Take&lt;T&gt; {
+ Take { inner, limit }
+}
+
+<span class="kw">impl</span>&lt;T&gt; Take&lt;T&gt; {
+ <span class="doccomment">/// Consumes this `Take`, returning the underlying value.
+ ///
+ /// # Examples
+ ///
+ /// ```rust
+ /// use bytes::{Buf, BufMut};
+ ///
+ /// let mut buf = b&quot;hello world&quot;.take(2);
+ /// let mut dst = vec![];
+ ///
+ /// dst.put(&amp;mut buf);
+ /// assert_eq!(*dst, b&quot;he&quot;[..]);
+ ///
+ /// let mut buf = buf.into_inner();
+ ///
+ /// dst.clear();
+ /// dst.put(&amp;mut buf);
+ /// assert_eq!(*dst, b&quot;llo world&quot;[..]);
+ /// ```
+ </span><span class="kw">pub fn </span>into_inner(<span class="self">self</span>) -&gt; T {
+ <span class="self">self</span>.inner
+ }
+
+ <span class="doccomment">/// Gets a reference to the underlying `Buf`.
+ ///
+ /// It is inadvisable to directly read from the underlying `Buf`.
+ ///
+ /// # Examples
+ ///
+ /// ```rust
+ /// use bytes::Buf;
+ ///
+ /// let buf = b&quot;hello world&quot;.take(2);
+ ///
+ /// assert_eq!(11, buf.get_ref().remaining());
+ /// ```
+ </span><span class="kw">pub fn </span>get_ref(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>T {
+ <span class="kw-2">&amp;</span><span class="self">self</span>.inner
+ }
+
+ <span class="doccomment">/// Gets a mutable reference to the underlying `Buf`.
+ ///
+ /// It is inadvisable to directly read from the underlying `Buf`.
+ ///
+ /// # Examples
+ ///
+ /// ```rust
+ /// use bytes::{Buf, BufMut};
+ ///
+ /// let mut buf = b&quot;hello world&quot;.take(2);
+ /// let mut dst = vec![];
+ ///
+ /// buf.get_mut().advance(2);
+ ///
+ /// dst.put(&amp;mut buf);
+ /// assert_eq!(*dst, b&quot;ll&quot;[..]);
+ /// ```
+ </span><span class="kw">pub fn </span>get_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;mut </span>T {
+ <span class="kw-2">&amp;mut </span><span class="self">self</span>.inner
+ }
+
+ <span class="doccomment">/// Returns the maximum number of bytes that can be read.
+ ///
+ /// # Note
+ ///
+ /// If the inner `Buf` has fewer bytes than indicated by this method then
+ /// that is the actual number of available bytes.
+ ///
+ /// # Examples
+ ///
+ /// ```rust
+ /// use bytes::Buf;
+ ///
+ /// let mut buf = b&quot;hello world&quot;.take(2);
+ ///
+ /// assert_eq!(2, buf.limit());
+ /// assert_eq!(b&#39;h&#39;, buf.get_u8());
+ /// assert_eq!(1, buf.limit());
+ /// ```
+ </span><span class="kw">pub fn </span>limit(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
+ <span class="self">self</span>.limit
+ }
+
+ <span class="doccomment">/// Sets the maximum number of bytes that can be read.
+ ///
+ /// # Note
+ ///
+ /// If the inner `Buf` has fewer bytes than `lim` then that is the actual
+ /// number of available bytes.
+ ///
+ /// # Examples
+ ///
+ /// ```rust
+ /// use bytes::{Buf, BufMut};
+ ///
+ /// let mut buf = b&quot;hello world&quot;.take(2);
+ /// let mut dst = vec![];
+ ///
+ /// dst.put(&amp;mut buf);
+ /// assert_eq!(*dst, b&quot;he&quot;[..]);
+ ///
+ /// dst.clear();
+ ///
+ /// buf.set_limit(3);
+ /// dst.put(&amp;mut buf);
+ /// assert_eq!(*dst, b&quot;llo&quot;[..]);
+ /// ```
+ </span><span class="kw">pub fn </span>set_limit(<span class="kw-2">&amp;mut </span><span class="self">self</span>, lim: usize) {
+ <span class="self">self</span>.limit = lim
+ }
+}
+
+<span class="kw">impl</span>&lt;T: Buf&gt; Buf <span class="kw">for </span>Take&lt;T&gt; {
+ <span class="kw">fn </span>remaining(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
+ cmp::min(<span class="self">self</span>.inner.remaining(), <span class="self">self</span>.limit)
+ }
+
+ <span class="kw">fn </span>chunk(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>[u8] {
+ <span class="kw">let </span>bytes = <span class="self">self</span>.inner.chunk();
+ <span class="kw-2">&amp;</span>bytes[..cmp::min(bytes.len(), <span class="self">self</span>.limit)]
+ }
+
+ <span class="kw">fn </span>advance(<span class="kw-2">&amp;mut </span><span class="self">self</span>, cnt: usize) {
+ <span class="macro">assert!</span>(cnt &lt;= <span class="self">self</span>.limit);
+ <span class="self">self</span>.inner.advance(cnt);
+ <span class="self">self</span>.limit -= cnt;
+ }
+
+ <span class="kw">fn </span>copy_to_bytes(<span class="kw-2">&amp;mut </span><span class="self">self</span>, len: usize) -&gt; Bytes {
+ <span class="macro">assert!</span>(len &lt;= <span class="self">self</span>.remaining(), <span class="string">&quot;`len` greater than remaining&quot;</span>);
+
+ <span class="kw">let </span>r = <span class="self">self</span>.inner.copy_to_bytes(len);
+ <span class="self">self</span>.limit -= len;
+ r
+ }
+}
+</code></pre></div>
+</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/src/bytes/buf/uninit_slice.rs.html b/src/bytes/buf/uninit_slice.rs.html
new file mode 100644
index 0000000..d474bbe
--- /dev/null
+++ b/src/bytes/buf/uninit_slice.rs.html
@@ -0,0 +1,516 @@
+<!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="Source of the Rust file `src/buf/uninit_slice.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>uninit_slice.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../../../static.files/source-script-74087aa2e88f4475.js"></script><script defer src="../../../source-files.js"></script><script defer src="../../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><div class="width-limiter"><nav class="sub"><a class="sub-logo-container" href="../../../bytes/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><pre class="src-line-numbers"><span id="1">1</span>
+<span id="2">2</span>
+<span id="3">3</span>
+<span id="4">4</span>
+<span id="5">5</span>
+<span id="6">6</span>
+<span id="7">7</span>
+<span id="8">8</span>
+<span id="9">9</span>
+<span id="10">10</span>
+<span id="11">11</span>
+<span id="12">12</span>
+<span id="13">13</span>
+<span id="14">14</span>
+<span id="15">15</span>
+<span id="16">16</span>
+<span id="17">17</span>
+<span id="18">18</span>
+<span id="19">19</span>
+<span id="20">20</span>
+<span id="21">21</span>
+<span id="22">22</span>
+<span id="23">23</span>
+<span id="24">24</span>
+<span id="25">25</span>
+<span id="26">26</span>
+<span id="27">27</span>
+<span id="28">28</span>
+<span id="29">29</span>
+<span id="30">30</span>
+<span id="31">31</span>
+<span id="32">32</span>
+<span id="33">33</span>
+<span id="34">34</span>
+<span id="35">35</span>
+<span id="36">36</span>
+<span id="37">37</span>
+<span id="38">38</span>
+<span id="39">39</span>
+<span id="40">40</span>
+<span id="41">41</span>
+<span id="42">42</span>
+<span id="43">43</span>
+<span id="44">44</span>
+<span id="45">45</span>
+<span id="46">46</span>
+<span id="47">47</span>
+<span id="48">48</span>
+<span id="49">49</span>
+<span id="50">50</span>
+<span id="51">51</span>
+<span id="52">52</span>
+<span id="53">53</span>
+<span id="54">54</span>
+<span id="55">55</span>
+<span id="56">56</span>
+<span id="57">57</span>
+<span id="58">58</span>
+<span id="59">59</span>
+<span id="60">60</span>
+<span id="61">61</span>
+<span id="62">62</span>
+<span id="63">63</span>
+<span id="64">64</span>
+<span id="65">65</span>
+<span id="66">66</span>
+<span id="67">67</span>
+<span id="68">68</span>
+<span id="69">69</span>
+<span id="70">70</span>
+<span id="71">71</span>
+<span id="72">72</span>
+<span id="73">73</span>
+<span id="74">74</span>
+<span id="75">75</span>
+<span id="76">76</span>
+<span id="77">77</span>
+<span id="78">78</span>
+<span id="79">79</span>
+<span id="80">80</span>
+<span id="81">81</span>
+<span id="82">82</span>
+<span id="83">83</span>
+<span id="84">84</span>
+<span id="85">85</span>
+<span id="86">86</span>
+<span id="87">87</span>
+<span id="88">88</span>
+<span id="89">89</span>
+<span id="90">90</span>
+<span id="91">91</span>
+<span id="92">92</span>
+<span id="93">93</span>
+<span id="94">94</span>
+<span id="95">95</span>
+<span id="96">96</span>
+<span id="97">97</span>
+<span id="98">98</span>
+<span id="99">99</span>
+<span id="100">100</span>
+<span id="101">101</span>
+<span id="102">102</span>
+<span id="103">103</span>
+<span id="104">104</span>
+<span id="105">105</span>
+<span id="106">106</span>
+<span id="107">107</span>
+<span id="108">108</span>
+<span id="109">109</span>
+<span id="110">110</span>
+<span id="111">111</span>
+<span id="112">112</span>
+<span id="113">113</span>
+<span id="114">114</span>
+<span id="115">115</span>
+<span id="116">116</span>
+<span id="117">117</span>
+<span id="118">118</span>
+<span id="119">119</span>
+<span id="120">120</span>
+<span id="121">121</span>
+<span id="122">122</span>
+<span id="123">123</span>
+<span id="124">124</span>
+<span id="125">125</span>
+<span id="126">126</span>
+<span id="127">127</span>
+<span id="128">128</span>
+<span id="129">129</span>
+<span id="130">130</span>
+<span id="131">131</span>
+<span id="132">132</span>
+<span id="133">133</span>
+<span id="134">134</span>
+<span id="135">135</span>
+<span id="136">136</span>
+<span id="137">137</span>
+<span id="138">138</span>
+<span id="139">139</span>
+<span id="140">140</span>
+<span id="141">141</span>
+<span id="142">142</span>
+<span id="143">143</span>
+<span id="144">144</span>
+<span id="145">145</span>
+<span id="146">146</span>
+<span id="147">147</span>
+<span id="148">148</span>
+<span id="149">149</span>
+<span id="150">150</span>
+<span id="151">151</span>
+<span id="152">152</span>
+<span id="153">153</span>
+<span id="154">154</span>
+<span id="155">155</span>
+<span id="156">156</span>
+<span id="157">157</span>
+<span id="158">158</span>
+<span id="159">159</span>
+<span id="160">160</span>
+<span id="161">161</span>
+<span id="162">162</span>
+<span id="163">163</span>
+<span id="164">164</span>
+<span id="165">165</span>
+<span id="166">166</span>
+<span id="167">167</span>
+<span id="168">168</span>
+<span id="169">169</span>
+<span id="170">170</span>
+<span id="171">171</span>
+<span id="172">172</span>
+<span id="173">173</span>
+<span id="174">174</span>
+<span id="175">175</span>
+<span id="176">176</span>
+<span id="177">177</span>
+<span id="178">178</span>
+<span id="179">179</span>
+<span id="180">180</span>
+<span id="181">181</span>
+<span id="182">182</span>
+<span id="183">183</span>
+<span id="184">184</span>
+<span id="185">185</span>
+<span id="186">186</span>
+<span id="187">187</span>
+<span id="188">188</span>
+<span id="189">189</span>
+<span id="190">190</span>
+<span id="191">191</span>
+<span id="192">192</span>
+<span id="193">193</span>
+<span id="194">194</span>
+<span id="195">195</span>
+<span id="196">196</span>
+<span id="197">197</span>
+<span id="198">198</span>
+<span id="199">199</span>
+<span id="200">200</span>
+<span id="201">201</span>
+<span id="202">202</span>
+<span id="203">203</span>
+<span id="204">204</span>
+<span id="205">205</span>
+<span id="206">206</span>
+<span id="207">207</span>
+<span id="208">208</span>
+<span id="209">209</span>
+<span id="210">210</span>
+<span id="211">211</span>
+<span id="212">212</span>
+<span id="213">213</span>
+<span id="214">214</span>
+<span id="215">215</span>
+<span id="216">216</span>
+<span id="217">217</span>
+<span id="218">218</span>
+<span id="219">219</span>
+<span id="220">220</span>
+<span id="221">221</span>
+<span id="222">222</span>
+<span id="223">223</span>
+<span id="224">224</span>
+<span id="225">225</span>
+<span id="226">226</span>
+<span id="227">227</span>
+<span id="228">228</span>
+<span id="229">229</span>
+<span id="230">230</span>
+<span id="231">231</span>
+<span id="232">232</span>
+<span id="233">233</span>
+<span id="234">234</span>
+<span id="235">235</span>
+<span id="236">236</span>
+<span id="237">237</span>
+<span id="238">238</span>
+<span id="239">239</span>
+<span id="240">240</span>
+<span id="241">241</span>
+<span id="242">242</span>
+<span id="243">243</span>
+<span id="244">244</span>
+<span id="245">245</span>
+<span id="246">246</span>
+<span id="247">247</span>
+<span id="248">248</span>
+<span id="249">249</span>
+<span id="250">250</span>
+<span id="251">251</span>
+<span id="252">252</span>
+<span id="253">253</span>
+<span id="254">254</span>
+<span id="255">255</span>
+<span id="256">256</span>
+<span id="257">257</span>
+</pre><pre class="rust"><code><span class="kw">use </span>core::fmt;
+<span class="kw">use </span>core::mem::MaybeUninit;
+<span class="kw">use </span>core::ops::{
+ Index, IndexMut, Range, RangeFrom, RangeFull, RangeInclusive, RangeTo, RangeToInclusive,
+};
+
+<span class="doccomment">/// Uninitialized byte slice.
+///
+/// Returned by `BufMut::chunk_mut()`, the referenced byte slice may be
+/// uninitialized. The wrapper provides safe access without introducing
+/// undefined behavior.
+///
+/// The safety invariants of this wrapper are:
+///
+/// 1. Reading from an `UninitSlice` is undefined behavior.
+/// 2. Writing uninitialized bytes to an `UninitSlice` is undefined behavior.
+///
+/// The difference between `&amp;mut UninitSlice` and `&amp;mut [MaybeUninit&lt;u8&gt;]` is
+/// that it is possible in safe code to write uninitialized bytes to an
+/// `&amp;mut [MaybeUninit&lt;u8&gt;]`, which this type prohibits.
+</span><span class="attr">#[repr(transparent)]
+</span><span class="kw">pub struct </span>UninitSlice([MaybeUninit&lt;u8&gt;]);
+
+<span class="kw">impl </span>UninitSlice {
+ <span class="doccomment">/// Creates a `&amp;mut UninitSlice` wrapping a slice of initialised memory.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::buf::UninitSlice;
+ ///
+ /// let mut buffer = [0u8; 64];
+ /// let slice = UninitSlice::new(&amp;mut buffer[..]);
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">pub fn </span>new(slice: <span class="kw-2">&amp;mut </span>[u8]) -&gt; <span class="kw-2">&amp;mut </span>UninitSlice {
+ <span class="kw">unsafe </span>{ <span class="kw-2">&amp;mut *</span>(slice <span class="kw">as </span><span class="kw-2">*mut </span>[u8] <span class="kw">as </span><span class="kw-2">*mut </span>[MaybeUninit&lt;u8&gt;] <span class="kw">as </span><span class="kw-2">*mut </span>UninitSlice) }
+ }
+
+ <span class="doccomment">/// Creates a `&amp;mut UninitSlice` wrapping a slice of uninitialised memory.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::buf::UninitSlice;
+ /// use core::mem::MaybeUninit;
+ ///
+ /// let mut buffer = [MaybeUninit::uninit(); 64];
+ /// let slice = UninitSlice::uninit(&amp;mut buffer[..]);
+ ///
+ /// let mut vec = Vec::with_capacity(1024);
+ /// let spare: &amp;mut UninitSlice = vec.spare_capacity_mut().into();
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">pub fn </span>uninit(slice: <span class="kw-2">&amp;mut </span>[MaybeUninit&lt;u8&gt;]) -&gt; <span class="kw-2">&amp;mut </span>UninitSlice {
+ <span class="kw">unsafe </span>{ <span class="kw-2">&amp;mut *</span>(slice <span class="kw">as </span><span class="kw-2">*mut </span>[MaybeUninit&lt;u8&gt;] <span class="kw">as </span><span class="kw-2">*mut </span>UninitSlice) }
+ }
+
+ <span class="kw">fn </span>uninit_ref(slice: <span class="kw-2">&amp;</span>[MaybeUninit&lt;u8&gt;]) -&gt; <span class="kw-2">&amp;</span>UninitSlice {
+ <span class="kw">unsafe </span>{ <span class="kw-2">&amp;*</span>(slice <span class="kw">as </span><span class="kw-2">*const </span>[MaybeUninit&lt;u8&gt;] <span class="kw">as </span><span class="kw-2">*const </span>UninitSlice) }
+ }
+
+ <span class="doccomment">/// Create a `&amp;mut UninitSlice` from a pointer and a length.
+ ///
+ /// # Safety
+ ///
+ /// The caller must ensure that `ptr` references a valid memory region owned
+ /// by the caller representing a byte slice for the duration of `&#39;a`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::buf::UninitSlice;
+ ///
+ /// let bytes = b&quot;hello world&quot;.to_vec();
+ /// let ptr = bytes.as_ptr() as *mut _;
+ /// let len = bytes.len();
+ ///
+ /// let slice = unsafe { UninitSlice::from_raw_parts_mut(ptr, len) };
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">pub unsafe fn </span>from_raw_parts_mut&lt;<span class="lifetime">&#39;a</span>&gt;(ptr: <span class="kw-2">*mut </span>u8, len: usize) -&gt; <span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span><span class="kw-2">mut </span>UninitSlice {
+ <span class="kw">let </span>maybe_init: <span class="kw-2">&amp;mut </span>[MaybeUninit&lt;u8&gt;] =
+ core::slice::from_raw_parts_mut(ptr <span class="kw">as </span><span class="kw-2">*mut </span><span class="kw">_</span>, len);
+ <span class="self">Self</span>::uninit(maybe_init)
+ }
+
+ <span class="doccomment">/// Write a single byte at the specified offset.
+ ///
+ /// # Panics
+ ///
+ /// The function panics if `index` is out of bounds.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::buf::UninitSlice;
+ ///
+ /// let mut data = [b&#39;f&#39;, b&#39;o&#39;, b&#39;o&#39;];
+ /// let slice = unsafe { UninitSlice::from_raw_parts_mut(data.as_mut_ptr(), 3) };
+ ///
+ /// slice.write_byte(0, b&#39;b&#39;);
+ ///
+ /// assert_eq!(b&quot;boo&quot;, &amp;data[..]);
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">pub fn </span>write_byte(<span class="kw-2">&amp;mut </span><span class="self">self</span>, index: usize, byte: u8) {
+ <span class="macro">assert!</span>(index &lt; <span class="self">self</span>.len());
+
+ <span class="kw">unsafe </span>{ <span class="self">self</span>[index..].as_mut_ptr().write(byte) }
+ }
+
+ <span class="doccomment">/// Copies bytes from `src` into `self`.
+ ///
+ /// The length of `src` must be the same as `self`.
+ ///
+ /// # Panics
+ ///
+ /// The function panics if `src` has a different length than `self`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::buf::UninitSlice;
+ ///
+ /// let mut data = [b&#39;f&#39;, b&#39;o&#39;, b&#39;o&#39;];
+ /// let slice = unsafe { UninitSlice::from_raw_parts_mut(data.as_mut_ptr(), 3) };
+ ///
+ /// slice.copy_from_slice(b&quot;bar&quot;);
+ ///
+ /// assert_eq!(b&quot;bar&quot;, &amp;data[..]);
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">pub fn </span>copy_from_slice(<span class="kw-2">&amp;mut </span><span class="self">self</span>, src: <span class="kw-2">&amp;</span>[u8]) {
+ <span class="kw">use </span>core::ptr;
+
+ <span class="macro">assert_eq!</span>(<span class="self">self</span>.len(), src.len());
+
+ <span class="kw">unsafe </span>{
+ ptr::copy_nonoverlapping(src.as_ptr(), <span class="self">self</span>.as_mut_ptr(), <span class="self">self</span>.len());
+ }
+ }
+
+ <span class="doccomment">/// Return a raw pointer to the slice&#39;s buffer.
+ ///
+ /// # Safety
+ ///
+ /// The caller **must not** read from the referenced memory and **must not**
+ /// write **uninitialized** bytes to the slice either.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut data = [0, 1, 2];
+ /// let mut slice = &amp;mut data[..];
+ /// let ptr = BufMut::chunk_mut(&amp;mut slice).as_mut_ptr();
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">pub fn </span>as_mut_ptr(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="kw-2">*mut </span>u8 {
+ <span class="self">self</span>.<span class="number">0</span>.as_mut_ptr() <span class="kw">as </span><span class="kw-2">*mut </span><span class="kw">_
+ </span>}
+
+ <span class="doccomment">/// Return a `&amp;mut [MaybeUninit&lt;u8&gt;]` to this slice&#39;s buffer.
+ ///
+ /// # Safety
+ ///
+ /// The caller **must not** read from the referenced memory and **must not** write
+ /// **uninitialized** bytes to the slice either. This is because `BufMut` implementation
+ /// that created the `UninitSlice` knows which parts are initialized. Writing uninitialized
+ /// bytes to the slice may cause the `BufMut` to read those bytes and trigger undefined
+ /// behavior.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut data = [0, 1, 2];
+ /// let mut slice = &amp;mut data[..];
+ /// unsafe {
+ /// let uninit_slice = BufMut::chunk_mut(&amp;mut slice).as_uninit_slice_mut();
+ /// };
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">pub unsafe fn </span>as_uninit_slice_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;mut </span>[MaybeUninit&lt;u8&gt;] {
+ <span class="kw-2">&amp;mut </span><span class="self">self</span>.<span class="number">0
+ </span>}
+
+ <span class="doccomment">/// Returns the number of bytes in the slice.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BufMut;
+ ///
+ /// let mut data = [0, 1, 2];
+ /// let mut slice = &amp;mut data[..];
+ /// let len = BufMut::chunk_mut(&amp;mut slice).len();
+ ///
+ /// assert_eq!(len, 3);
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">pub fn </span>len(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
+ <span class="self">self</span>.<span class="number">0</span>.len()
+ }
+}
+
+<span class="kw">impl </span>fmt::Debug <span class="kw">for </span>UninitSlice {
+ <span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, fmt: <span class="kw-2">&amp;mut </span>fmt::Formatter&lt;<span class="lifetime">&#39;_</span>&gt;) -&gt; fmt::Result {
+ fmt.debug_struct(<span class="string">&quot;UninitSlice[...]&quot;</span>).finish()
+ }
+}
+
+<span class="kw">impl</span>&lt;<span class="lifetime">&#39;a</span>&gt; From&lt;<span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span><span class="kw-2">mut </span>[u8]&gt; <span class="kw">for </span><span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span><span class="kw-2">mut </span>UninitSlice {
+ <span class="kw">fn </span>from(slice: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span><span class="kw-2">mut </span>[u8]) -&gt; <span class="self">Self </span>{
+ UninitSlice::new(slice)
+ }
+}
+
+<span class="kw">impl</span>&lt;<span class="lifetime">&#39;a</span>&gt; From&lt;<span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span><span class="kw-2">mut </span>[MaybeUninit&lt;u8&gt;]&gt; <span class="kw">for </span><span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span><span class="kw-2">mut </span>UninitSlice {
+ <span class="kw">fn </span>from(slice: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span><span class="kw-2">mut </span>[MaybeUninit&lt;u8&gt;]) -&gt; <span class="self">Self </span>{
+ UninitSlice::uninit(slice)
+ }
+}
+
+<span class="macro">macro_rules! </span>impl_index {
+ ($(<span class="macro-nonterminal">$t</span>:ty),<span class="kw-2">*</span>) =&gt; {
+ $(
+ <span class="kw">impl </span>Index&lt;<span class="macro-nonterminal">$t</span>&gt; <span class="kw">for </span>UninitSlice {
+ <span class="kw">type </span>Output = UninitSlice;
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>index(<span class="kw-2">&amp;</span><span class="self">self</span>, index: <span class="macro-nonterminal">$t</span>) -&gt; <span class="kw-2">&amp;</span>UninitSlice {
+ UninitSlice::uninit_ref(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="number">0</span>[index])
+ }
+ }
+
+ <span class="kw">impl </span>IndexMut&lt;<span class="macro-nonterminal">$t</span>&gt; <span class="kw">for </span>UninitSlice {
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>index_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>, index: <span class="macro-nonterminal">$t</span>) -&gt; <span class="kw-2">&amp;mut </span>UninitSlice {
+ UninitSlice::uninit(<span class="kw-2">&amp;mut </span><span class="self">self</span>.<span class="number">0</span>[index])
+ }
+ }
+ )*
+ };
+}
+
+<span class="macro">impl_index!</span>(
+ Range&lt;usize&gt;,
+ RangeFrom&lt;usize&gt;,
+ RangeFull,
+ RangeInclusive&lt;usize&gt;,
+ RangeTo&lt;usize&gt;,
+ RangeToInclusive&lt;usize&gt;
+);
+</code></pre></div>
+</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/src/bytes/buf/vec_deque.rs.html b/src/bytes/buf/vec_deque.rs.html
new file mode 100644
index 0000000..a276b6f
--- /dev/null
+++ b/src/bytes/buf/vec_deque.rs.html
@@ -0,0 +1,46 @@
+<!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="Source of the Rust file `src/buf/vec_deque.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>vec_deque.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../../../static.files/source-script-74087aa2e88f4475.js"></script><script defer src="../../../source-files.js"></script><script defer src="../../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><div class="width-limiter"><nav class="sub"><a class="sub-logo-container" href="../../../bytes/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><pre class="src-line-numbers"><span id="1">1</span>
+<span id="2">2</span>
+<span id="3">3</span>
+<span id="4">4</span>
+<span id="5">5</span>
+<span id="6">6</span>
+<span id="7">7</span>
+<span id="8">8</span>
+<span id="9">9</span>
+<span id="10">10</span>
+<span id="11">11</span>
+<span id="12">12</span>
+<span id="13">13</span>
+<span id="14">14</span>
+<span id="15">15</span>
+<span id="16">16</span>
+<span id="17">17</span>
+<span id="18">18</span>
+<span id="19">19</span>
+<span id="20">20</span>
+<span id="21">21</span>
+<span id="22">22</span>
+</pre><pre class="rust"><code><span class="kw">use </span>alloc::collections::VecDeque;
+
+<span class="kw">use </span><span class="kw">super</span>::Buf;
+
+<span class="kw">impl </span>Buf <span class="kw">for </span>VecDeque&lt;u8&gt; {
+ <span class="kw">fn </span>remaining(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
+ <span class="self">self</span>.len()
+ }
+
+ <span class="kw">fn </span>chunk(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>[u8] {
+ <span class="kw">let </span>(s1, s2) = <span class="self">self</span>.as_slices();
+ <span class="kw">if </span>s1.is_empty() {
+ s2
+ } <span class="kw">else </span>{
+ s1
+ }
+ }
+
+ <span class="kw">fn </span>advance(<span class="kw-2">&amp;mut </span><span class="self">self</span>, cnt: usize) {
+ <span class="self">self</span>.drain(..cnt);
+ }
+}
+</code></pre></div>
+</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/src/bytes/buf/writer.rs.html b/src/bytes/buf/writer.rs.html
new file mode 100644
index 0000000..25aa759
--- /dev/null
+++ b/src/bytes/buf/writer.rs.html
@@ -0,0 +1,178 @@
+<!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="Source of the Rust file `src/buf/writer.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>writer.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../../../static.files/source-script-74087aa2e88f4475.js"></script><script defer src="../../../source-files.js"></script><script defer src="../../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><div class="width-limiter"><nav class="sub"><a class="sub-logo-container" href="../../../bytes/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><pre class="src-line-numbers"><span id="1">1</span>
+<span id="2">2</span>
+<span id="3">3</span>
+<span id="4">4</span>
+<span id="5">5</span>
+<span id="6">6</span>
+<span id="7">7</span>
+<span id="8">8</span>
+<span id="9">9</span>
+<span id="10">10</span>
+<span id="11">11</span>
+<span id="12">12</span>
+<span id="13">13</span>
+<span id="14">14</span>
+<span id="15">15</span>
+<span id="16">16</span>
+<span id="17">17</span>
+<span id="18">18</span>
+<span id="19">19</span>
+<span id="20">20</span>
+<span id="21">21</span>
+<span id="22">22</span>
+<span id="23">23</span>
+<span id="24">24</span>
+<span id="25">25</span>
+<span id="26">26</span>
+<span id="27">27</span>
+<span id="28">28</span>
+<span id="29">29</span>
+<span id="30">30</span>
+<span id="31">31</span>
+<span id="32">32</span>
+<span id="33">33</span>
+<span id="34">34</span>
+<span id="35">35</span>
+<span id="36">36</span>
+<span id="37">37</span>
+<span id="38">38</span>
+<span id="39">39</span>
+<span id="40">40</span>
+<span id="41">41</span>
+<span id="42">42</span>
+<span id="43">43</span>
+<span id="44">44</span>
+<span id="45">45</span>
+<span id="46">46</span>
+<span id="47">47</span>
+<span id="48">48</span>
+<span id="49">49</span>
+<span id="50">50</span>
+<span id="51">51</span>
+<span id="52">52</span>
+<span id="53">53</span>
+<span id="54">54</span>
+<span id="55">55</span>
+<span id="56">56</span>
+<span id="57">57</span>
+<span id="58">58</span>
+<span id="59">59</span>
+<span id="60">60</span>
+<span id="61">61</span>
+<span id="62">62</span>
+<span id="63">63</span>
+<span id="64">64</span>
+<span id="65">65</span>
+<span id="66">66</span>
+<span id="67">67</span>
+<span id="68">68</span>
+<span id="69">69</span>
+<span id="70">70</span>
+<span id="71">71</span>
+<span id="72">72</span>
+<span id="73">73</span>
+<span id="74">74</span>
+<span id="75">75</span>
+<span id="76">76</span>
+<span id="77">77</span>
+<span id="78">78</span>
+<span id="79">79</span>
+<span id="80">80</span>
+<span id="81">81</span>
+<span id="82">82</span>
+<span id="83">83</span>
+<span id="84">84</span>
+<span id="85">85</span>
+<span id="86">86</span>
+<span id="87">87</span>
+<span id="88">88</span>
+</pre><pre class="rust"><code><span class="kw">use </span><span class="kw">crate</span>::BufMut;
+
+<span class="kw">use </span>std::{cmp, io};
+
+<span class="doccomment">/// A `BufMut` adapter which implements `io::Write` for the inner value.
+///
+/// This struct is generally created by calling `writer()` on `BufMut`. See
+/// documentation of [`writer()`](BufMut::writer) for more
+/// details.
+</span><span class="attr">#[derive(Debug)]
+</span><span class="kw">pub struct </span>Writer&lt;B&gt; {
+ buf: B,
+}
+
+<span class="kw">pub fn </span>new&lt;B&gt;(buf: B) -&gt; Writer&lt;B&gt; {
+ Writer { buf }
+}
+
+<span class="kw">impl</span>&lt;B: BufMut&gt; Writer&lt;B&gt; {
+ <span class="doccomment">/// Gets a reference to the underlying `BufMut`.
+ ///
+ /// It is inadvisable to directly write to the underlying `BufMut`.
+ ///
+ /// # Examples
+ ///
+ /// ```rust
+ /// use bytes::BufMut;
+ ///
+ /// let buf = Vec::with_capacity(1024).writer();
+ ///
+ /// assert_eq!(1024, buf.get_ref().capacity());
+ /// ```
+ </span><span class="kw">pub fn </span>get_ref(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>B {
+ <span class="kw-2">&amp;</span><span class="self">self</span>.buf
+ }
+
+ <span class="doccomment">/// Gets a mutable reference to the underlying `BufMut`.
+ ///
+ /// It is inadvisable to directly write to the underlying `BufMut`.
+ ///
+ /// # Examples
+ ///
+ /// ```rust
+ /// use bytes::BufMut;
+ ///
+ /// let mut buf = vec![].writer();
+ ///
+ /// buf.get_mut().reserve(1024);
+ ///
+ /// assert_eq!(1024, buf.get_ref().capacity());
+ /// ```
+ </span><span class="kw">pub fn </span>get_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;mut </span>B {
+ <span class="kw-2">&amp;mut </span><span class="self">self</span>.buf
+ }
+
+ <span class="doccomment">/// Consumes this `Writer`, returning the underlying value.
+ ///
+ /// # Examples
+ ///
+ /// ```rust
+ /// use bytes::BufMut;
+ /// use std::io;
+ ///
+ /// let mut buf = vec![].writer();
+ /// let mut src = &amp;b&quot;hello world&quot;[..];
+ ///
+ /// io::copy(&amp;mut src, &amp;mut buf).unwrap();
+ ///
+ /// let buf = buf.into_inner();
+ /// assert_eq!(*buf, b&quot;hello world&quot;[..]);
+ /// ```
+ </span><span class="kw">pub fn </span>into_inner(<span class="self">self</span>) -&gt; B {
+ <span class="self">self</span>.buf
+ }
+}
+
+<span class="kw">impl</span>&lt;B: BufMut + Sized&gt; io::Write <span class="kw">for </span>Writer&lt;B&gt; {
+ <span class="kw">fn </span>write(<span class="kw-2">&amp;mut </span><span class="self">self</span>, src: <span class="kw-2">&amp;</span>[u8]) -&gt; io::Result&lt;usize&gt; {
+ <span class="kw">let </span>n = cmp::min(<span class="self">self</span>.buf.remaining_mut(), src.len());
+
+ <span class="self">self</span>.buf.put(<span class="kw-2">&amp;</span>src[<span class="number">0</span>..n]);
+ <span class="prelude-val">Ok</span>(n)
+ }
+
+ <span class="kw">fn </span>flush(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; io::Result&lt;()&gt; {
+ <span class="prelude-val">Ok</span>(())
+ }
+}
+</code></pre></div>
+</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/src/bytes/bytes.rs.html b/src/bytes/bytes.rs.html
new file mode 100644
index 0000000..b454be1
--- /dev/null
+++ b/src/bytes/bytes.rs.html
@@ -0,0 +1,2962 @@
+<!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="Source of the Rust file `src/bytes.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>bytes.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../../static.files/source-script-74087aa2e88f4475.js"></script><script defer src="../../source-files.js"></script><script defer src="../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><div class="width-limiter"><nav class="sub"><a class="sub-logo-container" href="../../bytes/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><pre class="src-line-numbers"><span id="1">1</span>
+<span id="2">2</span>
+<span id="3">3</span>
+<span id="4">4</span>
+<span id="5">5</span>
+<span id="6">6</span>
+<span id="7">7</span>
+<span id="8">8</span>
+<span id="9">9</span>
+<span id="10">10</span>
+<span id="11">11</span>
+<span id="12">12</span>
+<span id="13">13</span>
+<span id="14">14</span>
+<span id="15">15</span>
+<span id="16">16</span>
+<span id="17">17</span>
+<span id="18">18</span>
+<span id="19">19</span>
+<span id="20">20</span>
+<span id="21">21</span>
+<span id="22">22</span>
+<span id="23">23</span>
+<span id="24">24</span>
+<span id="25">25</span>
+<span id="26">26</span>
+<span id="27">27</span>
+<span id="28">28</span>
+<span id="29">29</span>
+<span id="30">30</span>
+<span id="31">31</span>
+<span id="32">32</span>
+<span id="33">33</span>
+<span id="34">34</span>
+<span id="35">35</span>
+<span id="36">36</span>
+<span id="37">37</span>
+<span id="38">38</span>
+<span id="39">39</span>
+<span id="40">40</span>
+<span id="41">41</span>
+<span id="42">42</span>
+<span id="43">43</span>
+<span id="44">44</span>
+<span id="45">45</span>
+<span id="46">46</span>
+<span id="47">47</span>
+<span id="48">48</span>
+<span id="49">49</span>
+<span id="50">50</span>
+<span id="51">51</span>
+<span id="52">52</span>
+<span id="53">53</span>
+<span id="54">54</span>
+<span id="55">55</span>
+<span id="56">56</span>
+<span id="57">57</span>
+<span id="58">58</span>
+<span id="59">59</span>
+<span id="60">60</span>
+<span id="61">61</span>
+<span id="62">62</span>
+<span id="63">63</span>
+<span id="64">64</span>
+<span id="65">65</span>
+<span id="66">66</span>
+<span id="67">67</span>
+<span id="68">68</span>
+<span id="69">69</span>
+<span id="70">70</span>
+<span id="71">71</span>
+<span id="72">72</span>
+<span id="73">73</span>
+<span id="74">74</span>
+<span id="75">75</span>
+<span id="76">76</span>
+<span id="77">77</span>
+<span id="78">78</span>
+<span id="79">79</span>
+<span id="80">80</span>
+<span id="81">81</span>
+<span id="82">82</span>
+<span id="83">83</span>
+<span id="84">84</span>
+<span id="85">85</span>
+<span id="86">86</span>
+<span id="87">87</span>
+<span id="88">88</span>
+<span id="89">89</span>
+<span id="90">90</span>
+<span id="91">91</span>
+<span id="92">92</span>
+<span id="93">93</span>
+<span id="94">94</span>
+<span id="95">95</span>
+<span id="96">96</span>
+<span id="97">97</span>
+<span id="98">98</span>
+<span id="99">99</span>
+<span id="100">100</span>
+<span id="101">101</span>
+<span id="102">102</span>
+<span id="103">103</span>
+<span id="104">104</span>
+<span id="105">105</span>
+<span id="106">106</span>
+<span id="107">107</span>
+<span id="108">108</span>
+<span id="109">109</span>
+<span id="110">110</span>
+<span id="111">111</span>
+<span id="112">112</span>
+<span id="113">113</span>
+<span id="114">114</span>
+<span id="115">115</span>
+<span id="116">116</span>
+<span id="117">117</span>
+<span id="118">118</span>
+<span id="119">119</span>
+<span id="120">120</span>
+<span id="121">121</span>
+<span id="122">122</span>
+<span id="123">123</span>
+<span id="124">124</span>
+<span id="125">125</span>
+<span id="126">126</span>
+<span id="127">127</span>
+<span id="128">128</span>
+<span id="129">129</span>
+<span id="130">130</span>
+<span id="131">131</span>
+<span id="132">132</span>
+<span id="133">133</span>
+<span id="134">134</span>
+<span id="135">135</span>
+<span id="136">136</span>
+<span id="137">137</span>
+<span id="138">138</span>
+<span id="139">139</span>
+<span id="140">140</span>
+<span id="141">141</span>
+<span id="142">142</span>
+<span id="143">143</span>
+<span id="144">144</span>
+<span id="145">145</span>
+<span id="146">146</span>
+<span id="147">147</span>
+<span id="148">148</span>
+<span id="149">149</span>
+<span id="150">150</span>
+<span id="151">151</span>
+<span id="152">152</span>
+<span id="153">153</span>
+<span id="154">154</span>
+<span id="155">155</span>
+<span id="156">156</span>
+<span id="157">157</span>
+<span id="158">158</span>
+<span id="159">159</span>
+<span id="160">160</span>
+<span id="161">161</span>
+<span id="162">162</span>
+<span id="163">163</span>
+<span id="164">164</span>
+<span id="165">165</span>
+<span id="166">166</span>
+<span id="167">167</span>
+<span id="168">168</span>
+<span id="169">169</span>
+<span id="170">170</span>
+<span id="171">171</span>
+<span id="172">172</span>
+<span id="173">173</span>
+<span id="174">174</span>
+<span id="175">175</span>
+<span id="176">176</span>
+<span id="177">177</span>
+<span id="178">178</span>
+<span id="179">179</span>
+<span id="180">180</span>
+<span id="181">181</span>
+<span id="182">182</span>
+<span id="183">183</span>
+<span id="184">184</span>
+<span id="185">185</span>
+<span id="186">186</span>
+<span id="187">187</span>
+<span id="188">188</span>
+<span id="189">189</span>
+<span id="190">190</span>
+<span id="191">191</span>
+<span id="192">192</span>
+<span id="193">193</span>
+<span id="194">194</span>
+<span id="195">195</span>
+<span id="196">196</span>
+<span id="197">197</span>
+<span id="198">198</span>
+<span id="199">199</span>
+<span id="200">200</span>
+<span id="201">201</span>
+<span id="202">202</span>
+<span id="203">203</span>
+<span id="204">204</span>
+<span id="205">205</span>
+<span id="206">206</span>
+<span id="207">207</span>
+<span id="208">208</span>
+<span id="209">209</span>
+<span id="210">210</span>
+<span id="211">211</span>
+<span id="212">212</span>
+<span id="213">213</span>
+<span id="214">214</span>
+<span id="215">215</span>
+<span id="216">216</span>
+<span id="217">217</span>
+<span id="218">218</span>
+<span id="219">219</span>
+<span id="220">220</span>
+<span id="221">221</span>
+<span id="222">222</span>
+<span id="223">223</span>
+<span id="224">224</span>
+<span id="225">225</span>
+<span id="226">226</span>
+<span id="227">227</span>
+<span id="228">228</span>
+<span id="229">229</span>
+<span id="230">230</span>
+<span id="231">231</span>
+<span id="232">232</span>
+<span id="233">233</span>
+<span id="234">234</span>
+<span id="235">235</span>
+<span id="236">236</span>
+<span id="237">237</span>
+<span id="238">238</span>
+<span id="239">239</span>
+<span id="240">240</span>
+<span id="241">241</span>
+<span id="242">242</span>
+<span id="243">243</span>
+<span id="244">244</span>
+<span id="245">245</span>
+<span id="246">246</span>
+<span id="247">247</span>
+<span id="248">248</span>
+<span id="249">249</span>
+<span id="250">250</span>
+<span id="251">251</span>
+<span id="252">252</span>
+<span id="253">253</span>
+<span id="254">254</span>
+<span id="255">255</span>
+<span id="256">256</span>
+<span id="257">257</span>
+<span id="258">258</span>
+<span id="259">259</span>
+<span id="260">260</span>
+<span id="261">261</span>
+<span id="262">262</span>
+<span id="263">263</span>
+<span id="264">264</span>
+<span id="265">265</span>
+<span id="266">266</span>
+<span id="267">267</span>
+<span id="268">268</span>
+<span id="269">269</span>
+<span id="270">270</span>
+<span id="271">271</span>
+<span id="272">272</span>
+<span id="273">273</span>
+<span id="274">274</span>
+<span id="275">275</span>
+<span id="276">276</span>
+<span id="277">277</span>
+<span id="278">278</span>
+<span id="279">279</span>
+<span id="280">280</span>
+<span id="281">281</span>
+<span id="282">282</span>
+<span id="283">283</span>
+<span id="284">284</span>
+<span id="285">285</span>
+<span id="286">286</span>
+<span id="287">287</span>
+<span id="288">288</span>
+<span id="289">289</span>
+<span id="290">290</span>
+<span id="291">291</span>
+<span id="292">292</span>
+<span id="293">293</span>
+<span id="294">294</span>
+<span id="295">295</span>
+<span id="296">296</span>
+<span id="297">297</span>
+<span id="298">298</span>
+<span id="299">299</span>
+<span id="300">300</span>
+<span id="301">301</span>
+<span id="302">302</span>
+<span id="303">303</span>
+<span id="304">304</span>
+<span id="305">305</span>
+<span id="306">306</span>
+<span id="307">307</span>
+<span id="308">308</span>
+<span id="309">309</span>
+<span id="310">310</span>
+<span id="311">311</span>
+<span id="312">312</span>
+<span id="313">313</span>
+<span id="314">314</span>
+<span id="315">315</span>
+<span id="316">316</span>
+<span id="317">317</span>
+<span id="318">318</span>
+<span id="319">319</span>
+<span id="320">320</span>
+<span id="321">321</span>
+<span id="322">322</span>
+<span id="323">323</span>
+<span id="324">324</span>
+<span id="325">325</span>
+<span id="326">326</span>
+<span id="327">327</span>
+<span id="328">328</span>
+<span id="329">329</span>
+<span id="330">330</span>
+<span id="331">331</span>
+<span id="332">332</span>
+<span id="333">333</span>
+<span id="334">334</span>
+<span id="335">335</span>
+<span id="336">336</span>
+<span id="337">337</span>
+<span id="338">338</span>
+<span id="339">339</span>
+<span id="340">340</span>
+<span id="341">341</span>
+<span id="342">342</span>
+<span id="343">343</span>
+<span id="344">344</span>
+<span id="345">345</span>
+<span id="346">346</span>
+<span id="347">347</span>
+<span id="348">348</span>
+<span id="349">349</span>
+<span id="350">350</span>
+<span id="351">351</span>
+<span id="352">352</span>
+<span id="353">353</span>
+<span id="354">354</span>
+<span id="355">355</span>
+<span id="356">356</span>
+<span id="357">357</span>
+<span id="358">358</span>
+<span id="359">359</span>
+<span id="360">360</span>
+<span id="361">361</span>
+<span id="362">362</span>
+<span id="363">363</span>
+<span id="364">364</span>
+<span id="365">365</span>
+<span id="366">366</span>
+<span id="367">367</span>
+<span id="368">368</span>
+<span id="369">369</span>
+<span id="370">370</span>
+<span id="371">371</span>
+<span id="372">372</span>
+<span id="373">373</span>
+<span id="374">374</span>
+<span id="375">375</span>
+<span id="376">376</span>
+<span id="377">377</span>
+<span id="378">378</span>
+<span id="379">379</span>
+<span id="380">380</span>
+<span id="381">381</span>
+<span id="382">382</span>
+<span id="383">383</span>
+<span id="384">384</span>
+<span id="385">385</span>
+<span id="386">386</span>
+<span id="387">387</span>
+<span id="388">388</span>
+<span id="389">389</span>
+<span id="390">390</span>
+<span id="391">391</span>
+<span id="392">392</span>
+<span id="393">393</span>
+<span id="394">394</span>
+<span id="395">395</span>
+<span id="396">396</span>
+<span id="397">397</span>
+<span id="398">398</span>
+<span id="399">399</span>
+<span id="400">400</span>
+<span id="401">401</span>
+<span id="402">402</span>
+<span id="403">403</span>
+<span id="404">404</span>
+<span id="405">405</span>
+<span id="406">406</span>
+<span id="407">407</span>
+<span id="408">408</span>
+<span id="409">409</span>
+<span id="410">410</span>
+<span id="411">411</span>
+<span id="412">412</span>
+<span id="413">413</span>
+<span id="414">414</span>
+<span id="415">415</span>
+<span id="416">416</span>
+<span id="417">417</span>
+<span id="418">418</span>
+<span id="419">419</span>
+<span id="420">420</span>
+<span id="421">421</span>
+<span id="422">422</span>
+<span id="423">423</span>
+<span id="424">424</span>
+<span id="425">425</span>
+<span id="426">426</span>
+<span id="427">427</span>
+<span id="428">428</span>
+<span id="429">429</span>
+<span id="430">430</span>
+<span id="431">431</span>
+<span id="432">432</span>
+<span id="433">433</span>
+<span id="434">434</span>
+<span id="435">435</span>
+<span id="436">436</span>
+<span id="437">437</span>
+<span id="438">438</span>
+<span id="439">439</span>
+<span id="440">440</span>
+<span id="441">441</span>
+<span id="442">442</span>
+<span id="443">443</span>
+<span id="444">444</span>
+<span id="445">445</span>
+<span id="446">446</span>
+<span id="447">447</span>
+<span id="448">448</span>
+<span id="449">449</span>
+<span id="450">450</span>
+<span id="451">451</span>
+<span id="452">452</span>
+<span id="453">453</span>
+<span id="454">454</span>
+<span id="455">455</span>
+<span id="456">456</span>
+<span id="457">457</span>
+<span id="458">458</span>
+<span id="459">459</span>
+<span id="460">460</span>
+<span id="461">461</span>
+<span id="462">462</span>
+<span id="463">463</span>
+<span id="464">464</span>
+<span id="465">465</span>
+<span id="466">466</span>
+<span id="467">467</span>
+<span id="468">468</span>
+<span id="469">469</span>
+<span id="470">470</span>
+<span id="471">471</span>
+<span id="472">472</span>
+<span id="473">473</span>
+<span id="474">474</span>
+<span id="475">475</span>
+<span id="476">476</span>
+<span id="477">477</span>
+<span id="478">478</span>
+<span id="479">479</span>
+<span id="480">480</span>
+<span id="481">481</span>
+<span id="482">482</span>
+<span id="483">483</span>
+<span id="484">484</span>
+<span id="485">485</span>
+<span id="486">486</span>
+<span id="487">487</span>
+<span id="488">488</span>
+<span id="489">489</span>
+<span id="490">490</span>
+<span id="491">491</span>
+<span id="492">492</span>
+<span id="493">493</span>
+<span id="494">494</span>
+<span id="495">495</span>
+<span id="496">496</span>
+<span id="497">497</span>
+<span id="498">498</span>
+<span id="499">499</span>
+<span id="500">500</span>
+<span id="501">501</span>
+<span id="502">502</span>
+<span id="503">503</span>
+<span id="504">504</span>
+<span id="505">505</span>
+<span id="506">506</span>
+<span id="507">507</span>
+<span id="508">508</span>
+<span id="509">509</span>
+<span id="510">510</span>
+<span id="511">511</span>
+<span id="512">512</span>
+<span id="513">513</span>
+<span id="514">514</span>
+<span id="515">515</span>
+<span id="516">516</span>
+<span id="517">517</span>
+<span id="518">518</span>
+<span id="519">519</span>
+<span id="520">520</span>
+<span id="521">521</span>
+<span id="522">522</span>
+<span id="523">523</span>
+<span id="524">524</span>
+<span id="525">525</span>
+<span id="526">526</span>
+<span id="527">527</span>
+<span id="528">528</span>
+<span id="529">529</span>
+<span id="530">530</span>
+<span id="531">531</span>
+<span id="532">532</span>
+<span id="533">533</span>
+<span id="534">534</span>
+<span id="535">535</span>
+<span id="536">536</span>
+<span id="537">537</span>
+<span id="538">538</span>
+<span id="539">539</span>
+<span id="540">540</span>
+<span id="541">541</span>
+<span id="542">542</span>
+<span id="543">543</span>
+<span id="544">544</span>
+<span id="545">545</span>
+<span id="546">546</span>
+<span id="547">547</span>
+<span id="548">548</span>
+<span id="549">549</span>
+<span id="550">550</span>
+<span id="551">551</span>
+<span id="552">552</span>
+<span id="553">553</span>
+<span id="554">554</span>
+<span id="555">555</span>
+<span id="556">556</span>
+<span id="557">557</span>
+<span id="558">558</span>
+<span id="559">559</span>
+<span id="560">560</span>
+<span id="561">561</span>
+<span id="562">562</span>
+<span id="563">563</span>
+<span id="564">564</span>
+<span id="565">565</span>
+<span id="566">566</span>
+<span id="567">567</span>
+<span id="568">568</span>
+<span id="569">569</span>
+<span id="570">570</span>
+<span id="571">571</span>
+<span id="572">572</span>
+<span id="573">573</span>
+<span id="574">574</span>
+<span id="575">575</span>
+<span id="576">576</span>
+<span id="577">577</span>
+<span id="578">578</span>
+<span id="579">579</span>
+<span id="580">580</span>
+<span id="581">581</span>
+<span id="582">582</span>
+<span id="583">583</span>
+<span id="584">584</span>
+<span id="585">585</span>
+<span id="586">586</span>
+<span id="587">587</span>
+<span id="588">588</span>
+<span id="589">589</span>
+<span id="590">590</span>
+<span id="591">591</span>
+<span id="592">592</span>
+<span id="593">593</span>
+<span id="594">594</span>
+<span id="595">595</span>
+<span id="596">596</span>
+<span id="597">597</span>
+<span id="598">598</span>
+<span id="599">599</span>
+<span id="600">600</span>
+<span id="601">601</span>
+<span id="602">602</span>
+<span id="603">603</span>
+<span id="604">604</span>
+<span id="605">605</span>
+<span id="606">606</span>
+<span id="607">607</span>
+<span id="608">608</span>
+<span id="609">609</span>
+<span id="610">610</span>
+<span id="611">611</span>
+<span id="612">612</span>
+<span id="613">613</span>
+<span id="614">614</span>
+<span id="615">615</span>
+<span id="616">616</span>
+<span id="617">617</span>
+<span id="618">618</span>
+<span id="619">619</span>
+<span id="620">620</span>
+<span id="621">621</span>
+<span id="622">622</span>
+<span id="623">623</span>
+<span id="624">624</span>
+<span id="625">625</span>
+<span id="626">626</span>
+<span id="627">627</span>
+<span id="628">628</span>
+<span id="629">629</span>
+<span id="630">630</span>
+<span id="631">631</span>
+<span id="632">632</span>
+<span id="633">633</span>
+<span id="634">634</span>
+<span id="635">635</span>
+<span id="636">636</span>
+<span id="637">637</span>
+<span id="638">638</span>
+<span id="639">639</span>
+<span id="640">640</span>
+<span id="641">641</span>
+<span id="642">642</span>
+<span id="643">643</span>
+<span id="644">644</span>
+<span id="645">645</span>
+<span id="646">646</span>
+<span id="647">647</span>
+<span id="648">648</span>
+<span id="649">649</span>
+<span id="650">650</span>
+<span id="651">651</span>
+<span id="652">652</span>
+<span id="653">653</span>
+<span id="654">654</span>
+<span id="655">655</span>
+<span id="656">656</span>
+<span id="657">657</span>
+<span id="658">658</span>
+<span id="659">659</span>
+<span id="660">660</span>
+<span id="661">661</span>
+<span id="662">662</span>
+<span id="663">663</span>
+<span id="664">664</span>
+<span id="665">665</span>
+<span id="666">666</span>
+<span id="667">667</span>
+<span id="668">668</span>
+<span id="669">669</span>
+<span id="670">670</span>
+<span id="671">671</span>
+<span id="672">672</span>
+<span id="673">673</span>
+<span id="674">674</span>
+<span id="675">675</span>
+<span id="676">676</span>
+<span id="677">677</span>
+<span id="678">678</span>
+<span id="679">679</span>
+<span id="680">680</span>
+<span id="681">681</span>
+<span id="682">682</span>
+<span id="683">683</span>
+<span id="684">684</span>
+<span id="685">685</span>
+<span id="686">686</span>
+<span id="687">687</span>
+<span id="688">688</span>
+<span id="689">689</span>
+<span id="690">690</span>
+<span id="691">691</span>
+<span id="692">692</span>
+<span id="693">693</span>
+<span id="694">694</span>
+<span id="695">695</span>
+<span id="696">696</span>
+<span id="697">697</span>
+<span id="698">698</span>
+<span id="699">699</span>
+<span id="700">700</span>
+<span id="701">701</span>
+<span id="702">702</span>
+<span id="703">703</span>
+<span id="704">704</span>
+<span id="705">705</span>
+<span id="706">706</span>
+<span id="707">707</span>
+<span id="708">708</span>
+<span id="709">709</span>
+<span id="710">710</span>
+<span id="711">711</span>
+<span id="712">712</span>
+<span id="713">713</span>
+<span id="714">714</span>
+<span id="715">715</span>
+<span id="716">716</span>
+<span id="717">717</span>
+<span id="718">718</span>
+<span id="719">719</span>
+<span id="720">720</span>
+<span id="721">721</span>
+<span id="722">722</span>
+<span id="723">723</span>
+<span id="724">724</span>
+<span id="725">725</span>
+<span id="726">726</span>
+<span id="727">727</span>
+<span id="728">728</span>
+<span id="729">729</span>
+<span id="730">730</span>
+<span id="731">731</span>
+<span id="732">732</span>
+<span id="733">733</span>
+<span id="734">734</span>
+<span id="735">735</span>
+<span id="736">736</span>
+<span id="737">737</span>
+<span id="738">738</span>
+<span id="739">739</span>
+<span id="740">740</span>
+<span id="741">741</span>
+<span id="742">742</span>
+<span id="743">743</span>
+<span id="744">744</span>
+<span id="745">745</span>
+<span id="746">746</span>
+<span id="747">747</span>
+<span id="748">748</span>
+<span id="749">749</span>
+<span id="750">750</span>
+<span id="751">751</span>
+<span id="752">752</span>
+<span id="753">753</span>
+<span id="754">754</span>
+<span id="755">755</span>
+<span id="756">756</span>
+<span id="757">757</span>
+<span id="758">758</span>
+<span id="759">759</span>
+<span id="760">760</span>
+<span id="761">761</span>
+<span id="762">762</span>
+<span id="763">763</span>
+<span id="764">764</span>
+<span id="765">765</span>
+<span id="766">766</span>
+<span id="767">767</span>
+<span id="768">768</span>
+<span id="769">769</span>
+<span id="770">770</span>
+<span id="771">771</span>
+<span id="772">772</span>
+<span id="773">773</span>
+<span id="774">774</span>
+<span id="775">775</span>
+<span id="776">776</span>
+<span id="777">777</span>
+<span id="778">778</span>
+<span id="779">779</span>
+<span id="780">780</span>
+<span id="781">781</span>
+<span id="782">782</span>
+<span id="783">783</span>
+<span id="784">784</span>
+<span id="785">785</span>
+<span id="786">786</span>
+<span id="787">787</span>
+<span id="788">788</span>
+<span id="789">789</span>
+<span id="790">790</span>
+<span id="791">791</span>
+<span id="792">792</span>
+<span id="793">793</span>
+<span id="794">794</span>
+<span id="795">795</span>
+<span id="796">796</span>
+<span id="797">797</span>
+<span id="798">798</span>
+<span id="799">799</span>
+<span id="800">800</span>
+<span id="801">801</span>
+<span id="802">802</span>
+<span id="803">803</span>
+<span id="804">804</span>
+<span id="805">805</span>
+<span id="806">806</span>
+<span id="807">807</span>
+<span id="808">808</span>
+<span id="809">809</span>
+<span id="810">810</span>
+<span id="811">811</span>
+<span id="812">812</span>
+<span id="813">813</span>
+<span id="814">814</span>
+<span id="815">815</span>
+<span id="816">816</span>
+<span id="817">817</span>
+<span id="818">818</span>
+<span id="819">819</span>
+<span id="820">820</span>
+<span id="821">821</span>
+<span id="822">822</span>
+<span id="823">823</span>
+<span id="824">824</span>
+<span id="825">825</span>
+<span id="826">826</span>
+<span id="827">827</span>
+<span id="828">828</span>
+<span id="829">829</span>
+<span id="830">830</span>
+<span id="831">831</span>
+<span id="832">832</span>
+<span id="833">833</span>
+<span id="834">834</span>
+<span id="835">835</span>
+<span id="836">836</span>
+<span id="837">837</span>
+<span id="838">838</span>
+<span id="839">839</span>
+<span id="840">840</span>
+<span id="841">841</span>
+<span id="842">842</span>
+<span id="843">843</span>
+<span id="844">844</span>
+<span id="845">845</span>
+<span id="846">846</span>
+<span id="847">847</span>
+<span id="848">848</span>
+<span id="849">849</span>
+<span id="850">850</span>
+<span id="851">851</span>
+<span id="852">852</span>
+<span id="853">853</span>
+<span id="854">854</span>
+<span id="855">855</span>
+<span id="856">856</span>
+<span id="857">857</span>
+<span id="858">858</span>
+<span id="859">859</span>
+<span id="860">860</span>
+<span id="861">861</span>
+<span id="862">862</span>
+<span id="863">863</span>
+<span id="864">864</span>
+<span id="865">865</span>
+<span id="866">866</span>
+<span id="867">867</span>
+<span id="868">868</span>
+<span id="869">869</span>
+<span id="870">870</span>
+<span id="871">871</span>
+<span id="872">872</span>
+<span id="873">873</span>
+<span id="874">874</span>
+<span id="875">875</span>
+<span id="876">876</span>
+<span id="877">877</span>
+<span id="878">878</span>
+<span id="879">879</span>
+<span id="880">880</span>
+<span id="881">881</span>
+<span id="882">882</span>
+<span id="883">883</span>
+<span id="884">884</span>
+<span id="885">885</span>
+<span id="886">886</span>
+<span id="887">887</span>
+<span id="888">888</span>
+<span id="889">889</span>
+<span id="890">890</span>
+<span id="891">891</span>
+<span id="892">892</span>
+<span id="893">893</span>
+<span id="894">894</span>
+<span id="895">895</span>
+<span id="896">896</span>
+<span id="897">897</span>
+<span id="898">898</span>
+<span id="899">899</span>
+<span id="900">900</span>
+<span id="901">901</span>
+<span id="902">902</span>
+<span id="903">903</span>
+<span id="904">904</span>
+<span id="905">905</span>
+<span id="906">906</span>
+<span id="907">907</span>
+<span id="908">908</span>
+<span id="909">909</span>
+<span id="910">910</span>
+<span id="911">911</span>
+<span id="912">912</span>
+<span id="913">913</span>
+<span id="914">914</span>
+<span id="915">915</span>
+<span id="916">916</span>
+<span id="917">917</span>
+<span id="918">918</span>
+<span id="919">919</span>
+<span id="920">920</span>
+<span id="921">921</span>
+<span id="922">922</span>
+<span id="923">923</span>
+<span id="924">924</span>
+<span id="925">925</span>
+<span id="926">926</span>
+<span id="927">927</span>
+<span id="928">928</span>
+<span id="929">929</span>
+<span id="930">930</span>
+<span id="931">931</span>
+<span id="932">932</span>
+<span id="933">933</span>
+<span id="934">934</span>
+<span id="935">935</span>
+<span id="936">936</span>
+<span id="937">937</span>
+<span id="938">938</span>
+<span id="939">939</span>
+<span id="940">940</span>
+<span id="941">941</span>
+<span id="942">942</span>
+<span id="943">943</span>
+<span id="944">944</span>
+<span id="945">945</span>
+<span id="946">946</span>
+<span id="947">947</span>
+<span id="948">948</span>
+<span id="949">949</span>
+<span id="950">950</span>
+<span id="951">951</span>
+<span id="952">952</span>
+<span id="953">953</span>
+<span id="954">954</span>
+<span id="955">955</span>
+<span id="956">956</span>
+<span id="957">957</span>
+<span id="958">958</span>
+<span id="959">959</span>
+<span id="960">960</span>
+<span id="961">961</span>
+<span id="962">962</span>
+<span id="963">963</span>
+<span id="964">964</span>
+<span id="965">965</span>
+<span id="966">966</span>
+<span id="967">967</span>
+<span id="968">968</span>
+<span id="969">969</span>
+<span id="970">970</span>
+<span id="971">971</span>
+<span id="972">972</span>
+<span id="973">973</span>
+<span id="974">974</span>
+<span id="975">975</span>
+<span id="976">976</span>
+<span id="977">977</span>
+<span id="978">978</span>
+<span id="979">979</span>
+<span id="980">980</span>
+<span id="981">981</span>
+<span id="982">982</span>
+<span id="983">983</span>
+<span id="984">984</span>
+<span id="985">985</span>
+<span id="986">986</span>
+<span id="987">987</span>
+<span id="988">988</span>
+<span id="989">989</span>
+<span id="990">990</span>
+<span id="991">991</span>
+<span id="992">992</span>
+<span id="993">993</span>
+<span id="994">994</span>
+<span id="995">995</span>
+<span id="996">996</span>
+<span id="997">997</span>
+<span id="998">998</span>
+<span id="999">999</span>
+<span id="1000">1000</span>
+<span id="1001">1001</span>
+<span id="1002">1002</span>
+<span id="1003">1003</span>
+<span id="1004">1004</span>
+<span id="1005">1005</span>
+<span id="1006">1006</span>
+<span id="1007">1007</span>
+<span id="1008">1008</span>
+<span id="1009">1009</span>
+<span id="1010">1010</span>
+<span id="1011">1011</span>
+<span id="1012">1012</span>
+<span id="1013">1013</span>
+<span id="1014">1014</span>
+<span id="1015">1015</span>
+<span id="1016">1016</span>
+<span id="1017">1017</span>
+<span id="1018">1018</span>
+<span id="1019">1019</span>
+<span id="1020">1020</span>
+<span id="1021">1021</span>
+<span id="1022">1022</span>
+<span id="1023">1023</span>
+<span id="1024">1024</span>
+<span id="1025">1025</span>
+<span id="1026">1026</span>
+<span id="1027">1027</span>
+<span id="1028">1028</span>
+<span id="1029">1029</span>
+<span id="1030">1030</span>
+<span id="1031">1031</span>
+<span id="1032">1032</span>
+<span id="1033">1033</span>
+<span id="1034">1034</span>
+<span id="1035">1035</span>
+<span id="1036">1036</span>
+<span id="1037">1037</span>
+<span id="1038">1038</span>
+<span id="1039">1039</span>
+<span id="1040">1040</span>
+<span id="1041">1041</span>
+<span id="1042">1042</span>
+<span id="1043">1043</span>
+<span id="1044">1044</span>
+<span id="1045">1045</span>
+<span id="1046">1046</span>
+<span id="1047">1047</span>
+<span id="1048">1048</span>
+<span id="1049">1049</span>
+<span id="1050">1050</span>
+<span id="1051">1051</span>
+<span id="1052">1052</span>
+<span id="1053">1053</span>
+<span id="1054">1054</span>
+<span id="1055">1055</span>
+<span id="1056">1056</span>
+<span id="1057">1057</span>
+<span id="1058">1058</span>
+<span id="1059">1059</span>
+<span id="1060">1060</span>
+<span id="1061">1061</span>
+<span id="1062">1062</span>
+<span id="1063">1063</span>
+<span id="1064">1064</span>
+<span id="1065">1065</span>
+<span id="1066">1066</span>
+<span id="1067">1067</span>
+<span id="1068">1068</span>
+<span id="1069">1069</span>
+<span id="1070">1070</span>
+<span id="1071">1071</span>
+<span id="1072">1072</span>
+<span id="1073">1073</span>
+<span id="1074">1074</span>
+<span id="1075">1075</span>
+<span id="1076">1076</span>
+<span id="1077">1077</span>
+<span id="1078">1078</span>
+<span id="1079">1079</span>
+<span id="1080">1080</span>
+<span id="1081">1081</span>
+<span id="1082">1082</span>
+<span id="1083">1083</span>
+<span id="1084">1084</span>
+<span id="1085">1085</span>
+<span id="1086">1086</span>
+<span id="1087">1087</span>
+<span id="1088">1088</span>
+<span id="1089">1089</span>
+<span id="1090">1090</span>
+<span id="1091">1091</span>
+<span id="1092">1092</span>
+<span id="1093">1093</span>
+<span id="1094">1094</span>
+<span id="1095">1095</span>
+<span id="1096">1096</span>
+<span id="1097">1097</span>
+<span id="1098">1098</span>
+<span id="1099">1099</span>
+<span id="1100">1100</span>
+<span id="1101">1101</span>
+<span id="1102">1102</span>
+<span id="1103">1103</span>
+<span id="1104">1104</span>
+<span id="1105">1105</span>
+<span id="1106">1106</span>
+<span id="1107">1107</span>
+<span id="1108">1108</span>
+<span id="1109">1109</span>
+<span id="1110">1110</span>
+<span id="1111">1111</span>
+<span id="1112">1112</span>
+<span id="1113">1113</span>
+<span id="1114">1114</span>
+<span id="1115">1115</span>
+<span id="1116">1116</span>
+<span id="1117">1117</span>
+<span id="1118">1118</span>
+<span id="1119">1119</span>
+<span id="1120">1120</span>
+<span id="1121">1121</span>
+<span id="1122">1122</span>
+<span id="1123">1123</span>
+<span id="1124">1124</span>
+<span id="1125">1125</span>
+<span id="1126">1126</span>
+<span id="1127">1127</span>
+<span id="1128">1128</span>
+<span id="1129">1129</span>
+<span id="1130">1130</span>
+<span id="1131">1131</span>
+<span id="1132">1132</span>
+<span id="1133">1133</span>
+<span id="1134">1134</span>
+<span id="1135">1135</span>
+<span id="1136">1136</span>
+<span id="1137">1137</span>
+<span id="1138">1138</span>
+<span id="1139">1139</span>
+<span id="1140">1140</span>
+<span id="1141">1141</span>
+<span id="1142">1142</span>
+<span id="1143">1143</span>
+<span id="1144">1144</span>
+<span id="1145">1145</span>
+<span id="1146">1146</span>
+<span id="1147">1147</span>
+<span id="1148">1148</span>
+<span id="1149">1149</span>
+<span id="1150">1150</span>
+<span id="1151">1151</span>
+<span id="1152">1152</span>
+<span id="1153">1153</span>
+<span id="1154">1154</span>
+<span id="1155">1155</span>
+<span id="1156">1156</span>
+<span id="1157">1157</span>
+<span id="1158">1158</span>
+<span id="1159">1159</span>
+<span id="1160">1160</span>
+<span id="1161">1161</span>
+<span id="1162">1162</span>
+<span id="1163">1163</span>
+<span id="1164">1164</span>
+<span id="1165">1165</span>
+<span id="1166">1166</span>
+<span id="1167">1167</span>
+<span id="1168">1168</span>
+<span id="1169">1169</span>
+<span id="1170">1170</span>
+<span id="1171">1171</span>
+<span id="1172">1172</span>
+<span id="1173">1173</span>
+<span id="1174">1174</span>
+<span id="1175">1175</span>
+<span id="1176">1176</span>
+<span id="1177">1177</span>
+<span id="1178">1178</span>
+<span id="1179">1179</span>
+<span id="1180">1180</span>
+<span id="1181">1181</span>
+<span id="1182">1182</span>
+<span id="1183">1183</span>
+<span id="1184">1184</span>
+<span id="1185">1185</span>
+<span id="1186">1186</span>
+<span id="1187">1187</span>
+<span id="1188">1188</span>
+<span id="1189">1189</span>
+<span id="1190">1190</span>
+<span id="1191">1191</span>
+<span id="1192">1192</span>
+<span id="1193">1193</span>
+<span id="1194">1194</span>
+<span id="1195">1195</span>
+<span id="1196">1196</span>
+<span id="1197">1197</span>
+<span id="1198">1198</span>
+<span id="1199">1199</span>
+<span id="1200">1200</span>
+<span id="1201">1201</span>
+<span id="1202">1202</span>
+<span id="1203">1203</span>
+<span id="1204">1204</span>
+<span id="1205">1205</span>
+<span id="1206">1206</span>
+<span id="1207">1207</span>
+<span id="1208">1208</span>
+<span id="1209">1209</span>
+<span id="1210">1210</span>
+<span id="1211">1211</span>
+<span id="1212">1212</span>
+<span id="1213">1213</span>
+<span id="1214">1214</span>
+<span id="1215">1215</span>
+<span id="1216">1216</span>
+<span id="1217">1217</span>
+<span id="1218">1218</span>
+<span id="1219">1219</span>
+<span id="1220">1220</span>
+<span id="1221">1221</span>
+<span id="1222">1222</span>
+<span id="1223">1223</span>
+<span id="1224">1224</span>
+<span id="1225">1225</span>
+<span id="1226">1226</span>
+<span id="1227">1227</span>
+<span id="1228">1228</span>
+<span id="1229">1229</span>
+<span id="1230">1230</span>
+<span id="1231">1231</span>
+<span id="1232">1232</span>
+<span id="1233">1233</span>
+<span id="1234">1234</span>
+<span id="1235">1235</span>
+<span id="1236">1236</span>
+<span id="1237">1237</span>
+<span id="1238">1238</span>
+<span id="1239">1239</span>
+<span id="1240">1240</span>
+<span id="1241">1241</span>
+<span id="1242">1242</span>
+<span id="1243">1243</span>
+<span id="1244">1244</span>
+<span id="1245">1245</span>
+<span id="1246">1246</span>
+<span id="1247">1247</span>
+<span id="1248">1248</span>
+<span id="1249">1249</span>
+<span id="1250">1250</span>
+<span id="1251">1251</span>
+<span id="1252">1252</span>
+<span id="1253">1253</span>
+<span id="1254">1254</span>
+<span id="1255">1255</span>
+<span id="1256">1256</span>
+<span id="1257">1257</span>
+<span id="1258">1258</span>
+<span id="1259">1259</span>
+<span id="1260">1260</span>
+<span id="1261">1261</span>
+<span id="1262">1262</span>
+<span id="1263">1263</span>
+<span id="1264">1264</span>
+<span id="1265">1265</span>
+<span id="1266">1266</span>
+<span id="1267">1267</span>
+<span id="1268">1268</span>
+<span id="1269">1269</span>
+<span id="1270">1270</span>
+<span id="1271">1271</span>
+<span id="1272">1272</span>
+<span id="1273">1273</span>
+<span id="1274">1274</span>
+<span id="1275">1275</span>
+<span id="1276">1276</span>
+<span id="1277">1277</span>
+<span id="1278">1278</span>
+<span id="1279">1279</span>
+<span id="1280">1280</span>
+<span id="1281">1281</span>
+<span id="1282">1282</span>
+<span id="1283">1283</span>
+<span id="1284">1284</span>
+<span id="1285">1285</span>
+<span id="1286">1286</span>
+<span id="1287">1287</span>
+<span id="1288">1288</span>
+<span id="1289">1289</span>
+<span id="1290">1290</span>
+<span id="1291">1291</span>
+<span id="1292">1292</span>
+<span id="1293">1293</span>
+<span id="1294">1294</span>
+<span id="1295">1295</span>
+<span id="1296">1296</span>
+<span id="1297">1297</span>
+<span id="1298">1298</span>
+<span id="1299">1299</span>
+<span id="1300">1300</span>
+<span id="1301">1301</span>
+<span id="1302">1302</span>
+<span id="1303">1303</span>
+<span id="1304">1304</span>
+<span id="1305">1305</span>
+<span id="1306">1306</span>
+<span id="1307">1307</span>
+<span id="1308">1308</span>
+<span id="1309">1309</span>
+<span id="1310">1310</span>
+<span id="1311">1311</span>
+<span id="1312">1312</span>
+<span id="1313">1313</span>
+<span id="1314">1314</span>
+<span id="1315">1315</span>
+<span id="1316">1316</span>
+<span id="1317">1317</span>
+<span id="1318">1318</span>
+<span id="1319">1319</span>
+<span id="1320">1320</span>
+<span id="1321">1321</span>
+<span id="1322">1322</span>
+<span id="1323">1323</span>
+<span id="1324">1324</span>
+<span id="1325">1325</span>
+<span id="1326">1326</span>
+<span id="1327">1327</span>
+<span id="1328">1328</span>
+<span id="1329">1329</span>
+<span id="1330">1330</span>
+<span id="1331">1331</span>
+<span id="1332">1332</span>
+<span id="1333">1333</span>
+<span id="1334">1334</span>
+<span id="1335">1335</span>
+<span id="1336">1336</span>
+<span id="1337">1337</span>
+<span id="1338">1338</span>
+<span id="1339">1339</span>
+<span id="1340">1340</span>
+<span id="1341">1341</span>
+<span id="1342">1342</span>
+<span id="1343">1343</span>
+<span id="1344">1344</span>
+<span id="1345">1345</span>
+<span id="1346">1346</span>
+<span id="1347">1347</span>
+<span id="1348">1348</span>
+<span id="1349">1349</span>
+<span id="1350">1350</span>
+<span id="1351">1351</span>
+<span id="1352">1352</span>
+<span id="1353">1353</span>
+<span id="1354">1354</span>
+<span id="1355">1355</span>
+<span id="1356">1356</span>
+<span id="1357">1357</span>
+<span id="1358">1358</span>
+<span id="1359">1359</span>
+<span id="1360">1360</span>
+<span id="1361">1361</span>
+<span id="1362">1362</span>
+<span id="1363">1363</span>
+<span id="1364">1364</span>
+<span id="1365">1365</span>
+<span id="1366">1366</span>
+<span id="1367">1367</span>
+<span id="1368">1368</span>
+<span id="1369">1369</span>
+<span id="1370">1370</span>
+<span id="1371">1371</span>
+<span id="1372">1372</span>
+<span id="1373">1373</span>
+<span id="1374">1374</span>
+<span id="1375">1375</span>
+<span id="1376">1376</span>
+<span id="1377">1377</span>
+<span id="1378">1378</span>
+<span id="1379">1379</span>
+<span id="1380">1380</span>
+<span id="1381">1381</span>
+<span id="1382">1382</span>
+<span id="1383">1383</span>
+<span id="1384">1384</span>
+<span id="1385">1385</span>
+<span id="1386">1386</span>
+<span id="1387">1387</span>
+<span id="1388">1388</span>
+<span id="1389">1389</span>
+<span id="1390">1390</span>
+<span id="1391">1391</span>
+<span id="1392">1392</span>
+<span id="1393">1393</span>
+<span id="1394">1394</span>
+<span id="1395">1395</span>
+<span id="1396">1396</span>
+<span id="1397">1397</span>
+<span id="1398">1398</span>
+<span id="1399">1399</span>
+<span id="1400">1400</span>
+<span id="1401">1401</span>
+<span id="1402">1402</span>
+<span id="1403">1403</span>
+<span id="1404">1404</span>
+<span id="1405">1405</span>
+<span id="1406">1406</span>
+<span id="1407">1407</span>
+<span id="1408">1408</span>
+<span id="1409">1409</span>
+<span id="1410">1410</span>
+<span id="1411">1411</span>
+<span id="1412">1412</span>
+<span id="1413">1413</span>
+<span id="1414">1414</span>
+<span id="1415">1415</span>
+<span id="1416">1416</span>
+<span id="1417">1417</span>
+<span id="1418">1418</span>
+<span id="1419">1419</span>
+<span id="1420">1420</span>
+<span id="1421">1421</span>
+<span id="1422">1422</span>
+<span id="1423">1423</span>
+<span id="1424">1424</span>
+<span id="1425">1425</span>
+<span id="1426">1426</span>
+<span id="1427">1427</span>
+<span id="1428">1428</span>
+<span id="1429">1429</span>
+<span id="1430">1430</span>
+<span id="1431">1431</span>
+<span id="1432">1432</span>
+<span id="1433">1433</span>
+<span id="1434">1434</span>
+<span id="1435">1435</span>
+<span id="1436">1436</span>
+<span id="1437">1437</span>
+<span id="1438">1438</span>
+<span id="1439">1439</span>
+<span id="1440">1440</span>
+<span id="1441">1441</span>
+<span id="1442">1442</span>
+<span id="1443">1443</span>
+<span id="1444">1444</span>
+<span id="1445">1445</span>
+<span id="1446">1446</span>
+<span id="1447">1447</span>
+<span id="1448">1448</span>
+<span id="1449">1449</span>
+<span id="1450">1450</span>
+<span id="1451">1451</span>
+<span id="1452">1452</span>
+<span id="1453">1453</span>
+<span id="1454">1454</span>
+<span id="1455">1455</span>
+<span id="1456">1456</span>
+<span id="1457">1457</span>
+<span id="1458">1458</span>
+<span id="1459">1459</span>
+<span id="1460">1460</span>
+<span id="1461">1461</span>
+<span id="1462">1462</span>
+<span id="1463">1463</span>
+<span id="1464">1464</span>
+<span id="1465">1465</span>
+<span id="1466">1466</span>
+<span id="1467">1467</span>
+<span id="1468">1468</span>
+<span id="1469">1469</span>
+<span id="1470">1470</span>
+<span id="1471">1471</span>
+<span id="1472">1472</span>
+<span id="1473">1473</span>
+<span id="1474">1474</span>
+<span id="1475">1475</span>
+<span id="1476">1476</span>
+<span id="1477">1477</span>
+<span id="1478">1478</span>
+<span id="1479">1479</span>
+<span id="1480">1480</span>
+</pre><pre class="rust"><code><span class="kw">use </span>core::iter::FromIterator;
+<span class="kw">use </span>core::mem::{<span class="self">self</span>, ManuallyDrop};
+<span class="kw">use </span>core::ops::{Deref, RangeBounds};
+<span class="kw">use </span>core::{cmp, fmt, hash, ptr, slice, usize};
+
+<span class="kw">use </span>alloc::{
+ alloc::{dealloc, Layout},
+ borrow::Borrow,
+ boxed::Box,
+ string::String,
+ vec::Vec,
+};
+
+<span class="kw">use </span><span class="kw">crate</span>::buf::IntoIter;
+<span class="attr">#[allow(unused)]
+</span><span class="kw">use </span><span class="kw">crate</span>::loom::sync::atomic::AtomicMut;
+<span class="kw">use </span><span class="kw">crate</span>::loom::sync::atomic::{AtomicPtr, AtomicUsize, Ordering};
+<span class="kw">use crate</span>::{offset_from, Buf, BytesMut};
+
+<span class="doccomment">/// A cheaply cloneable and sliceable chunk of contiguous memory.
+///
+/// `Bytes` is an efficient container for storing and operating on contiguous
+/// slices of memory. It is intended for use primarily in networking code, but
+/// could have applications elsewhere as well.
+///
+/// `Bytes` values facilitate zero-copy network programming by allowing multiple
+/// `Bytes` objects to point to the same underlying memory.
+///
+/// `Bytes` does not have a single implementation. It is an interface, whose
+/// exact behavior is implemented through dynamic dispatch in several underlying
+/// implementations of `Bytes`.
+///
+/// All `Bytes` implementations must fulfill the following requirements:
+/// - They are cheaply cloneable and thereby shareable between an unlimited amount
+/// of components, for example by modifying a reference count.
+/// - Instances can be sliced to refer to a subset of the original buffer.
+///
+/// ```
+/// use bytes::Bytes;
+///
+/// let mut mem = Bytes::from(&quot;Hello world&quot;);
+/// let a = mem.slice(0..5);
+///
+/// assert_eq!(a, &quot;Hello&quot;);
+///
+/// let b = mem.split_to(6);
+///
+/// assert_eq!(mem, &quot;world&quot;);
+/// assert_eq!(b, &quot;Hello &quot;);
+/// ```
+///
+/// # Memory layout
+///
+/// The `Bytes` struct itself is fairly small, limited to 4 `usize` fields used
+/// to track information about which segment of the underlying memory the
+/// `Bytes` handle has access to.
+///
+/// `Bytes` keeps both a pointer to the shared state containing the full memory
+/// slice and a pointer to the start of the region visible by the handle.
+/// `Bytes` also tracks the length of its view into the memory.
+///
+/// # Sharing
+///
+/// `Bytes` contains a vtable, which allows implementations of `Bytes` to define
+/// how sharing/cloning is implemented in detail.
+/// When `Bytes::clone()` is called, `Bytes` will call the vtable function for
+/// cloning the backing storage in order to share it behind multiple `Bytes`
+/// instances.
+///
+/// For `Bytes` implementations which refer to constant memory (e.g. created
+/// via `Bytes::from_static()`) the cloning implementation will be a no-op.
+///
+/// For `Bytes` implementations which point to a reference counted shared storage
+/// (e.g. an `Arc&lt;[u8]&gt;`), sharing will be implemented by increasing the
+/// reference count.
+///
+/// Due to this mechanism, multiple `Bytes` instances may point to the same
+/// shared memory region.
+/// Each `Bytes` instance can point to different sections within that
+/// memory region, and `Bytes` instances may or may not have overlapping views
+/// into the memory.
+///
+/// The following diagram visualizes a scenario where 2 `Bytes` instances make
+/// use of an `Arc`-based backing storage, and provide access to different views:
+///
+/// ```text
+///
+/// Arc ptrs ┌─────────┐
+/// ________________________ / │ Bytes 2 │
+/// / └─────────┘
+/// / ┌───────────┐ | |
+/// |_________/ │ Bytes 1 │ | |
+/// | └───────────┘ | |
+/// | | | ___/ data | tail
+/// | data | tail |/ |
+/// v v v v
+/// ┌─────┬─────┬───────────┬───────────────┬─────┐
+/// │ Arc │ │ │ │ │
+/// └─────┴─────┴───────────┴───────────────┴─────┘
+/// ```
+</span><span class="kw">pub struct </span>Bytes {
+ ptr: <span class="kw-2">*const </span>u8,
+ len: usize,
+ <span class="comment">// inlined &quot;trait object&quot;
+ </span>data: AtomicPtr&lt;()&gt;,
+ vtable: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Vtable,
+}
+
+<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">struct </span>Vtable {
+ <span class="doccomment">/// fn(data, ptr, len)
+ </span><span class="kw">pub </span>clone: <span class="kw">unsafe fn</span>(<span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;, <span class="kw-2">*const </span>u8, usize) -&gt; Bytes,
+ <span class="doccomment">/// fn(data, ptr, len)
+ ///
+ /// takes `Bytes` to value
+ </span><span class="kw">pub </span>to_vec: <span class="kw">unsafe fn</span>(<span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;, <span class="kw-2">*const </span>u8, usize) -&gt; Vec&lt;u8&gt;,
+ <span class="kw">pub </span>to_mut: <span class="kw">unsafe fn</span>(<span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;, <span class="kw-2">*const </span>u8, usize) -&gt; BytesMut,
+ <span class="doccomment">/// fn(data)
+ </span><span class="kw">pub </span>is_unique: <span class="kw">unsafe fn</span>(<span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;) -&gt; bool,
+ <span class="doccomment">/// fn(data, ptr, len)
+ </span><span class="kw">pub </span>drop: <span class="kw">unsafe fn</span>(<span class="kw-2">&amp;mut </span>AtomicPtr&lt;()&gt;, <span class="kw-2">*const </span>u8, usize),
+}
+
+<span class="kw">impl </span>Bytes {
+ <span class="doccomment">/// Creates a new empty `Bytes`.
+ ///
+ /// This will not allocate and the returned `Bytes` handle will be empty.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Bytes;
+ ///
+ /// let b = Bytes::new();
+ /// assert_eq!(&amp;b[..], b&quot;&quot;);
+ /// ```
+ </span><span class="attr">#[inline]
+ #[cfg(not(all(loom, test)))]
+ </span><span class="kw">pub const fn </span>new() -&gt; <span class="self">Self </span>{
+ <span class="comment">// Make it a named const to work around
+ // &quot;unsizing casts are not allowed in const fn&quot;
+ </span><span class="kw">const </span>EMPTY: <span class="kw-2">&amp;</span>[u8] = <span class="kw-2">&amp;</span>[];
+ Bytes::from_static(EMPTY)
+ }
+
+ <span class="attr">#[cfg(all(loom, test))]
+ </span><span class="kw">pub fn </span>new() -&gt; <span class="self">Self </span>{
+ <span class="kw">const </span>EMPTY: <span class="kw-2">&amp;</span>[u8] = <span class="kw-2">&amp;</span>[];
+ Bytes::from_static(EMPTY)
+ }
+
+ <span class="doccomment">/// Creates a new `Bytes` from a static slice.
+ ///
+ /// The returned `Bytes` will point directly to the static slice. There is
+ /// no allocating or copying.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Bytes;
+ ///
+ /// let b = Bytes::from_static(b&quot;hello&quot;);
+ /// assert_eq!(&amp;b[..], b&quot;hello&quot;);
+ /// ```
+ </span><span class="attr">#[inline]
+ #[cfg(not(all(loom, test)))]
+ </span><span class="kw">pub const fn </span>from_static(bytes: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>[u8]) -&gt; <span class="self">Self </span>{
+ Bytes {
+ ptr: bytes.as_ptr(),
+ len: bytes.len(),
+ data: AtomicPtr::new(ptr::null_mut()),
+ vtable: <span class="kw-2">&amp;</span>STATIC_VTABLE,
+ }
+ }
+
+ <span class="attr">#[cfg(all(loom, test))]
+ </span><span class="kw">pub fn </span>from_static(bytes: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>[u8]) -&gt; <span class="self">Self </span>{
+ Bytes {
+ ptr: bytes.as_ptr(),
+ len: bytes.len(),
+ data: AtomicPtr::new(ptr::null_mut()),
+ vtable: <span class="kw-2">&amp;</span>STATIC_VTABLE,
+ }
+ }
+
+ <span class="doccomment">/// Returns the number of bytes contained in this `Bytes`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Bytes;
+ ///
+ /// let b = Bytes::from(&amp;b&quot;hello&quot;[..]);
+ /// assert_eq!(b.len(), 5);
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">pub const fn </span>len(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
+ <span class="self">self</span>.len
+ }
+
+ <span class="doccomment">/// Returns true if the `Bytes` has a length of 0.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Bytes;
+ ///
+ /// let b = Bytes::new();
+ /// assert!(b.is_empty());
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">pub const fn </span>is_empty(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; bool {
+ <span class="self">self</span>.len == <span class="number">0
+ </span>}
+
+ <span class="doccomment">/// Returns true if this is the only reference to the data.
+ ///
+ /// Always returns false if the data is backed by a static slice.
+ ///
+ /// The result of this method may be invalidated immediately if another
+ /// thread clones this value while this is being called. Ensure you have
+ /// unique access to this value (`&amp;mut Bytes`) first if you need to be
+ /// certain the result is valid (i.e. for safety reasons)
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Bytes;
+ ///
+ /// let a = Bytes::from(vec![1, 2, 3]);
+ /// assert!(a.is_unique());
+ /// let b = a.clone();
+ /// assert!(!a.is_unique());
+ /// ```
+ </span><span class="kw">pub fn </span>is_unique(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; bool {
+ <span class="kw">unsafe </span>{ (<span class="self">self</span>.vtable.is_unique)(<span class="kw-2">&amp;</span><span class="self">self</span>.data) }
+ }
+
+ <span class="doccomment">/// Creates `Bytes` instance from slice, by copying it.
+ </span><span class="kw">pub fn </span>copy_from_slice(data: <span class="kw-2">&amp;</span>[u8]) -&gt; <span class="self">Self </span>{
+ data.to_vec().into()
+ }
+
+ <span class="doccomment">/// Returns a slice of self for the provided range.
+ ///
+ /// This will increment the reference count for the underlying memory and
+ /// return a new `Bytes` handle set to the slice.
+ ///
+ /// This operation is `O(1)`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Bytes;
+ ///
+ /// let a = Bytes::from(&amp;b&quot;hello world&quot;[..]);
+ /// let b = a.slice(2..5);
+ ///
+ /// assert_eq!(&amp;b[..], b&quot;llo&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// Requires that `begin &lt;= end` and `end &lt;= self.len()`, otherwise slicing
+ /// will panic.
+ </span><span class="kw">pub fn </span>slice(<span class="kw-2">&amp;</span><span class="self">self</span>, range: <span class="kw">impl </span>RangeBounds&lt;usize&gt;) -&gt; <span class="self">Self </span>{
+ <span class="kw">use </span>core::ops::Bound;
+
+ <span class="kw">let </span>len = <span class="self">self</span>.len();
+
+ <span class="kw">let </span>begin = <span class="kw">match </span>range.start_bound() {
+ Bound::Included(<span class="kw-2">&amp;</span>n) =&gt; n,
+ Bound::Excluded(<span class="kw-2">&amp;</span>n) =&gt; n.checked_add(<span class="number">1</span>).expect(<span class="string">&quot;out of range&quot;</span>),
+ Bound::Unbounded =&gt; <span class="number">0</span>,
+ };
+
+ <span class="kw">let </span>end = <span class="kw">match </span>range.end_bound() {
+ Bound::Included(<span class="kw-2">&amp;</span>n) =&gt; n.checked_add(<span class="number">1</span>).expect(<span class="string">&quot;out of range&quot;</span>),
+ Bound::Excluded(<span class="kw-2">&amp;</span>n) =&gt; n,
+ Bound::Unbounded =&gt; len,
+ };
+
+ <span class="macro">assert!</span>(
+ begin &lt;= end,
+ <span class="string">&quot;range start must not be greater than end: {:?} &lt;= {:?}&quot;</span>,
+ begin,
+ end,
+ );
+ <span class="macro">assert!</span>(
+ end &lt;= len,
+ <span class="string">&quot;range end out of bounds: {:?} &lt;= {:?}&quot;</span>,
+ end,
+ len,
+ );
+
+ <span class="kw">if </span>end == begin {
+ <span class="kw">return </span>Bytes::new();
+ }
+
+ <span class="kw">let </span><span class="kw-2">mut </span>ret = <span class="self">self</span>.clone();
+
+ ret.len = end - begin;
+ ret.ptr = <span class="kw">unsafe </span>{ ret.ptr.add(begin) };
+
+ ret
+ }
+
+ <span class="doccomment">/// Returns a slice of self that is equivalent to the given `subset`.
+ ///
+ /// When processing a `Bytes` buffer with other tools, one often gets a
+ /// `&amp;[u8]` which is in fact a slice of the `Bytes`, i.e. a subset of it.
+ /// This function turns that `&amp;[u8]` into another `Bytes`, as if one had
+ /// called `self.slice()` with the offsets that correspond to `subset`.
+ ///
+ /// This operation is `O(1)`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Bytes;
+ ///
+ /// let bytes = Bytes::from(&amp;b&quot;012345678&quot;[..]);
+ /// let as_slice = bytes.as_ref();
+ /// let subset = &amp;as_slice[2..6];
+ /// let subslice = bytes.slice_ref(&amp;subset);
+ /// assert_eq!(&amp;subslice[..], b&quot;2345&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// Requires that the given `sub` slice is in fact contained within the
+ /// `Bytes` buffer; otherwise this function will panic.
+ </span><span class="kw">pub fn </span>slice_ref(<span class="kw-2">&amp;</span><span class="self">self</span>, subset: <span class="kw-2">&amp;</span>[u8]) -&gt; <span class="self">Self </span>{
+ <span class="comment">// Empty slice and empty Bytes may have their pointers reset
+ // so explicitly allow empty slice to be a subslice of any slice.
+ </span><span class="kw">if </span>subset.is_empty() {
+ <span class="kw">return </span>Bytes::new();
+ }
+
+ <span class="kw">let </span>bytes_p = <span class="self">self</span>.as_ptr() <span class="kw">as </span>usize;
+ <span class="kw">let </span>bytes_len = <span class="self">self</span>.len();
+
+ <span class="kw">let </span>sub_p = subset.as_ptr() <span class="kw">as </span>usize;
+ <span class="kw">let </span>sub_len = subset.len();
+
+ <span class="macro">assert!</span>(
+ sub_p &gt;= bytes_p,
+ <span class="string">&quot;subset pointer ({:p}) is smaller than self pointer ({:p})&quot;</span>,
+ subset.as_ptr(),
+ <span class="self">self</span>.as_ptr(),
+ );
+ <span class="macro">assert!</span>(
+ sub_p + sub_len &lt;= bytes_p + bytes_len,
+ <span class="string">&quot;subset is out of bounds: self = ({:p}, {}), subset = ({:p}, {})&quot;</span>,
+ <span class="self">self</span>.as_ptr(),
+ bytes_len,
+ subset.as_ptr(),
+ sub_len,
+ );
+
+ <span class="kw">let </span>sub_offset = sub_p - bytes_p;
+
+ <span class="self">self</span>.slice(sub_offset..(sub_offset + sub_len))
+ }
+
+ <span class="doccomment">/// Splits the bytes into two at the given index.
+ ///
+ /// Afterwards `self` contains elements `[0, at)`, and the returned `Bytes`
+ /// contains elements `[at, len)`.
+ ///
+ /// This is an `O(1)` operation that just increases the reference count and
+ /// sets a few indices.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Bytes;
+ ///
+ /// let mut a = Bytes::from(&amp;b&quot;hello world&quot;[..]);
+ /// let b = a.split_off(5);
+ ///
+ /// assert_eq!(&amp;a[..], b&quot;hello&quot;);
+ /// assert_eq!(&amp;b[..], b&quot; world&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// Panics if `at &gt; len`.
+ </span><span class="attr">#[must_use = <span class="string">&quot;consider Bytes::truncate if you don&#39;t need the other half&quot;</span>]
+ </span><span class="kw">pub fn </span>split_off(<span class="kw-2">&amp;mut </span><span class="self">self</span>, at: usize) -&gt; <span class="self">Self </span>{
+ <span class="kw">if </span>at == <span class="self">self</span>.len() {
+ <span class="kw">return </span>Bytes::new();
+ }
+
+ <span class="kw">if </span>at == <span class="number">0 </span>{
+ <span class="kw">return </span>mem::replace(<span class="self">self</span>, Bytes::new());
+ }
+
+ <span class="macro">assert!</span>(
+ at &lt;= <span class="self">self</span>.len(),
+ <span class="string">&quot;split_off out of bounds: {:?} &lt;= {:?}&quot;</span>,
+ at,
+ <span class="self">self</span>.len(),
+ );
+
+ <span class="kw">let </span><span class="kw-2">mut </span>ret = <span class="self">self</span>.clone();
+
+ <span class="self">self</span>.len = at;
+
+ <span class="kw">unsafe </span>{ ret.inc_start(at) };
+
+ ret
+ }
+
+ <span class="doccomment">/// Splits the bytes into two at the given index.
+ ///
+ /// Afterwards `self` contains elements `[at, len)`, and the returned
+ /// `Bytes` contains elements `[0, at)`.
+ ///
+ /// This is an `O(1)` operation that just increases the reference count and
+ /// sets a few indices.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Bytes;
+ ///
+ /// let mut a = Bytes::from(&amp;b&quot;hello world&quot;[..]);
+ /// let b = a.split_to(5);
+ ///
+ /// assert_eq!(&amp;a[..], b&quot; world&quot;);
+ /// assert_eq!(&amp;b[..], b&quot;hello&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// Panics if `at &gt; len`.
+ </span><span class="attr">#[must_use = <span class="string">&quot;consider Bytes::advance if you don&#39;t need the other half&quot;</span>]
+ </span><span class="kw">pub fn </span>split_to(<span class="kw-2">&amp;mut </span><span class="self">self</span>, at: usize) -&gt; <span class="self">Self </span>{
+ <span class="kw">if </span>at == <span class="self">self</span>.len() {
+ <span class="kw">return </span>mem::replace(<span class="self">self</span>, Bytes::new());
+ }
+
+ <span class="kw">if </span>at == <span class="number">0 </span>{
+ <span class="kw">return </span>Bytes::new();
+ }
+
+ <span class="macro">assert!</span>(
+ at &lt;= <span class="self">self</span>.len(),
+ <span class="string">&quot;split_to out of bounds: {:?} &lt;= {:?}&quot;</span>,
+ at,
+ <span class="self">self</span>.len(),
+ );
+
+ <span class="kw">let </span><span class="kw-2">mut </span>ret = <span class="self">self</span>.clone();
+
+ <span class="kw">unsafe </span>{ <span class="self">self</span>.inc_start(at) };
+
+ ret.len = at;
+ ret
+ }
+
+ <span class="doccomment">/// Shortens the buffer, keeping the first `len` bytes and dropping the
+ /// rest.
+ ///
+ /// If `len` is greater than the buffer&#39;s current length, this has no
+ /// effect.
+ ///
+ /// The [split_off](`Self::split_off()`) method can emulate `truncate`, but this causes the
+ /// excess bytes to be returned instead of dropped.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Bytes;
+ ///
+ /// let mut buf = Bytes::from(&amp;b&quot;hello world&quot;[..]);
+ /// buf.truncate(5);
+ /// assert_eq!(buf, b&quot;hello&quot;[..]);
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">pub fn </span>truncate(<span class="kw-2">&amp;mut </span><span class="self">self</span>, len: usize) {
+ <span class="kw">if </span>len &lt; <span class="self">self</span>.len {
+ <span class="comment">// The Vec &quot;promotable&quot; vtables do not store the capacity,
+ // so we cannot truncate while using this repr. We *have* to
+ // promote using `split_off` so the capacity can be stored.
+ </span><span class="kw">if </span><span class="self">self</span>.vtable <span class="kw">as </span><span class="kw-2">*const </span>Vtable == <span class="kw-2">&amp;</span>PROMOTABLE_EVEN_VTABLE
+ || <span class="self">self</span>.vtable <span class="kw">as </span><span class="kw-2">*const </span>Vtable == <span class="kw-2">&amp;</span>PROMOTABLE_ODD_VTABLE
+ {
+ drop(<span class="self">self</span>.split_off(len));
+ } <span class="kw">else </span>{
+ <span class="self">self</span>.len = len;
+ }
+ }
+ }
+
+ <span class="doccomment">/// Clears the buffer, removing all data.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::Bytes;
+ ///
+ /// let mut buf = Bytes::from(&amp;b&quot;hello world&quot;[..]);
+ /// buf.clear();
+ /// assert!(buf.is_empty());
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">pub fn </span>clear(<span class="kw-2">&amp;mut </span><span class="self">self</span>) {
+ <span class="self">self</span>.truncate(<span class="number">0</span>);
+ }
+
+ <span class="doccomment">/// Try to convert self into `BytesMut`.
+ ///
+ /// If `self` is unique for the entire original buffer, this will succeed
+ /// and return a `BytesMut` with the contents of `self` without copying.
+ /// If `self` is not unique for the entire original buffer, this will fail
+ /// and return self.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::{Bytes, BytesMut};
+ ///
+ /// let bytes = Bytes::from(b&quot;hello&quot;.to_vec());
+ /// assert_eq!(bytes.try_into_mut(), Ok(BytesMut::from(&amp;b&quot;hello&quot;[..])));
+ /// ```
+ </span><span class="kw">pub fn </span>try_into_mut(<span class="self">self</span>) -&gt; <span class="prelude-ty">Result</span>&lt;BytesMut, Bytes&gt; {
+ <span class="kw">if </span><span class="self">self</span>.is_unique() {
+ <span class="prelude-val">Ok</span>(<span class="self">self</span>.into())
+ } <span class="kw">else </span>{
+ <span class="prelude-val">Err</span>(<span class="self">self</span>)
+ }
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">unsafe fn </span>with_vtable(
+ ptr: <span class="kw-2">*const </span>u8,
+ len: usize,
+ data: AtomicPtr&lt;()&gt;,
+ vtable: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Vtable,
+ ) -&gt; Bytes {
+ Bytes {
+ ptr,
+ len,
+ data,
+ vtable,
+ }
+ }
+
+ <span class="comment">// private
+
+ </span><span class="attr">#[inline]
+ </span><span class="kw">fn </span>as_slice(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>[u8] {
+ <span class="kw">unsafe </span>{ slice::from_raw_parts(<span class="self">self</span>.ptr, <span class="self">self</span>.len) }
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">unsafe fn </span>inc_start(<span class="kw-2">&amp;mut </span><span class="self">self</span>, by: usize) {
+ <span class="comment">// should already be asserted, but debug assert for tests
+ </span><span class="macro">debug_assert!</span>(<span class="self">self</span>.len &gt;= by, <span class="string">&quot;internal: inc_start out of bounds&quot;</span>);
+ <span class="self">self</span>.len -= by;
+ <span class="self">self</span>.ptr = <span class="self">self</span>.ptr.add(by);
+ }
+}
+
+<span class="comment">// Vtable must enforce this behavior
+</span><span class="kw">unsafe impl </span>Send <span class="kw">for </span>Bytes {}
+<span class="kw">unsafe impl </span>Sync <span class="kw">for </span>Bytes {}
+
+<span class="kw">impl </span>Drop <span class="kw">for </span>Bytes {
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>drop(<span class="kw-2">&amp;mut </span><span class="self">self</span>) {
+ <span class="kw">unsafe </span>{ (<span class="self">self</span>.vtable.drop)(<span class="kw-2">&amp;mut </span><span class="self">self</span>.data, <span class="self">self</span>.ptr, <span class="self">self</span>.len) }
+ }
+}
+
+<span class="kw">impl </span>Clone <span class="kw">for </span>Bytes {
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>clone(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; Bytes {
+ <span class="kw">unsafe </span>{ (<span class="self">self</span>.vtable.clone)(<span class="kw-2">&amp;</span><span class="self">self</span>.data, <span class="self">self</span>.ptr, <span class="self">self</span>.len) }
+ }
+}
+
+<span class="kw">impl </span>Buf <span class="kw">for </span>Bytes {
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>remaining(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
+ <span class="self">self</span>.len()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>chunk(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>[u8] {
+ <span class="self">self</span>.as_slice()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>advance(<span class="kw-2">&amp;mut </span><span class="self">self</span>, cnt: usize) {
+ <span class="macro">assert!</span>(
+ cnt &lt;= <span class="self">self</span>.len(),
+ <span class="string">&quot;cannot advance past `remaining`: {:?} &lt;= {:?}&quot;</span>,
+ cnt,
+ <span class="self">self</span>.len(),
+ );
+
+ <span class="kw">unsafe </span>{
+ <span class="self">self</span>.inc_start(cnt);
+ }
+ }
+
+ <span class="kw">fn </span>copy_to_bytes(<span class="kw-2">&amp;mut </span><span class="self">self</span>, len: usize) -&gt; <span class="self">Self </span>{
+ <span class="self">self</span>.split_to(len)
+ }
+}
+
+<span class="kw">impl </span>Deref <span class="kw">for </span>Bytes {
+ <span class="kw">type </span>Target = [u8];
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>deref(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>[u8] {
+ <span class="self">self</span>.as_slice()
+ }
+}
+
+<span class="kw">impl </span>AsRef&lt;[u8]&gt; <span class="kw">for </span>Bytes {
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>as_ref(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>[u8] {
+ <span class="self">self</span>.as_slice()
+ }
+}
+
+<span class="kw">impl </span>hash::Hash <span class="kw">for </span>Bytes {
+ <span class="kw">fn </span>hash&lt;H&gt;(<span class="kw-2">&amp;</span><span class="self">self</span>, state: <span class="kw-2">&amp;mut </span>H)
+ <span class="kw">where
+ </span>H: hash::Hasher,
+ {
+ <span class="self">self</span>.as_slice().hash(state);
+ }
+}
+
+<span class="kw">impl </span>Borrow&lt;[u8]&gt; <span class="kw">for </span>Bytes {
+ <span class="kw">fn </span>borrow(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>[u8] {
+ <span class="self">self</span>.as_slice()
+ }
+}
+
+<span class="kw">impl </span>IntoIterator <span class="kw">for </span>Bytes {
+ <span class="kw">type </span>Item = u8;
+ <span class="kw">type </span>IntoIter = IntoIter&lt;Bytes&gt;;
+
+ <span class="kw">fn </span>into_iter(<span class="self">self</span>) -&gt; <span class="self">Self</span>::IntoIter {
+ IntoIter::new(<span class="self">self</span>)
+ }
+}
+
+<span class="kw">impl</span>&lt;<span class="lifetime">&#39;a</span>&gt; IntoIterator <span class="kw">for </span><span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span>Bytes {
+ <span class="kw">type </span>Item = <span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span>u8;
+ <span class="kw">type </span>IntoIter = core::slice::Iter&lt;<span class="lifetime">&#39;a</span>, u8&gt;;
+
+ <span class="kw">fn </span>into_iter(<span class="self">self</span>) -&gt; <span class="self">Self</span>::IntoIter {
+ <span class="self">self</span>.as_slice().iter()
+ }
+}
+
+<span class="kw">impl </span>FromIterator&lt;u8&gt; <span class="kw">for </span>Bytes {
+ <span class="kw">fn </span>from_iter&lt;T: IntoIterator&lt;Item = u8&gt;&gt;(into_iter: T) -&gt; <span class="self">Self </span>{
+ Vec::from_iter(into_iter).into()
+ }
+}
+
+<span class="comment">// impl Eq
+
+</span><span class="kw">impl </span>PartialEq <span class="kw">for </span>Bytes {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>Bytes) -&gt; bool {
+ <span class="self">self</span>.as_slice() == other.as_slice()
+ }
+}
+
+<span class="kw">impl </span>PartialOrd <span class="kw">for </span>Bytes {
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>Bytes) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ <span class="self">self</span>.as_slice().partial_cmp(other.as_slice())
+ }
+}
+
+<span class="kw">impl </span>Ord <span class="kw">for </span>Bytes {
+ <span class="kw">fn </span>cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>Bytes) -&gt; cmp::Ordering {
+ <span class="self">self</span>.as_slice().cmp(other.as_slice())
+ }
+}
+
+<span class="kw">impl </span>Eq <span class="kw">for </span>Bytes {}
+
+<span class="kw">impl </span>PartialEq&lt;[u8]&gt; <span class="kw">for </span>Bytes {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>[u8]) -&gt; bool {
+ <span class="self">self</span>.as_slice() == other
+ }
+}
+
+<span class="kw">impl </span>PartialOrd&lt;[u8]&gt; <span class="kw">for </span>Bytes {
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>[u8]) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ <span class="self">self</span>.as_slice().partial_cmp(other)
+ }
+}
+
+<span class="kw">impl </span>PartialEq&lt;Bytes&gt; <span class="kw">for </span>[u8] {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>Bytes) -&gt; bool {
+ <span class="kw-2">*</span>other == <span class="kw-2">*</span><span class="self">self
+ </span>}
+}
+
+<span class="kw">impl </span>PartialOrd&lt;Bytes&gt; <span class="kw">for </span>[u8] {
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>Bytes) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ &lt;[u8] <span class="kw">as </span>PartialOrd&lt;[u8]&gt;&gt;::partial_cmp(<span class="self">self</span>, other)
+ }
+}
+
+<span class="kw">impl </span>PartialEq&lt;str&gt; <span class="kw">for </span>Bytes {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>str) -&gt; bool {
+ <span class="self">self</span>.as_slice() == other.as_bytes()
+ }
+}
+
+<span class="kw">impl </span>PartialOrd&lt;str&gt; <span class="kw">for </span>Bytes {
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>str) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ <span class="self">self</span>.as_slice().partial_cmp(other.as_bytes())
+ }
+}
+
+<span class="kw">impl </span>PartialEq&lt;Bytes&gt; <span class="kw">for </span>str {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>Bytes) -&gt; bool {
+ <span class="kw-2">*</span>other == <span class="kw-2">*</span><span class="self">self
+ </span>}
+}
+
+<span class="kw">impl </span>PartialOrd&lt;Bytes&gt; <span class="kw">for </span>str {
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>Bytes) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ &lt;[u8] <span class="kw">as </span>PartialOrd&lt;[u8]&gt;&gt;::partial_cmp(<span class="self">self</span>.as_bytes(), other)
+ }
+}
+
+<span class="kw">impl </span>PartialEq&lt;Vec&lt;u8&gt;&gt; <span class="kw">for </span>Bytes {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>Vec&lt;u8&gt;) -&gt; bool {
+ <span class="kw-2">*</span><span class="self">self </span>== other[..]
+ }
+}
+
+<span class="kw">impl </span>PartialOrd&lt;Vec&lt;u8&gt;&gt; <span class="kw">for </span>Bytes {
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>Vec&lt;u8&gt;) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ <span class="self">self</span>.as_slice().partial_cmp(<span class="kw-2">&amp;</span>other[..])
+ }
+}
+
+<span class="kw">impl </span>PartialEq&lt;Bytes&gt; <span class="kw">for </span>Vec&lt;u8&gt; {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>Bytes) -&gt; bool {
+ <span class="kw-2">*</span>other == <span class="kw-2">*</span><span class="self">self
+ </span>}
+}
+
+<span class="kw">impl </span>PartialOrd&lt;Bytes&gt; <span class="kw">for </span>Vec&lt;u8&gt; {
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>Bytes) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ &lt;[u8] <span class="kw">as </span>PartialOrd&lt;[u8]&gt;&gt;::partial_cmp(<span class="self">self</span>, other)
+ }
+}
+
+<span class="kw">impl </span>PartialEq&lt;String&gt; <span class="kw">for </span>Bytes {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>String) -&gt; bool {
+ <span class="kw-2">*</span><span class="self">self </span>== other[..]
+ }
+}
+
+<span class="kw">impl </span>PartialOrd&lt;String&gt; <span class="kw">for </span>Bytes {
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>String) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ <span class="self">self</span>.as_slice().partial_cmp(other.as_bytes())
+ }
+}
+
+<span class="kw">impl </span>PartialEq&lt;Bytes&gt; <span class="kw">for </span>String {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>Bytes) -&gt; bool {
+ <span class="kw-2">*</span>other == <span class="kw-2">*</span><span class="self">self
+ </span>}
+}
+
+<span class="kw">impl </span>PartialOrd&lt;Bytes&gt; <span class="kw">for </span>String {
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>Bytes) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ &lt;[u8] <span class="kw">as </span>PartialOrd&lt;[u8]&gt;&gt;::partial_cmp(<span class="self">self</span>.as_bytes(), other)
+ }
+}
+
+<span class="kw">impl </span>PartialEq&lt;Bytes&gt; <span class="kw">for </span><span class="kw-2">&amp;</span>[u8] {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>Bytes) -&gt; bool {
+ <span class="kw-2">*</span>other == <span class="kw-2">*</span><span class="self">self
+ </span>}
+}
+
+<span class="kw">impl </span>PartialOrd&lt;Bytes&gt; <span class="kw">for </span><span class="kw-2">&amp;</span>[u8] {
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>Bytes) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ &lt;[u8] <span class="kw">as </span>PartialOrd&lt;[u8]&gt;&gt;::partial_cmp(<span class="self">self</span>, other)
+ }
+}
+
+<span class="kw">impl </span>PartialEq&lt;Bytes&gt; <span class="kw">for </span><span class="kw-2">&amp;</span>str {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>Bytes) -&gt; bool {
+ <span class="kw-2">*</span>other == <span class="kw-2">*</span><span class="self">self
+ </span>}
+}
+
+<span class="kw">impl </span>PartialOrd&lt;Bytes&gt; <span class="kw">for </span><span class="kw-2">&amp;</span>str {
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>Bytes) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ &lt;[u8] <span class="kw">as </span>PartialOrd&lt;[u8]&gt;&gt;::partial_cmp(<span class="self">self</span>.as_bytes(), other)
+ }
+}
+
+<span class="kw">impl</span>&lt;<span class="lifetime">&#39;a</span>, T: <span class="question-mark">?</span>Sized&gt; PartialEq&lt;<span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span>T&gt; <span class="kw">for </span>Bytes
+<span class="kw">where
+ </span>Bytes: PartialEq&lt;T&gt;,
+{
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: &amp;&amp;<span class="lifetime">&#39;a </span>T) -&gt; bool {
+ <span class="kw-2">*</span><span class="self">self </span>== <span class="kw-2">**</span>other
+ }
+}
+
+<span class="kw">impl</span>&lt;<span class="lifetime">&#39;a</span>, T: <span class="question-mark">?</span>Sized&gt; PartialOrd&lt;<span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span>T&gt; <span class="kw">for </span>Bytes
+<span class="kw">where
+ </span>Bytes: PartialOrd&lt;T&gt;,
+{
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: &amp;&amp;<span class="lifetime">&#39;a </span>T) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ <span class="self">self</span>.partial_cmp(<span class="kw-2">&amp;**</span>other)
+ }
+}
+
+<span class="comment">// impl From
+
+</span><span class="kw">impl </span>Default <span class="kw">for </span>Bytes {
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>default() -&gt; Bytes {
+ Bytes::new()
+ }
+}
+
+<span class="kw">impl </span>From&lt;<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>[u8]&gt; <span class="kw">for </span>Bytes {
+ <span class="kw">fn </span>from(slice: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>[u8]) -&gt; Bytes {
+ Bytes::from_static(slice)
+ }
+}
+
+<span class="kw">impl </span>From&lt;<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>str&gt; <span class="kw">for </span>Bytes {
+ <span class="kw">fn </span>from(slice: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>str) -&gt; Bytes {
+ Bytes::from_static(slice.as_bytes())
+ }
+}
+
+<span class="kw">impl </span>From&lt;Vec&lt;u8&gt;&gt; <span class="kw">for </span>Bytes {
+ <span class="kw">fn </span>from(vec: Vec&lt;u8&gt;) -&gt; Bytes {
+ <span class="kw">let </span><span class="kw-2">mut </span>vec = ManuallyDrop::new(vec);
+ <span class="kw">let </span>ptr = vec.as_mut_ptr();
+ <span class="kw">let </span>len = vec.len();
+ <span class="kw">let </span>cap = vec.capacity();
+
+ <span class="comment">// Avoid an extra allocation if possible.
+ </span><span class="kw">if </span>len == cap {
+ <span class="kw">let </span>vec = ManuallyDrop::into_inner(vec);
+ <span class="kw">return </span>Bytes::from(vec.into_boxed_slice());
+ }
+
+ <span class="kw">let </span>shared = Box::new(Shared {
+ buf: ptr,
+ cap,
+ ref_cnt: AtomicUsize::new(<span class="number">1</span>),
+ });
+
+ <span class="kw">let </span>shared = Box::into_raw(shared);
+ <span class="comment">// The pointer should be aligned, so this assert should
+ // always succeed.
+ </span><span class="macro">debug_assert!</span>(
+ <span class="number">0 </span>== (shared <span class="kw">as </span>usize &amp; KIND_MASK),
+ <span class="string">&quot;internal: Box&lt;Shared&gt; should have an aligned pointer&quot;</span>,
+ );
+ Bytes {
+ ptr,
+ len,
+ data: AtomicPtr::new(shared <span class="kw">as _</span>),
+ vtable: <span class="kw-2">&amp;</span>SHARED_VTABLE,
+ }
+ }
+}
+
+<span class="kw">impl </span>From&lt;Box&lt;[u8]&gt;&gt; <span class="kw">for </span>Bytes {
+ <span class="kw">fn </span>from(slice: Box&lt;[u8]&gt;) -&gt; Bytes {
+ <span class="comment">// Box&lt;[u8]&gt; doesn&#39;t contain a heap allocation for empty slices,
+ // so the pointer isn&#39;t aligned enough for the KIND_VEC stashing to
+ // work.
+ </span><span class="kw">if </span>slice.is_empty() {
+ <span class="kw">return </span>Bytes::new();
+ }
+
+ <span class="kw">let </span>len = slice.len();
+ <span class="kw">let </span>ptr = Box::into_raw(slice) <span class="kw">as </span><span class="kw-2">*mut </span>u8;
+
+ <span class="kw">if </span>ptr <span class="kw">as </span>usize &amp; <span class="number">0x1 </span>== <span class="number">0 </span>{
+ <span class="kw">let </span>data = ptr_map(ptr, |addr| addr | KIND_VEC);
+ Bytes {
+ ptr,
+ len,
+ data: AtomicPtr::new(data.cast()),
+ vtable: <span class="kw-2">&amp;</span>PROMOTABLE_EVEN_VTABLE,
+ }
+ } <span class="kw">else </span>{
+ Bytes {
+ ptr,
+ len,
+ data: AtomicPtr::new(ptr.cast()),
+ vtable: <span class="kw-2">&amp;</span>PROMOTABLE_ODD_VTABLE,
+ }
+ }
+ }
+}
+
+<span class="kw">impl </span>From&lt;Bytes&gt; <span class="kw">for </span>BytesMut {
+ <span class="doccomment">/// Convert self into `BytesMut`.
+ ///
+ /// If `bytes` is unique for the entire original buffer, this will return a
+ /// `BytesMut` with the contents of `bytes` without copying.
+ /// If `bytes` is not unique for the entire original buffer, this will make
+ /// a copy of `bytes` subset of the original buffer in a new `BytesMut`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::{Bytes, BytesMut};
+ ///
+ /// let bytes = Bytes::from(b&quot;hello&quot;.to_vec());
+ /// assert_eq!(BytesMut::from(bytes), BytesMut::from(&amp;b&quot;hello&quot;[..]));
+ /// ```
+ </span><span class="kw">fn </span>from(bytes: Bytes) -&gt; <span class="self">Self </span>{
+ <span class="kw">let </span>bytes = ManuallyDrop::new(bytes);
+ <span class="kw">unsafe </span>{ (bytes.vtable.to_mut)(<span class="kw-2">&amp;</span>bytes.data, bytes.ptr, bytes.len) }
+ }
+}
+
+<span class="kw">impl </span>From&lt;String&gt; <span class="kw">for </span>Bytes {
+ <span class="kw">fn </span>from(s: String) -&gt; Bytes {
+ Bytes::from(s.into_bytes())
+ }
+}
+
+<span class="kw">impl </span>From&lt;Bytes&gt; <span class="kw">for </span>Vec&lt;u8&gt; {
+ <span class="kw">fn </span>from(bytes: Bytes) -&gt; Vec&lt;u8&gt; {
+ <span class="kw">let </span>bytes = ManuallyDrop::new(bytes);
+ <span class="kw">unsafe </span>{ (bytes.vtable.to_vec)(<span class="kw-2">&amp;</span>bytes.data, bytes.ptr, bytes.len) }
+ }
+}
+
+<span class="comment">// ===== impl Vtable =====
+
+</span><span class="kw">impl </span>fmt::Debug <span class="kw">for </span>Vtable {
+ <span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, f: <span class="kw-2">&amp;mut </span>fmt::Formatter&lt;<span class="lifetime">&#39;_</span>&gt;) -&gt; fmt::Result {
+ f.debug_struct(<span class="string">&quot;Vtable&quot;</span>)
+ .field(<span class="string">&quot;clone&quot;</span>, <span class="kw-2">&amp;</span>(<span class="self">self</span>.clone <span class="kw">as </span><span class="kw-2">*const </span>()))
+ .field(<span class="string">&quot;drop&quot;</span>, <span class="kw-2">&amp;</span>(<span class="self">self</span>.drop <span class="kw">as </span><span class="kw-2">*const </span>()))
+ .finish()
+ }
+}
+
+<span class="comment">// ===== impl StaticVtable =====
+
+</span><span class="kw">const </span>STATIC_VTABLE: Vtable = Vtable {
+ clone: static_clone,
+ to_vec: static_to_vec,
+ to_mut: static_to_mut,
+ is_unique: static_is_unique,
+ drop: static_drop,
+};
+
+<span class="kw">unsafe fn </span>static_clone(<span class="kw">_</span>: <span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;, ptr: <span class="kw-2">*const </span>u8, len: usize) -&gt; Bytes {
+ <span class="kw">let </span>slice = slice::from_raw_parts(ptr, len);
+ Bytes::from_static(slice)
+}
+
+<span class="kw">unsafe fn </span>static_to_vec(<span class="kw">_</span>: <span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;, ptr: <span class="kw-2">*const </span>u8, len: usize) -&gt; Vec&lt;u8&gt; {
+ <span class="kw">let </span>slice = slice::from_raw_parts(ptr, len);
+ slice.to_vec()
+}
+
+<span class="kw">unsafe fn </span>static_to_mut(<span class="kw">_</span>: <span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;, ptr: <span class="kw-2">*const </span>u8, len: usize) -&gt; BytesMut {
+ <span class="kw">let </span>slice = slice::from_raw_parts(ptr, len);
+ BytesMut::from(slice)
+}
+
+<span class="kw">fn </span>static_is_unique(<span class="kw">_</span>: <span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;) -&gt; bool {
+ <span class="bool-val">false
+</span>}
+
+<span class="kw">unsafe fn </span>static_drop(<span class="kw">_</span>: <span class="kw-2">&amp;mut </span>AtomicPtr&lt;()&gt;, <span class="kw">_</span>: <span class="kw-2">*const </span>u8, <span class="kw">_</span>: usize) {
+ <span class="comment">// nothing to drop for &amp;&#39;static [u8]
+</span>}
+
+<span class="comment">// ===== impl PromotableVtable =====
+
+</span><span class="kw">static </span>PROMOTABLE_EVEN_VTABLE: Vtable = Vtable {
+ clone: promotable_even_clone,
+ to_vec: promotable_even_to_vec,
+ to_mut: promotable_even_to_mut,
+ is_unique: promotable_is_unique,
+ drop: promotable_even_drop,
+};
+
+<span class="kw">static </span>PROMOTABLE_ODD_VTABLE: Vtable = Vtable {
+ clone: promotable_odd_clone,
+ to_vec: promotable_odd_to_vec,
+ to_mut: promotable_odd_to_mut,
+ is_unique: promotable_is_unique,
+ drop: promotable_odd_drop,
+};
+
+<span class="kw">unsafe fn </span>promotable_even_clone(data: <span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;, ptr: <span class="kw-2">*const </span>u8, len: usize) -&gt; Bytes {
+ <span class="kw">let </span>shared = data.load(Ordering::Acquire);
+ <span class="kw">let </span>kind = shared <span class="kw">as </span>usize &amp; KIND_MASK;
+
+ <span class="kw">if </span>kind == KIND_ARC {
+ shallow_clone_arc(shared.cast(), ptr, len)
+ } <span class="kw">else </span>{
+ <span class="macro">debug_assert_eq!</span>(kind, KIND_VEC);
+ <span class="kw">let </span>buf = ptr_map(shared.cast(), |addr| addr &amp; !KIND_MASK);
+ shallow_clone_vec(data, shared, buf, ptr, len)
+ }
+}
+
+<span class="kw">unsafe fn </span>promotable_to_vec(
+ data: <span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;,
+ ptr: <span class="kw-2">*const </span>u8,
+ len: usize,
+ f: <span class="kw">fn</span>(<span class="kw-2">*mut </span>()) -&gt; <span class="kw-2">*mut </span>u8,
+) -&gt; Vec&lt;u8&gt; {
+ <span class="kw">let </span>shared = data.load(Ordering::Acquire);
+ <span class="kw">let </span>kind = shared <span class="kw">as </span>usize &amp; KIND_MASK;
+
+ <span class="kw">if </span>kind == KIND_ARC {
+ shared_to_vec_impl(shared.cast(), ptr, len)
+ } <span class="kw">else </span>{
+ <span class="comment">// If Bytes holds a Vec, then the offset must be 0.
+ </span><span class="macro">debug_assert_eq!</span>(kind, KIND_VEC);
+
+ <span class="kw">let </span>buf = f(shared);
+
+ <span class="kw">let </span>cap = offset_from(ptr, buf) + len;
+
+ <span class="comment">// Copy back buffer
+ </span>ptr::copy(ptr, buf, len);
+
+ Vec::from_raw_parts(buf, len, cap)
+ }
+}
+
+<span class="kw">unsafe fn </span>promotable_to_mut(
+ data: <span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;,
+ ptr: <span class="kw-2">*const </span>u8,
+ len: usize,
+ f: <span class="kw">fn</span>(<span class="kw-2">*mut </span>()) -&gt; <span class="kw-2">*mut </span>u8,
+) -&gt; BytesMut {
+ <span class="kw">let </span>shared = data.load(Ordering::Acquire);
+ <span class="kw">let </span>kind = shared <span class="kw">as </span>usize &amp; KIND_MASK;
+
+ <span class="kw">if </span>kind == KIND_ARC {
+ shared_to_mut_impl(shared.cast(), ptr, len)
+ } <span class="kw">else </span>{
+ <span class="comment">// KIND_VEC is a view of an underlying buffer at a certain offset.
+ // The ptr + len always represents the end of that buffer.
+ // Before truncating it, it is first promoted to KIND_ARC.
+ // Thus, we can safely reconstruct a Vec from it without leaking memory.
+ </span><span class="macro">debug_assert_eq!</span>(kind, KIND_VEC);
+
+ <span class="kw">let </span>buf = f(shared);
+ <span class="kw">let </span>off = offset_from(ptr, buf);
+ <span class="kw">let </span>cap = off + len;
+ <span class="kw">let </span>v = Vec::from_raw_parts(buf, cap, cap);
+
+ <span class="kw">let </span><span class="kw-2">mut </span>b = BytesMut::from_vec(v);
+ b.advance_unchecked(off);
+ b
+ }
+}
+
+<span class="kw">unsafe fn </span>promotable_even_to_vec(data: <span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;, ptr: <span class="kw-2">*const </span>u8, len: usize) -&gt; Vec&lt;u8&gt; {
+ promotable_to_vec(data, ptr, len, |shared| {
+ ptr_map(shared.cast(), |addr| addr &amp; !KIND_MASK)
+ })
+}
+
+<span class="kw">unsafe fn </span>promotable_even_to_mut(data: <span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;, ptr: <span class="kw-2">*const </span>u8, len: usize) -&gt; BytesMut {
+ promotable_to_mut(data, ptr, len, |shared| {
+ ptr_map(shared.cast(), |addr| addr &amp; !KIND_MASK)
+ })
+}
+
+<span class="kw">unsafe fn </span>promotable_even_drop(data: <span class="kw-2">&amp;mut </span>AtomicPtr&lt;()&gt;, ptr: <span class="kw-2">*const </span>u8, len: usize) {
+ data.with_mut(|shared| {
+ <span class="kw">let </span>shared = <span class="kw-2">*</span>shared;
+ <span class="kw">let </span>kind = shared <span class="kw">as </span>usize &amp; KIND_MASK;
+
+ <span class="kw">if </span>kind == KIND_ARC {
+ release_shared(shared.cast());
+ } <span class="kw">else </span>{
+ <span class="macro">debug_assert_eq!</span>(kind, KIND_VEC);
+ <span class="kw">let </span>buf = ptr_map(shared.cast(), |addr| addr &amp; !KIND_MASK);
+ free_boxed_slice(buf, ptr, len);
+ }
+ });
+}
+
+<span class="kw">unsafe fn </span>promotable_odd_clone(data: <span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;, ptr: <span class="kw-2">*const </span>u8, len: usize) -&gt; Bytes {
+ <span class="kw">let </span>shared = data.load(Ordering::Acquire);
+ <span class="kw">let </span>kind = shared <span class="kw">as </span>usize &amp; KIND_MASK;
+
+ <span class="kw">if </span>kind == KIND_ARC {
+ shallow_clone_arc(shared <span class="kw">as _</span>, ptr, len)
+ } <span class="kw">else </span>{
+ <span class="macro">debug_assert_eq!</span>(kind, KIND_VEC);
+ shallow_clone_vec(data, shared, shared.cast(), ptr, len)
+ }
+}
+
+<span class="kw">unsafe fn </span>promotable_odd_to_vec(data: <span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;, ptr: <span class="kw-2">*const </span>u8, len: usize) -&gt; Vec&lt;u8&gt; {
+ promotable_to_vec(data, ptr, len, |shared| shared.cast())
+}
+
+<span class="kw">unsafe fn </span>promotable_odd_to_mut(data: <span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;, ptr: <span class="kw-2">*const </span>u8, len: usize) -&gt; BytesMut {
+ promotable_to_mut(data, ptr, len, |shared| shared.cast())
+}
+
+<span class="kw">unsafe fn </span>promotable_odd_drop(data: <span class="kw-2">&amp;mut </span>AtomicPtr&lt;()&gt;, ptr: <span class="kw-2">*const </span>u8, len: usize) {
+ data.with_mut(|shared| {
+ <span class="kw">let </span>shared = <span class="kw-2">*</span>shared;
+ <span class="kw">let </span>kind = shared <span class="kw">as </span>usize &amp; KIND_MASK;
+
+ <span class="kw">if </span>kind == KIND_ARC {
+ release_shared(shared.cast());
+ } <span class="kw">else </span>{
+ <span class="macro">debug_assert_eq!</span>(kind, KIND_VEC);
+
+ free_boxed_slice(shared.cast(), ptr, len);
+ }
+ });
+}
+
+<span class="kw">unsafe fn </span>promotable_is_unique(data: <span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;) -&gt; bool {
+ <span class="kw">let </span>shared = data.load(Ordering::Acquire);
+ <span class="kw">let </span>kind = shared <span class="kw">as </span>usize &amp; KIND_MASK;
+
+ <span class="kw">if </span>kind == KIND_ARC {
+ <span class="kw">let </span>ref_cnt = (<span class="kw-2">*</span>shared.cast::&lt;Shared&gt;()).ref_cnt.load(Ordering::Relaxed);
+ ref_cnt == <span class="number">1
+ </span>} <span class="kw">else </span>{
+ <span class="bool-val">true
+ </span>}
+}
+
+<span class="kw">unsafe fn </span>free_boxed_slice(buf: <span class="kw-2">*mut </span>u8, offset: <span class="kw-2">*const </span>u8, len: usize) {
+ <span class="kw">let </span>cap = offset_from(offset, buf) + len;
+ dealloc(buf, Layout::from_size_align(cap, <span class="number">1</span>).unwrap())
+}
+
+<span class="comment">// ===== impl SharedVtable =====
+
+</span><span class="kw">struct </span>Shared {
+ <span class="comment">// Holds arguments to dealloc upon Drop, but otherwise doesn&#39;t use them
+ </span>buf: <span class="kw-2">*mut </span>u8,
+ cap: usize,
+ ref_cnt: AtomicUsize,
+}
+
+<span class="kw">impl </span>Drop <span class="kw">for </span>Shared {
+ <span class="kw">fn </span>drop(<span class="kw-2">&amp;mut </span><span class="self">self</span>) {
+ <span class="kw">unsafe </span>{ dealloc(<span class="self">self</span>.buf, Layout::from_size_align(<span class="self">self</span>.cap, <span class="number">1</span>).unwrap()) }
+ }
+}
+
+<span class="comment">// Assert that the alignment of `Shared` is divisible by 2.
+// This is a necessary invariant since we depend on allocating `Shared` a
+// shared object to implicitly carry the `KIND_ARC` flag in its pointer.
+// This flag is set when the LSB is 0.
+</span><span class="kw">const _</span>: [(); <span class="number">0 </span>- mem::align_of::&lt;Shared&gt;() % <span class="number">2</span>] = []; <span class="comment">// Assert that the alignment of `Shared` is divisible by 2.
+
+</span><span class="kw">static </span>SHARED_VTABLE: Vtable = Vtable {
+ clone: shared_clone,
+ to_vec: shared_to_vec,
+ to_mut: shared_to_mut,
+ is_unique: shared_is_unique,
+ drop: shared_drop,
+};
+
+<span class="kw">const </span>KIND_ARC: usize = <span class="number">0b0</span>;
+<span class="kw">const </span>KIND_VEC: usize = <span class="number">0b1</span>;
+<span class="kw">const </span>KIND_MASK: usize = <span class="number">0b1</span>;
+
+<span class="kw">unsafe fn </span>shared_clone(data: <span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;, ptr: <span class="kw-2">*const </span>u8, len: usize) -&gt; Bytes {
+ <span class="kw">let </span>shared = data.load(Ordering::Relaxed);
+ shallow_clone_arc(shared <span class="kw">as _</span>, ptr, len)
+}
+
+<span class="kw">unsafe fn </span>shared_to_vec_impl(shared: <span class="kw-2">*mut </span>Shared, ptr: <span class="kw-2">*const </span>u8, len: usize) -&gt; Vec&lt;u8&gt; {
+ <span class="comment">// Check that the ref_cnt is 1 (unique).
+ //
+ // If it is unique, then it is set to 0 with AcqRel fence for the same
+ // reason in release_shared.
+ //
+ // Otherwise, we take the other branch and call release_shared.
+ </span><span class="kw">if </span>(<span class="kw-2">*</span>shared)
+ .ref_cnt
+ .compare_exchange(<span class="number">1</span>, <span class="number">0</span>, Ordering::AcqRel, Ordering::Relaxed)
+ .is_ok()
+ {
+ <span class="comment">// Deallocate the `Shared` instance without running its destructor.
+ </span><span class="kw">let </span>shared = <span class="kw-2">*</span>Box::from_raw(shared);
+ <span class="kw">let </span>shared = ManuallyDrop::new(shared);
+ <span class="kw">let </span>buf = shared.buf;
+ <span class="kw">let </span>cap = shared.cap;
+
+ <span class="comment">// Copy back buffer
+ </span>ptr::copy(ptr, buf, len);
+
+ Vec::from_raw_parts(buf, len, cap)
+ } <span class="kw">else </span>{
+ <span class="kw">let </span>v = slice::from_raw_parts(ptr, len).to_vec();
+ release_shared(shared);
+ v
+ }
+}
+
+<span class="kw">unsafe fn </span>shared_to_vec(data: <span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;, ptr: <span class="kw-2">*const </span>u8, len: usize) -&gt; Vec&lt;u8&gt; {
+ shared_to_vec_impl(data.load(Ordering::Relaxed).cast(), ptr, len)
+}
+
+<span class="kw">unsafe fn </span>shared_to_mut_impl(shared: <span class="kw-2">*mut </span>Shared, ptr: <span class="kw-2">*const </span>u8, len: usize) -&gt; BytesMut {
+ <span class="comment">// The goal is to check if the current handle is the only handle
+ // that currently has access to the buffer. This is done by
+ // checking if the `ref_cnt` is currently 1.
+ //
+ // The `Acquire` ordering synchronizes with the `Release` as
+ // part of the `fetch_sub` in `release_shared`. The `fetch_sub`
+ // operation guarantees that any mutations done in other threads
+ // are ordered before the `ref_cnt` is decremented. As such,
+ // this `Acquire` will guarantee that those mutations are
+ // visible to the current thread.
+ //
+ // Otherwise, we take the other branch, copy the data and call `release_shared`.
+ </span><span class="kw">if </span>(<span class="kw-2">*</span>shared).ref_cnt.load(Ordering::Acquire) == <span class="number">1 </span>{
+ <span class="comment">// Deallocate the `Shared` instance without running its destructor.
+ </span><span class="kw">let </span>shared = <span class="kw-2">*</span>Box::from_raw(shared);
+ <span class="kw">let </span>shared = ManuallyDrop::new(shared);
+ <span class="kw">let </span>buf = shared.buf;
+ <span class="kw">let </span>cap = shared.cap;
+
+ <span class="comment">// Rebuild Vec
+ </span><span class="kw">let </span>off = offset_from(ptr, buf);
+ <span class="kw">let </span>v = Vec::from_raw_parts(buf, len + off, cap);
+
+ <span class="kw">let </span><span class="kw-2">mut </span>b = BytesMut::from_vec(v);
+ b.advance_unchecked(off);
+ b
+ } <span class="kw">else </span>{
+ <span class="comment">// Copy the data from Shared in a new Vec, then release it
+ </span><span class="kw">let </span>v = slice::from_raw_parts(ptr, len).to_vec();
+ release_shared(shared);
+ BytesMut::from_vec(v)
+ }
+}
+
+<span class="kw">unsafe fn </span>shared_to_mut(data: <span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;, ptr: <span class="kw-2">*const </span>u8, len: usize) -&gt; BytesMut {
+ shared_to_mut_impl(data.load(Ordering::Relaxed).cast(), ptr, len)
+}
+
+<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">unsafe fn </span>shared_is_unique(data: <span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;) -&gt; bool {
+ <span class="kw">let </span>shared = data.load(Ordering::Acquire);
+ <span class="kw">let </span>ref_cnt = (<span class="kw-2">*</span>shared.cast::&lt;Shared&gt;()).ref_cnt.load(Ordering::Relaxed);
+ ref_cnt == <span class="number">1
+</span>}
+
+<span class="kw">unsafe fn </span>shared_drop(data: <span class="kw-2">&amp;mut </span>AtomicPtr&lt;()&gt;, _ptr: <span class="kw-2">*const </span>u8, _len: usize) {
+ data.with_mut(|shared| {
+ release_shared(shared.cast());
+ });
+}
+
+<span class="kw">unsafe fn </span>shallow_clone_arc(shared: <span class="kw-2">*mut </span>Shared, ptr: <span class="kw-2">*const </span>u8, len: usize) -&gt; Bytes {
+ <span class="kw">let </span>old_size = (<span class="kw-2">*</span>shared).ref_cnt.fetch_add(<span class="number">1</span>, Ordering::Relaxed);
+
+ <span class="kw">if </span>old_size &gt; usize::MAX &gt;&gt; <span class="number">1 </span>{
+ <span class="kw">crate</span>::abort();
+ }
+
+ Bytes {
+ ptr,
+ len,
+ data: AtomicPtr::new(shared <span class="kw">as _</span>),
+ vtable: <span class="kw-2">&amp;</span>SHARED_VTABLE,
+ }
+}
+
+<span class="attr">#[cold]
+</span><span class="kw">unsafe fn </span>shallow_clone_vec(
+ atom: <span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;,
+ ptr: <span class="kw-2">*const </span>(),
+ buf: <span class="kw-2">*mut </span>u8,
+ offset: <span class="kw-2">*const </span>u8,
+ len: usize,
+) -&gt; Bytes {
+ <span class="comment">// If the buffer is still tracked in a `Vec&lt;u8&gt;`. It is time to
+ // promote the vec to an `Arc`. This could potentially be called
+ // concurrently, so some care must be taken.
+
+ // First, allocate a new `Shared` instance containing the
+ // `Vec` fields. It&#39;s important to note that `ptr`, `len`,
+ // and `cap` cannot be mutated without having `&amp;mut self`.
+ // This means that these fields will not be concurrently
+ // updated and since the buffer hasn&#39;t been promoted to an
+ // `Arc`, those three fields still are the components of the
+ // vector.
+ </span><span class="kw">let </span>shared = Box::new(Shared {
+ buf,
+ cap: offset_from(offset, buf) + len,
+ <span class="comment">// Initialize refcount to 2. One for this reference, and one
+ // for the new clone that will be returned from
+ // `shallow_clone`.
+ </span>ref_cnt: AtomicUsize::new(<span class="number">2</span>),
+ });
+
+ <span class="kw">let </span>shared = Box::into_raw(shared);
+
+ <span class="comment">// The pointer should be aligned, so this assert should
+ // always succeed.
+ </span><span class="macro">debug_assert!</span>(
+ <span class="number">0 </span>== (shared <span class="kw">as </span>usize &amp; KIND_MASK),
+ <span class="string">&quot;internal: Box&lt;Shared&gt; should have an aligned pointer&quot;</span>,
+ );
+
+ <span class="comment">// Try compare &amp; swapping the pointer into the `arc` field.
+ // `Release` is used synchronize with other threads that
+ // will load the `arc` field.
+ //
+ // If the `compare_exchange` fails, then the thread lost the
+ // race to promote the buffer to shared. The `Acquire`
+ // ordering will synchronize with the `compare_exchange`
+ // that happened in the other thread and the `Shared`
+ // pointed to by `actual` will be visible.
+ </span><span class="kw">match </span>atom.compare_exchange(ptr <span class="kw">as _</span>, shared <span class="kw">as _</span>, Ordering::AcqRel, Ordering::Acquire) {
+ <span class="prelude-val">Ok</span>(actual) =&gt; {
+ <span class="macro">debug_assert!</span>(actual <span class="kw">as </span>usize == ptr <span class="kw">as </span>usize);
+ <span class="comment">// The upgrade was successful, the new handle can be
+ // returned.
+ </span>Bytes {
+ ptr: offset,
+ len,
+ data: AtomicPtr::new(shared <span class="kw">as _</span>),
+ vtable: <span class="kw-2">&amp;</span>SHARED_VTABLE,
+ }
+ }
+ <span class="prelude-val">Err</span>(actual) =&gt; {
+ <span class="comment">// The upgrade failed, a concurrent clone happened. Release
+ // the allocation that was made in this thread, it will not
+ // be needed.
+ </span><span class="kw">let </span>shared = Box::from_raw(shared);
+ mem::forget(<span class="kw-2">*</span>shared);
+
+ <span class="comment">// Buffer already promoted to shared storage, so increment ref
+ // count.
+ </span>shallow_clone_arc(actual <span class="kw">as _</span>, offset, len)
+ }
+ }
+}
+
+<span class="kw">unsafe fn </span>release_shared(ptr: <span class="kw-2">*mut </span>Shared) {
+ <span class="comment">// `Shared` storage... follow the drop steps from Arc.
+ </span><span class="kw">if </span>(<span class="kw-2">*</span>ptr).ref_cnt.fetch_sub(<span class="number">1</span>, Ordering::Release) != <span class="number">1 </span>{
+ <span class="kw">return</span>;
+ }
+
+ <span class="comment">// This fence is needed to prevent reordering of use of the data and
+ // deletion of the data. Because it is marked `Release`, the decreasing
+ // of the reference count synchronizes with this `Acquire` fence. This
+ // means that use of the data happens before decreasing the reference
+ // count, which happens before this fence, which happens before the
+ // deletion of the data.
+ //
+ // As explained in the [Boost documentation][1],
+ //
+ // &gt; It is important to enforce any possible access to the object in one
+ // &gt; thread (through an existing reference) to *happen before* deleting
+ // &gt; the object in a different thread. This is achieved by a &quot;release&quot;
+ // &gt; operation after dropping a reference (any access to the object
+ // &gt; through this reference must obviously happened before), and an
+ // &gt; &quot;acquire&quot; operation before deleting the object.
+ //
+ // [1]: (www.boost.org/doc/libs/1_55_0/doc/html/atomic/usage_examples.html)
+ //
+ // Thread sanitizer does not support atomic fences. Use an atomic load
+ // instead.
+ </span>(<span class="kw-2">*</span>ptr).ref_cnt.load(Ordering::Acquire);
+
+ <span class="comment">// Drop the data
+ </span>drop(Box::from_raw(ptr));
+}
+
+<span class="comment">// Ideally we would always use this version of `ptr_map` since it is strict
+// provenance compatible, but it results in worse codegen. We will however still
+// use it on miri because it gives better diagnostics for people who test bytes
+// code with miri.
+//
+// See https://github.com/tokio-rs/bytes/pull/545 for more info.
+</span><span class="attr">#[cfg(miri)]
+</span><span class="kw">fn </span>ptr_map&lt;F&gt;(ptr: <span class="kw-2">*mut </span>u8, f: F) -&gt; <span class="kw-2">*mut </span>u8
+<span class="kw">where
+ </span>F: FnOnce(usize) -&gt; usize,
+{
+ <span class="kw">let </span>old_addr = ptr <span class="kw">as </span>usize;
+ <span class="kw">let </span>new_addr = f(old_addr);
+ <span class="kw">let </span>diff = new_addr.wrapping_sub(old_addr);
+ ptr.wrapping_add(diff)
+}
+
+<span class="attr">#[cfg(not(miri))]
+</span><span class="kw">fn </span>ptr_map&lt;F&gt;(ptr: <span class="kw-2">*mut </span>u8, f: F) -&gt; <span class="kw-2">*mut </span>u8
+<span class="kw">where
+ </span>F: FnOnce(usize) -&gt; usize,
+{
+ <span class="kw">let </span>old_addr = ptr <span class="kw">as </span>usize;
+ <span class="kw">let </span>new_addr = f(old_addr);
+ new_addr <span class="kw">as </span><span class="kw-2">*mut </span>u8
+}
+
+<span class="comment">// compile-fails
+
+</span><span class="doccomment">/// ```compile_fail
+/// use bytes::Bytes;
+/// #[deny(unused_must_use)]
+/// {
+/// let mut b1 = Bytes::from(&quot;hello world&quot;);
+/// b1.split_to(6);
+/// }
+/// ```
+</span><span class="kw">fn </span>_split_to_must_use() {}
+
+<span class="doccomment">/// ```compile_fail
+/// use bytes::Bytes;
+/// #[deny(unused_must_use)]
+/// {
+/// let mut b1 = Bytes::from(&quot;hello world&quot;);
+/// b1.split_off(6);
+/// }
+/// ```
+</span><span class="kw">fn </span>_split_off_must_use() {}
+
+<span class="comment">// fuzz tests
+</span><span class="attr">#[cfg(all(test, loom))]
+</span><span class="kw">mod </span>fuzz {
+ <span class="kw">use </span>loom::sync::Arc;
+ <span class="kw">use </span>loom::thread;
+
+ <span class="kw">use </span><span class="kw">super</span>::Bytes;
+ <span class="attr">#[test]
+ </span><span class="kw">fn </span>bytes_cloning_vec() {
+ loom::model(|| {
+ <span class="kw">let </span>a = Bytes::from(<span class="string">b&quot;abcdefgh&quot;</span>.to_vec());
+ <span class="kw">let </span>addr = a.as_ptr() <span class="kw">as </span>usize;
+
+ <span class="comment">// test the Bytes::clone is Sync by putting it in an Arc
+ </span><span class="kw">let </span>a1 = Arc::new(a);
+ <span class="kw">let </span>a2 = a1.clone();
+
+ <span class="kw">let </span>t1 = thread::spawn(<span class="kw">move </span>|| {
+ <span class="kw">let </span>b: Bytes = (<span class="kw-2">*</span>a1).clone();
+ <span class="macro">assert_eq!</span>(b.as_ptr() <span class="kw">as </span>usize, addr);
+ });
+
+ <span class="kw">let </span>t2 = thread::spawn(<span class="kw">move </span>|| {
+ <span class="kw">let </span>b: Bytes = (<span class="kw-2">*</span>a2).clone();
+ <span class="macro">assert_eq!</span>(b.as_ptr() <span class="kw">as </span>usize, addr);
+ });
+
+ t1.join().unwrap();
+ t2.join().unwrap();
+ });
+ }
+}
+</code></pre></div>
+</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/src/bytes/bytes_mut.rs.html b/src/bytes/bytes_mut.rs.html
new file mode 100644
index 0000000..fde2361
--- /dev/null
+++ b/src/bytes/bytes_mut.rs.html
@@ -0,0 +1,3670 @@
+<!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="Source of the Rust file `src/bytes_mut.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>bytes_mut.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../../static.files/source-script-74087aa2e88f4475.js"></script><script defer src="../../source-files.js"></script><script defer src="../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><div class="width-limiter"><nav class="sub"><a class="sub-logo-container" href="../../bytes/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><pre class="src-line-numbers"><span id="1">1</span>
+<span id="2">2</span>
+<span id="3">3</span>
+<span id="4">4</span>
+<span id="5">5</span>
+<span id="6">6</span>
+<span id="7">7</span>
+<span id="8">8</span>
+<span id="9">9</span>
+<span id="10">10</span>
+<span id="11">11</span>
+<span id="12">12</span>
+<span id="13">13</span>
+<span id="14">14</span>
+<span id="15">15</span>
+<span id="16">16</span>
+<span id="17">17</span>
+<span id="18">18</span>
+<span id="19">19</span>
+<span id="20">20</span>
+<span id="21">21</span>
+<span id="22">22</span>
+<span id="23">23</span>
+<span id="24">24</span>
+<span id="25">25</span>
+<span id="26">26</span>
+<span id="27">27</span>
+<span id="28">28</span>
+<span id="29">29</span>
+<span id="30">30</span>
+<span id="31">31</span>
+<span id="32">32</span>
+<span id="33">33</span>
+<span id="34">34</span>
+<span id="35">35</span>
+<span id="36">36</span>
+<span id="37">37</span>
+<span id="38">38</span>
+<span id="39">39</span>
+<span id="40">40</span>
+<span id="41">41</span>
+<span id="42">42</span>
+<span id="43">43</span>
+<span id="44">44</span>
+<span id="45">45</span>
+<span id="46">46</span>
+<span id="47">47</span>
+<span id="48">48</span>
+<span id="49">49</span>
+<span id="50">50</span>
+<span id="51">51</span>
+<span id="52">52</span>
+<span id="53">53</span>
+<span id="54">54</span>
+<span id="55">55</span>
+<span id="56">56</span>
+<span id="57">57</span>
+<span id="58">58</span>
+<span id="59">59</span>
+<span id="60">60</span>
+<span id="61">61</span>
+<span id="62">62</span>
+<span id="63">63</span>
+<span id="64">64</span>
+<span id="65">65</span>
+<span id="66">66</span>
+<span id="67">67</span>
+<span id="68">68</span>
+<span id="69">69</span>
+<span id="70">70</span>
+<span id="71">71</span>
+<span id="72">72</span>
+<span id="73">73</span>
+<span id="74">74</span>
+<span id="75">75</span>
+<span id="76">76</span>
+<span id="77">77</span>
+<span id="78">78</span>
+<span id="79">79</span>
+<span id="80">80</span>
+<span id="81">81</span>
+<span id="82">82</span>
+<span id="83">83</span>
+<span id="84">84</span>
+<span id="85">85</span>
+<span id="86">86</span>
+<span id="87">87</span>
+<span id="88">88</span>
+<span id="89">89</span>
+<span id="90">90</span>
+<span id="91">91</span>
+<span id="92">92</span>
+<span id="93">93</span>
+<span id="94">94</span>
+<span id="95">95</span>
+<span id="96">96</span>
+<span id="97">97</span>
+<span id="98">98</span>
+<span id="99">99</span>
+<span id="100">100</span>
+<span id="101">101</span>
+<span id="102">102</span>
+<span id="103">103</span>
+<span id="104">104</span>
+<span id="105">105</span>
+<span id="106">106</span>
+<span id="107">107</span>
+<span id="108">108</span>
+<span id="109">109</span>
+<span id="110">110</span>
+<span id="111">111</span>
+<span id="112">112</span>
+<span id="113">113</span>
+<span id="114">114</span>
+<span id="115">115</span>
+<span id="116">116</span>
+<span id="117">117</span>
+<span id="118">118</span>
+<span id="119">119</span>
+<span id="120">120</span>
+<span id="121">121</span>
+<span id="122">122</span>
+<span id="123">123</span>
+<span id="124">124</span>
+<span id="125">125</span>
+<span id="126">126</span>
+<span id="127">127</span>
+<span id="128">128</span>
+<span id="129">129</span>
+<span id="130">130</span>
+<span id="131">131</span>
+<span id="132">132</span>
+<span id="133">133</span>
+<span id="134">134</span>
+<span id="135">135</span>
+<span id="136">136</span>
+<span id="137">137</span>
+<span id="138">138</span>
+<span id="139">139</span>
+<span id="140">140</span>
+<span id="141">141</span>
+<span id="142">142</span>
+<span id="143">143</span>
+<span id="144">144</span>
+<span id="145">145</span>
+<span id="146">146</span>
+<span id="147">147</span>
+<span id="148">148</span>
+<span id="149">149</span>
+<span id="150">150</span>
+<span id="151">151</span>
+<span id="152">152</span>
+<span id="153">153</span>
+<span id="154">154</span>
+<span id="155">155</span>
+<span id="156">156</span>
+<span id="157">157</span>
+<span id="158">158</span>
+<span id="159">159</span>
+<span id="160">160</span>
+<span id="161">161</span>
+<span id="162">162</span>
+<span id="163">163</span>
+<span id="164">164</span>
+<span id="165">165</span>
+<span id="166">166</span>
+<span id="167">167</span>
+<span id="168">168</span>
+<span id="169">169</span>
+<span id="170">170</span>
+<span id="171">171</span>
+<span id="172">172</span>
+<span id="173">173</span>
+<span id="174">174</span>
+<span id="175">175</span>
+<span id="176">176</span>
+<span id="177">177</span>
+<span id="178">178</span>
+<span id="179">179</span>
+<span id="180">180</span>
+<span id="181">181</span>
+<span id="182">182</span>
+<span id="183">183</span>
+<span id="184">184</span>
+<span id="185">185</span>
+<span id="186">186</span>
+<span id="187">187</span>
+<span id="188">188</span>
+<span id="189">189</span>
+<span id="190">190</span>
+<span id="191">191</span>
+<span id="192">192</span>
+<span id="193">193</span>
+<span id="194">194</span>
+<span id="195">195</span>
+<span id="196">196</span>
+<span id="197">197</span>
+<span id="198">198</span>
+<span id="199">199</span>
+<span id="200">200</span>
+<span id="201">201</span>
+<span id="202">202</span>
+<span id="203">203</span>
+<span id="204">204</span>
+<span id="205">205</span>
+<span id="206">206</span>
+<span id="207">207</span>
+<span id="208">208</span>
+<span id="209">209</span>
+<span id="210">210</span>
+<span id="211">211</span>
+<span id="212">212</span>
+<span id="213">213</span>
+<span id="214">214</span>
+<span id="215">215</span>
+<span id="216">216</span>
+<span id="217">217</span>
+<span id="218">218</span>
+<span id="219">219</span>
+<span id="220">220</span>
+<span id="221">221</span>
+<span id="222">222</span>
+<span id="223">223</span>
+<span id="224">224</span>
+<span id="225">225</span>
+<span id="226">226</span>
+<span id="227">227</span>
+<span id="228">228</span>
+<span id="229">229</span>
+<span id="230">230</span>
+<span id="231">231</span>
+<span id="232">232</span>
+<span id="233">233</span>
+<span id="234">234</span>
+<span id="235">235</span>
+<span id="236">236</span>
+<span id="237">237</span>
+<span id="238">238</span>
+<span id="239">239</span>
+<span id="240">240</span>
+<span id="241">241</span>
+<span id="242">242</span>
+<span id="243">243</span>
+<span id="244">244</span>
+<span id="245">245</span>
+<span id="246">246</span>
+<span id="247">247</span>
+<span id="248">248</span>
+<span id="249">249</span>
+<span id="250">250</span>
+<span id="251">251</span>
+<span id="252">252</span>
+<span id="253">253</span>
+<span id="254">254</span>
+<span id="255">255</span>
+<span id="256">256</span>
+<span id="257">257</span>
+<span id="258">258</span>
+<span id="259">259</span>
+<span id="260">260</span>
+<span id="261">261</span>
+<span id="262">262</span>
+<span id="263">263</span>
+<span id="264">264</span>
+<span id="265">265</span>
+<span id="266">266</span>
+<span id="267">267</span>
+<span id="268">268</span>
+<span id="269">269</span>
+<span id="270">270</span>
+<span id="271">271</span>
+<span id="272">272</span>
+<span id="273">273</span>
+<span id="274">274</span>
+<span id="275">275</span>
+<span id="276">276</span>
+<span id="277">277</span>
+<span id="278">278</span>
+<span id="279">279</span>
+<span id="280">280</span>
+<span id="281">281</span>
+<span id="282">282</span>
+<span id="283">283</span>
+<span id="284">284</span>
+<span id="285">285</span>
+<span id="286">286</span>
+<span id="287">287</span>
+<span id="288">288</span>
+<span id="289">289</span>
+<span id="290">290</span>
+<span id="291">291</span>
+<span id="292">292</span>
+<span id="293">293</span>
+<span id="294">294</span>
+<span id="295">295</span>
+<span id="296">296</span>
+<span id="297">297</span>
+<span id="298">298</span>
+<span id="299">299</span>
+<span id="300">300</span>
+<span id="301">301</span>
+<span id="302">302</span>
+<span id="303">303</span>
+<span id="304">304</span>
+<span id="305">305</span>
+<span id="306">306</span>
+<span id="307">307</span>
+<span id="308">308</span>
+<span id="309">309</span>
+<span id="310">310</span>
+<span id="311">311</span>
+<span id="312">312</span>
+<span id="313">313</span>
+<span id="314">314</span>
+<span id="315">315</span>
+<span id="316">316</span>
+<span id="317">317</span>
+<span id="318">318</span>
+<span id="319">319</span>
+<span id="320">320</span>
+<span id="321">321</span>
+<span id="322">322</span>
+<span id="323">323</span>
+<span id="324">324</span>
+<span id="325">325</span>
+<span id="326">326</span>
+<span id="327">327</span>
+<span id="328">328</span>
+<span id="329">329</span>
+<span id="330">330</span>
+<span id="331">331</span>
+<span id="332">332</span>
+<span id="333">333</span>
+<span id="334">334</span>
+<span id="335">335</span>
+<span id="336">336</span>
+<span id="337">337</span>
+<span id="338">338</span>
+<span id="339">339</span>
+<span id="340">340</span>
+<span id="341">341</span>
+<span id="342">342</span>
+<span id="343">343</span>
+<span id="344">344</span>
+<span id="345">345</span>
+<span id="346">346</span>
+<span id="347">347</span>
+<span id="348">348</span>
+<span id="349">349</span>
+<span id="350">350</span>
+<span id="351">351</span>
+<span id="352">352</span>
+<span id="353">353</span>
+<span id="354">354</span>
+<span id="355">355</span>
+<span id="356">356</span>
+<span id="357">357</span>
+<span id="358">358</span>
+<span id="359">359</span>
+<span id="360">360</span>
+<span id="361">361</span>
+<span id="362">362</span>
+<span id="363">363</span>
+<span id="364">364</span>
+<span id="365">365</span>
+<span id="366">366</span>
+<span id="367">367</span>
+<span id="368">368</span>
+<span id="369">369</span>
+<span id="370">370</span>
+<span id="371">371</span>
+<span id="372">372</span>
+<span id="373">373</span>
+<span id="374">374</span>
+<span id="375">375</span>
+<span id="376">376</span>
+<span id="377">377</span>
+<span id="378">378</span>
+<span id="379">379</span>
+<span id="380">380</span>
+<span id="381">381</span>
+<span id="382">382</span>
+<span id="383">383</span>
+<span id="384">384</span>
+<span id="385">385</span>
+<span id="386">386</span>
+<span id="387">387</span>
+<span id="388">388</span>
+<span id="389">389</span>
+<span id="390">390</span>
+<span id="391">391</span>
+<span id="392">392</span>
+<span id="393">393</span>
+<span id="394">394</span>
+<span id="395">395</span>
+<span id="396">396</span>
+<span id="397">397</span>
+<span id="398">398</span>
+<span id="399">399</span>
+<span id="400">400</span>
+<span id="401">401</span>
+<span id="402">402</span>
+<span id="403">403</span>
+<span id="404">404</span>
+<span id="405">405</span>
+<span id="406">406</span>
+<span id="407">407</span>
+<span id="408">408</span>
+<span id="409">409</span>
+<span id="410">410</span>
+<span id="411">411</span>
+<span id="412">412</span>
+<span id="413">413</span>
+<span id="414">414</span>
+<span id="415">415</span>
+<span id="416">416</span>
+<span id="417">417</span>
+<span id="418">418</span>
+<span id="419">419</span>
+<span id="420">420</span>
+<span id="421">421</span>
+<span id="422">422</span>
+<span id="423">423</span>
+<span id="424">424</span>
+<span id="425">425</span>
+<span id="426">426</span>
+<span id="427">427</span>
+<span id="428">428</span>
+<span id="429">429</span>
+<span id="430">430</span>
+<span id="431">431</span>
+<span id="432">432</span>
+<span id="433">433</span>
+<span id="434">434</span>
+<span id="435">435</span>
+<span id="436">436</span>
+<span id="437">437</span>
+<span id="438">438</span>
+<span id="439">439</span>
+<span id="440">440</span>
+<span id="441">441</span>
+<span id="442">442</span>
+<span id="443">443</span>
+<span id="444">444</span>
+<span id="445">445</span>
+<span id="446">446</span>
+<span id="447">447</span>
+<span id="448">448</span>
+<span id="449">449</span>
+<span id="450">450</span>
+<span id="451">451</span>
+<span id="452">452</span>
+<span id="453">453</span>
+<span id="454">454</span>
+<span id="455">455</span>
+<span id="456">456</span>
+<span id="457">457</span>
+<span id="458">458</span>
+<span id="459">459</span>
+<span id="460">460</span>
+<span id="461">461</span>
+<span id="462">462</span>
+<span id="463">463</span>
+<span id="464">464</span>
+<span id="465">465</span>
+<span id="466">466</span>
+<span id="467">467</span>
+<span id="468">468</span>
+<span id="469">469</span>
+<span id="470">470</span>
+<span id="471">471</span>
+<span id="472">472</span>
+<span id="473">473</span>
+<span id="474">474</span>
+<span id="475">475</span>
+<span id="476">476</span>
+<span id="477">477</span>
+<span id="478">478</span>
+<span id="479">479</span>
+<span id="480">480</span>
+<span id="481">481</span>
+<span id="482">482</span>
+<span id="483">483</span>
+<span id="484">484</span>
+<span id="485">485</span>
+<span id="486">486</span>
+<span id="487">487</span>
+<span id="488">488</span>
+<span id="489">489</span>
+<span id="490">490</span>
+<span id="491">491</span>
+<span id="492">492</span>
+<span id="493">493</span>
+<span id="494">494</span>
+<span id="495">495</span>
+<span id="496">496</span>
+<span id="497">497</span>
+<span id="498">498</span>
+<span id="499">499</span>
+<span id="500">500</span>
+<span id="501">501</span>
+<span id="502">502</span>
+<span id="503">503</span>
+<span id="504">504</span>
+<span id="505">505</span>
+<span id="506">506</span>
+<span id="507">507</span>
+<span id="508">508</span>
+<span id="509">509</span>
+<span id="510">510</span>
+<span id="511">511</span>
+<span id="512">512</span>
+<span id="513">513</span>
+<span id="514">514</span>
+<span id="515">515</span>
+<span id="516">516</span>
+<span id="517">517</span>
+<span id="518">518</span>
+<span id="519">519</span>
+<span id="520">520</span>
+<span id="521">521</span>
+<span id="522">522</span>
+<span id="523">523</span>
+<span id="524">524</span>
+<span id="525">525</span>
+<span id="526">526</span>
+<span id="527">527</span>
+<span id="528">528</span>
+<span id="529">529</span>
+<span id="530">530</span>
+<span id="531">531</span>
+<span id="532">532</span>
+<span id="533">533</span>
+<span id="534">534</span>
+<span id="535">535</span>
+<span id="536">536</span>
+<span id="537">537</span>
+<span id="538">538</span>
+<span id="539">539</span>
+<span id="540">540</span>
+<span id="541">541</span>
+<span id="542">542</span>
+<span id="543">543</span>
+<span id="544">544</span>
+<span id="545">545</span>
+<span id="546">546</span>
+<span id="547">547</span>
+<span id="548">548</span>
+<span id="549">549</span>
+<span id="550">550</span>
+<span id="551">551</span>
+<span id="552">552</span>
+<span id="553">553</span>
+<span id="554">554</span>
+<span id="555">555</span>
+<span id="556">556</span>
+<span id="557">557</span>
+<span id="558">558</span>
+<span id="559">559</span>
+<span id="560">560</span>
+<span id="561">561</span>
+<span id="562">562</span>
+<span id="563">563</span>
+<span id="564">564</span>
+<span id="565">565</span>
+<span id="566">566</span>
+<span id="567">567</span>
+<span id="568">568</span>
+<span id="569">569</span>
+<span id="570">570</span>
+<span id="571">571</span>
+<span id="572">572</span>
+<span id="573">573</span>
+<span id="574">574</span>
+<span id="575">575</span>
+<span id="576">576</span>
+<span id="577">577</span>
+<span id="578">578</span>
+<span id="579">579</span>
+<span id="580">580</span>
+<span id="581">581</span>
+<span id="582">582</span>
+<span id="583">583</span>
+<span id="584">584</span>
+<span id="585">585</span>
+<span id="586">586</span>
+<span id="587">587</span>
+<span id="588">588</span>
+<span id="589">589</span>
+<span id="590">590</span>
+<span id="591">591</span>
+<span id="592">592</span>
+<span id="593">593</span>
+<span id="594">594</span>
+<span id="595">595</span>
+<span id="596">596</span>
+<span id="597">597</span>
+<span id="598">598</span>
+<span id="599">599</span>
+<span id="600">600</span>
+<span id="601">601</span>
+<span id="602">602</span>
+<span id="603">603</span>
+<span id="604">604</span>
+<span id="605">605</span>
+<span id="606">606</span>
+<span id="607">607</span>
+<span id="608">608</span>
+<span id="609">609</span>
+<span id="610">610</span>
+<span id="611">611</span>
+<span id="612">612</span>
+<span id="613">613</span>
+<span id="614">614</span>
+<span id="615">615</span>
+<span id="616">616</span>
+<span id="617">617</span>
+<span id="618">618</span>
+<span id="619">619</span>
+<span id="620">620</span>
+<span id="621">621</span>
+<span id="622">622</span>
+<span id="623">623</span>
+<span id="624">624</span>
+<span id="625">625</span>
+<span id="626">626</span>
+<span id="627">627</span>
+<span id="628">628</span>
+<span id="629">629</span>
+<span id="630">630</span>
+<span id="631">631</span>
+<span id="632">632</span>
+<span id="633">633</span>
+<span id="634">634</span>
+<span id="635">635</span>
+<span id="636">636</span>
+<span id="637">637</span>
+<span id="638">638</span>
+<span id="639">639</span>
+<span id="640">640</span>
+<span id="641">641</span>
+<span id="642">642</span>
+<span id="643">643</span>
+<span id="644">644</span>
+<span id="645">645</span>
+<span id="646">646</span>
+<span id="647">647</span>
+<span id="648">648</span>
+<span id="649">649</span>
+<span id="650">650</span>
+<span id="651">651</span>
+<span id="652">652</span>
+<span id="653">653</span>
+<span id="654">654</span>
+<span id="655">655</span>
+<span id="656">656</span>
+<span id="657">657</span>
+<span id="658">658</span>
+<span id="659">659</span>
+<span id="660">660</span>
+<span id="661">661</span>
+<span id="662">662</span>
+<span id="663">663</span>
+<span id="664">664</span>
+<span id="665">665</span>
+<span id="666">666</span>
+<span id="667">667</span>
+<span id="668">668</span>
+<span id="669">669</span>
+<span id="670">670</span>
+<span id="671">671</span>
+<span id="672">672</span>
+<span id="673">673</span>
+<span id="674">674</span>
+<span id="675">675</span>
+<span id="676">676</span>
+<span id="677">677</span>
+<span id="678">678</span>
+<span id="679">679</span>
+<span id="680">680</span>
+<span id="681">681</span>
+<span id="682">682</span>
+<span id="683">683</span>
+<span id="684">684</span>
+<span id="685">685</span>
+<span id="686">686</span>
+<span id="687">687</span>
+<span id="688">688</span>
+<span id="689">689</span>
+<span id="690">690</span>
+<span id="691">691</span>
+<span id="692">692</span>
+<span id="693">693</span>
+<span id="694">694</span>
+<span id="695">695</span>
+<span id="696">696</span>
+<span id="697">697</span>
+<span id="698">698</span>
+<span id="699">699</span>
+<span id="700">700</span>
+<span id="701">701</span>
+<span id="702">702</span>
+<span id="703">703</span>
+<span id="704">704</span>
+<span id="705">705</span>
+<span id="706">706</span>
+<span id="707">707</span>
+<span id="708">708</span>
+<span id="709">709</span>
+<span id="710">710</span>
+<span id="711">711</span>
+<span id="712">712</span>
+<span id="713">713</span>
+<span id="714">714</span>
+<span id="715">715</span>
+<span id="716">716</span>
+<span id="717">717</span>
+<span id="718">718</span>
+<span id="719">719</span>
+<span id="720">720</span>
+<span id="721">721</span>
+<span id="722">722</span>
+<span id="723">723</span>
+<span id="724">724</span>
+<span id="725">725</span>
+<span id="726">726</span>
+<span id="727">727</span>
+<span id="728">728</span>
+<span id="729">729</span>
+<span id="730">730</span>
+<span id="731">731</span>
+<span id="732">732</span>
+<span id="733">733</span>
+<span id="734">734</span>
+<span id="735">735</span>
+<span id="736">736</span>
+<span id="737">737</span>
+<span id="738">738</span>
+<span id="739">739</span>
+<span id="740">740</span>
+<span id="741">741</span>
+<span id="742">742</span>
+<span id="743">743</span>
+<span id="744">744</span>
+<span id="745">745</span>
+<span id="746">746</span>
+<span id="747">747</span>
+<span id="748">748</span>
+<span id="749">749</span>
+<span id="750">750</span>
+<span id="751">751</span>
+<span id="752">752</span>
+<span id="753">753</span>
+<span id="754">754</span>
+<span id="755">755</span>
+<span id="756">756</span>
+<span id="757">757</span>
+<span id="758">758</span>
+<span id="759">759</span>
+<span id="760">760</span>
+<span id="761">761</span>
+<span id="762">762</span>
+<span id="763">763</span>
+<span id="764">764</span>
+<span id="765">765</span>
+<span id="766">766</span>
+<span id="767">767</span>
+<span id="768">768</span>
+<span id="769">769</span>
+<span id="770">770</span>
+<span id="771">771</span>
+<span id="772">772</span>
+<span id="773">773</span>
+<span id="774">774</span>
+<span id="775">775</span>
+<span id="776">776</span>
+<span id="777">777</span>
+<span id="778">778</span>
+<span id="779">779</span>
+<span id="780">780</span>
+<span id="781">781</span>
+<span id="782">782</span>
+<span id="783">783</span>
+<span id="784">784</span>
+<span id="785">785</span>
+<span id="786">786</span>
+<span id="787">787</span>
+<span id="788">788</span>
+<span id="789">789</span>
+<span id="790">790</span>
+<span id="791">791</span>
+<span id="792">792</span>
+<span id="793">793</span>
+<span id="794">794</span>
+<span id="795">795</span>
+<span id="796">796</span>
+<span id="797">797</span>
+<span id="798">798</span>
+<span id="799">799</span>
+<span id="800">800</span>
+<span id="801">801</span>
+<span id="802">802</span>
+<span id="803">803</span>
+<span id="804">804</span>
+<span id="805">805</span>
+<span id="806">806</span>
+<span id="807">807</span>
+<span id="808">808</span>
+<span id="809">809</span>
+<span id="810">810</span>
+<span id="811">811</span>
+<span id="812">812</span>
+<span id="813">813</span>
+<span id="814">814</span>
+<span id="815">815</span>
+<span id="816">816</span>
+<span id="817">817</span>
+<span id="818">818</span>
+<span id="819">819</span>
+<span id="820">820</span>
+<span id="821">821</span>
+<span id="822">822</span>
+<span id="823">823</span>
+<span id="824">824</span>
+<span id="825">825</span>
+<span id="826">826</span>
+<span id="827">827</span>
+<span id="828">828</span>
+<span id="829">829</span>
+<span id="830">830</span>
+<span id="831">831</span>
+<span id="832">832</span>
+<span id="833">833</span>
+<span id="834">834</span>
+<span id="835">835</span>
+<span id="836">836</span>
+<span id="837">837</span>
+<span id="838">838</span>
+<span id="839">839</span>
+<span id="840">840</span>
+<span id="841">841</span>
+<span id="842">842</span>
+<span id="843">843</span>
+<span id="844">844</span>
+<span id="845">845</span>
+<span id="846">846</span>
+<span id="847">847</span>
+<span id="848">848</span>
+<span id="849">849</span>
+<span id="850">850</span>
+<span id="851">851</span>
+<span id="852">852</span>
+<span id="853">853</span>
+<span id="854">854</span>
+<span id="855">855</span>
+<span id="856">856</span>
+<span id="857">857</span>
+<span id="858">858</span>
+<span id="859">859</span>
+<span id="860">860</span>
+<span id="861">861</span>
+<span id="862">862</span>
+<span id="863">863</span>
+<span id="864">864</span>
+<span id="865">865</span>
+<span id="866">866</span>
+<span id="867">867</span>
+<span id="868">868</span>
+<span id="869">869</span>
+<span id="870">870</span>
+<span id="871">871</span>
+<span id="872">872</span>
+<span id="873">873</span>
+<span id="874">874</span>
+<span id="875">875</span>
+<span id="876">876</span>
+<span id="877">877</span>
+<span id="878">878</span>
+<span id="879">879</span>
+<span id="880">880</span>
+<span id="881">881</span>
+<span id="882">882</span>
+<span id="883">883</span>
+<span id="884">884</span>
+<span id="885">885</span>
+<span id="886">886</span>
+<span id="887">887</span>
+<span id="888">888</span>
+<span id="889">889</span>
+<span id="890">890</span>
+<span id="891">891</span>
+<span id="892">892</span>
+<span id="893">893</span>
+<span id="894">894</span>
+<span id="895">895</span>
+<span id="896">896</span>
+<span id="897">897</span>
+<span id="898">898</span>
+<span id="899">899</span>
+<span id="900">900</span>
+<span id="901">901</span>
+<span id="902">902</span>
+<span id="903">903</span>
+<span id="904">904</span>
+<span id="905">905</span>
+<span id="906">906</span>
+<span id="907">907</span>
+<span id="908">908</span>
+<span id="909">909</span>
+<span id="910">910</span>
+<span id="911">911</span>
+<span id="912">912</span>
+<span id="913">913</span>
+<span id="914">914</span>
+<span id="915">915</span>
+<span id="916">916</span>
+<span id="917">917</span>
+<span id="918">918</span>
+<span id="919">919</span>
+<span id="920">920</span>
+<span id="921">921</span>
+<span id="922">922</span>
+<span id="923">923</span>
+<span id="924">924</span>
+<span id="925">925</span>
+<span id="926">926</span>
+<span id="927">927</span>
+<span id="928">928</span>
+<span id="929">929</span>
+<span id="930">930</span>
+<span id="931">931</span>
+<span id="932">932</span>
+<span id="933">933</span>
+<span id="934">934</span>
+<span id="935">935</span>
+<span id="936">936</span>
+<span id="937">937</span>
+<span id="938">938</span>
+<span id="939">939</span>
+<span id="940">940</span>
+<span id="941">941</span>
+<span id="942">942</span>
+<span id="943">943</span>
+<span id="944">944</span>
+<span id="945">945</span>
+<span id="946">946</span>
+<span id="947">947</span>
+<span id="948">948</span>
+<span id="949">949</span>
+<span id="950">950</span>
+<span id="951">951</span>
+<span id="952">952</span>
+<span id="953">953</span>
+<span id="954">954</span>
+<span id="955">955</span>
+<span id="956">956</span>
+<span id="957">957</span>
+<span id="958">958</span>
+<span id="959">959</span>
+<span id="960">960</span>
+<span id="961">961</span>
+<span id="962">962</span>
+<span id="963">963</span>
+<span id="964">964</span>
+<span id="965">965</span>
+<span id="966">966</span>
+<span id="967">967</span>
+<span id="968">968</span>
+<span id="969">969</span>
+<span id="970">970</span>
+<span id="971">971</span>
+<span id="972">972</span>
+<span id="973">973</span>
+<span id="974">974</span>
+<span id="975">975</span>
+<span id="976">976</span>
+<span id="977">977</span>
+<span id="978">978</span>
+<span id="979">979</span>
+<span id="980">980</span>
+<span id="981">981</span>
+<span id="982">982</span>
+<span id="983">983</span>
+<span id="984">984</span>
+<span id="985">985</span>
+<span id="986">986</span>
+<span id="987">987</span>
+<span id="988">988</span>
+<span id="989">989</span>
+<span id="990">990</span>
+<span id="991">991</span>
+<span id="992">992</span>
+<span id="993">993</span>
+<span id="994">994</span>
+<span id="995">995</span>
+<span id="996">996</span>
+<span id="997">997</span>
+<span id="998">998</span>
+<span id="999">999</span>
+<span id="1000">1000</span>
+<span id="1001">1001</span>
+<span id="1002">1002</span>
+<span id="1003">1003</span>
+<span id="1004">1004</span>
+<span id="1005">1005</span>
+<span id="1006">1006</span>
+<span id="1007">1007</span>
+<span id="1008">1008</span>
+<span id="1009">1009</span>
+<span id="1010">1010</span>
+<span id="1011">1011</span>
+<span id="1012">1012</span>
+<span id="1013">1013</span>
+<span id="1014">1014</span>
+<span id="1015">1015</span>
+<span id="1016">1016</span>
+<span id="1017">1017</span>
+<span id="1018">1018</span>
+<span id="1019">1019</span>
+<span id="1020">1020</span>
+<span id="1021">1021</span>
+<span id="1022">1022</span>
+<span id="1023">1023</span>
+<span id="1024">1024</span>
+<span id="1025">1025</span>
+<span id="1026">1026</span>
+<span id="1027">1027</span>
+<span id="1028">1028</span>
+<span id="1029">1029</span>
+<span id="1030">1030</span>
+<span id="1031">1031</span>
+<span id="1032">1032</span>
+<span id="1033">1033</span>
+<span id="1034">1034</span>
+<span id="1035">1035</span>
+<span id="1036">1036</span>
+<span id="1037">1037</span>
+<span id="1038">1038</span>
+<span id="1039">1039</span>
+<span id="1040">1040</span>
+<span id="1041">1041</span>
+<span id="1042">1042</span>
+<span id="1043">1043</span>
+<span id="1044">1044</span>
+<span id="1045">1045</span>
+<span id="1046">1046</span>
+<span id="1047">1047</span>
+<span id="1048">1048</span>
+<span id="1049">1049</span>
+<span id="1050">1050</span>
+<span id="1051">1051</span>
+<span id="1052">1052</span>
+<span id="1053">1053</span>
+<span id="1054">1054</span>
+<span id="1055">1055</span>
+<span id="1056">1056</span>
+<span id="1057">1057</span>
+<span id="1058">1058</span>
+<span id="1059">1059</span>
+<span id="1060">1060</span>
+<span id="1061">1061</span>
+<span id="1062">1062</span>
+<span id="1063">1063</span>
+<span id="1064">1064</span>
+<span id="1065">1065</span>
+<span id="1066">1066</span>
+<span id="1067">1067</span>
+<span id="1068">1068</span>
+<span id="1069">1069</span>
+<span id="1070">1070</span>
+<span id="1071">1071</span>
+<span id="1072">1072</span>
+<span id="1073">1073</span>
+<span id="1074">1074</span>
+<span id="1075">1075</span>
+<span id="1076">1076</span>
+<span id="1077">1077</span>
+<span id="1078">1078</span>
+<span id="1079">1079</span>
+<span id="1080">1080</span>
+<span id="1081">1081</span>
+<span id="1082">1082</span>
+<span id="1083">1083</span>
+<span id="1084">1084</span>
+<span id="1085">1085</span>
+<span id="1086">1086</span>
+<span id="1087">1087</span>
+<span id="1088">1088</span>
+<span id="1089">1089</span>
+<span id="1090">1090</span>
+<span id="1091">1091</span>
+<span id="1092">1092</span>
+<span id="1093">1093</span>
+<span id="1094">1094</span>
+<span id="1095">1095</span>
+<span id="1096">1096</span>
+<span id="1097">1097</span>
+<span id="1098">1098</span>
+<span id="1099">1099</span>
+<span id="1100">1100</span>
+<span id="1101">1101</span>
+<span id="1102">1102</span>
+<span id="1103">1103</span>
+<span id="1104">1104</span>
+<span id="1105">1105</span>
+<span id="1106">1106</span>
+<span id="1107">1107</span>
+<span id="1108">1108</span>
+<span id="1109">1109</span>
+<span id="1110">1110</span>
+<span id="1111">1111</span>
+<span id="1112">1112</span>
+<span id="1113">1113</span>
+<span id="1114">1114</span>
+<span id="1115">1115</span>
+<span id="1116">1116</span>
+<span id="1117">1117</span>
+<span id="1118">1118</span>
+<span id="1119">1119</span>
+<span id="1120">1120</span>
+<span id="1121">1121</span>
+<span id="1122">1122</span>
+<span id="1123">1123</span>
+<span id="1124">1124</span>
+<span id="1125">1125</span>
+<span id="1126">1126</span>
+<span id="1127">1127</span>
+<span id="1128">1128</span>
+<span id="1129">1129</span>
+<span id="1130">1130</span>
+<span id="1131">1131</span>
+<span id="1132">1132</span>
+<span id="1133">1133</span>
+<span id="1134">1134</span>
+<span id="1135">1135</span>
+<span id="1136">1136</span>
+<span id="1137">1137</span>
+<span id="1138">1138</span>
+<span id="1139">1139</span>
+<span id="1140">1140</span>
+<span id="1141">1141</span>
+<span id="1142">1142</span>
+<span id="1143">1143</span>
+<span id="1144">1144</span>
+<span id="1145">1145</span>
+<span id="1146">1146</span>
+<span id="1147">1147</span>
+<span id="1148">1148</span>
+<span id="1149">1149</span>
+<span id="1150">1150</span>
+<span id="1151">1151</span>
+<span id="1152">1152</span>
+<span id="1153">1153</span>
+<span id="1154">1154</span>
+<span id="1155">1155</span>
+<span id="1156">1156</span>
+<span id="1157">1157</span>
+<span id="1158">1158</span>
+<span id="1159">1159</span>
+<span id="1160">1160</span>
+<span id="1161">1161</span>
+<span id="1162">1162</span>
+<span id="1163">1163</span>
+<span id="1164">1164</span>
+<span id="1165">1165</span>
+<span id="1166">1166</span>
+<span id="1167">1167</span>
+<span id="1168">1168</span>
+<span id="1169">1169</span>
+<span id="1170">1170</span>
+<span id="1171">1171</span>
+<span id="1172">1172</span>
+<span id="1173">1173</span>
+<span id="1174">1174</span>
+<span id="1175">1175</span>
+<span id="1176">1176</span>
+<span id="1177">1177</span>
+<span id="1178">1178</span>
+<span id="1179">1179</span>
+<span id="1180">1180</span>
+<span id="1181">1181</span>
+<span id="1182">1182</span>
+<span id="1183">1183</span>
+<span id="1184">1184</span>
+<span id="1185">1185</span>
+<span id="1186">1186</span>
+<span id="1187">1187</span>
+<span id="1188">1188</span>
+<span id="1189">1189</span>
+<span id="1190">1190</span>
+<span id="1191">1191</span>
+<span id="1192">1192</span>
+<span id="1193">1193</span>
+<span id="1194">1194</span>
+<span id="1195">1195</span>
+<span id="1196">1196</span>
+<span id="1197">1197</span>
+<span id="1198">1198</span>
+<span id="1199">1199</span>
+<span id="1200">1200</span>
+<span id="1201">1201</span>
+<span id="1202">1202</span>
+<span id="1203">1203</span>
+<span id="1204">1204</span>
+<span id="1205">1205</span>
+<span id="1206">1206</span>
+<span id="1207">1207</span>
+<span id="1208">1208</span>
+<span id="1209">1209</span>
+<span id="1210">1210</span>
+<span id="1211">1211</span>
+<span id="1212">1212</span>
+<span id="1213">1213</span>
+<span id="1214">1214</span>
+<span id="1215">1215</span>
+<span id="1216">1216</span>
+<span id="1217">1217</span>
+<span id="1218">1218</span>
+<span id="1219">1219</span>
+<span id="1220">1220</span>
+<span id="1221">1221</span>
+<span id="1222">1222</span>
+<span id="1223">1223</span>
+<span id="1224">1224</span>
+<span id="1225">1225</span>
+<span id="1226">1226</span>
+<span id="1227">1227</span>
+<span id="1228">1228</span>
+<span id="1229">1229</span>
+<span id="1230">1230</span>
+<span id="1231">1231</span>
+<span id="1232">1232</span>
+<span id="1233">1233</span>
+<span id="1234">1234</span>
+<span id="1235">1235</span>
+<span id="1236">1236</span>
+<span id="1237">1237</span>
+<span id="1238">1238</span>
+<span id="1239">1239</span>
+<span id="1240">1240</span>
+<span id="1241">1241</span>
+<span id="1242">1242</span>
+<span id="1243">1243</span>
+<span id="1244">1244</span>
+<span id="1245">1245</span>
+<span id="1246">1246</span>
+<span id="1247">1247</span>
+<span id="1248">1248</span>
+<span id="1249">1249</span>
+<span id="1250">1250</span>
+<span id="1251">1251</span>
+<span id="1252">1252</span>
+<span id="1253">1253</span>
+<span id="1254">1254</span>
+<span id="1255">1255</span>
+<span id="1256">1256</span>
+<span id="1257">1257</span>
+<span id="1258">1258</span>
+<span id="1259">1259</span>
+<span id="1260">1260</span>
+<span id="1261">1261</span>
+<span id="1262">1262</span>
+<span id="1263">1263</span>
+<span id="1264">1264</span>
+<span id="1265">1265</span>
+<span id="1266">1266</span>
+<span id="1267">1267</span>
+<span id="1268">1268</span>
+<span id="1269">1269</span>
+<span id="1270">1270</span>
+<span id="1271">1271</span>
+<span id="1272">1272</span>
+<span id="1273">1273</span>
+<span id="1274">1274</span>
+<span id="1275">1275</span>
+<span id="1276">1276</span>
+<span id="1277">1277</span>
+<span id="1278">1278</span>
+<span id="1279">1279</span>
+<span id="1280">1280</span>
+<span id="1281">1281</span>
+<span id="1282">1282</span>
+<span id="1283">1283</span>
+<span id="1284">1284</span>
+<span id="1285">1285</span>
+<span id="1286">1286</span>
+<span id="1287">1287</span>
+<span id="1288">1288</span>
+<span id="1289">1289</span>
+<span id="1290">1290</span>
+<span id="1291">1291</span>
+<span id="1292">1292</span>
+<span id="1293">1293</span>
+<span id="1294">1294</span>
+<span id="1295">1295</span>
+<span id="1296">1296</span>
+<span id="1297">1297</span>
+<span id="1298">1298</span>
+<span id="1299">1299</span>
+<span id="1300">1300</span>
+<span id="1301">1301</span>
+<span id="1302">1302</span>
+<span id="1303">1303</span>
+<span id="1304">1304</span>
+<span id="1305">1305</span>
+<span id="1306">1306</span>
+<span id="1307">1307</span>
+<span id="1308">1308</span>
+<span id="1309">1309</span>
+<span id="1310">1310</span>
+<span id="1311">1311</span>
+<span id="1312">1312</span>
+<span id="1313">1313</span>
+<span id="1314">1314</span>
+<span id="1315">1315</span>
+<span id="1316">1316</span>
+<span id="1317">1317</span>
+<span id="1318">1318</span>
+<span id="1319">1319</span>
+<span id="1320">1320</span>
+<span id="1321">1321</span>
+<span id="1322">1322</span>
+<span id="1323">1323</span>
+<span id="1324">1324</span>
+<span id="1325">1325</span>
+<span id="1326">1326</span>
+<span id="1327">1327</span>
+<span id="1328">1328</span>
+<span id="1329">1329</span>
+<span id="1330">1330</span>
+<span id="1331">1331</span>
+<span id="1332">1332</span>
+<span id="1333">1333</span>
+<span id="1334">1334</span>
+<span id="1335">1335</span>
+<span id="1336">1336</span>
+<span id="1337">1337</span>
+<span id="1338">1338</span>
+<span id="1339">1339</span>
+<span id="1340">1340</span>
+<span id="1341">1341</span>
+<span id="1342">1342</span>
+<span id="1343">1343</span>
+<span id="1344">1344</span>
+<span id="1345">1345</span>
+<span id="1346">1346</span>
+<span id="1347">1347</span>
+<span id="1348">1348</span>
+<span id="1349">1349</span>
+<span id="1350">1350</span>
+<span id="1351">1351</span>
+<span id="1352">1352</span>
+<span id="1353">1353</span>
+<span id="1354">1354</span>
+<span id="1355">1355</span>
+<span id="1356">1356</span>
+<span id="1357">1357</span>
+<span id="1358">1358</span>
+<span id="1359">1359</span>
+<span id="1360">1360</span>
+<span id="1361">1361</span>
+<span id="1362">1362</span>
+<span id="1363">1363</span>
+<span id="1364">1364</span>
+<span id="1365">1365</span>
+<span id="1366">1366</span>
+<span id="1367">1367</span>
+<span id="1368">1368</span>
+<span id="1369">1369</span>
+<span id="1370">1370</span>
+<span id="1371">1371</span>
+<span id="1372">1372</span>
+<span id="1373">1373</span>
+<span id="1374">1374</span>
+<span id="1375">1375</span>
+<span id="1376">1376</span>
+<span id="1377">1377</span>
+<span id="1378">1378</span>
+<span id="1379">1379</span>
+<span id="1380">1380</span>
+<span id="1381">1381</span>
+<span id="1382">1382</span>
+<span id="1383">1383</span>
+<span id="1384">1384</span>
+<span id="1385">1385</span>
+<span id="1386">1386</span>
+<span id="1387">1387</span>
+<span id="1388">1388</span>
+<span id="1389">1389</span>
+<span id="1390">1390</span>
+<span id="1391">1391</span>
+<span id="1392">1392</span>
+<span id="1393">1393</span>
+<span id="1394">1394</span>
+<span id="1395">1395</span>
+<span id="1396">1396</span>
+<span id="1397">1397</span>
+<span id="1398">1398</span>
+<span id="1399">1399</span>
+<span id="1400">1400</span>
+<span id="1401">1401</span>
+<span id="1402">1402</span>
+<span id="1403">1403</span>
+<span id="1404">1404</span>
+<span id="1405">1405</span>
+<span id="1406">1406</span>
+<span id="1407">1407</span>
+<span id="1408">1408</span>
+<span id="1409">1409</span>
+<span id="1410">1410</span>
+<span id="1411">1411</span>
+<span id="1412">1412</span>
+<span id="1413">1413</span>
+<span id="1414">1414</span>
+<span id="1415">1415</span>
+<span id="1416">1416</span>
+<span id="1417">1417</span>
+<span id="1418">1418</span>
+<span id="1419">1419</span>
+<span id="1420">1420</span>
+<span id="1421">1421</span>
+<span id="1422">1422</span>
+<span id="1423">1423</span>
+<span id="1424">1424</span>
+<span id="1425">1425</span>
+<span id="1426">1426</span>
+<span id="1427">1427</span>
+<span id="1428">1428</span>
+<span id="1429">1429</span>
+<span id="1430">1430</span>
+<span id="1431">1431</span>
+<span id="1432">1432</span>
+<span id="1433">1433</span>
+<span id="1434">1434</span>
+<span id="1435">1435</span>
+<span id="1436">1436</span>
+<span id="1437">1437</span>
+<span id="1438">1438</span>
+<span id="1439">1439</span>
+<span id="1440">1440</span>
+<span id="1441">1441</span>
+<span id="1442">1442</span>
+<span id="1443">1443</span>
+<span id="1444">1444</span>
+<span id="1445">1445</span>
+<span id="1446">1446</span>
+<span id="1447">1447</span>
+<span id="1448">1448</span>
+<span id="1449">1449</span>
+<span id="1450">1450</span>
+<span id="1451">1451</span>
+<span id="1452">1452</span>
+<span id="1453">1453</span>
+<span id="1454">1454</span>
+<span id="1455">1455</span>
+<span id="1456">1456</span>
+<span id="1457">1457</span>
+<span id="1458">1458</span>
+<span id="1459">1459</span>
+<span id="1460">1460</span>
+<span id="1461">1461</span>
+<span id="1462">1462</span>
+<span id="1463">1463</span>
+<span id="1464">1464</span>
+<span id="1465">1465</span>
+<span id="1466">1466</span>
+<span id="1467">1467</span>
+<span id="1468">1468</span>
+<span id="1469">1469</span>
+<span id="1470">1470</span>
+<span id="1471">1471</span>
+<span id="1472">1472</span>
+<span id="1473">1473</span>
+<span id="1474">1474</span>
+<span id="1475">1475</span>
+<span id="1476">1476</span>
+<span id="1477">1477</span>
+<span id="1478">1478</span>
+<span id="1479">1479</span>
+<span id="1480">1480</span>
+<span id="1481">1481</span>
+<span id="1482">1482</span>
+<span id="1483">1483</span>
+<span id="1484">1484</span>
+<span id="1485">1485</span>
+<span id="1486">1486</span>
+<span id="1487">1487</span>
+<span id="1488">1488</span>
+<span id="1489">1489</span>
+<span id="1490">1490</span>
+<span id="1491">1491</span>
+<span id="1492">1492</span>
+<span id="1493">1493</span>
+<span id="1494">1494</span>
+<span id="1495">1495</span>
+<span id="1496">1496</span>
+<span id="1497">1497</span>
+<span id="1498">1498</span>
+<span id="1499">1499</span>
+<span id="1500">1500</span>
+<span id="1501">1501</span>
+<span id="1502">1502</span>
+<span id="1503">1503</span>
+<span id="1504">1504</span>
+<span id="1505">1505</span>
+<span id="1506">1506</span>
+<span id="1507">1507</span>
+<span id="1508">1508</span>
+<span id="1509">1509</span>
+<span id="1510">1510</span>
+<span id="1511">1511</span>
+<span id="1512">1512</span>
+<span id="1513">1513</span>
+<span id="1514">1514</span>
+<span id="1515">1515</span>
+<span id="1516">1516</span>
+<span id="1517">1517</span>
+<span id="1518">1518</span>
+<span id="1519">1519</span>
+<span id="1520">1520</span>
+<span id="1521">1521</span>
+<span id="1522">1522</span>
+<span id="1523">1523</span>
+<span id="1524">1524</span>
+<span id="1525">1525</span>
+<span id="1526">1526</span>
+<span id="1527">1527</span>
+<span id="1528">1528</span>
+<span id="1529">1529</span>
+<span id="1530">1530</span>
+<span id="1531">1531</span>
+<span id="1532">1532</span>
+<span id="1533">1533</span>
+<span id="1534">1534</span>
+<span id="1535">1535</span>
+<span id="1536">1536</span>
+<span id="1537">1537</span>
+<span id="1538">1538</span>
+<span id="1539">1539</span>
+<span id="1540">1540</span>
+<span id="1541">1541</span>
+<span id="1542">1542</span>
+<span id="1543">1543</span>
+<span id="1544">1544</span>
+<span id="1545">1545</span>
+<span id="1546">1546</span>
+<span id="1547">1547</span>
+<span id="1548">1548</span>
+<span id="1549">1549</span>
+<span id="1550">1550</span>
+<span id="1551">1551</span>
+<span id="1552">1552</span>
+<span id="1553">1553</span>
+<span id="1554">1554</span>
+<span id="1555">1555</span>
+<span id="1556">1556</span>
+<span id="1557">1557</span>
+<span id="1558">1558</span>
+<span id="1559">1559</span>
+<span id="1560">1560</span>
+<span id="1561">1561</span>
+<span id="1562">1562</span>
+<span id="1563">1563</span>
+<span id="1564">1564</span>
+<span id="1565">1565</span>
+<span id="1566">1566</span>
+<span id="1567">1567</span>
+<span id="1568">1568</span>
+<span id="1569">1569</span>
+<span id="1570">1570</span>
+<span id="1571">1571</span>
+<span id="1572">1572</span>
+<span id="1573">1573</span>
+<span id="1574">1574</span>
+<span id="1575">1575</span>
+<span id="1576">1576</span>
+<span id="1577">1577</span>
+<span id="1578">1578</span>
+<span id="1579">1579</span>
+<span id="1580">1580</span>
+<span id="1581">1581</span>
+<span id="1582">1582</span>
+<span id="1583">1583</span>
+<span id="1584">1584</span>
+<span id="1585">1585</span>
+<span id="1586">1586</span>
+<span id="1587">1587</span>
+<span id="1588">1588</span>
+<span id="1589">1589</span>
+<span id="1590">1590</span>
+<span id="1591">1591</span>
+<span id="1592">1592</span>
+<span id="1593">1593</span>
+<span id="1594">1594</span>
+<span id="1595">1595</span>
+<span id="1596">1596</span>
+<span id="1597">1597</span>
+<span id="1598">1598</span>
+<span id="1599">1599</span>
+<span id="1600">1600</span>
+<span id="1601">1601</span>
+<span id="1602">1602</span>
+<span id="1603">1603</span>
+<span id="1604">1604</span>
+<span id="1605">1605</span>
+<span id="1606">1606</span>
+<span id="1607">1607</span>
+<span id="1608">1608</span>
+<span id="1609">1609</span>
+<span id="1610">1610</span>
+<span id="1611">1611</span>
+<span id="1612">1612</span>
+<span id="1613">1613</span>
+<span id="1614">1614</span>
+<span id="1615">1615</span>
+<span id="1616">1616</span>
+<span id="1617">1617</span>
+<span id="1618">1618</span>
+<span id="1619">1619</span>
+<span id="1620">1620</span>
+<span id="1621">1621</span>
+<span id="1622">1622</span>
+<span id="1623">1623</span>
+<span id="1624">1624</span>
+<span id="1625">1625</span>
+<span id="1626">1626</span>
+<span id="1627">1627</span>
+<span id="1628">1628</span>
+<span id="1629">1629</span>
+<span id="1630">1630</span>
+<span id="1631">1631</span>
+<span id="1632">1632</span>
+<span id="1633">1633</span>
+<span id="1634">1634</span>
+<span id="1635">1635</span>
+<span id="1636">1636</span>
+<span id="1637">1637</span>
+<span id="1638">1638</span>
+<span id="1639">1639</span>
+<span id="1640">1640</span>
+<span id="1641">1641</span>
+<span id="1642">1642</span>
+<span id="1643">1643</span>
+<span id="1644">1644</span>
+<span id="1645">1645</span>
+<span id="1646">1646</span>
+<span id="1647">1647</span>
+<span id="1648">1648</span>
+<span id="1649">1649</span>
+<span id="1650">1650</span>
+<span id="1651">1651</span>
+<span id="1652">1652</span>
+<span id="1653">1653</span>
+<span id="1654">1654</span>
+<span id="1655">1655</span>
+<span id="1656">1656</span>
+<span id="1657">1657</span>
+<span id="1658">1658</span>
+<span id="1659">1659</span>
+<span id="1660">1660</span>
+<span id="1661">1661</span>
+<span id="1662">1662</span>
+<span id="1663">1663</span>
+<span id="1664">1664</span>
+<span id="1665">1665</span>
+<span id="1666">1666</span>
+<span id="1667">1667</span>
+<span id="1668">1668</span>
+<span id="1669">1669</span>
+<span id="1670">1670</span>
+<span id="1671">1671</span>
+<span id="1672">1672</span>
+<span id="1673">1673</span>
+<span id="1674">1674</span>
+<span id="1675">1675</span>
+<span id="1676">1676</span>
+<span id="1677">1677</span>
+<span id="1678">1678</span>
+<span id="1679">1679</span>
+<span id="1680">1680</span>
+<span id="1681">1681</span>
+<span id="1682">1682</span>
+<span id="1683">1683</span>
+<span id="1684">1684</span>
+<span id="1685">1685</span>
+<span id="1686">1686</span>
+<span id="1687">1687</span>
+<span id="1688">1688</span>
+<span id="1689">1689</span>
+<span id="1690">1690</span>
+<span id="1691">1691</span>
+<span id="1692">1692</span>
+<span id="1693">1693</span>
+<span id="1694">1694</span>
+<span id="1695">1695</span>
+<span id="1696">1696</span>
+<span id="1697">1697</span>
+<span id="1698">1698</span>
+<span id="1699">1699</span>
+<span id="1700">1700</span>
+<span id="1701">1701</span>
+<span id="1702">1702</span>
+<span id="1703">1703</span>
+<span id="1704">1704</span>
+<span id="1705">1705</span>
+<span id="1706">1706</span>
+<span id="1707">1707</span>
+<span id="1708">1708</span>
+<span id="1709">1709</span>
+<span id="1710">1710</span>
+<span id="1711">1711</span>
+<span id="1712">1712</span>
+<span id="1713">1713</span>
+<span id="1714">1714</span>
+<span id="1715">1715</span>
+<span id="1716">1716</span>
+<span id="1717">1717</span>
+<span id="1718">1718</span>
+<span id="1719">1719</span>
+<span id="1720">1720</span>
+<span id="1721">1721</span>
+<span id="1722">1722</span>
+<span id="1723">1723</span>
+<span id="1724">1724</span>
+<span id="1725">1725</span>
+<span id="1726">1726</span>
+<span id="1727">1727</span>
+<span id="1728">1728</span>
+<span id="1729">1729</span>
+<span id="1730">1730</span>
+<span id="1731">1731</span>
+<span id="1732">1732</span>
+<span id="1733">1733</span>
+<span id="1734">1734</span>
+<span id="1735">1735</span>
+<span id="1736">1736</span>
+<span id="1737">1737</span>
+<span id="1738">1738</span>
+<span id="1739">1739</span>
+<span id="1740">1740</span>
+<span id="1741">1741</span>
+<span id="1742">1742</span>
+<span id="1743">1743</span>
+<span id="1744">1744</span>
+<span id="1745">1745</span>
+<span id="1746">1746</span>
+<span id="1747">1747</span>
+<span id="1748">1748</span>
+<span id="1749">1749</span>
+<span id="1750">1750</span>
+<span id="1751">1751</span>
+<span id="1752">1752</span>
+<span id="1753">1753</span>
+<span id="1754">1754</span>
+<span id="1755">1755</span>
+<span id="1756">1756</span>
+<span id="1757">1757</span>
+<span id="1758">1758</span>
+<span id="1759">1759</span>
+<span id="1760">1760</span>
+<span id="1761">1761</span>
+<span id="1762">1762</span>
+<span id="1763">1763</span>
+<span id="1764">1764</span>
+<span id="1765">1765</span>
+<span id="1766">1766</span>
+<span id="1767">1767</span>
+<span id="1768">1768</span>
+<span id="1769">1769</span>
+<span id="1770">1770</span>
+<span id="1771">1771</span>
+<span id="1772">1772</span>
+<span id="1773">1773</span>
+<span id="1774">1774</span>
+<span id="1775">1775</span>
+<span id="1776">1776</span>
+<span id="1777">1777</span>
+<span id="1778">1778</span>
+<span id="1779">1779</span>
+<span id="1780">1780</span>
+<span id="1781">1781</span>
+<span id="1782">1782</span>
+<span id="1783">1783</span>
+<span id="1784">1784</span>
+<span id="1785">1785</span>
+<span id="1786">1786</span>
+<span id="1787">1787</span>
+<span id="1788">1788</span>
+<span id="1789">1789</span>
+<span id="1790">1790</span>
+<span id="1791">1791</span>
+<span id="1792">1792</span>
+<span id="1793">1793</span>
+<span id="1794">1794</span>
+<span id="1795">1795</span>
+<span id="1796">1796</span>
+<span id="1797">1797</span>
+<span id="1798">1798</span>
+<span id="1799">1799</span>
+<span id="1800">1800</span>
+<span id="1801">1801</span>
+<span id="1802">1802</span>
+<span id="1803">1803</span>
+<span id="1804">1804</span>
+<span id="1805">1805</span>
+<span id="1806">1806</span>
+<span id="1807">1807</span>
+<span id="1808">1808</span>
+<span id="1809">1809</span>
+<span id="1810">1810</span>
+<span id="1811">1811</span>
+<span id="1812">1812</span>
+<span id="1813">1813</span>
+<span id="1814">1814</span>
+<span id="1815">1815</span>
+<span id="1816">1816</span>
+<span id="1817">1817</span>
+<span id="1818">1818</span>
+<span id="1819">1819</span>
+<span id="1820">1820</span>
+<span id="1821">1821</span>
+<span id="1822">1822</span>
+<span id="1823">1823</span>
+<span id="1824">1824</span>
+<span id="1825">1825</span>
+<span id="1826">1826</span>
+<span id="1827">1827</span>
+<span id="1828">1828</span>
+<span id="1829">1829</span>
+<span id="1830">1830</span>
+<span id="1831">1831</span>
+<span id="1832">1832</span>
+<span id="1833">1833</span>
+<span id="1834">1834</span>
+</pre><pre class="rust"><code><span class="kw">use </span>core::iter::FromIterator;
+<span class="kw">use </span>core::mem::{<span class="self">self</span>, ManuallyDrop, MaybeUninit};
+<span class="kw">use </span>core::ops::{Deref, DerefMut};
+<span class="kw">use </span>core::ptr::{<span class="self">self</span>, NonNull};
+<span class="kw">use </span>core::{cmp, fmt, hash, isize, slice, usize};
+
+<span class="kw">use </span>alloc::{
+ borrow::{Borrow, BorrowMut},
+ boxed::Box,
+ string::String,
+ vec,
+ vec::Vec,
+};
+
+<span class="kw">use </span><span class="kw">crate</span>::buf::{IntoIter, UninitSlice};
+<span class="kw">use </span><span class="kw">crate</span>::bytes::Vtable;
+<span class="attr">#[allow(unused)]
+</span><span class="kw">use </span><span class="kw">crate</span>::loom::sync::atomic::AtomicMut;
+<span class="kw">use </span><span class="kw">crate</span>::loom::sync::atomic::{AtomicPtr, AtomicUsize, Ordering};
+<span class="kw">use crate</span>::{offset_from, Buf, BufMut, Bytes};
+
+<span class="doccomment">/// A unique reference to a contiguous slice of memory.
+///
+/// `BytesMut` represents a unique view into a potentially shared memory region.
+/// Given the uniqueness guarantee, owners of `BytesMut` handles are able to
+/// mutate the memory.
+///
+/// `BytesMut` can be thought of as containing a `buf: Arc&lt;Vec&lt;u8&gt;&gt;`, an offset
+/// into `buf`, a slice length, and a guarantee that no other `BytesMut` for the
+/// same `buf` overlaps with its slice. That guarantee means that a write lock
+/// is not required.
+///
+/// # Growth
+///
+/// `BytesMut`&#39;s `BufMut` implementation will implicitly grow its buffer as
+/// necessary. However, explicitly reserving the required space up-front before
+/// a series of inserts will be more efficient.
+///
+/// # Examples
+///
+/// ```
+/// use bytes::{BytesMut, BufMut};
+///
+/// let mut buf = BytesMut::with_capacity(64);
+///
+/// buf.put_u8(b&#39;h&#39;);
+/// buf.put_u8(b&#39;e&#39;);
+/// buf.put(&amp;b&quot;llo&quot;[..]);
+///
+/// assert_eq!(&amp;buf[..], b&quot;hello&quot;);
+///
+/// // Freeze the buffer so that it can be shared
+/// let a = buf.freeze();
+///
+/// // This does not allocate, instead `b` points to the same memory.
+/// let b = a.clone();
+///
+/// assert_eq!(&amp;a[..], b&quot;hello&quot;);
+/// assert_eq!(&amp;b[..], b&quot;hello&quot;);
+/// ```
+</span><span class="kw">pub struct </span>BytesMut {
+ ptr: NonNull&lt;u8&gt;,
+ len: usize,
+ cap: usize,
+ data: <span class="kw-2">*mut </span>Shared,
+}
+
+<span class="comment">// Thread-safe reference-counted container for the shared storage. This mostly
+// the same as `core::sync::Arc` but without the weak counter. The ref counting
+// fns are based on the ones found in `std`.
+//
+// The main reason to use `Shared` instead of `core::sync::Arc` is that it ends
+// up making the overall code simpler and easier to reason about. This is due to
+// some of the logic around setting `Inner::arc` and other ways the `arc` field
+// is used. Using `Arc` ended up requiring a number of funky transmutes and
+// other shenanigans to make it work.
+</span><span class="kw">struct </span>Shared {
+ vec: Vec&lt;u8&gt;,
+ original_capacity_repr: usize,
+ ref_count: AtomicUsize,
+}
+
+<span class="comment">// Assert that the alignment of `Shared` is divisible by 2.
+// This is a necessary invariant since we depend on allocating `Shared` a
+// shared object to implicitly carry the `KIND_ARC` flag in its pointer.
+// This flag is set when the LSB is 0.
+</span><span class="kw">const _</span>: [(); <span class="number">0 </span>- mem::align_of::&lt;Shared&gt;() % <span class="number">2</span>] = []; <span class="comment">// Assert that the alignment of `Shared` is divisible by 2.
+
+// Buffer storage strategy flags.
+</span><span class="kw">const </span>KIND_ARC: usize = <span class="number">0b0</span>;
+<span class="kw">const </span>KIND_VEC: usize = <span class="number">0b1</span>;
+<span class="kw">const </span>KIND_MASK: usize = <span class="number">0b1</span>;
+
+<span class="comment">// The max original capacity value. Any `Bytes` allocated with a greater initial
+// capacity will default to this.
+</span><span class="kw">const </span>MAX_ORIGINAL_CAPACITY_WIDTH: usize = <span class="number">17</span>;
+<span class="comment">// The original capacity algorithm will not take effect unless the originally
+// allocated capacity was at least 1kb in size.
+</span><span class="kw">const </span>MIN_ORIGINAL_CAPACITY_WIDTH: usize = <span class="number">10</span>;
+<span class="comment">// The original capacity is stored in powers of 2 starting at 1kb to a max of
+// 64kb. Representing it as such requires only 3 bits of storage.
+</span><span class="kw">const </span>ORIGINAL_CAPACITY_MASK: usize = <span class="number">0b11100</span>;
+<span class="kw">const </span>ORIGINAL_CAPACITY_OFFSET: usize = <span class="number">2</span>;
+
+<span class="kw">const </span>VEC_POS_OFFSET: usize = <span class="number">5</span>;
+<span class="comment">// When the storage is in the `Vec` representation, the pointer can be advanced
+// at most this value. This is due to the amount of storage available to track
+// the offset is usize - number of KIND bits and number of ORIGINAL_CAPACITY
+// bits.
+</span><span class="kw">const </span>MAX_VEC_POS: usize = usize::MAX &gt;&gt; VEC_POS_OFFSET;
+<span class="kw">const </span>NOT_VEC_POS_MASK: usize = <span class="number">0b11111</span>;
+
+<span class="attr">#[cfg(target_pointer_width = <span class="string">&quot;64&quot;</span>)]
+</span><span class="kw">const </span>PTR_WIDTH: usize = <span class="number">64</span>;
+<span class="attr">#[cfg(target_pointer_width = <span class="string">&quot;32&quot;</span>)]
+</span><span class="kw">const </span>PTR_WIDTH: usize = <span class="number">32</span>;
+
+<span class="comment">/*
+ *
+ * ===== BytesMut =====
+ *
+ */
+
+</span><span class="kw">impl </span>BytesMut {
+ <span class="doccomment">/// Creates a new `BytesMut` with the specified capacity.
+ ///
+ /// The returned `BytesMut` will be able to hold at least `capacity` bytes
+ /// without reallocating.
+ ///
+ /// It is important to note that this function does not specify the length
+ /// of the returned `BytesMut`, but only the capacity.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::{BytesMut, BufMut};
+ ///
+ /// let mut bytes = BytesMut::with_capacity(64);
+ ///
+ /// // `bytes` contains no data, even though there is capacity
+ /// assert_eq!(bytes.len(), 0);
+ ///
+ /// bytes.put(&amp;b&quot;hello world&quot;[..]);
+ ///
+ /// assert_eq!(&amp;bytes[..], b&quot;hello world&quot;);
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">pub fn </span>with_capacity(capacity: usize) -&gt; BytesMut {
+ BytesMut::from_vec(Vec::with_capacity(capacity))
+ }
+
+ <span class="doccomment">/// Creates a new `BytesMut` with default capacity.
+ ///
+ /// Resulting object has length 0 and unspecified capacity.
+ /// This function does not allocate.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::{BytesMut, BufMut};
+ ///
+ /// let mut bytes = BytesMut::new();
+ ///
+ /// assert_eq!(0, bytes.len());
+ ///
+ /// bytes.reserve(2);
+ /// bytes.put_slice(b&quot;xy&quot;);
+ ///
+ /// assert_eq!(&amp;b&quot;xy&quot;[..], &amp;bytes[..]);
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">pub fn </span>new() -&gt; BytesMut {
+ BytesMut::with_capacity(<span class="number">0</span>)
+ }
+
+ <span class="doccomment">/// Returns the number of bytes contained in this `BytesMut`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BytesMut;
+ ///
+ /// let b = BytesMut::from(&amp;b&quot;hello&quot;[..]);
+ /// assert_eq!(b.len(), 5);
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">pub fn </span>len(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
+ <span class="self">self</span>.len
+ }
+
+ <span class="doccomment">/// Returns true if the `BytesMut` has a length of 0.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BytesMut;
+ ///
+ /// let b = BytesMut::with_capacity(64);
+ /// assert!(b.is_empty());
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">pub fn </span>is_empty(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; bool {
+ <span class="self">self</span>.len == <span class="number">0
+ </span>}
+
+ <span class="doccomment">/// Returns the number of bytes the `BytesMut` can hold without reallocating.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BytesMut;
+ ///
+ /// let b = BytesMut::with_capacity(64);
+ /// assert_eq!(b.capacity(), 64);
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">pub fn </span>capacity(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
+ <span class="self">self</span>.cap
+ }
+
+ <span class="doccomment">/// Converts `self` into an immutable `Bytes`.
+ ///
+ /// The conversion is zero cost and is used to indicate that the slice
+ /// referenced by the handle will no longer be mutated. Once the conversion
+ /// is done, the handle can be cloned and shared across threads.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::{BytesMut, BufMut};
+ /// use std::thread;
+ ///
+ /// let mut b = BytesMut::with_capacity(64);
+ /// b.put(&amp;b&quot;hello world&quot;[..]);
+ /// let b1 = b.freeze();
+ /// let b2 = b1.clone();
+ ///
+ /// let th = thread::spawn(move || {
+ /// assert_eq!(&amp;b1[..], b&quot;hello world&quot;);
+ /// });
+ ///
+ /// assert_eq!(&amp;b2[..], b&quot;hello world&quot;);
+ /// th.join().unwrap();
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">pub fn </span>freeze(<span class="self">self</span>) -&gt; Bytes {
+ <span class="kw">let </span>bytes = ManuallyDrop::new(<span class="self">self</span>);
+ <span class="kw">if </span>bytes.kind() == KIND_VEC {
+ <span class="comment">// Just re-use `Bytes` internal Vec vtable
+ </span><span class="kw">unsafe </span>{
+ <span class="kw">let </span>off = bytes.get_vec_pos();
+ <span class="kw">let </span>vec = rebuild_vec(bytes.ptr.as_ptr(), bytes.len, bytes.cap, off);
+ <span class="kw">let </span><span class="kw-2">mut </span>b: Bytes = vec.into();
+ b.advance(off);
+ b
+ }
+ } <span class="kw">else </span>{
+ <span class="macro">debug_assert_eq!</span>(bytes.kind(), KIND_ARC);
+
+ <span class="kw">let </span>ptr = bytes.ptr.as_ptr();
+ <span class="kw">let </span>len = bytes.len;
+ <span class="kw">let </span>data = AtomicPtr::new(bytes.data.cast());
+ <span class="kw">unsafe </span>{ Bytes::with_vtable(ptr, len, data, <span class="kw-2">&amp;</span>SHARED_VTABLE) }
+ }
+ }
+
+ <span class="doccomment">/// Creates a new `BytesMut`, which is initialized with zero.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BytesMut;
+ ///
+ /// let zeros = BytesMut::zeroed(42);
+ ///
+ /// assert_eq!(zeros.len(), 42);
+ /// zeros.into_iter().for_each(|x| assert_eq!(x, 0));
+ /// ```
+ </span><span class="kw">pub fn </span>zeroed(len: usize) -&gt; BytesMut {
+ BytesMut::from_vec(<span class="macro">vec!</span>[<span class="number">0</span>; len])
+ }
+
+ <span class="doccomment">/// Splits the bytes into two at the given index.
+ ///
+ /// Afterwards `self` contains elements `[0, at)`, and the returned
+ /// `BytesMut` contains elements `[at, capacity)`.
+ ///
+ /// This is an `O(1)` operation that just increases the reference count
+ /// and sets a few indices.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BytesMut;
+ ///
+ /// let mut a = BytesMut::from(&amp;b&quot;hello world&quot;[..]);
+ /// let mut b = a.split_off(5);
+ ///
+ /// a[0] = b&#39;j&#39;;
+ /// b[0] = b&#39;!&#39;;
+ ///
+ /// assert_eq!(&amp;a[..], b&quot;jello&quot;);
+ /// assert_eq!(&amp;b[..], b&quot;!world&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// Panics if `at &gt; capacity`.
+ </span><span class="attr">#[must_use = <span class="string">&quot;consider BytesMut::truncate if you don&#39;t need the other half&quot;</span>]
+ </span><span class="kw">pub fn </span>split_off(<span class="kw-2">&amp;mut </span><span class="self">self</span>, at: usize) -&gt; BytesMut {
+ <span class="macro">assert!</span>(
+ at &lt;= <span class="self">self</span>.capacity(),
+ <span class="string">&quot;split_off out of bounds: {:?} &lt;= {:?}&quot;</span>,
+ at,
+ <span class="self">self</span>.capacity(),
+ );
+ <span class="kw">unsafe </span>{
+ <span class="kw">let </span><span class="kw-2">mut </span>other = <span class="self">self</span>.shallow_clone();
+ <span class="comment">// SAFETY: We&#39;ve checked that `at` &lt;= `self.capacity()` above.
+ </span>other.advance_unchecked(at);
+ <span class="self">self</span>.cap = at;
+ <span class="self">self</span>.len = cmp::min(<span class="self">self</span>.len, at);
+ other
+ }
+ }
+
+ <span class="doccomment">/// Removes the bytes from the current view, returning them in a new
+ /// `BytesMut` handle.
+ ///
+ /// Afterwards, `self` will be empty, but will retain any additional
+ /// capacity that it had before the operation. This is identical to
+ /// `self.split_to(self.len())`.
+ ///
+ /// This is an `O(1)` operation that just increases the reference count and
+ /// sets a few indices.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::{BytesMut, BufMut};
+ ///
+ /// let mut buf = BytesMut::with_capacity(1024);
+ /// buf.put(&amp;b&quot;hello world&quot;[..]);
+ ///
+ /// let other = buf.split();
+ ///
+ /// assert!(buf.is_empty());
+ /// assert_eq!(1013, buf.capacity());
+ ///
+ /// assert_eq!(other, b&quot;hello world&quot;[..]);
+ /// ```
+ </span><span class="attr">#[must_use = <span class="string">&quot;consider BytesMut::clear if you don&#39;t need the other half&quot;</span>]
+ </span><span class="kw">pub fn </span>split(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; BytesMut {
+ <span class="kw">let </span>len = <span class="self">self</span>.len();
+ <span class="self">self</span>.split_to(len)
+ }
+
+ <span class="doccomment">/// Splits the buffer into two at the given index.
+ ///
+ /// Afterwards `self` contains elements `[at, len)`, and the returned `BytesMut`
+ /// contains elements `[0, at)`.
+ ///
+ /// This is an `O(1)` operation that just increases the reference count and
+ /// sets a few indices.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BytesMut;
+ ///
+ /// let mut a = BytesMut::from(&amp;b&quot;hello world&quot;[..]);
+ /// let mut b = a.split_to(5);
+ ///
+ /// a[0] = b&#39;!&#39;;
+ /// b[0] = b&#39;j&#39;;
+ ///
+ /// assert_eq!(&amp;a[..], b&quot;!world&quot;);
+ /// assert_eq!(&amp;b[..], b&quot;jello&quot;);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// Panics if `at &gt; len`.
+ </span><span class="attr">#[must_use = <span class="string">&quot;consider BytesMut::advance if you don&#39;t need the other half&quot;</span>]
+ </span><span class="kw">pub fn </span>split_to(<span class="kw-2">&amp;mut </span><span class="self">self</span>, at: usize) -&gt; BytesMut {
+ <span class="macro">assert!</span>(
+ at &lt;= <span class="self">self</span>.len(),
+ <span class="string">&quot;split_to out of bounds: {:?} &lt;= {:?}&quot;</span>,
+ at,
+ <span class="self">self</span>.len(),
+ );
+
+ <span class="kw">unsafe </span>{
+ <span class="kw">let </span><span class="kw-2">mut </span>other = <span class="self">self</span>.shallow_clone();
+ <span class="comment">// SAFETY: We&#39;ve checked that `at` &lt;= `self.len()` and we know that `self.len()` &lt;=
+ // `self.capacity()`.
+ </span><span class="self">self</span>.advance_unchecked(at);
+ other.cap = at;
+ other.len = at;
+ other
+ }
+ }
+
+ <span class="doccomment">/// Shortens the buffer, keeping the first `len` bytes and dropping the
+ /// rest.
+ ///
+ /// If `len` is greater than the buffer&#39;s current length, this has no
+ /// effect.
+ ///
+ /// Existing underlying capacity is preserved.
+ ///
+ /// The [split_off](`Self::split_off()`) method can emulate `truncate`, but this causes the
+ /// excess bytes to be returned instead of dropped.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BytesMut;
+ ///
+ /// let mut buf = BytesMut::from(&amp;b&quot;hello world&quot;[..]);
+ /// buf.truncate(5);
+ /// assert_eq!(buf, b&quot;hello&quot;[..]);
+ /// ```
+ </span><span class="kw">pub fn </span>truncate(<span class="kw-2">&amp;mut </span><span class="self">self</span>, len: usize) {
+ <span class="kw">if </span>len &lt;= <span class="self">self</span>.len() {
+ <span class="comment">// SAFETY: Shrinking the buffer cannot expose uninitialized bytes.
+ </span><span class="kw">unsafe </span>{ <span class="self">self</span>.set_len(len) };
+ }
+ }
+
+ <span class="doccomment">/// Clears the buffer, removing all data. Existing capacity is preserved.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BytesMut;
+ ///
+ /// let mut buf = BytesMut::from(&amp;b&quot;hello world&quot;[..]);
+ /// buf.clear();
+ /// assert!(buf.is_empty());
+ /// ```
+ </span><span class="kw">pub fn </span>clear(<span class="kw-2">&amp;mut </span><span class="self">self</span>) {
+ <span class="comment">// SAFETY: Setting the length to zero cannot expose uninitialized bytes.
+ </span><span class="kw">unsafe </span>{ <span class="self">self</span>.set_len(<span class="number">0</span>) };
+ }
+
+ <span class="doccomment">/// Resizes the buffer so that `len` is equal to `new_len`.
+ ///
+ /// If `new_len` is greater than `len`, the buffer is extended by the
+ /// difference with each additional byte set to `value`. If `new_len` is
+ /// less than `len`, the buffer is simply truncated.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BytesMut;
+ ///
+ /// let mut buf = BytesMut::new();
+ ///
+ /// buf.resize(3, 0x1);
+ /// assert_eq!(&amp;buf[..], &amp;[0x1, 0x1, 0x1]);
+ ///
+ /// buf.resize(2, 0x2);
+ /// assert_eq!(&amp;buf[..], &amp;[0x1, 0x1]);
+ ///
+ /// buf.resize(4, 0x3);
+ /// assert_eq!(&amp;buf[..], &amp;[0x1, 0x1, 0x3, 0x3]);
+ /// ```
+ </span><span class="kw">pub fn </span>resize(<span class="kw-2">&amp;mut </span><span class="self">self</span>, new_len: usize, value: u8) {
+ <span class="kw">let </span>additional = <span class="kw">if let </span><span class="prelude-val">Some</span>(additional) = new_len.checked_sub(<span class="self">self</span>.len()) {
+ additional
+ } <span class="kw">else </span>{
+ <span class="self">self</span>.truncate(new_len);
+ <span class="kw">return</span>;
+ };
+
+ <span class="kw">if </span>additional == <span class="number">0 </span>{
+ <span class="kw">return</span>;
+ }
+
+ <span class="self">self</span>.reserve(additional);
+ <span class="kw">let </span>dst = <span class="self">self</span>.spare_capacity_mut().as_mut_ptr();
+ <span class="comment">// SAFETY: `spare_capacity_mut` returns a valid, properly aligned pointer and we&#39;ve
+ // reserved enough space to write `additional` bytes.
+ </span><span class="kw">unsafe </span>{ ptr::write_bytes(dst, value, additional) };
+
+ <span class="comment">// SAFETY: There are at least `new_len` initialized bytes in the buffer so no
+ // uninitialized bytes are being exposed.
+ </span><span class="kw">unsafe </span>{ <span class="self">self</span>.set_len(new_len) };
+ }
+
+ <span class="doccomment">/// Sets the length of the buffer.
+ ///
+ /// This will explicitly set the size of the buffer without actually
+ /// modifying the data, so it is up to the caller to ensure that the data
+ /// has been initialized.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BytesMut;
+ ///
+ /// let mut b = BytesMut::from(&amp;b&quot;hello world&quot;[..]);
+ ///
+ /// unsafe {
+ /// b.set_len(5);
+ /// }
+ ///
+ /// assert_eq!(&amp;b[..], b&quot;hello&quot;);
+ ///
+ /// unsafe {
+ /// b.set_len(11);
+ /// }
+ ///
+ /// assert_eq!(&amp;b[..], b&quot;hello world&quot;);
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">pub unsafe fn </span>set_len(<span class="kw-2">&amp;mut </span><span class="self">self</span>, len: usize) {
+ <span class="macro">debug_assert!</span>(len &lt;= <span class="self">self</span>.cap, <span class="string">&quot;set_len out of bounds&quot;</span>);
+ <span class="self">self</span>.len = len;
+ }
+
+ <span class="doccomment">/// Reserves capacity for at least `additional` more bytes to be inserted
+ /// into the given `BytesMut`.
+ ///
+ /// More than `additional` bytes may be reserved in order to avoid frequent
+ /// reallocations. A call to `reserve` may result in an allocation.
+ ///
+ /// Before allocating new buffer space, the function will attempt to reclaim
+ /// space in the existing buffer. If the current handle references a view
+ /// into a larger original buffer, and all other handles referencing part
+ /// of the same original buffer have been dropped, then the current view
+ /// can be copied/shifted to the front of the buffer and the handle can take
+ /// ownership of the full buffer, provided that the full buffer is large
+ /// enough to fit the requested additional capacity.
+ ///
+ /// This optimization will only happen if shifting the data from the current
+ /// view to the front of the buffer is not too expensive in terms of the
+ /// (amortized) time required. The precise condition is subject to change;
+ /// as of now, the length of the data being shifted needs to be at least as
+ /// large as the distance that it&#39;s shifted by. If the current view is empty
+ /// and the original buffer is large enough to fit the requested additional
+ /// capacity, then reallocations will never happen.
+ ///
+ /// # Examples
+ ///
+ /// In the following example, a new buffer is allocated.
+ ///
+ /// ```
+ /// use bytes::BytesMut;
+ ///
+ /// let mut buf = BytesMut::from(&amp;b&quot;hello&quot;[..]);
+ /// buf.reserve(64);
+ /// assert!(buf.capacity() &gt;= 69);
+ /// ```
+ ///
+ /// In the following example, the existing buffer is reclaimed.
+ ///
+ /// ```
+ /// use bytes::{BytesMut, BufMut};
+ ///
+ /// let mut buf = BytesMut::with_capacity(128);
+ /// buf.put(&amp;[0; 64][..]);
+ ///
+ /// let ptr = buf.as_ptr();
+ /// let other = buf.split();
+ ///
+ /// assert!(buf.is_empty());
+ /// assert_eq!(buf.capacity(), 64);
+ ///
+ /// drop(other);
+ /// buf.reserve(128);
+ ///
+ /// assert_eq!(buf.capacity(), 128);
+ /// assert_eq!(buf.as_ptr(), ptr);
+ /// ```
+ ///
+ /// # Panics
+ ///
+ /// Panics if the new capacity overflows `usize`.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">pub fn </span>reserve(<span class="kw-2">&amp;mut </span><span class="self">self</span>, additional: usize) {
+ <span class="kw">let </span>len = <span class="self">self</span>.len();
+ <span class="kw">let </span>rem = <span class="self">self</span>.capacity() - len;
+
+ <span class="kw">if </span>additional &lt;= rem {
+ <span class="comment">// The handle can already store at least `additional` more bytes, so
+ // there is no further work needed to be done.
+ </span><span class="kw">return</span>;
+ }
+
+ <span class="self">self</span>.reserve_inner(additional);
+ }
+
+ <span class="comment">// In separate function to allow the short-circuits in `reserve` to
+ // be inline-able. Significant helps performance.
+ </span><span class="kw">fn </span>reserve_inner(<span class="kw-2">&amp;mut </span><span class="self">self</span>, additional: usize) {
+ <span class="kw">let </span>len = <span class="self">self</span>.len();
+ <span class="kw">let </span>kind = <span class="self">self</span>.kind();
+
+ <span class="kw">if </span>kind == KIND_VEC {
+ <span class="comment">// If there&#39;s enough free space before the start of the buffer, then
+ // just copy the data backwards and reuse the already-allocated
+ // space.
+ //
+ // Otherwise, since backed by a vector, use `Vec::reserve`
+ //
+ // We need to make sure that this optimization does not kill the
+ // amortized runtimes of BytesMut&#39;s operations.
+ </span><span class="kw">unsafe </span>{
+ <span class="kw">let </span>off = <span class="self">self</span>.get_vec_pos();
+
+ <span class="comment">// Only reuse space if we can satisfy the requested additional space.
+ //
+ // Also check if the value of `off` suggests that enough bytes
+ // have been read to account for the overhead of shifting all
+ // the data (in an amortized analysis).
+ // Hence the condition `off &gt;= self.len()`.
+ //
+ // This condition also already implies that the buffer is going
+ // to be (at least) half-empty in the end; so we do not break
+ // the (amortized) runtime with future resizes of the underlying
+ // `Vec`.
+ //
+ // [For more details check issue #524, and PR #525.]
+ </span><span class="kw">if </span><span class="self">self</span>.capacity() - <span class="self">self</span>.len() + off &gt;= additional &amp;&amp; off &gt;= <span class="self">self</span>.len() {
+ <span class="comment">// There&#39;s enough space, and it&#39;s not too much overhead:
+ // reuse the space!
+ //
+ // Just move the pointer back to the start after copying
+ // data back.
+ </span><span class="kw">let </span>base_ptr = <span class="self">self</span>.ptr.as_ptr().sub(off);
+ <span class="comment">// Since `off &gt;= self.len()`, the two regions don&#39;t overlap.
+ </span>ptr::copy_nonoverlapping(<span class="self">self</span>.ptr.as_ptr(), base_ptr, <span class="self">self</span>.len);
+ <span class="self">self</span>.ptr = vptr(base_ptr);
+ <span class="self">self</span>.set_vec_pos(<span class="number">0</span>);
+
+ <span class="comment">// Length stays constant, but since we moved backwards we
+ // can gain capacity back.
+ </span><span class="self">self</span>.cap += off;
+ } <span class="kw">else </span>{
+ <span class="comment">// Not enough space, or reusing might be too much overhead:
+ // allocate more space!
+ </span><span class="kw">let </span><span class="kw-2">mut </span>v =
+ ManuallyDrop::new(rebuild_vec(<span class="self">self</span>.ptr.as_ptr(), <span class="self">self</span>.len, <span class="self">self</span>.cap, off));
+ v.reserve(additional);
+
+ <span class="comment">// Update the info
+ </span><span class="self">self</span>.ptr = vptr(v.as_mut_ptr().add(off));
+ <span class="self">self</span>.cap = v.capacity() - off;
+ <span class="macro">debug_assert_eq!</span>(<span class="self">self</span>.len, v.len() - off);
+ }
+
+ <span class="kw">return</span>;
+ }
+ }
+
+ <span class="macro">debug_assert_eq!</span>(kind, KIND_ARC);
+ <span class="kw">let </span>shared: <span class="kw-2">*mut </span>Shared = <span class="self">self</span>.data;
+
+ <span class="comment">// Reserving involves abandoning the currently shared buffer and
+ // allocating a new vector with the requested capacity.
+ //
+ // Compute the new capacity
+ </span><span class="kw">let </span><span class="kw-2">mut </span>new_cap = len.checked_add(additional).expect(<span class="string">&quot;overflow&quot;</span>);
+
+ <span class="kw">unsafe </span>{
+ <span class="comment">// First, try to reclaim the buffer. This is possible if the current
+ // handle is the only outstanding handle pointing to the buffer.
+ </span><span class="kw">if </span>(<span class="kw-2">*</span>shared).is_unique() {
+ <span class="comment">// This is the only handle to the buffer. It can be reclaimed.
+ // However, before doing the work of copying data, check to make
+ // sure that the vector has enough capacity.
+ </span><span class="kw">let </span>v = <span class="kw-2">&amp;mut </span>(<span class="kw-2">*</span>shared).vec;
+
+ <span class="kw">let </span>v_capacity = v.capacity();
+ <span class="kw">let </span>ptr = v.as_mut_ptr();
+
+ <span class="kw">let </span>offset = offset_from(<span class="self">self</span>.ptr.as_ptr(), ptr);
+
+ <span class="comment">// Compare the condition in the `kind == KIND_VEC` case above
+ // for more details.
+ </span><span class="kw">if </span>v_capacity &gt;= new_cap + offset {
+ <span class="self">self</span>.cap = new_cap;
+ <span class="comment">// no copy is necessary
+ </span>} <span class="kw">else if </span>v_capacity &gt;= new_cap &amp;&amp; offset &gt;= len {
+ <span class="comment">// The capacity is sufficient, and copying is not too much
+ // overhead: reclaim the buffer!
+
+ // `offset &gt;= len` means: no overlap
+ </span>ptr::copy_nonoverlapping(<span class="self">self</span>.ptr.as_ptr(), ptr, len);
+
+ <span class="self">self</span>.ptr = vptr(ptr);
+ <span class="self">self</span>.cap = v.capacity();
+ } <span class="kw">else </span>{
+ <span class="comment">// calculate offset
+ </span><span class="kw">let </span>off = (<span class="self">self</span>.ptr.as_ptr() <span class="kw">as </span>usize) - (v.as_ptr() <span class="kw">as </span>usize);
+
+ <span class="comment">// new_cap is calculated in terms of `BytesMut`, not the underlying
+ // `Vec`, so it does not take the offset into account.
+ //
+ // Thus we have to manually add it here.
+ </span>new_cap = new_cap.checked_add(off).expect(<span class="string">&quot;overflow&quot;</span>);
+
+ <span class="comment">// The vector capacity is not sufficient. The reserve request is
+ // asking for more than the initial buffer capacity. Allocate more
+ // than requested if `new_cap` is not much bigger than the current
+ // capacity.
+ //
+ // There are some situations, using `reserve_exact` that the
+ // buffer capacity could be below `original_capacity`, so do a
+ // check.
+ </span><span class="kw">let </span>double = v.capacity().checked_shl(<span class="number">1</span>).unwrap_or(new_cap);
+
+ new_cap = cmp::max(double, new_cap);
+
+ <span class="comment">// No space - allocate more
+ //
+ // The length field of `Shared::vec` is not used by the `BytesMut`;
+ // instead we use the `len` field in the `BytesMut` itself. However,
+ // when calling `reserve`, it doesn&#39;t guarantee that data stored in
+ // the unused capacity of the vector is copied over to the new
+ // allocation, so we need to ensure that we don&#39;t have any data we
+ // care about in the unused capacity before calling `reserve`.
+ </span><span class="macro">debug_assert!</span>(off + len &lt;= v.capacity());
+ v.set_len(off + len);
+ v.reserve(new_cap - v.len());
+
+ <span class="comment">// Update the info
+ </span><span class="self">self</span>.ptr = vptr(v.as_mut_ptr().add(off));
+ <span class="self">self</span>.cap = v.capacity() - off;
+ }
+
+ <span class="kw">return</span>;
+ }
+ }
+
+ <span class="kw">let </span>original_capacity_repr = <span class="kw">unsafe </span>{ (<span class="kw-2">*</span>shared).original_capacity_repr };
+ <span class="kw">let </span>original_capacity = original_capacity_from_repr(original_capacity_repr);
+
+ new_cap = cmp::max(new_cap, original_capacity);
+
+ <span class="comment">// Create a new vector to store the data
+ </span><span class="kw">let </span><span class="kw-2">mut </span>v = ManuallyDrop::new(Vec::with_capacity(new_cap));
+
+ <span class="comment">// Copy the bytes
+ </span>v.extend_from_slice(<span class="self">self</span>.as_ref());
+
+ <span class="comment">// Release the shared handle. This must be done *after* the bytes are
+ // copied.
+ </span><span class="kw">unsafe </span>{ release_shared(shared) };
+
+ <span class="comment">// Update self
+ </span><span class="kw">let </span>data = (original_capacity_repr &lt;&lt; ORIGINAL_CAPACITY_OFFSET) | KIND_VEC;
+ <span class="self">self</span>.data = invalid_ptr(data);
+ <span class="self">self</span>.ptr = vptr(v.as_mut_ptr());
+ <span class="self">self</span>.cap = v.capacity();
+ <span class="macro">debug_assert_eq!</span>(<span class="self">self</span>.len, v.len());
+ }
+
+ <span class="doccomment">/// Appends given bytes to this `BytesMut`.
+ ///
+ /// If this `BytesMut` object does not have enough capacity, it is resized
+ /// first.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BytesMut;
+ ///
+ /// let mut buf = BytesMut::with_capacity(0);
+ /// buf.extend_from_slice(b&quot;aaabbb&quot;);
+ /// buf.extend_from_slice(b&quot;cccddd&quot;);
+ ///
+ /// assert_eq!(b&quot;aaabbbcccddd&quot;, &amp;buf[..]);
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">pub fn </span>extend_from_slice(<span class="kw-2">&amp;mut </span><span class="self">self</span>, extend: <span class="kw-2">&amp;</span>[u8]) {
+ <span class="kw">let </span>cnt = extend.len();
+ <span class="self">self</span>.reserve(cnt);
+
+ <span class="kw">unsafe </span>{
+ <span class="kw">let </span>dst = <span class="self">self</span>.spare_capacity_mut();
+ <span class="comment">// Reserved above
+ </span><span class="macro">debug_assert!</span>(dst.len() &gt;= cnt);
+
+ ptr::copy_nonoverlapping(extend.as_ptr(), dst.as_mut_ptr().cast(), cnt);
+ }
+
+ <span class="kw">unsafe </span>{
+ <span class="self">self</span>.advance_mut(cnt);
+ }
+ }
+
+ <span class="doccomment">/// Absorbs a `BytesMut` that was previously split off.
+ ///
+ /// If the two `BytesMut` objects were previously contiguous and not mutated
+ /// in a way that causes re-allocation i.e., if `other` was created by
+ /// calling `split_off` on this `BytesMut`, then this is an `O(1)` operation
+ /// that just decreases a reference count and sets a few indices.
+ /// Otherwise this method degenerates to
+ /// `self.extend_from_slice(other.as_ref())`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BytesMut;
+ ///
+ /// let mut buf = BytesMut::with_capacity(64);
+ /// buf.extend_from_slice(b&quot;aaabbbcccddd&quot;);
+ ///
+ /// let split = buf.split_off(6);
+ /// assert_eq!(b&quot;aaabbb&quot;, &amp;buf[..]);
+ /// assert_eq!(b&quot;cccddd&quot;, &amp;split[..]);
+ ///
+ /// buf.unsplit(split);
+ /// assert_eq!(b&quot;aaabbbcccddd&quot;, &amp;buf[..]);
+ /// ```
+ </span><span class="kw">pub fn </span>unsplit(<span class="kw-2">&amp;mut </span><span class="self">self</span>, other: BytesMut) {
+ <span class="kw">if </span><span class="self">self</span>.is_empty() {
+ <span class="kw-2">*</span><span class="self">self </span>= other;
+ <span class="kw">return</span>;
+ }
+
+ <span class="kw">if let </span><span class="prelude-val">Err</span>(other) = <span class="self">self</span>.try_unsplit(other) {
+ <span class="self">self</span>.extend_from_slice(other.as_ref());
+ }
+ }
+
+ <span class="comment">// private
+
+ // For now, use a `Vec` to manage the memory for us, but we may want to
+ // change that in the future to some alternate allocator strategy.
+ //
+ // Thus, we don&#39;t expose an easy way to construct from a `Vec` since an
+ // internal change could make a simple pattern (`BytesMut::from(vec)`)
+ // suddenly a lot more expensive.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>from_vec(vec: Vec&lt;u8&gt;) -&gt; BytesMut {
+ <span class="kw">let </span><span class="kw-2">mut </span>vec = ManuallyDrop::new(vec);
+ <span class="kw">let </span>ptr = vptr(vec.as_mut_ptr());
+ <span class="kw">let </span>len = vec.len();
+ <span class="kw">let </span>cap = vec.capacity();
+
+ <span class="kw">let </span>original_capacity_repr = original_capacity_to_repr(cap);
+ <span class="kw">let </span>data = (original_capacity_repr &lt;&lt; ORIGINAL_CAPACITY_OFFSET) | KIND_VEC;
+
+ BytesMut {
+ ptr,
+ len,
+ cap,
+ data: invalid_ptr(data),
+ }
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>as_slice(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>[u8] {
+ <span class="kw">unsafe </span>{ slice::from_raw_parts(<span class="self">self</span>.ptr.as_ptr(), <span class="self">self</span>.len) }
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>as_slice_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;mut </span>[u8] {
+ <span class="kw">unsafe </span>{ slice::from_raw_parts_mut(<span class="self">self</span>.ptr.as_ptr(), <span class="self">self</span>.len) }
+ }
+
+ <span class="doccomment">/// Advance the buffer without bounds checking.
+ ///
+ /// # SAFETY
+ ///
+ /// The caller must ensure that `count` &lt;= `self.cap`.
+ </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">unsafe fn </span>advance_unchecked(<span class="kw-2">&amp;mut </span><span class="self">self</span>, count: usize) {
+ <span class="comment">// Setting the start to 0 is a no-op, so return early if this is the
+ // case.
+ </span><span class="kw">if </span>count == <span class="number">0 </span>{
+ <span class="kw">return</span>;
+ }
+
+ <span class="macro">debug_assert!</span>(count &lt;= <span class="self">self</span>.cap, <span class="string">&quot;internal: set_start out of bounds&quot;</span>);
+
+ <span class="kw">let </span>kind = <span class="self">self</span>.kind();
+
+ <span class="kw">if </span>kind == KIND_VEC {
+ <span class="comment">// Setting the start when in vec representation is a little more
+ // complicated. First, we have to track how far ahead the
+ // &quot;start&quot; of the byte buffer from the beginning of the vec. We
+ // also have to ensure that we don&#39;t exceed the maximum shift.
+ </span><span class="kw">let </span>pos = <span class="self">self</span>.get_vec_pos() + count;
+
+ <span class="kw">if </span>pos &lt;= MAX_VEC_POS {
+ <span class="self">self</span>.set_vec_pos(pos);
+ } <span class="kw">else </span>{
+ <span class="comment">// The repr must be upgraded to ARC. This will never happen
+ // on 64 bit systems and will only happen on 32 bit systems
+ // when shifting past 134,217,727 bytes. As such, we don&#39;t
+ // worry too much about performance here.
+ </span><span class="self">self</span>.promote_to_shared(<span class="comment">/*ref_count = */ </span><span class="number">1</span>);
+ }
+ }
+
+ <span class="comment">// Updating the start of the view is setting `ptr` to point to the
+ // new start and updating the `len` field to reflect the new length
+ // of the view.
+ </span><span class="self">self</span>.ptr = vptr(<span class="self">self</span>.ptr.as_ptr().add(count));
+ <span class="self">self</span>.len = <span class="self">self</span>.len.checked_sub(count).unwrap_or(<span class="number">0</span>);
+ <span class="self">self</span>.cap -= count;
+ }
+
+ <span class="kw">fn </span>try_unsplit(<span class="kw-2">&amp;mut </span><span class="self">self</span>, other: BytesMut) -&gt; <span class="prelude-ty">Result</span>&lt;(), BytesMut&gt; {
+ <span class="kw">if </span>other.capacity() == <span class="number">0 </span>{
+ <span class="kw">return </span><span class="prelude-val">Ok</span>(());
+ }
+
+ <span class="kw">let </span>ptr = <span class="kw">unsafe </span>{ <span class="self">self</span>.ptr.as_ptr().add(<span class="self">self</span>.len) };
+ <span class="kw">if </span>ptr == other.ptr.as_ptr()
+ &amp;&amp; <span class="self">self</span>.kind() == KIND_ARC
+ &amp;&amp; other.kind() == KIND_ARC
+ &amp;&amp; <span class="self">self</span>.data == other.data
+ {
+ <span class="comment">// Contiguous blocks, just combine directly
+ </span><span class="self">self</span>.len += other.len;
+ <span class="self">self</span>.cap += other.cap;
+ <span class="prelude-val">Ok</span>(())
+ } <span class="kw">else </span>{
+ <span class="prelude-val">Err</span>(other)
+ }
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>kind(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
+ <span class="self">self</span>.data <span class="kw">as </span>usize &amp; KIND_MASK
+ }
+
+ <span class="kw">unsafe fn </span>promote_to_shared(<span class="kw-2">&amp;mut </span><span class="self">self</span>, ref_cnt: usize) {
+ <span class="macro">debug_assert_eq!</span>(<span class="self">self</span>.kind(), KIND_VEC);
+ <span class="macro">debug_assert!</span>(ref_cnt == <span class="number">1 </span>|| ref_cnt == <span class="number">2</span>);
+
+ <span class="kw">let </span>original_capacity_repr =
+ (<span class="self">self</span>.data <span class="kw">as </span>usize &amp; ORIGINAL_CAPACITY_MASK) &gt;&gt; ORIGINAL_CAPACITY_OFFSET;
+
+ <span class="comment">// The vec offset cannot be concurrently mutated, so there
+ // should be no danger reading it.
+ </span><span class="kw">let </span>off = (<span class="self">self</span>.data <span class="kw">as </span>usize) &gt;&gt; VEC_POS_OFFSET;
+
+ <span class="comment">// First, allocate a new `Shared` instance containing the
+ // `Vec` fields. It&#39;s important to note that `ptr`, `len`,
+ // and `cap` cannot be mutated without having `&amp;mut self`.
+ // This means that these fields will not be concurrently
+ // updated and since the buffer hasn&#39;t been promoted to an
+ // `Arc`, those three fields still are the components of the
+ // vector.
+ </span><span class="kw">let </span>shared = Box::new(Shared {
+ vec: rebuild_vec(<span class="self">self</span>.ptr.as_ptr(), <span class="self">self</span>.len, <span class="self">self</span>.cap, off),
+ original_capacity_repr,
+ ref_count: AtomicUsize::new(ref_cnt),
+ });
+
+ <span class="kw">let </span>shared = Box::into_raw(shared);
+
+ <span class="comment">// The pointer should be aligned, so this assert should
+ // always succeed.
+ </span><span class="macro">debug_assert_eq!</span>(shared <span class="kw">as </span>usize &amp; KIND_MASK, KIND_ARC);
+
+ <span class="self">self</span>.data = shared;
+ }
+
+ <span class="doccomment">/// Makes an exact shallow clone of `self`.
+ ///
+ /// The kind of `self` doesn&#39;t matter, but this is unsafe
+ /// because the clone will have the same offsets. You must
+ /// be sure the returned value to the user doesn&#39;t allow
+ /// two views into the same range.
+ </span><span class="attr">#[inline]
+ </span><span class="kw">unsafe fn </span>shallow_clone(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; BytesMut {
+ <span class="kw">if </span><span class="self">self</span>.kind() == KIND_ARC {
+ increment_shared(<span class="self">self</span>.data);
+ ptr::read(<span class="self">self</span>)
+ } <span class="kw">else </span>{
+ <span class="self">self</span>.promote_to_shared(<span class="comment">/*ref_count = */ </span><span class="number">2</span>);
+ ptr::read(<span class="self">self</span>)
+ }
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">unsafe fn </span>get_vec_pos(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
+ <span class="macro">debug_assert_eq!</span>(<span class="self">self</span>.kind(), KIND_VEC);
+
+ <span class="self">self</span>.data <span class="kw">as </span>usize &gt;&gt; VEC_POS_OFFSET
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">unsafe fn </span>set_vec_pos(<span class="kw-2">&amp;mut </span><span class="self">self</span>, pos: usize) {
+ <span class="macro">debug_assert_eq!</span>(<span class="self">self</span>.kind(), KIND_VEC);
+ <span class="macro">debug_assert!</span>(pos &lt;= MAX_VEC_POS);
+
+ <span class="self">self</span>.data = invalid_ptr((pos &lt;&lt; VEC_POS_OFFSET) | (<span class="self">self</span>.data <span class="kw">as </span>usize &amp; NOT_VEC_POS_MASK));
+ }
+
+ <span class="doccomment">/// Returns the remaining spare capacity of the buffer as a slice of `MaybeUninit&lt;u8&gt;`.
+ ///
+ /// The returned slice can be used to fill the buffer with data (e.g. by
+ /// reading from a file) before marking the data as initialized using the
+ /// [`set_len`] method.
+ ///
+ /// [`set_len`]: BytesMut::set_len
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use bytes::BytesMut;
+ ///
+ /// // Allocate buffer big enough for 10 bytes.
+ /// let mut buf = BytesMut::with_capacity(10);
+ ///
+ /// // Fill in the first 3 elements.
+ /// let uninit = buf.spare_capacity_mut();
+ /// uninit[0].write(0);
+ /// uninit[1].write(1);
+ /// uninit[2].write(2);
+ ///
+ /// // Mark the first 3 bytes of the buffer as being initialized.
+ /// unsafe {
+ /// buf.set_len(3);
+ /// }
+ ///
+ /// assert_eq!(&amp;buf[..], &amp;[0, 1, 2]);
+ /// ```
+ </span><span class="attr">#[inline]
+ </span><span class="kw">pub fn </span>spare_capacity_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;mut </span>[MaybeUninit&lt;u8&gt;] {
+ <span class="kw">unsafe </span>{
+ <span class="kw">let </span>ptr = <span class="self">self</span>.ptr.as_ptr().add(<span class="self">self</span>.len);
+ <span class="kw">let </span>len = <span class="self">self</span>.cap - <span class="self">self</span>.len;
+
+ slice::from_raw_parts_mut(ptr.cast(), len)
+ }
+ }
+}
+
+<span class="kw">impl </span>Drop <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>drop(<span class="kw-2">&amp;mut </span><span class="self">self</span>) {
+ <span class="kw">let </span>kind = <span class="self">self</span>.kind();
+
+ <span class="kw">if </span>kind == KIND_VEC {
+ <span class="kw">unsafe </span>{
+ <span class="kw">let </span>off = <span class="self">self</span>.get_vec_pos();
+
+ <span class="comment">// Vector storage, free the vector
+ </span><span class="kw">let _ </span>= rebuild_vec(<span class="self">self</span>.ptr.as_ptr(), <span class="self">self</span>.len, <span class="self">self</span>.cap, off);
+ }
+ } <span class="kw">else if </span>kind == KIND_ARC {
+ <span class="kw">unsafe </span>{ release_shared(<span class="self">self</span>.data) };
+ }
+ }
+}
+
+<span class="kw">impl </span>Buf <span class="kw">for </span>BytesMut {
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>remaining(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
+ <span class="self">self</span>.len()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>chunk(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>[u8] {
+ <span class="self">self</span>.as_slice()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>advance(<span class="kw-2">&amp;mut </span><span class="self">self</span>, cnt: usize) {
+ <span class="comment">// Advancing by the length is the same as resetting the length to 0,
+ // except this way we get to reuse the full capacity.
+ </span><span class="kw">if </span>cnt == <span class="self">self</span>.remaining() {
+ <span class="self">self</span>.clear();
+ <span class="kw">return</span>;
+ }
+
+ <span class="macro">assert!</span>(
+ cnt &lt;= <span class="self">self</span>.remaining(),
+ <span class="string">&quot;cannot advance past `remaining`: {:?} &lt;= {:?}&quot;</span>,
+ cnt,
+ <span class="self">self</span>.remaining(),
+ );
+ <span class="kw">unsafe </span>{
+ <span class="comment">// SAFETY: We&#39;ve checked that `cnt` &lt;= `self.remaining()` and we know that
+ // `self.remaining()` &lt;= `self.cap`.
+ </span><span class="self">self</span>.advance_unchecked(cnt);
+ }
+ }
+
+ <span class="kw">fn </span>copy_to_bytes(<span class="kw-2">&amp;mut </span><span class="self">self</span>, len: usize) -&gt; Bytes {
+ <span class="self">self</span>.split_to(len).freeze()
+ }
+}
+
+<span class="kw">unsafe impl </span>BufMut <span class="kw">for </span>BytesMut {
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>remaining_mut(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
+ usize::MAX - <span class="self">self</span>.len()
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">unsafe fn </span>advance_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>, cnt: usize) {
+ <span class="kw">let </span>remaining = <span class="self">self</span>.cap - <span class="self">self</span>.len();
+ <span class="kw">if </span>cnt &gt; remaining {
+ <span class="kw">super</span>::panic_advance(cnt, remaining);
+ }
+ <span class="comment">// Addition won&#39;t overflow since it is at most `self.cap`.
+ </span><span class="self">self</span>.len = <span class="self">self</span>.len() + cnt;
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>chunk_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;mut </span>UninitSlice {
+ <span class="kw">if </span><span class="self">self</span>.capacity() == <span class="self">self</span>.len() {
+ <span class="self">self</span>.reserve(<span class="number">64</span>);
+ }
+ <span class="self">self</span>.spare_capacity_mut().into()
+ }
+
+ <span class="comment">// Specialize these methods so they can skip checking `remaining_mut`
+ // and `advance_mut`.
+
+ </span><span class="kw">fn </span>put&lt;T: Buf&gt;(<span class="kw-2">&amp;mut </span><span class="self">self</span>, <span class="kw-2">mut </span>src: T)
+ <span class="kw">where
+ </span><span class="self">Self</span>: Sized,
+ {
+ <span class="kw">while </span>src.has_remaining() {
+ <span class="kw">let </span>s = src.chunk();
+ <span class="kw">let </span>l = s.len();
+ <span class="self">self</span>.extend_from_slice(s);
+ src.advance(l);
+ }
+ }
+
+ <span class="kw">fn </span>put_slice(<span class="kw-2">&amp;mut </span><span class="self">self</span>, src: <span class="kw-2">&amp;</span>[u8]) {
+ <span class="self">self</span>.extend_from_slice(src);
+ }
+
+ <span class="kw">fn </span>put_bytes(<span class="kw-2">&amp;mut </span><span class="self">self</span>, val: u8, cnt: usize) {
+ <span class="self">self</span>.reserve(cnt);
+ <span class="kw">unsafe </span>{
+ <span class="kw">let </span>dst = <span class="self">self</span>.spare_capacity_mut();
+ <span class="comment">// Reserved above
+ </span><span class="macro">debug_assert!</span>(dst.len() &gt;= cnt);
+
+ ptr::write_bytes(dst.as_mut_ptr(), val, cnt);
+
+ <span class="self">self</span>.advance_mut(cnt);
+ }
+ }
+}
+
+<span class="kw">impl </span>AsRef&lt;[u8]&gt; <span class="kw">for </span>BytesMut {
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>as_ref(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>[u8] {
+ <span class="self">self</span>.as_slice()
+ }
+}
+
+<span class="kw">impl </span>Deref <span class="kw">for </span>BytesMut {
+ <span class="kw">type </span>Target = [u8];
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>deref(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>[u8] {
+ <span class="self">self</span>.as_ref()
+ }
+}
+
+<span class="kw">impl </span>AsMut&lt;[u8]&gt; <span class="kw">for </span>BytesMut {
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>as_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;mut </span>[u8] {
+ <span class="self">self</span>.as_slice_mut()
+ }
+}
+
+<span class="kw">impl </span>DerefMut <span class="kw">for </span>BytesMut {
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>deref_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;mut </span>[u8] {
+ <span class="self">self</span>.as_mut()
+ }
+}
+
+<span class="kw">impl</span>&lt;<span class="lifetime">&#39;a</span>&gt; From&lt;<span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span>[u8]&gt; <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>from(src: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span>[u8]) -&gt; BytesMut {
+ BytesMut::from_vec(src.to_vec())
+ }
+}
+
+<span class="kw">impl</span>&lt;<span class="lifetime">&#39;a</span>&gt; From&lt;<span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span>str&gt; <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>from(src: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span>str) -&gt; BytesMut {
+ BytesMut::from(src.as_bytes())
+ }
+}
+
+<span class="kw">impl </span>From&lt;BytesMut&gt; <span class="kw">for </span>Bytes {
+ <span class="kw">fn </span>from(src: BytesMut) -&gt; Bytes {
+ src.freeze()
+ }
+}
+
+<span class="kw">impl </span>PartialEq <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>BytesMut) -&gt; bool {
+ <span class="self">self</span>.as_slice() == other.as_slice()
+ }
+}
+
+<span class="kw">impl </span>PartialOrd <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>BytesMut) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ <span class="self">self</span>.as_slice().partial_cmp(other.as_slice())
+ }
+}
+
+<span class="kw">impl </span>Ord <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>BytesMut) -&gt; cmp::Ordering {
+ <span class="self">self</span>.as_slice().cmp(other.as_slice())
+ }
+}
+
+<span class="kw">impl </span>Eq <span class="kw">for </span>BytesMut {}
+
+<span class="kw">impl </span>Default <span class="kw">for </span>BytesMut {
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>default() -&gt; BytesMut {
+ BytesMut::new()
+ }
+}
+
+<span class="kw">impl </span>hash::Hash <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>hash&lt;H&gt;(<span class="kw-2">&amp;</span><span class="self">self</span>, state: <span class="kw-2">&amp;mut </span>H)
+ <span class="kw">where
+ </span>H: hash::Hasher,
+ {
+ <span class="kw">let </span>s: <span class="kw-2">&amp;</span>[u8] = <span class="self">self</span>.as_ref();
+ s.hash(state);
+ }
+}
+
+<span class="kw">impl </span>Borrow&lt;[u8]&gt; <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>borrow(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>[u8] {
+ <span class="self">self</span>.as_ref()
+ }
+}
+
+<span class="kw">impl </span>BorrowMut&lt;[u8]&gt; <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>borrow_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;mut </span>[u8] {
+ <span class="self">self</span>.as_mut()
+ }
+}
+
+<span class="kw">impl </span>fmt::Write <span class="kw">for </span>BytesMut {
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>write_str(<span class="kw-2">&amp;mut </span><span class="self">self</span>, s: <span class="kw-2">&amp;</span>str) -&gt; fmt::Result {
+ <span class="kw">if </span><span class="self">self</span>.remaining_mut() &gt;= s.len() {
+ <span class="self">self</span>.put_slice(s.as_bytes());
+ <span class="prelude-val">Ok</span>(())
+ } <span class="kw">else </span>{
+ <span class="prelude-val">Err</span>(fmt::Error)
+ }
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>write_fmt(<span class="kw-2">&amp;mut </span><span class="self">self</span>, args: fmt::Arguments&lt;<span class="lifetime">&#39;_</span>&gt;) -&gt; fmt::Result {
+ fmt::write(<span class="self">self</span>, args)
+ }
+}
+
+<span class="kw">impl </span>Clone <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>clone(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; BytesMut {
+ BytesMut::from(<span class="kw-2">&amp;</span><span class="self">self</span>[..])
+ }
+}
+
+<span class="kw">impl </span>IntoIterator <span class="kw">for </span>BytesMut {
+ <span class="kw">type </span>Item = u8;
+ <span class="kw">type </span>IntoIter = IntoIter&lt;BytesMut&gt;;
+
+ <span class="kw">fn </span>into_iter(<span class="self">self</span>) -&gt; <span class="self">Self</span>::IntoIter {
+ IntoIter::new(<span class="self">self</span>)
+ }
+}
+
+<span class="kw">impl</span>&lt;<span class="lifetime">&#39;a</span>&gt; IntoIterator <span class="kw">for </span><span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span>BytesMut {
+ <span class="kw">type </span>Item = <span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span>u8;
+ <span class="kw">type </span>IntoIter = core::slice::Iter&lt;<span class="lifetime">&#39;a</span>, u8&gt;;
+
+ <span class="kw">fn </span>into_iter(<span class="self">self</span>) -&gt; <span class="self">Self</span>::IntoIter {
+ <span class="self">self</span>.as_ref().iter()
+ }
+}
+
+<span class="kw">impl </span>Extend&lt;u8&gt; <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>extend&lt;T&gt;(<span class="kw-2">&amp;mut </span><span class="self">self</span>, iter: T)
+ <span class="kw">where
+ </span>T: IntoIterator&lt;Item = u8&gt;,
+ {
+ <span class="kw">let </span>iter = iter.into_iter();
+
+ <span class="kw">let </span>(lower, <span class="kw">_</span>) = iter.size_hint();
+ <span class="self">self</span>.reserve(lower);
+
+ <span class="comment">// TODO: optimize
+ // 1. If self.kind() == KIND_VEC, use Vec::extend
+ </span><span class="kw">for </span>b <span class="kw">in </span>iter {
+ <span class="self">self</span>.put_u8(b);
+ }
+ }
+}
+
+<span class="kw">impl</span>&lt;<span class="lifetime">&#39;a</span>&gt; Extend&lt;<span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span>u8&gt; <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>extend&lt;T&gt;(<span class="kw-2">&amp;mut </span><span class="self">self</span>, iter: T)
+ <span class="kw">where
+ </span>T: IntoIterator&lt;Item = <span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span>u8&gt;,
+ {
+ <span class="self">self</span>.extend(iter.into_iter().copied())
+ }
+}
+
+<span class="kw">impl </span>Extend&lt;Bytes&gt; <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>extend&lt;T&gt;(<span class="kw-2">&amp;mut </span><span class="self">self</span>, iter: T)
+ <span class="kw">where
+ </span>T: IntoIterator&lt;Item = Bytes&gt;,
+ {
+ <span class="kw">for </span>bytes <span class="kw">in </span>iter {
+ <span class="self">self</span>.extend_from_slice(<span class="kw-2">&amp;</span>bytes)
+ }
+ }
+}
+
+<span class="kw">impl </span>FromIterator&lt;u8&gt; <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>from_iter&lt;T: IntoIterator&lt;Item = u8&gt;&gt;(into_iter: T) -&gt; <span class="self">Self </span>{
+ BytesMut::from_vec(Vec::from_iter(into_iter))
+ }
+}
+
+<span class="kw">impl</span>&lt;<span class="lifetime">&#39;a</span>&gt; FromIterator&lt;<span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span>u8&gt; <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>from_iter&lt;T: IntoIterator&lt;Item = <span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span>u8&gt;&gt;(into_iter: T) -&gt; <span class="self">Self </span>{
+ BytesMut::from_iter(into_iter.into_iter().copied())
+ }
+}
+
+<span class="comment">/*
+ *
+ * ===== Inner =====
+ *
+ */
+
+</span><span class="kw">unsafe fn </span>increment_shared(ptr: <span class="kw-2">*mut </span>Shared) {
+ <span class="kw">let </span>old_size = (<span class="kw-2">*</span>ptr).ref_count.fetch_add(<span class="number">1</span>, Ordering::Relaxed);
+
+ <span class="kw">if </span>old_size &gt; isize::MAX <span class="kw">as </span>usize {
+ <span class="kw">crate</span>::abort();
+ }
+}
+
+<span class="kw">unsafe fn </span>release_shared(ptr: <span class="kw-2">*mut </span>Shared) {
+ <span class="comment">// `Shared` storage... follow the drop steps from Arc.
+ </span><span class="kw">if </span>(<span class="kw-2">*</span>ptr).ref_count.fetch_sub(<span class="number">1</span>, Ordering::Release) != <span class="number">1 </span>{
+ <span class="kw">return</span>;
+ }
+
+ <span class="comment">// This fence is needed to prevent reordering of use of the data and
+ // deletion of the data. Because it is marked `Release`, the decreasing
+ // of the reference count synchronizes with this `Acquire` fence. This
+ // means that use of the data happens before decreasing the reference
+ // count, which happens before this fence, which happens before the
+ // deletion of the data.
+ //
+ // As explained in the [Boost documentation][1],
+ //
+ // &gt; It is important to enforce any possible access to the object in one
+ // &gt; thread (through an existing reference) to *happen before* deleting
+ // &gt; the object in a different thread. This is achieved by a &quot;release&quot;
+ // &gt; operation after dropping a reference (any access to the object
+ // &gt; through this reference must obviously happened before), and an
+ // &gt; &quot;acquire&quot; operation before deleting the object.
+ //
+ // [1]: (www.boost.org/doc/libs/1_55_0/doc/html/atomic/usage_examples.html)
+ //
+ // Thread sanitizer does not support atomic fences. Use an atomic load
+ // instead.
+ </span>(<span class="kw-2">*</span>ptr).ref_count.load(Ordering::Acquire);
+
+ <span class="comment">// Drop the data
+ </span>drop(Box::from_raw(ptr));
+}
+
+<span class="kw">impl </span>Shared {
+ <span class="kw">fn </span>is_unique(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; bool {
+ <span class="comment">// The goal is to check if the current handle is the only handle
+ // that currently has access to the buffer. This is done by
+ // checking if the `ref_count` is currently 1.
+ //
+ // The `Acquire` ordering synchronizes with the `Release` as
+ // part of the `fetch_sub` in `release_shared`. The `fetch_sub`
+ // operation guarantees that any mutations done in other threads
+ // are ordered before the `ref_count` is decremented. As such,
+ // this `Acquire` will guarantee that those mutations are
+ // visible to the current thread.
+ </span><span class="self">self</span>.ref_count.load(Ordering::Acquire) == <span class="number">1
+ </span>}
+}
+
+<span class="attr">#[inline]
+</span><span class="kw">fn </span>original_capacity_to_repr(cap: usize) -&gt; usize {
+ <span class="kw">let </span>width = PTR_WIDTH - ((cap &gt;&gt; MIN_ORIGINAL_CAPACITY_WIDTH).leading_zeros() <span class="kw">as </span>usize);
+ cmp::min(
+ width,
+ MAX_ORIGINAL_CAPACITY_WIDTH - MIN_ORIGINAL_CAPACITY_WIDTH,
+ )
+}
+
+<span class="kw">fn </span>original_capacity_from_repr(repr: usize) -&gt; usize {
+ <span class="kw">if </span>repr == <span class="number">0 </span>{
+ <span class="kw">return </span><span class="number">0</span>;
+ }
+
+ <span class="number">1 </span>&lt;&lt; (repr + (MIN_ORIGINAL_CAPACITY_WIDTH - <span class="number">1</span>))
+}
+
+<span class="attr">#[cfg(test)]
+</span><span class="kw">mod </span>tests {
+ <span class="kw">use super</span>::<span class="kw-2">*</span>;
+
+ <span class="attr">#[test]
+ </span><span class="kw">fn </span>test_original_capacity_to_repr() {
+ <span class="macro">assert_eq!</span>(original_capacity_to_repr(<span class="number">0</span>), <span class="number">0</span>);
+
+ <span class="kw">let </span>max_width = <span class="number">32</span>;
+
+ <span class="kw">for </span>width <span class="kw">in </span><span class="number">1</span>..(max_width + <span class="number">1</span>) {
+ <span class="kw">let </span>cap = <span class="number">1 </span>&lt;&lt; width - <span class="number">1</span>;
+
+ <span class="kw">let </span>expected = <span class="kw">if </span>width &lt; MIN_ORIGINAL_CAPACITY_WIDTH {
+ <span class="number">0
+ </span>} <span class="kw">else if </span>width &lt; MAX_ORIGINAL_CAPACITY_WIDTH {
+ width - MIN_ORIGINAL_CAPACITY_WIDTH
+ } <span class="kw">else </span>{
+ MAX_ORIGINAL_CAPACITY_WIDTH - MIN_ORIGINAL_CAPACITY_WIDTH
+ };
+
+ <span class="macro">assert_eq!</span>(original_capacity_to_repr(cap), expected);
+
+ <span class="kw">if </span>width &gt; <span class="number">1 </span>{
+ <span class="macro">assert_eq!</span>(original_capacity_to_repr(cap + <span class="number">1</span>), expected);
+ }
+
+ <span class="comment">// MIN_ORIGINAL_CAPACITY_WIDTH must be bigger than 7 to pass tests below
+ </span><span class="kw">if </span>width == MIN_ORIGINAL_CAPACITY_WIDTH + <span class="number">1 </span>{
+ <span class="macro">assert_eq!</span>(original_capacity_to_repr(cap - <span class="number">24</span>), expected - <span class="number">1</span>);
+ <span class="macro">assert_eq!</span>(original_capacity_to_repr(cap + <span class="number">76</span>), expected);
+ } <span class="kw">else if </span>width == MIN_ORIGINAL_CAPACITY_WIDTH + <span class="number">2 </span>{
+ <span class="macro">assert_eq!</span>(original_capacity_to_repr(cap - <span class="number">1</span>), expected - <span class="number">1</span>);
+ <span class="macro">assert_eq!</span>(original_capacity_to_repr(cap - <span class="number">48</span>), expected - <span class="number">1</span>);
+ }
+ }
+ }
+
+ <span class="attr">#[test]
+ </span><span class="kw">fn </span>test_original_capacity_from_repr() {
+ <span class="macro">assert_eq!</span>(<span class="number">0</span>, original_capacity_from_repr(<span class="number">0</span>));
+
+ <span class="kw">let </span>min_cap = <span class="number">1 </span>&lt;&lt; MIN_ORIGINAL_CAPACITY_WIDTH;
+
+ <span class="macro">assert_eq!</span>(min_cap, original_capacity_from_repr(<span class="number">1</span>));
+ <span class="macro">assert_eq!</span>(min_cap * <span class="number">2</span>, original_capacity_from_repr(<span class="number">2</span>));
+ <span class="macro">assert_eq!</span>(min_cap * <span class="number">4</span>, original_capacity_from_repr(<span class="number">3</span>));
+ <span class="macro">assert_eq!</span>(min_cap * <span class="number">8</span>, original_capacity_from_repr(<span class="number">4</span>));
+ <span class="macro">assert_eq!</span>(min_cap * <span class="number">16</span>, original_capacity_from_repr(<span class="number">5</span>));
+ <span class="macro">assert_eq!</span>(min_cap * <span class="number">32</span>, original_capacity_from_repr(<span class="number">6</span>));
+ <span class="macro">assert_eq!</span>(min_cap * <span class="number">64</span>, original_capacity_from_repr(<span class="number">7</span>));
+ }
+}
+
+<span class="kw">unsafe impl </span>Send <span class="kw">for </span>BytesMut {}
+<span class="kw">unsafe impl </span>Sync <span class="kw">for </span>BytesMut {}
+
+<span class="comment">/*
+ *
+ * ===== PartialEq / PartialOrd =====
+ *
+ */
+
+</span><span class="kw">impl </span>PartialEq&lt;[u8]&gt; <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>[u8]) -&gt; bool {
+ <span class="kw-2">&amp;**</span><span class="self">self </span>== other
+ }
+}
+
+<span class="kw">impl </span>PartialOrd&lt;[u8]&gt; <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>[u8]) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ (<span class="kw-2">**</span><span class="self">self</span>).partial_cmp(other)
+ }
+}
+
+<span class="kw">impl </span>PartialEq&lt;BytesMut&gt; <span class="kw">for </span>[u8] {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>BytesMut) -&gt; bool {
+ <span class="kw-2">*</span>other == <span class="kw-2">*</span><span class="self">self
+ </span>}
+}
+
+<span class="kw">impl </span>PartialOrd&lt;BytesMut&gt; <span class="kw">for </span>[u8] {
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>BytesMut) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ &lt;[u8] <span class="kw">as </span>PartialOrd&lt;[u8]&gt;&gt;::partial_cmp(<span class="self">self</span>, other)
+ }
+}
+
+<span class="kw">impl </span>PartialEq&lt;str&gt; <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>str) -&gt; bool {
+ <span class="kw-2">&amp;**</span><span class="self">self </span>== other.as_bytes()
+ }
+}
+
+<span class="kw">impl </span>PartialOrd&lt;str&gt; <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>str) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ (<span class="kw-2">**</span><span class="self">self</span>).partial_cmp(other.as_bytes())
+ }
+}
+
+<span class="kw">impl </span>PartialEq&lt;BytesMut&gt; <span class="kw">for </span>str {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>BytesMut) -&gt; bool {
+ <span class="kw-2">*</span>other == <span class="kw-2">*</span><span class="self">self
+ </span>}
+}
+
+<span class="kw">impl </span>PartialOrd&lt;BytesMut&gt; <span class="kw">for </span>str {
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>BytesMut) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ &lt;[u8] <span class="kw">as </span>PartialOrd&lt;[u8]&gt;&gt;::partial_cmp(<span class="self">self</span>.as_bytes(), other)
+ }
+}
+
+<span class="kw">impl </span>PartialEq&lt;Vec&lt;u8&gt;&gt; <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>Vec&lt;u8&gt;) -&gt; bool {
+ <span class="kw-2">*</span><span class="self">self </span>== other[..]
+ }
+}
+
+<span class="kw">impl </span>PartialOrd&lt;Vec&lt;u8&gt;&gt; <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>Vec&lt;u8&gt;) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ (<span class="kw-2">**</span><span class="self">self</span>).partial_cmp(<span class="kw-2">&amp;</span>other[..])
+ }
+}
+
+<span class="kw">impl </span>PartialEq&lt;BytesMut&gt; <span class="kw">for </span>Vec&lt;u8&gt; {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>BytesMut) -&gt; bool {
+ <span class="kw-2">*</span>other == <span class="kw-2">*</span><span class="self">self
+ </span>}
+}
+
+<span class="kw">impl </span>PartialOrd&lt;BytesMut&gt; <span class="kw">for </span>Vec&lt;u8&gt; {
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>BytesMut) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ other.partial_cmp(<span class="self">self</span>)
+ }
+}
+
+<span class="kw">impl </span>PartialEq&lt;String&gt; <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>String) -&gt; bool {
+ <span class="kw-2">*</span><span class="self">self </span>== other[..]
+ }
+}
+
+<span class="kw">impl </span>PartialOrd&lt;String&gt; <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>String) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ (<span class="kw-2">**</span><span class="self">self</span>).partial_cmp(other.as_bytes())
+ }
+}
+
+<span class="kw">impl </span>PartialEq&lt;BytesMut&gt; <span class="kw">for </span>String {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>BytesMut) -&gt; bool {
+ <span class="kw-2">*</span>other == <span class="kw-2">*</span><span class="self">self
+ </span>}
+}
+
+<span class="kw">impl </span>PartialOrd&lt;BytesMut&gt; <span class="kw">for </span>String {
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>BytesMut) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ &lt;[u8] <span class="kw">as </span>PartialOrd&lt;[u8]&gt;&gt;::partial_cmp(<span class="self">self</span>.as_bytes(), other)
+ }
+}
+
+<span class="kw">impl</span>&lt;<span class="lifetime">&#39;a</span>, T: <span class="question-mark">?</span>Sized&gt; PartialEq&lt;<span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span>T&gt; <span class="kw">for </span>BytesMut
+<span class="kw">where
+ </span>BytesMut: PartialEq&lt;T&gt;,
+{
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: &amp;&amp;<span class="lifetime">&#39;a </span>T) -&gt; bool {
+ <span class="kw-2">*</span><span class="self">self </span>== <span class="kw-2">**</span>other
+ }
+}
+
+<span class="kw">impl</span>&lt;<span class="lifetime">&#39;a</span>, T: <span class="question-mark">?</span>Sized&gt; PartialOrd&lt;<span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span>T&gt; <span class="kw">for </span>BytesMut
+<span class="kw">where
+ </span>BytesMut: PartialOrd&lt;T&gt;,
+{
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: &amp;&amp;<span class="lifetime">&#39;a </span>T) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ <span class="self">self</span>.partial_cmp(<span class="kw-2">*</span>other)
+ }
+}
+
+<span class="kw">impl </span>PartialEq&lt;BytesMut&gt; <span class="kw">for </span><span class="kw-2">&amp;</span>[u8] {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>BytesMut) -&gt; bool {
+ <span class="kw-2">*</span>other == <span class="kw-2">*</span><span class="self">self
+ </span>}
+}
+
+<span class="kw">impl </span>PartialOrd&lt;BytesMut&gt; <span class="kw">for </span><span class="kw-2">&amp;</span>[u8] {
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>BytesMut) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ &lt;[u8] <span class="kw">as </span>PartialOrd&lt;[u8]&gt;&gt;::partial_cmp(<span class="self">self</span>, other)
+ }
+}
+
+<span class="kw">impl </span>PartialEq&lt;BytesMut&gt; <span class="kw">for </span><span class="kw-2">&amp;</span>str {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>BytesMut) -&gt; bool {
+ <span class="kw-2">*</span>other == <span class="kw-2">*</span><span class="self">self
+ </span>}
+}
+
+<span class="kw">impl </span>PartialOrd&lt;BytesMut&gt; <span class="kw">for </span><span class="kw-2">&amp;</span>str {
+ <span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>BytesMut) -&gt; <span class="prelude-ty">Option</span>&lt;cmp::Ordering&gt; {
+ other.partial_cmp(<span class="self">self</span>)
+ }
+}
+
+<span class="kw">impl </span>PartialEq&lt;BytesMut&gt; <span class="kw">for </span>Bytes {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>BytesMut) -&gt; bool {
+ other[..] == <span class="self">self</span>[..]
+ }
+}
+
+<span class="kw">impl </span>PartialEq&lt;Bytes&gt; <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>Bytes) -&gt; bool {
+ other[..] == <span class="self">self</span>[..]
+ }
+}
+
+<span class="kw">impl </span>From&lt;BytesMut&gt; <span class="kw">for </span>Vec&lt;u8&gt; {
+ <span class="kw">fn </span>from(bytes: BytesMut) -&gt; <span class="self">Self </span>{
+ <span class="kw">let </span>kind = bytes.kind();
+ <span class="kw">let </span>bytes = ManuallyDrop::new(bytes);
+
+ <span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="kw">if </span>kind == KIND_VEC {
+ <span class="kw">unsafe </span>{
+ <span class="kw">let </span>off = bytes.get_vec_pos();
+ rebuild_vec(bytes.ptr.as_ptr(), bytes.len, bytes.cap, off)
+ }
+ } <span class="kw">else </span>{
+ <span class="kw">let </span>shared = bytes.data <span class="kw">as </span><span class="kw-2">*mut </span>Shared;
+
+ <span class="kw">if unsafe </span>{ (<span class="kw-2">*</span>shared).is_unique() } {
+ <span class="kw">let </span>vec = mem::replace(<span class="kw">unsafe </span>{ <span class="kw-2">&amp;mut </span>(<span class="kw-2">*</span>shared).vec }, Vec::new());
+
+ <span class="kw">unsafe </span>{ release_shared(shared) };
+
+ vec
+ } <span class="kw">else </span>{
+ <span class="kw">return </span>ManuallyDrop::into_inner(bytes).deref().to_vec();
+ }
+ };
+
+ <span class="kw">let </span>len = bytes.len;
+
+ <span class="kw">unsafe </span>{
+ ptr::copy(bytes.ptr.as_ptr(), vec.as_mut_ptr(), len);
+ vec.set_len(len);
+ }
+
+ vec
+ }
+}
+
+<span class="attr">#[inline]
+</span><span class="kw">fn </span>vptr(ptr: <span class="kw-2">*mut </span>u8) -&gt; NonNull&lt;u8&gt; {
+ <span class="kw">if </span><span class="macro">cfg!</span>(debug_assertions) {
+ NonNull::new(ptr).expect(<span class="string">&quot;Vec pointer should be non-null&quot;</span>)
+ } <span class="kw">else </span>{
+ <span class="kw">unsafe </span>{ NonNull::new_unchecked(ptr) }
+ }
+}
+
+<span class="doccomment">/// Returns a dangling pointer with the given address. This is used to store
+/// integer data in pointer fields.
+///
+/// It is equivalent to `addr as *mut T`, but this fails on miri when strict
+/// provenance checking is enabled.
+</span><span class="attr">#[inline]
+</span><span class="kw">fn </span>invalid_ptr&lt;T&gt;(addr: usize) -&gt; <span class="kw-2">*mut </span>T {
+ <span class="kw">let </span>ptr = core::ptr::null_mut::&lt;u8&gt;().wrapping_add(addr);
+ <span class="macro">debug_assert_eq!</span>(ptr <span class="kw">as </span>usize, addr);
+ ptr.cast::&lt;T&gt;()
+}
+
+<span class="kw">unsafe fn </span>rebuild_vec(ptr: <span class="kw-2">*mut </span>u8, <span class="kw-2">mut </span>len: usize, <span class="kw-2">mut </span>cap: usize, off: usize) -&gt; Vec&lt;u8&gt; {
+ <span class="kw">let </span>ptr = ptr.sub(off);
+ len += off;
+ cap += off;
+
+ Vec::from_raw_parts(ptr, len, cap)
+}
+
+<span class="comment">// ===== impl SharedVtable =====
+
+</span><span class="kw">static </span>SHARED_VTABLE: Vtable = Vtable {
+ clone: shared_v_clone,
+ to_vec: shared_v_to_vec,
+ to_mut: shared_v_to_mut,
+ is_unique: <span class="kw">crate</span>::bytes::shared_is_unique,
+ drop: shared_v_drop,
+};
+
+<span class="kw">unsafe fn </span>shared_v_clone(data: <span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;, ptr: <span class="kw-2">*const </span>u8, len: usize) -&gt; Bytes {
+ <span class="kw">let </span>shared = data.load(Ordering::Relaxed) <span class="kw">as </span><span class="kw-2">*mut </span>Shared;
+ increment_shared(shared);
+
+ <span class="kw">let </span>data = AtomicPtr::new(shared <span class="kw">as </span><span class="kw-2">*mut </span>());
+ Bytes::with_vtable(ptr, len, data, <span class="kw-2">&amp;</span>SHARED_VTABLE)
+}
+
+<span class="kw">unsafe fn </span>shared_v_to_vec(data: <span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;, ptr: <span class="kw-2">*const </span>u8, len: usize) -&gt; Vec&lt;u8&gt; {
+ <span class="kw">let </span>shared: <span class="kw-2">*mut </span>Shared = data.load(Ordering::Relaxed).cast();
+
+ <span class="kw">if </span>(<span class="kw-2">*</span>shared).is_unique() {
+ <span class="kw">let </span>shared = <span class="kw-2">&amp;mut *</span>shared;
+
+ <span class="comment">// Drop shared
+ </span><span class="kw">let </span><span class="kw-2">mut </span>vec = mem::replace(<span class="kw-2">&amp;mut </span>shared.vec, Vec::new());
+ release_shared(shared);
+
+ <span class="comment">// Copy back buffer
+ </span>ptr::copy(ptr, vec.as_mut_ptr(), len);
+ vec.set_len(len);
+
+ vec
+ } <span class="kw">else </span>{
+ <span class="kw">let </span>v = slice::from_raw_parts(ptr, len).to_vec();
+ release_shared(shared);
+ v
+ }
+}
+
+<span class="kw">unsafe fn </span>shared_v_to_mut(data: <span class="kw-2">&amp;</span>AtomicPtr&lt;()&gt;, ptr: <span class="kw-2">*const </span>u8, len: usize) -&gt; BytesMut {
+ <span class="kw">let </span>shared: <span class="kw-2">*mut </span>Shared = data.load(Ordering::Relaxed).cast();
+
+ <span class="kw">if </span>(<span class="kw-2">*</span>shared).is_unique() {
+ <span class="kw">let </span>shared = <span class="kw-2">&amp;mut *</span>shared;
+
+ <span class="comment">// The capacity is always the original capacity of the buffer
+ // minus the offset from the start of the buffer
+ </span><span class="kw">let </span>v = <span class="kw-2">&amp;mut </span>shared.vec;
+ <span class="kw">let </span>v_capacity = v.capacity();
+ <span class="kw">let </span>v_ptr = v.as_mut_ptr();
+ <span class="kw">let </span>offset = offset_from(ptr <span class="kw">as </span><span class="kw-2">*mut </span>u8, v_ptr);
+ <span class="kw">let </span>cap = v_capacity - offset;
+
+ <span class="kw">let </span>ptr = vptr(ptr <span class="kw">as </span><span class="kw-2">*mut </span>u8);
+
+ BytesMut {
+ ptr,
+ len,
+ cap,
+ data: shared,
+ }
+ } <span class="kw">else </span>{
+ <span class="kw">let </span>v = slice::from_raw_parts(ptr, len).to_vec();
+ release_shared(shared);
+ BytesMut::from_vec(v)
+ }
+}
+
+<span class="kw">unsafe fn </span>shared_v_drop(data: <span class="kw-2">&amp;mut </span>AtomicPtr&lt;()&gt;, _ptr: <span class="kw-2">*const </span>u8, _len: usize) {
+ data.with_mut(|shared| {
+ release_shared(<span class="kw-2">*</span>shared <span class="kw">as </span><span class="kw-2">*mut </span>Shared);
+ });
+}
+
+<span class="comment">// compile-fails
+
+</span><span class="doccomment">/// ```compile_fail
+/// use bytes::BytesMut;
+/// #[deny(unused_must_use)]
+/// {
+/// let mut b1 = BytesMut::from(&quot;hello world&quot;);
+/// b1.split_to(6);
+/// }
+/// ```
+</span><span class="kw">fn </span>_split_to_must_use() {}
+
+<span class="doccomment">/// ```compile_fail
+/// use bytes::BytesMut;
+/// #[deny(unused_must_use)]
+/// {
+/// let mut b1 = BytesMut::from(&quot;hello world&quot;);
+/// b1.split_off(6);
+/// }
+/// ```
+</span><span class="kw">fn </span>_split_off_must_use() {}
+
+<span class="doccomment">/// ```compile_fail
+/// use bytes::BytesMut;
+/// #[deny(unused_must_use)]
+/// {
+/// let mut b1 = BytesMut::from(&quot;hello world&quot;);
+/// b1.split();
+/// }
+/// ```
+</span><span class="kw">fn </span>_split_must_use() {}
+
+<span class="comment">// fuzz tests
+</span><span class="attr">#[cfg(all(test, loom))]
+</span><span class="kw">mod </span>fuzz {
+ <span class="kw">use </span>loom::sync::Arc;
+ <span class="kw">use </span>loom::thread;
+
+ <span class="kw">use </span><span class="kw">super</span>::BytesMut;
+ <span class="kw">use </span><span class="kw">crate</span>::Bytes;
+
+ <span class="attr">#[test]
+ </span><span class="kw">fn </span>bytes_mut_cloning_frozen() {
+ loom::model(|| {
+ <span class="kw">let </span>a = BytesMut::from(<span class="kw-2">&amp;</span><span class="string">b&quot;abcdefgh&quot;</span>[..]).split().freeze();
+ <span class="kw">let </span>addr = a.as_ptr() <span class="kw">as </span>usize;
+
+ <span class="comment">// test the Bytes::clone is Sync by putting it in an Arc
+ </span><span class="kw">let </span>a1 = Arc::new(a);
+ <span class="kw">let </span>a2 = a1.clone();
+
+ <span class="kw">let </span>t1 = thread::spawn(<span class="kw">move </span>|| {
+ <span class="kw">let </span>b: Bytes = (<span class="kw-2">*</span>a1).clone();
+ <span class="macro">assert_eq!</span>(b.as_ptr() <span class="kw">as </span>usize, addr);
+ });
+
+ <span class="kw">let </span>t2 = thread::spawn(<span class="kw">move </span>|| {
+ <span class="kw">let </span>b: Bytes = (<span class="kw-2">*</span>a2).clone();
+ <span class="macro">assert_eq!</span>(b.as_ptr() <span class="kw">as </span>usize, addr);
+ });
+
+ t1.join().unwrap();
+ t2.join().unwrap();
+ });
+ }
+}
+</code></pre></div>
+</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/src/bytes/fmt/debug.rs.html b/src/bytes/fmt/debug.rs.html
new file mode 100644
index 0000000..f3aa0df
--- /dev/null
+++ b/src/bytes/fmt/debug.rs.html
@@ -0,0 +1,100 @@
+<!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="Source of the Rust file `src/fmt/debug.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>debug.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../../../static.files/source-script-74087aa2e88f4475.js"></script><script defer src="../../../source-files.js"></script><script defer src="../../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><div class="width-limiter"><nav class="sub"><a class="sub-logo-container" href="../../../bytes/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><pre class="src-line-numbers"><span id="1">1</span>
+<span id="2">2</span>
+<span id="3">3</span>
+<span id="4">4</span>
+<span id="5">5</span>
+<span id="6">6</span>
+<span id="7">7</span>
+<span id="8">8</span>
+<span id="9">9</span>
+<span id="10">10</span>
+<span id="11">11</span>
+<span id="12">12</span>
+<span id="13">13</span>
+<span id="14">14</span>
+<span id="15">15</span>
+<span id="16">16</span>
+<span id="17">17</span>
+<span id="18">18</span>
+<span id="19">19</span>
+<span id="20">20</span>
+<span id="21">21</span>
+<span id="22">22</span>
+<span id="23">23</span>
+<span id="24">24</span>
+<span id="25">25</span>
+<span id="26">26</span>
+<span id="27">27</span>
+<span id="28">28</span>
+<span id="29">29</span>
+<span id="30">30</span>
+<span id="31">31</span>
+<span id="32">32</span>
+<span id="33">33</span>
+<span id="34">34</span>
+<span id="35">35</span>
+<span id="36">36</span>
+<span id="37">37</span>
+<span id="38">38</span>
+<span id="39">39</span>
+<span id="40">40</span>
+<span id="41">41</span>
+<span id="42">42</span>
+<span id="43">43</span>
+<span id="44">44</span>
+<span id="45">45</span>
+<span id="46">46</span>
+<span id="47">47</span>
+<span id="48">48</span>
+<span id="49">49</span>
+</pre><pre class="rust"><code><span class="kw">use </span>core::fmt::{Debug, Formatter, <span class="prelude-ty">Result</span>};
+
+<span class="kw">use </span><span class="kw">super</span>::BytesRef;
+<span class="kw">use crate</span>::{Bytes, BytesMut};
+
+<span class="doccomment">/// Alternative implementation of `std::fmt::Debug` for byte slice.
+///
+/// Standard `Debug` implementation for `[u8]` is comma separated
+/// list of numbers. Since large amount of byte strings are in fact
+/// ASCII strings or contain a lot of ASCII strings (e. g. HTTP),
+/// it is convenient to print strings as ASCII when possible.
+</span><span class="kw">impl </span>Debug <span class="kw">for </span>BytesRef&lt;<span class="lifetime">&#39;_</span>&gt; {
+ <span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, f: <span class="kw-2">&amp;mut </span>Formatter&lt;<span class="lifetime">&#39;_</span>&gt;) -&gt; <span class="prelude-ty">Result </span>{
+ <span class="macro">write!</span>(f, <span class="string">&quot;b\&quot;&quot;</span>)<span class="question-mark">?</span>;
+ <span class="kw">for </span><span class="kw-2">&amp;</span>b <span class="kw">in </span><span class="self">self</span>.<span class="number">0 </span>{
+ <span class="comment">// https://doc.rust-lang.org/reference/tokens.html#byte-escapes
+ </span><span class="kw">if </span>b == <span class="string">b&#39;\n&#39; </span>{
+ <span class="macro">write!</span>(f, <span class="string">&quot;\\n&quot;</span>)<span class="question-mark">?</span>;
+ } <span class="kw">else if </span>b == <span class="string">b&#39;\r&#39; </span>{
+ <span class="macro">write!</span>(f, <span class="string">&quot;\\r&quot;</span>)<span class="question-mark">?</span>;
+ } <span class="kw">else if </span>b == <span class="string">b&#39;\t&#39; </span>{
+ <span class="macro">write!</span>(f, <span class="string">&quot;\\t&quot;</span>)<span class="question-mark">?</span>;
+ } <span class="kw">else if </span>b == <span class="string">b&#39;\\&#39; </span>|| b == <span class="string">b&#39;&quot;&#39; </span>{
+ <span class="macro">write!</span>(f, <span class="string">&quot;\\{}&quot;</span>, b <span class="kw">as </span>char)<span class="question-mark">?</span>;
+ } <span class="kw">else if </span>b == <span class="string">b&#39;\0&#39; </span>{
+ <span class="macro">write!</span>(f, <span class="string">&quot;\\0&quot;</span>)<span class="question-mark">?</span>;
+ <span class="comment">// ASCII printable
+ </span>} <span class="kw">else if </span>(<span class="number">0x20</span>..<span class="number">0x7f</span>).contains(<span class="kw-2">&amp;</span>b) {
+ <span class="macro">write!</span>(f, <span class="string">&quot;{}&quot;</span>, b <span class="kw">as </span>char)<span class="question-mark">?</span>;
+ } <span class="kw">else </span>{
+ <span class="macro">write!</span>(f, <span class="string">&quot;\\x{:02x}&quot;</span>, b)<span class="question-mark">?</span>;
+ }
+ }
+ <span class="macro">write!</span>(f, <span class="string">&quot;\&quot;&quot;</span>)<span class="question-mark">?</span>;
+ <span class="prelude-val">Ok</span>(())
+ }
+}
+
+<span class="kw">impl </span>Debug <span class="kw">for </span>Bytes {
+ <span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, f: <span class="kw-2">&amp;mut </span>Formatter&lt;<span class="lifetime">&#39;_</span>&gt;) -&gt; <span class="prelude-ty">Result </span>{
+ Debug::fmt(<span class="kw-2">&amp;</span>BytesRef(<span class="self">self</span>.as_ref()), f)
+ }
+}
+
+<span class="kw">impl </span>Debug <span class="kw">for </span>BytesMut {
+ <span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, f: <span class="kw-2">&amp;mut </span>Formatter&lt;<span class="lifetime">&#39;_</span>&gt;) -&gt; <span class="prelude-ty">Result </span>{
+ Debug::fmt(<span class="kw-2">&amp;</span>BytesRef(<span class="self">self</span>.as_ref()), f)
+ }
+}
+</code></pre></div>
+</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/src/bytes/fmt/hex.rs.html b/src/bytes/fmt/hex.rs.html
new file mode 100644
index 0000000..3554e0e
--- /dev/null
+++ b/src/bytes/fmt/hex.rs.html
@@ -0,0 +1,76 @@
+<!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="Source of the Rust file `src/fmt/hex.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>hex.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../../../static.files/source-script-74087aa2e88f4475.js"></script><script defer src="../../../source-files.js"></script><script defer src="../../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><div class="width-limiter"><nav class="sub"><a class="sub-logo-container" href="../../../bytes/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><pre class="src-line-numbers"><span id="1">1</span>
+<span id="2">2</span>
+<span id="3">3</span>
+<span id="4">4</span>
+<span id="5">5</span>
+<span id="6">6</span>
+<span id="7">7</span>
+<span id="8">8</span>
+<span id="9">9</span>
+<span id="10">10</span>
+<span id="11">11</span>
+<span id="12">12</span>
+<span id="13">13</span>
+<span id="14">14</span>
+<span id="15">15</span>
+<span id="16">16</span>
+<span id="17">17</span>
+<span id="18">18</span>
+<span id="19">19</span>
+<span id="20">20</span>
+<span id="21">21</span>
+<span id="22">22</span>
+<span id="23">23</span>
+<span id="24">24</span>
+<span id="25">25</span>
+<span id="26">26</span>
+<span id="27">27</span>
+<span id="28">28</span>
+<span id="29">29</span>
+<span id="30">30</span>
+<span id="31">31</span>
+<span id="32">32</span>
+<span id="33">33</span>
+<span id="34">34</span>
+<span id="35">35</span>
+<span id="36">36</span>
+<span id="37">37</span>
+</pre><pre class="rust"><code><span class="kw">use </span>core::fmt::{Formatter, LowerHex, <span class="prelude-ty">Result</span>, UpperHex};
+
+<span class="kw">use </span><span class="kw">super</span>::BytesRef;
+<span class="kw">use crate</span>::{Bytes, BytesMut};
+
+<span class="kw">impl </span>LowerHex <span class="kw">for </span>BytesRef&lt;<span class="lifetime">&#39;_</span>&gt; {
+ <span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, f: <span class="kw-2">&amp;mut </span>Formatter&lt;<span class="lifetime">&#39;_</span>&gt;) -&gt; <span class="prelude-ty">Result </span>{
+ <span class="kw">for </span><span class="kw-2">&amp;</span>b <span class="kw">in </span><span class="self">self</span>.<span class="number">0 </span>{
+ <span class="macro">write!</span>(f, <span class="string">&quot;{:02x}&quot;</span>, b)<span class="question-mark">?</span>;
+ }
+ <span class="prelude-val">Ok</span>(())
+ }
+}
+
+<span class="kw">impl </span>UpperHex <span class="kw">for </span>BytesRef&lt;<span class="lifetime">&#39;_</span>&gt; {
+ <span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, f: <span class="kw-2">&amp;mut </span>Formatter&lt;<span class="lifetime">&#39;_</span>&gt;) -&gt; <span class="prelude-ty">Result </span>{
+ <span class="kw">for </span><span class="kw-2">&amp;</span>b <span class="kw">in </span><span class="self">self</span>.<span class="number">0 </span>{
+ <span class="macro">write!</span>(f, <span class="string">&quot;{:02X}&quot;</span>, b)<span class="question-mark">?</span>;
+ }
+ <span class="prelude-val">Ok</span>(())
+ }
+}
+
+<span class="macro">macro_rules! </span>hex_impl {
+ (<span class="macro-nonterminal">$tr</span>:ident, <span class="macro-nonterminal">$ty</span>:ty) =&gt; {
+ <span class="kw">impl </span><span class="macro-nonterminal">$tr </span><span class="kw">for </span><span class="macro-nonterminal">$ty </span>{
+ <span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, f: <span class="kw-2">&amp;mut </span>Formatter&lt;<span class="lifetime">&#39;_</span>&gt;) -&gt; <span class="prelude-ty">Result </span>{
+ <span class="macro-nonterminal">$tr::fmt</span>(<span class="kw-2">&amp;</span>BytesRef(<span class="self">self</span>.as_ref()), f)
+ }
+ }
+ };
+}
+
+<span class="macro">hex_impl!</span>(LowerHex, Bytes);
+<span class="macro">hex_impl!</span>(LowerHex, BytesMut);
+<span class="macro">hex_impl!</span>(UpperHex, Bytes);
+<span class="macro">hex_impl!</span>(UpperHex, BytesMut);
+</code></pre></div>
+</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/src/bytes/fmt/mod.rs.html b/src/bytes/fmt/mod.rs.html
new file mode 100644
index 0000000..aafa5c7
--- /dev/null
+++ b/src/bytes/fmt/mod.rs.html
@@ -0,0 +1,12 @@
+<!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="Source of the Rust file `src/fmt/mod.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>mod.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../../../static.files/source-script-74087aa2e88f4475.js"></script><script defer src="../../../source-files.js"></script><script defer src="../../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><div class="width-limiter"><nav class="sub"><a class="sub-logo-container" href="../../../bytes/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><pre class="src-line-numbers"><span id="1">1</span>
+<span id="2">2</span>
+<span id="3">3</span>
+<span id="4">4</span>
+<span id="5">5</span>
+</pre><pre class="rust"><code><span class="kw">mod </span>debug;
+<span class="kw">mod </span>hex;
+
+<span class="doccomment">/// `BytesRef` is not a part of public API of bytes crate.
+</span><span class="kw">struct </span>BytesRef&lt;<span class="lifetime">&#39;a</span>&gt;(<span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span>[u8]);
+</code></pre></div>
+</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/src/bytes/lib.rs.html b/src/bytes/lib.rs.html
new file mode 100644
index 0000000..b9bfb3a
--- /dev/null
+++ b/src/bytes/lib.rs.html
@@ -0,0 +1,332 @@
+<!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="Source of the Rust file `src/lib.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>lib.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../../static.files/source-script-74087aa2e88f4475.js"></script><script defer src="../../source-files.js"></script><script defer src="../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><div class="width-limiter"><nav class="sub"><a class="sub-logo-container" href="../../bytes/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><pre class="src-line-numbers"><span id="1">1</span>
+<span id="2">2</span>
+<span id="3">3</span>
+<span id="4">4</span>
+<span id="5">5</span>
+<span id="6">6</span>
+<span id="7">7</span>
+<span id="8">8</span>
+<span id="9">9</span>
+<span id="10">10</span>
+<span id="11">11</span>
+<span id="12">12</span>
+<span id="13">13</span>
+<span id="14">14</span>
+<span id="15">15</span>
+<span id="16">16</span>
+<span id="17">17</span>
+<span id="18">18</span>
+<span id="19">19</span>
+<span id="20">20</span>
+<span id="21">21</span>
+<span id="22">22</span>
+<span id="23">23</span>
+<span id="24">24</span>
+<span id="25">25</span>
+<span id="26">26</span>
+<span id="27">27</span>
+<span id="28">28</span>
+<span id="29">29</span>
+<span id="30">30</span>
+<span id="31">31</span>
+<span id="32">32</span>
+<span id="33">33</span>
+<span id="34">34</span>
+<span id="35">35</span>
+<span id="36">36</span>
+<span id="37">37</span>
+<span id="38">38</span>
+<span id="39">39</span>
+<span id="40">40</span>
+<span id="41">41</span>
+<span id="42">42</span>
+<span id="43">43</span>
+<span id="44">44</span>
+<span id="45">45</span>
+<span id="46">46</span>
+<span id="47">47</span>
+<span id="48">48</span>
+<span id="49">49</span>
+<span id="50">50</span>
+<span id="51">51</span>
+<span id="52">52</span>
+<span id="53">53</span>
+<span id="54">54</span>
+<span id="55">55</span>
+<span id="56">56</span>
+<span id="57">57</span>
+<span id="58">58</span>
+<span id="59">59</span>
+<span id="60">60</span>
+<span id="61">61</span>
+<span id="62">62</span>
+<span id="63">63</span>
+<span id="64">64</span>
+<span id="65">65</span>
+<span id="66">66</span>
+<span id="67">67</span>
+<span id="68">68</span>
+<span id="69">69</span>
+<span id="70">70</span>
+<span id="71">71</span>
+<span id="72">72</span>
+<span id="73">73</span>
+<span id="74">74</span>
+<span id="75">75</span>
+<span id="76">76</span>
+<span id="77">77</span>
+<span id="78">78</span>
+<span id="79">79</span>
+<span id="80">80</span>
+<span id="81">81</span>
+<span id="82">82</span>
+<span id="83">83</span>
+<span id="84">84</span>
+<span id="85">85</span>
+<span id="86">86</span>
+<span id="87">87</span>
+<span id="88">88</span>
+<span id="89">89</span>
+<span id="90">90</span>
+<span id="91">91</span>
+<span id="92">92</span>
+<span id="93">93</span>
+<span id="94">94</span>
+<span id="95">95</span>
+<span id="96">96</span>
+<span id="97">97</span>
+<span id="98">98</span>
+<span id="99">99</span>
+<span id="100">100</span>
+<span id="101">101</span>
+<span id="102">102</span>
+<span id="103">103</span>
+<span id="104">104</span>
+<span id="105">105</span>
+<span id="106">106</span>
+<span id="107">107</span>
+<span id="108">108</span>
+<span id="109">109</span>
+<span id="110">110</span>
+<span id="111">111</span>
+<span id="112">112</span>
+<span id="113">113</span>
+<span id="114">114</span>
+<span id="115">115</span>
+<span id="116">116</span>
+<span id="117">117</span>
+<span id="118">118</span>
+<span id="119">119</span>
+<span id="120">120</span>
+<span id="121">121</span>
+<span id="122">122</span>
+<span id="123">123</span>
+<span id="124">124</span>
+<span id="125">125</span>
+<span id="126">126</span>
+<span id="127">127</span>
+<span id="128">128</span>
+<span id="129">129</span>
+<span id="130">130</span>
+<span id="131">131</span>
+<span id="132">132</span>
+<span id="133">133</span>
+<span id="134">134</span>
+<span id="135">135</span>
+<span id="136">136</span>
+<span id="137">137</span>
+<span id="138">138</span>
+<span id="139">139</span>
+<span id="140">140</span>
+<span id="141">141</span>
+<span id="142">142</span>
+<span id="143">143</span>
+<span id="144">144</span>
+<span id="145">145</span>
+<span id="146">146</span>
+<span id="147">147</span>
+<span id="148">148</span>
+<span id="149">149</span>
+<span id="150">150</span>
+<span id="151">151</span>
+<span id="152">152</span>
+<span id="153">153</span>
+<span id="154">154</span>
+<span id="155">155</span>
+<span id="156">156</span>
+<span id="157">157</span>
+<span id="158">158</span>
+<span id="159">159</span>
+<span id="160">160</span>
+<span id="161">161</span>
+<span id="162">162</span>
+<span id="163">163</span>
+<span id="164">164</span>
+<span id="165">165</span>
+</pre><pre class="rust"><code><span class="attr">#![allow(unknown_lints, unexpected_cfgs)]
+#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)]
+#![doc(test(
+ no_crate_inject,
+ attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))
+))]
+#![no_std]
+#![cfg_attr(docsrs, feature(doc_cfg))]
+
+</span><span class="doccomment">//! Provides abstractions for working with bytes.
+//!
+//! The `bytes` crate provides an efficient byte buffer structure
+//! ([`Bytes`]) and traits for working with buffer
+//! implementations ([`Buf`], [`BufMut`]).
+//!
+//! # `Bytes`
+//!
+//! `Bytes` is an efficient container for storing and operating on contiguous
+//! slices of memory. It is intended for use primarily in networking code, but
+//! could have applications elsewhere as well.
+//!
+//! `Bytes` values facilitate zero-copy network programming by allowing multiple
+//! `Bytes` objects to point to the same underlying memory. This is managed by
+//! using a reference count to track when the memory is no longer needed and can
+//! be freed.
+//!
+//! A `Bytes` handle can be created directly from an existing byte store (such as `&amp;[u8]`
+//! or `Vec&lt;u8&gt;`), but usually a `BytesMut` is used first and written to. For
+//! example:
+//!
+//! ```rust
+//! use bytes::{BytesMut, BufMut};
+//!
+//! let mut buf = BytesMut::with_capacity(1024);
+//! buf.put(&amp;b&quot;hello world&quot;[..]);
+//! buf.put_u16(1234);
+//!
+//! let a = buf.split();
+//! assert_eq!(a, b&quot;hello world\x04\xD2&quot;[..]);
+//!
+//! buf.put(&amp;b&quot;goodbye world&quot;[..]);
+//!
+//! let b = buf.split();
+//! assert_eq!(b, b&quot;goodbye world&quot;[..]);
+//!
+//! assert_eq!(buf.capacity(), 998);
+//! ```
+//!
+//! In the above example, only a single buffer of 1024 is allocated. The handles
+//! `a` and `b` will share the underlying buffer and maintain indices tracking
+//! the view into the buffer represented by the handle.
+//!
+//! See the [struct docs](`Bytes`) for more details.
+//!
+//! # `Buf`, `BufMut`
+//!
+//! These two traits provide read and write access to buffers. The underlying
+//! storage may or may not be in contiguous memory. For example, `Bytes` is a
+//! buffer that guarantees contiguous memory, but a [rope] stores the bytes in
+//! disjoint chunks. `Buf` and `BufMut` maintain cursors tracking the current
+//! position in the underlying byte storage. When bytes are read or written, the
+//! cursor is advanced.
+//!
+//! [rope]: https://en.wikipedia.org/wiki/Rope_(data_structure)
+//!
+//! ## Relation with `Read` and `Write`
+//!
+//! At first glance, it may seem that `Buf` and `BufMut` overlap in
+//! functionality with [`std::io::Read`] and [`std::io::Write`]. However, they
+//! serve different purposes. A buffer is the value that is provided as an
+//! argument to `Read::read` and `Write::write`. `Read` and `Write` may then
+//! perform a syscall, which has the potential of failing. Operations on `Buf`
+//! and `BufMut` are infallible.
+
+</span><span class="kw">extern crate </span>alloc;
+
+<span class="attr">#[cfg(feature = <span class="string">&quot;std&quot;</span>)]
+</span><span class="kw">extern crate </span>std;
+
+<span class="kw">pub mod </span>buf;
+<span class="kw">pub use </span><span class="kw">crate</span>::buf::{Buf, BufMut};
+
+<span class="kw">mod </span>bytes;
+<span class="kw">mod </span>bytes_mut;
+<span class="kw">mod </span>fmt;
+<span class="kw">mod </span>loom;
+<span class="kw">pub use </span><span class="kw">crate</span>::bytes::Bytes;
+<span class="kw">pub use </span><span class="kw">crate</span>::bytes_mut::BytesMut;
+
+<span class="comment">// Optional Serde support
+</span><span class="attr">#[cfg(feature = <span class="string">&quot;serde&quot;</span>)]
+</span><span class="kw">mod </span>serde;
+
+<span class="attr">#[inline(never)]
+#[cold]
+</span><span class="kw">fn </span>abort() -&gt; ! {
+ <span class="attr">#[cfg(feature = <span class="string">&quot;std&quot;</span>)]
+ </span>{
+ std::process::abort();
+ }
+
+ <span class="attr">#[cfg(not(feature = <span class="string">&quot;std&quot;</span>))]
+ </span>{
+ <span class="kw">struct </span>Abort;
+ <span class="kw">impl </span>Drop <span class="kw">for </span>Abort {
+ <span class="kw">fn </span>drop(<span class="kw-2">&amp;mut </span><span class="self">self</span>) {
+ <span class="macro">panic!</span>();
+ }
+ }
+ <span class="kw">let </span>_a = Abort;
+ <span class="macro">panic!</span>(<span class="string">&quot;abort&quot;</span>);
+ }
+}
+
+<span class="attr">#[inline(always)]
+#[cfg(feature = <span class="string">&quot;std&quot;</span>)]
+</span><span class="kw">fn </span>saturating_sub_usize_u64(a: usize, b: u64) -&gt; usize {
+ <span class="kw">use </span>core::convert::TryFrom;
+ <span class="kw">match </span>usize::try_from(b) {
+ <span class="prelude-val">Ok</span>(b) =&gt; a.saturating_sub(b),
+ <span class="prelude-val">Err</span>(<span class="kw">_</span>) =&gt; <span class="number">0</span>,
+ }
+}
+
+<span class="attr">#[inline(always)]
+#[cfg(feature = <span class="string">&quot;std&quot;</span>)]
+</span><span class="kw">fn </span>min_u64_usize(a: u64, b: usize) -&gt; usize {
+ <span class="kw">use </span>core::convert::TryFrom;
+ <span class="kw">match </span>usize::try_from(a) {
+ <span class="prelude-val">Ok</span>(a) =&gt; usize::min(a, b),
+ <span class="prelude-val">Err</span>(<span class="kw">_</span>) =&gt; b,
+ }
+}
+
+<span class="doccomment">/// Panic with a nice error message.
+</span><span class="attr">#[cold]
+</span><span class="kw">fn </span>panic_advance(idx: usize, len: usize) -&gt; ! {
+ <span class="macro">panic!</span>(
+ <span class="string">&quot;advance out of bounds: the len is {} but advancing by {}&quot;</span>,
+ len, idx
+ );
+}
+
+<span class="attr">#[cold]
+</span><span class="kw">fn </span>panic_does_not_fit(size: usize, nbytes: usize) -&gt; ! {
+ <span class="macro">panic!</span>(
+ <span class="string">&quot;size too large: the integer type can fit {} bytes, but nbytes is {}&quot;</span>,
+ size, nbytes
+ );
+}
+
+<span class="doccomment">/// Precondition: dst &gt;= original
+///
+/// The following line is equivalent to:
+///
+/// ```rust,ignore
+/// self.ptr.as_ptr().offset_from(ptr) as usize;
+/// ```
+///
+/// But due to min rust is 1.39 and it is only stabilized
+/// in 1.47, we cannot use it.
+</span><span class="attr">#[inline]
+</span><span class="kw">fn </span>offset_from(dst: <span class="kw-2">*const </span>u8, original: <span class="kw-2">*const </span>u8) -&gt; usize {
+ dst <span class="kw">as </span>usize - original <span class="kw">as </span>usize
+}
+</code></pre></div>
+</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/src/bytes/loom.rs.html b/src/bytes/loom.rs.html
new file mode 100644
index 0000000..cc90586
--- /dev/null
+++ b/src/bytes/loom.rs.html
@@ -0,0 +1,62 @@
+<!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="Source of the Rust file `src/loom.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>loom.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../../static.files/source-script-74087aa2e88f4475.js"></script><script defer src="../../source-files.js"></script><script defer src="../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><div class="width-limiter"><nav class="sub"><a class="sub-logo-container" href="../../bytes/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><pre class="src-line-numbers"><span id="1">1</span>
+<span id="2">2</span>
+<span id="3">3</span>
+<span id="4">4</span>
+<span id="5">5</span>
+<span id="6">6</span>
+<span id="7">7</span>
+<span id="8">8</span>
+<span id="9">9</span>
+<span id="10">10</span>
+<span id="11">11</span>
+<span id="12">12</span>
+<span id="13">13</span>
+<span id="14">14</span>
+<span id="15">15</span>
+<span id="16">16</span>
+<span id="17">17</span>
+<span id="18">18</span>
+<span id="19">19</span>
+<span id="20">20</span>
+<span id="21">21</span>
+<span id="22">22</span>
+<span id="23">23</span>
+<span id="24">24</span>
+<span id="25">25</span>
+<span id="26">26</span>
+<span id="27">27</span>
+<span id="28">28</span>
+<span id="29">29</span>
+<span id="30">30</span>
+</pre><pre class="rust"><code><span class="attr">#[cfg(not(all(test, loom)))]
+</span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">mod </span>sync {
+ <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">mod </span>atomic {
+ <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">use </span>core::sync::atomic::{AtomicPtr, AtomicUsize, Ordering};
+
+ <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">trait </span>AtomicMut&lt;T&gt; {
+ <span class="kw">fn </span>with_mut&lt;F, R&gt;(<span class="kw-2">&amp;mut </span><span class="self">self</span>, f: F) -&gt; R
+ <span class="kw">where
+ </span>F: FnOnce(<span class="kw-2">&amp;mut *mut </span>T) -&gt; R;
+ }
+
+ <span class="kw">impl</span>&lt;T&gt; AtomicMut&lt;T&gt; <span class="kw">for </span>AtomicPtr&lt;T&gt; {
+ <span class="kw">fn </span>with_mut&lt;F, R&gt;(<span class="kw-2">&amp;mut </span><span class="self">self</span>, f: F) -&gt; R
+ <span class="kw">where
+ </span>F: FnOnce(<span class="kw-2">&amp;mut *mut </span>T) -&gt; R,
+ {
+ f(<span class="self">self</span>.get_mut())
+ }
+ }
+ }
+}
+
+<span class="attr">#[cfg(all(test, loom))]
+</span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">mod </span>sync {
+ <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">mod </span>atomic {
+ <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">use </span>loom::sync::atomic::{AtomicPtr, AtomicUsize, Ordering};
+
+ <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">trait </span>AtomicMut&lt;T&gt; {}
+ }
+}
+</code></pre></div>
+</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/src/bytes/serde.rs.html b/src/bytes/serde.rs.html
new file mode 100644
index 0000000..7946f8c
--- /dev/null
+++ b/src/bytes/serde.rs.html
@@ -0,0 +1,180 @@
+<!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="Source of the Rust file `src/serde.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>serde.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-eabf764633b9d7be.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../static.files/light-777f3e9583f8c92d.css"><link rel="stylesheet" disabled href="../../static.files/dark-e2f4109f2e82e3af.css"><link rel="stylesheet" disabled href="../../static.files/ayu-c360e709a65bed99.css"><script id="default-settings" ></script><script src="../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="../../static.files/source-script-74087aa2e88f4475.js"></script><script defer src="../../source-files.js"></script><script defer src="../../static.files/main-c2d2a5dbaed13e6b.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><div class="width-limiter"><nav class="sub"><a class="sub-logo-container" href="../../bytes/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><pre class="src-line-numbers"><span id="1">1</span>
+<span id="2">2</span>
+<span id="3">3</span>
+<span id="4">4</span>
+<span id="5">5</span>
+<span id="6">6</span>
+<span id="7">7</span>
+<span id="8">8</span>
+<span id="9">9</span>
+<span id="10">10</span>
+<span id="11">11</span>
+<span id="12">12</span>
+<span id="13">13</span>
+<span id="14">14</span>
+<span id="15">15</span>
+<span id="16">16</span>
+<span id="17">17</span>
+<span id="18">18</span>
+<span id="19">19</span>
+<span id="20">20</span>
+<span id="21">21</span>
+<span id="22">22</span>
+<span id="23">23</span>
+<span id="24">24</span>
+<span id="25">25</span>
+<span id="26">26</span>
+<span id="27">27</span>
+<span id="28">28</span>
+<span id="29">29</span>
+<span id="30">30</span>
+<span id="31">31</span>
+<span id="32">32</span>
+<span id="33">33</span>
+<span id="34">34</span>
+<span id="35">35</span>
+<span id="36">36</span>
+<span id="37">37</span>
+<span id="38">38</span>
+<span id="39">39</span>
+<span id="40">40</span>
+<span id="41">41</span>
+<span id="42">42</span>
+<span id="43">43</span>
+<span id="44">44</span>
+<span id="45">45</span>
+<span id="46">46</span>
+<span id="47">47</span>
+<span id="48">48</span>
+<span id="49">49</span>
+<span id="50">50</span>
+<span id="51">51</span>
+<span id="52">52</span>
+<span id="53">53</span>
+<span id="54">54</span>
+<span id="55">55</span>
+<span id="56">56</span>
+<span id="57">57</span>
+<span id="58">58</span>
+<span id="59">59</span>
+<span id="60">60</span>
+<span id="61">61</span>
+<span id="62">62</span>
+<span id="63">63</span>
+<span id="64">64</span>
+<span id="65">65</span>
+<span id="66">66</span>
+<span id="67">67</span>
+<span id="68">68</span>
+<span id="69">69</span>
+<span id="70">70</span>
+<span id="71">71</span>
+<span id="72">72</span>
+<span id="73">73</span>
+<span id="74">74</span>
+<span id="75">75</span>
+<span id="76">76</span>
+<span id="77">77</span>
+<span id="78">78</span>
+<span id="79">79</span>
+<span id="80">80</span>
+<span id="81">81</span>
+<span id="82">82</span>
+<span id="83">83</span>
+<span id="84">84</span>
+<span id="85">85</span>
+<span id="86">86</span>
+<span id="87">87</span>
+<span id="88">88</span>
+<span id="89">89</span>
+</pre><pre class="rust"><code><span class="kw">use super</span>::{Bytes, BytesMut};
+<span class="kw">use </span>alloc::string::String;
+<span class="kw">use </span>alloc::vec::Vec;
+<span class="kw">use </span>core::{cmp, fmt};
+<span class="kw">use </span>serde::{de, Deserialize, Deserializer, Serialize, Serializer};
+
+<span class="macro">macro_rules! </span>serde_impl {
+ (<span class="macro-nonterminal">$ty</span>:ident, <span class="macro-nonterminal">$visitor_ty</span>:ident, <span class="macro-nonterminal">$from_slice</span>:ident, <span class="macro-nonterminal">$from_vec</span>:ident) =&gt; {
+ <span class="kw">impl </span>Serialize <span class="kw">for </span><span class="macro-nonterminal">$ty </span>{
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>serialize&lt;S&gt;(<span class="kw-2">&amp;</span><span class="self">self</span>, serializer: S) -&gt; <span class="prelude-ty">Result</span>&lt;S::Ok, S::Error&gt;
+ <span class="kw">where
+ </span>S: Serializer,
+ {
+ serializer.serialize_bytes(<span class="kw-2">&amp;</span><span class="self">self</span>)
+ }
+ }
+
+ <span class="kw">struct </span><span class="macro-nonterminal">$visitor_ty</span>;
+
+ <span class="kw">impl</span>&lt;<span class="lifetime">&#39;de</span>&gt; de::Visitor&lt;<span class="lifetime">&#39;de</span>&gt; <span class="kw">for </span><span class="macro-nonterminal">$visitor_ty </span>{
+ <span class="kw">type </span>Value = <span class="macro-nonterminal">$ty</span>;
+
+ <span class="kw">fn </span>expecting(<span class="kw-2">&amp;</span><span class="self">self</span>, formatter: <span class="kw-2">&amp;mut </span>fmt::Formatter&lt;<span class="lifetime">&#39;_</span>&gt;) -&gt; fmt::Result {
+ formatter.write_str(<span class="string">&quot;byte array&quot;</span>)
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>visit_seq&lt;V&gt;(<span class="self">self</span>, <span class="kw-2">mut </span>seq: V) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="self">Self</span>::Value, V::Error&gt;
+ <span class="kw">where
+ </span>V: de::SeqAccess&lt;<span class="lifetime">&#39;de</span>&gt;,
+ {
+ <span class="kw">let </span>len = cmp::min(seq.size_hint().unwrap_or(<span class="number">0</span>), <span class="number">4096</span>);
+ <span class="kw">let </span><span class="kw-2">mut </span>values: Vec&lt;u8&gt; = Vec::with_capacity(len);
+
+ <span class="kw">while let </span><span class="prelude-val">Some</span>(value) = seq.next_element()<span class="question-mark">? </span>{
+ values.push(value);
+ }
+
+ <span class="prelude-val">Ok</span>(<span class="macro-nonterminal">$ty</span>::<span class="macro-nonterminal">$from_vec</span>(values))
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>visit_bytes&lt;E&gt;(<span class="self">self</span>, v: <span class="kw-2">&amp;</span>[u8]) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="self">Self</span>::Value, E&gt;
+ <span class="kw">where
+ </span>E: de::Error,
+ {
+ <span class="prelude-val">Ok</span>(<span class="macro-nonterminal">$ty</span>::<span class="macro-nonterminal">$from_slice</span>(v))
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>visit_byte_buf&lt;E&gt;(<span class="self">self</span>, v: Vec&lt;u8&gt;) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="self">Self</span>::Value, E&gt;
+ <span class="kw">where
+ </span>E: de::Error,
+ {
+ <span class="prelude-val">Ok</span>(<span class="macro-nonterminal">$ty</span>::<span class="macro-nonterminal">$from_vec</span>(v))
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>visit_str&lt;E&gt;(<span class="self">self</span>, v: <span class="kw-2">&amp;</span>str) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="self">Self</span>::Value, E&gt;
+ <span class="kw">where
+ </span>E: de::Error,
+ {
+ <span class="prelude-val">Ok</span>(<span class="macro-nonterminal">$ty</span>::<span class="macro-nonterminal">$from_slice</span>(v.as_bytes()))
+ }
+
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>visit_string&lt;E&gt;(<span class="self">self</span>, v: String) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="self">Self</span>::Value, E&gt;
+ <span class="kw">where
+ </span>E: de::Error,
+ {
+ <span class="prelude-val">Ok</span>(<span class="macro-nonterminal">$ty</span>::<span class="macro-nonterminal">$from_vec</span>(v.into_bytes()))
+ }
+ }
+
+ <span class="kw">impl</span>&lt;<span class="lifetime">&#39;de</span>&gt; Deserialize&lt;<span class="lifetime">&#39;de</span>&gt; <span class="kw">for </span><span class="macro-nonterminal">$ty </span>{
+ <span class="attr">#[inline]
+ </span><span class="kw">fn </span>deserialize&lt;D&gt;(deserializer: D) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="macro-nonterminal">$ty</span>, D::Error&gt;
+ <span class="kw">where
+ </span>D: Deserializer&lt;<span class="lifetime">&#39;de</span>&gt;,
+ {
+ deserializer.deserialize_byte_buf(<span class="macro-nonterminal">$visitor_ty</span>)
+ }
+ }
+ };
+}
+
+<span class="macro">serde_impl!</span>(Bytes, BytesVisitor, copy_from_slice, from);
+<span class="macro">serde_impl!</span>(BytesMut, BytesMutVisitor, from, from_vec);
+</code></pre></div>
+</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="bytes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0-nightly (42325c525 2022-11-11)" data-search-js="search-39ee4160c7dc16c9.js" data-settings-js="settings-3a0b9947ba1bd99a.js" data-settings-css="settings-a66f7524084a489a.css" ></div></body></html> \ No newline at end of file
diff --git a/static.files/COPYRIGHT-002d5dd09d9a4f50.txt b/static.files/COPYRIGHT-002d5dd09d9a4f50.txt
new file mode 100644
index 0000000..34e4813
--- /dev/null
+++ b/static.files/COPYRIGHT-002d5dd09d9a4f50.txt
@@ -0,0 +1,46 @@
+These documentation pages include resources by third parties. This copyright
+file applies only to those resources. The following third party resources are
+included, and carry their own copyright notices and license terms:
+
+* Fira Sans (FiraSans-Regular.woff2, FiraSans-Medium.woff2):
+
+ Copyright (c) 2014, Mozilla Foundation https://mozilla.org/
+ with Reserved Font Name Fira Sans.
+
+ Copyright (c) 2014, Telefonica S.A.
+
+ Licensed under the SIL Open Font License, Version 1.1.
+ See FiraSans-LICENSE.txt.
+
+* rustdoc.css, main.js, and playpen.js:
+
+ Copyright 2015 The Rust Developers.
+ Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or
+ the MIT license (LICENSE-MIT.txt) at your option.
+
+* normalize.css:
+
+ Copyright (c) Nicolas Gallagher and Jonathan Neal.
+ Licensed under the MIT license (see LICENSE-MIT.txt).
+
+* Source Code Pro (SourceCodePro-Regular.ttf.woff2,
+ SourceCodePro-Semibold.ttf.woff2, SourceCodePro-It.ttf.woff2):
+
+ Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/),
+ with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark
+ of Adobe Systems Incorporated in the United States and/or other countries.
+
+ Licensed under the SIL Open Font License, Version 1.1.
+ See SourceCodePro-LICENSE.txt.
+
+* Source Serif 4 (SourceSerif4-Regular.ttf.woff2, SourceSerif4-Bold.ttf.woff2,
+ SourceSerif4-It.ttf.woff2):
+
+ Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name
+ 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United
+ States and/or other countries.
+
+ Licensed under the SIL Open Font License, Version 1.1.
+ See SourceSerif4-LICENSE.md.
+
+This copyright file is intended to be distributed with rustdoc output.
diff --git a/static.files/FiraSans-LICENSE-1761dca11ffc8f19.txt b/static.files/FiraSans-LICENSE-1761dca11ffc8f19.txt
new file mode 100644
index 0000000..ff9afab
--- /dev/null
+++ b/static.files/FiraSans-LICENSE-1761dca11ffc8f19.txt
@@ -0,0 +1,94 @@
+Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A.
+with Reserved Font Name < Fira >,
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 b/static.files/FiraSans-Medium-8f9a781e4970d388.woff2
new file mode 100644
index 0000000..7a1e5fc
--- /dev/null
+++ b/static.files/FiraSans-Medium-8f9a781e4970d388.woff2
Binary files differ
diff --git a/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 b/static.files/FiraSans-Regular-018c141bf0843ffd.woff2
new file mode 100644
index 0000000..e766e06
--- /dev/null
+++ b/static.files/FiraSans-Regular-018c141bf0843ffd.woff2
Binary files differ
diff --git a/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt b/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt
new file mode 100644
index 0000000..16fe87b
--- /dev/null
+++ b/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/static.files/LICENSE-MIT-65090b722b3f6c56.txt b/static.files/LICENSE-MIT-65090b722b3f6c56.txt
new file mode 100644
index 0000000..31aa793
--- /dev/null
+++ b/static.files/LICENSE-MIT-65090b722b3f6c56.txt
@@ -0,0 +1,23 @@
+Permission is hereby granted, free of charge, to any
+person obtaining a copy of this software and associated
+documentation files (the "Software"), to deal in the
+Software without restriction, including without
+limitation the rights to use, copy, modify, merge,
+publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software
+is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice
+shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
+ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
+TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 b/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2
new file mode 100644
index 0000000..1866ad4
--- /dev/null
+++ b/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2
Binary files differ
diff --git a/static.files/NanumBarunGothic-LICENSE-2fe9ce67ec95245d.txt b/static.files/NanumBarunGothic-LICENSE-2fe9ce67ec95245d.txt
new file mode 100644
index 0000000..0bf4668
--- /dev/null
+++ b/static.files/NanumBarunGothic-LICENSE-2fe9ce67ec95245d.txt
@@ -0,0 +1,99 @@
+Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/),
+
+with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic,
+NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen,
+Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, Naver NanumMyeongjoEco,
+NanumMyeongjoEco, Naver NanumGothicLight, NanumGothicLight, NanumBarunGothic,
+Naver NanumBarunGothic, NanumSquareRound, NanumBarunPen, MaruBuri
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 b/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2
new file mode 100644
index 0000000..462c34e
--- /dev/null
+++ b/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2
Binary files differ
diff --git a/static.files/SourceCodePro-LICENSE-f554967dca0cf1dd.txt b/static.files/SourceCodePro-LICENSE-f554967dca0cf1dd.txt
new file mode 100644
index 0000000..0754257
--- /dev/null
+++ b/static.files/SourceCodePro-LICENSE-f554967dca0cf1dd.txt
@@ -0,0 +1,93 @@
+Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+
+This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 b/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2
new file mode 100644
index 0000000..10b558e
--- /dev/null
+++ b/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2
Binary files differ
diff --git a/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 b/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2
new file mode 100644
index 0000000..5ec64ee
--- /dev/null
+++ b/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2
Binary files differ
diff --git a/static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2 b/static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2
new file mode 100644
index 0000000..db57d21
--- /dev/null
+++ b/static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2
Binary files differ
diff --git a/static.files/SourceSerif4-It-d034fe4ef9d0fa00.ttf.woff2 b/static.files/SourceSerif4-It-d034fe4ef9d0fa00.ttf.woff2
new file mode 100644
index 0000000..1cbc021
--- /dev/null
+++ b/static.files/SourceSerif4-It-d034fe4ef9d0fa00.ttf.woff2
Binary files differ
diff --git a/static.files/SourceSerif4-LICENSE-964d32dc04f20ca3.md b/static.files/SourceSerif4-LICENSE-964d32dc04f20ca3.md
new file mode 100644
index 0000000..68ea189
--- /dev/null
+++ b/static.files/SourceSerif4-LICENSE-964d32dc04f20ca3.md
@@ -0,0 +1,93 @@
+Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries.
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+
+This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2 b/static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2
new file mode 100644
index 0000000..2db73fe
--- /dev/null
+++ b/static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2
Binary files differ
diff --git a/static.files/ayu-c360e709a65bed99.css b/static.files/ayu-c360e709a65bed99.css
new file mode 100644
index 0000000..2fa1fa3
--- /dev/null
+++ b/static.files/ayu-c360e709a65bed99.css
@@ -0,0 +1,285 @@
+/*
+Based off of the Ayu theme
+Original by Dempfi (https://github.com/dempfi/ayu)
+*/
+
+:root {
+ --main-background-color: #0f1419;
+ --main-color: #c5c5c5;
+ --settings-input-color: #ffb454;
+ --sidebar-background-color: #14191f;
+ --sidebar-background-color-hover: rgba(70, 70, 70, 0.33);
+ --code-block-background-color: #191f26;
+ --scrollbar-track-background-color: transparent;
+ --scrollbar-thumb-background-color: #5c6773;
+ --scrollbar-color: #5c6773 #24292f;
+ --headings-border-bottom-color: #5c6773;
+ --border-color: #5c6773;
+ --button-background-color: #141920;
+ --right-side-color: grey;
+ --code-attribute-color: #999;
+ --toggles-color: #999;
+ --search-input-focused-border-color: #5c6773; /* Same as `--border-color`. */
+ --copy-path-button-color: #fff;
+ --copy-path-img-filter: invert(70%);
+ --copy-path-img-hover-filter: invert(100%);
+ --codeblock-error-hover-color: rgb(255, 0, 0);
+ --codeblock-error-color: rgba(255, 0, 0, .5);
+ --codeblock-ignore-hover-color: rgb(255, 142, 0);
+ --codeblock-ignore-color: rgba(255, 142, 0, .6);
+ --type-link-color: #ffa0a5;
+ --trait-link-color: #39afd7;
+ --assoc-item-link-color: #39afd7;
+ --function-link-color: #fdd687;
+ --macro-link-color: #a37acc;
+ --keyword-link-color: #39afd7;
+ --mod-link-color: #39afd7;
+ --link-color: #39afd7;
+ --sidebar-link-color: #53b1db;
+ --sidebar-current-link-background-color: transparent;
+ --search-result-link-focus-background-color: #3c3c3c;
+ --search-result-border-color: #aaa3;
+ --stab-background-color: #314559;
+ --stab-code-color: #e6e1cf;
+ --search-color: #fff;
+ --code-highlight-kw-color: #ff7733;
+ --code-highlight-kw-2-color: #ff7733;
+ --code-highlight-lifetime-color: #ff7733;
+ --code-highlight-prelude-color: #69f2df;
+ --code-highlight-prelude-val-color: #ff7733;
+ --code-highlight-number-color: #b8cc52;
+ --code-highlight-string-color: #b8cc52;
+ --code-highlight-literal-color: #ff7733;
+ --code-highlight-attribute-color: #e6e1cf;
+ --code-highlight-self-color: #36a3d9;
+ --code-highlight-macro-color: #a37acc;
+ --code-highlight-question-mark-color: #ff9011;
+ --code-highlight-comment-color: #788797;
+ --code-highlight-doc-comment-color: #a1ac88;
+ --example-line-numbers-border-color: none;
+ --src-line-numbers-span-color: #5c6773;
+ --src-line-number-highlighted-background-color: rgba(255, 236, 164, 0.06);
+ --test-arrow-color: #788797;
+ --test-arrow-background-color: rgba(57, 175, 215, 0.09);
+ --test-arrow-hover-color: #c5c5c5;
+ --test-arrow-hover-background-color: rgba(57, 175, 215, 0.368);
+ --target-background-color: rgba(255, 236, 164, 0.06);
+ --target-border-color: rgba(255, 180, 76, 0.85);
+ --rust-logo-filter: drop-shadow(1px 0 0px #fff)
+ drop-shadow(0 1px 0 #fff)
+ drop-shadow(-1px 0 0 #fff)
+ drop-shadow(0 -1px 0 #fff);
+ /* match border-color; uses https://codepen.io/sosuke/pen/Pjoqqp */
+ --crate-search-div-filter: invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg)
+ brightness(94%) contrast(94%);
+ --crate-search-div-hover-filter: invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg)
+ brightness(113%) contrast(76%);
+ --crate-search-hover-border: #e0e0e0;
+}
+
+.slider {
+ background-color: #ccc;
+}
+.slider:before {
+ background-color: white;
+}
+input:focus + .slider {
+ box-shadow: 0 0 0 2px #0a84ff, 0 0 0 6px rgba(10, 132, 255, 0.3);
+}
+
+h1, h2, h3, h4 {
+ color: white;
+}
+h1 a {
+ color: #fff;
+}
+h4 {
+ border: none;
+}
+
+.docblock code {
+ color: #ffb454;
+}
+.code-header {
+ color: #e6e1cf;
+}
+.docblock pre > code, pre > code {
+ color: #e6e1cf;
+}
+.item-info code {
+ color: #e6e1cf;
+}
+.docblock a > code {
+ color: #39AFD7 !important;
+}
+pre, .rustdoc.source .example-wrap {
+ color: #e6e1cf;
+}
+
+.sidebar .current,
+.sidebar a:hover {
+ color: #ffb44c;
+}
+
+.sidebar-elems .location {
+ color: #ff7733;
+}
+
+.src-line-numbers .line-highlighted {
+ color: #708090;
+ padding-right: 4px;
+ border-right: 1px solid #ffb44c;
+}
+
+.search-results a:hover {
+ color: #fff !important;
+ background-color: #3c3c3c;
+}
+
+.search-results a:focus {
+ color: #fff !important;
+ background-color: #3c3c3c;
+}
+.search-results a {
+ color: #0096cf;
+}
+.search-results a div.desc {
+ color: #c5c5c5;
+}
+
+.content .item-info::before { color: #ccc; }
+
+.sidebar h2 a,
+.sidebar h3 a {
+ color: white;
+}
+body.source .example-wrap pre.rust a {
+ background: #333;
+}
+
+details.rustdoc-toggle > summary::before {
+ filter: invert(100%);
+}
+
+.module-item .stab,
+.import-item .stab {
+ color: #000;
+}
+
+.result-name .primitive > i, .result-name .keyword > i {
+ color: #788797;
+}
+
+.search-failed a {
+ color: #39AFD7;
+}
+
+.tooltip::after {
+ background-color: #314559;
+ color: #c5c5c5;
+}
+
+.tooltip::before {
+ border-color: transparent #314559 transparent transparent;
+}
+
+.notable-traits-tooltiptext {
+ background-color: #314559;
+}
+
+#titles > button.selected {
+ background-color: #141920 !important;
+ border-bottom: 1px solid #ffb44c !important;
+ border-top: none;
+}
+
+#titles > button:not(.selected) {
+ background-color: transparent !important;
+ border: none;
+}
+
+#titles > button:hover {
+ border-bottom: 1px solid rgba(242, 151, 24, 0.3);
+}
+
+#titles > button > div.count {
+ color: #888;
+}
+
+/* rules that this theme does not need to set, here to satisfy the rule checker */
+/* note that a lot of these are partially set in some way (meaning they are set
+individually rather than as a group) */
+/* FIXME: these rules should be at the bottom of the file but currently must be
+above the `@media (max-width: 700px)` rules due to a bug in the css checker */
+/* see https://github.com/rust-lang/rust/pull/71237#issuecomment-618170143 */
+pre.rust .lifetime {}
+pre.rust .kw {}
+#titles > button:hover, #titles > button.selected {}
+pre.rust .self, pre.rust .bool-val, pre.rust .prelude-val, pre.rust .attribute {}
+pre.rust .kw-2, pre.rust .prelude-ty {}
+
+kbd {
+ color: #c5c5c5;
+ background-color: #314559;
+ box-shadow: inset 0 -1px 0 #5c6773;
+}
+
+#settings-menu > a, #help-button > a {
+ color: #fff;
+}
+
+#settings-menu > a img {
+ filter: invert(100);
+}
+
+#settings-menu > a:hover, #settings-menu > a:focus,
+#help-button > a:hover, #help-button > a:focus {
+ border-color: #e0e0e0;
+}
+
+.search-results .result-name span.alias {
+ color: #c5c5c5;
+}
+.search-results .result-name span.grey {
+ color: #999;
+}
+
+#source-sidebar > .title {
+ color: #fff;
+}
+#source-sidebar div.files > a:hover, details.dir-entry summary:hover,
+#source-sidebar div.files > a:focus, details.dir-entry summary:focus {
+ background-color: #14191f;
+ color: #ffb44c;
+}
+#source-sidebar div.files > a.selected {
+ background-color: #14191f;
+ color: #ffb44c;
+}
+
+.scraped-example-list .scrape-help {
+ border-color: #aaa;
+ color: #eee;
+}
+.scraped-example-list .scrape-help:hover {
+ border-color: white;
+ color: white;
+}
+.scraped-example .example-wrap .rust span.highlight {
+ background: rgb(91, 59, 1);
+}
+.scraped-example .example-wrap .rust span.highlight.focus {
+ background: rgb(124, 75, 15);
+}
+.scraped-example:not(.expanded) .code-wrapper:before {
+ background: linear-gradient(to bottom, rgba(15, 20, 25, 1), rgba(15, 20, 25, 0));
+}
+.scraped-example:not(.expanded) .code-wrapper:after {
+ background: linear-gradient(to top, rgba(15, 20, 25, 1), rgba(15, 20, 25, 0));
+}
+.toggle-line-inner {
+ background: #999;
+}
+.toggle-line:hover .toggle-line-inner {
+ background: #c5c5c5;
+}
diff --git a/static.files/clipboard-7571035ce49a181d.svg b/static.files/clipboard-7571035ce49a181d.svg
new file mode 100644
index 0000000..8adbd99
--- /dev/null
+++ b/static.files/clipboard-7571035ce49a181d.svg
@@ -0,0 +1 @@
+<svg width="24" height="25" viewBox="0 0 24 25" xmlns="http://www.w3.org/2000/svg" aria-label="Copy to clipboard"><path d="M18 20h2v3c0 1-1 2-2 2H2c-.998 0-2-1-2-2V5c0-.911.755-1.667 1.667-1.667h5A3.323 3.323 0 0110 0a3.323 3.323 0 013.333 3.333h5C19.245 3.333 20 4.09 20 5v8.333h-2V9H2v14h16v-3zM3 7h14c0-.911-.793-1.667-1.75-1.667H13.5c-.957 0-1.75-.755-1.75-1.666C11.75 2.755 10.957 2 10 2s-1.75.755-1.75 1.667c0 .911-.793 1.666-1.75 1.666H4.75C3.793 5.333 3 6.09 3 7z"/><path d="M4 19h6v2H4zM12 11H4v2h8zM4 17h4v-2H4zM15 15v-3l-4.5 4.5L15 21v-3l8.027-.032L23 15z"/></svg>
diff --git a/static.files/dark-e2f4109f2e82e3af.css b/static.files/dark-e2f4109f2e82e3af.css
new file mode 100644
index 0000000..43f8dd4
--- /dev/null
+++ b/static.files/dark-e2f4109f2e82e3af.css
@@ -0,0 +1,182 @@
+:root {
+ --main-background-color: #353535;
+ --main-color: #ddd;
+ --settings-input-color: #2196f3;
+ --sidebar-background-color: #505050;
+ --sidebar-background-color-hover: #676767;
+ --code-block-background-color: #2A2A2A;
+ --scrollbar-track-background-color: #717171;
+ --scrollbar-thumb-background-color: rgba(32, 34, 37, .6);
+ --scrollbar-color: rgba(32,34,37,.6) #5a5a5a;
+ --headings-border-bottom-color: #d2d2d2;
+ --border-color: #e0e0e0;
+ --button-background-color: #f0f0f0;
+ --right-side-color: grey;
+ --code-attribute-color: #999;
+ --toggles-color: #999;
+ --search-input-focused-border-color: #008dfd;
+ --copy-path-button-color: #999;
+ --copy-path-img-filter: invert(50%);
+ --copy-path-img-hover-filter: invert(65%);
+ --codeblock-error-hover-color: rgb(255, 0, 0);
+ --codeblock-error-color: rgba(255, 0, 0, .5);
+ --codeblock-ignore-hover-color: rgb(255, 142, 0);
+ --codeblock-ignore-color: rgba(255, 142, 0, .6);
+ --type-link-color: #2dbfb8;
+ --trait-link-color: #b78cf2;
+ --assoc-item-link-color: #d2991d;
+ --function-link-color: #2bab63;
+ --macro-link-color: #09bd00;
+ --keyword-link-color: #d2991d;
+ --mod-link-color: #d2991d;
+ --link-color: #d2991d;
+ --sidebar-link-color: #fdbf35;
+ --sidebar-current-link-background-color: #444;
+ --search-result-link-focus-background-color: #616161;
+ --search-result-border-color: #aaa3;
+ --stab-background-color: #314559;
+ --stab-code-color: #e6e1cf;
+ --search-color: #111;
+ --code-highlight-kw-color: #ab8ac1;
+ --code-highlight-kw-2-color: #769acb;
+ --code-highlight-lifetime-color: #d97f26;
+ --code-highlight-prelude-color: #769acb;
+ --code-highlight-prelude-val-color: #ee6868;
+ --code-highlight-number-color: #83a300;
+ --code-highlight-string-color: #83a300;
+ --code-highlight-literal-color: #ee6868;
+ --code-highlight-attribute-color: #ee6868;
+ --code-highlight-self-color: #ee6868;
+ --code-highlight-macro-color: #3e999f;
+ --code-highlight-question-mark-color: #ff9011;
+ --code-highlight-comment-color: #8d8d8b;
+ --code-highlight-doc-comment-color: #8ca375;
+ --example-line-numbers-border-color: #4a4949;
+ --src-line-numbers-span-color: #3b91e2;
+ --src-line-number-highlighted-background-color: #0a042f;
+ --test-arrow-color: #dedede;
+ --test-arrow-background-color: rgba(78, 139, 202, 0.2);
+ --test-arrow-hover-color: #dedede;
+ --test-arrow-hover-background-color: #4e8bca;
+ --target-background-color: #494a3d;
+ --target-border-color: #bb7410;
+ --rust-logo-filter: drop-shadow(1px 0 0px #fff)
+ drop-shadow(0 1px 0 #fff)
+ drop-shadow(-1px 0 0 #fff)
+ drop-shadow(0 -1px 0 #fff);
+ /* match border-color; uses https://codepen.io/sosuke/pen/Pjoqqp */
+ --crate-search-div-filter: invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg)
+ brightness(90%) contrast(90%);
+ --crate-search-div-hover-filter: invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg)
+ brightness(100%) contrast(91%);
+ --crate-search-hover-border: #2196f3;
+}
+
+.slider {
+ background-color: #ccc;
+}
+.slider:before {
+ background-color: white;
+}
+input:focus + .slider {
+ box-shadow: 0 0 0 2px #0a84ff, 0 0 0 6px rgba(10, 132, 255, 0.3);
+}
+
+.content .item-info::before { color: #ccc; }
+
+body.source .example-wrap pre.rust a {
+ background: #333;
+}
+
+details.rustdoc-toggle > summary::before {
+ filter: invert(100%);
+}
+
+.search-failed a {
+ color: #0089ff;
+}
+
+.tooltip::after {
+ background-color: #000;
+ color: #fff;
+ border-color: #000;
+}
+
+.tooltip::before {
+ border-color: transparent black transparent transparent;
+}
+
+.notable-traits-tooltiptext {
+ background-color: #111;
+}
+
+#titles > button:not(.selected) {
+ background-color: #252525;
+ border-top-color: #252525;
+}
+
+#titles > button:hover, #titles > button.selected {
+ border-top-color: #0089ff;
+ background-color: #353535;
+}
+
+#titles > button > div.count {
+ color: #888;
+}
+
+kbd {
+ color: #000;
+ background-color: #fafbfc;
+ box-shadow: inset 0 -1px 0 #c6cbd1;
+}
+
+#settings-menu > a, #help-button > a {
+ color: #000;
+}
+
+#settings-menu > a:hover, #settings-menu > a:focus,
+#help-button > a:hover, #help-button > a:focus {
+ border-color: #ffb900;
+}
+
+.search-results .result-name span.alias {
+ color: #fff;
+}
+.search-results .result-name span.grey {
+ color: #ccc;
+}
+
+#source-sidebar div.files > a:hover, details.dir-entry summary:hover,
+#source-sidebar div.files > a:focus, details.dir-entry summary:focus {
+ background-color: #444;
+}
+#source-sidebar div.files > a.selected {
+ background-color: #333;
+}
+
+.scraped-example-list .scrape-help {
+ border-color: #aaa;
+ color: #eee;
+}
+.scraped-example-list .scrape-help:hover {
+ border-color: white;
+ color: white;
+}
+.scraped-example .example-wrap .rust span.highlight {
+ background: rgb(91, 59, 1);
+}
+.scraped-example .example-wrap .rust span.highlight.focus {
+ background: rgb(124, 75, 15);
+}
+.scraped-example:not(.expanded) .code-wrapper:before {
+ background: linear-gradient(to bottom, rgba(53, 53, 53, 1), rgba(53, 53, 53, 0));
+}
+.scraped-example:not(.expanded) .code-wrapper:after {
+ background: linear-gradient(to top, rgba(53, 53, 53, 1), rgba(53, 53, 53, 0));
+}
+.toggle-line-inner {
+ background: #999;
+}
+.toggle-line:hover .toggle-line-inner {
+ background: #c5c5c5;
+}
diff --git a/static.files/down-arrow-927217e04c7463ac.svg b/static.files/down-arrow-927217e04c7463ac.svg
new file mode 100644
index 0000000..5d76a64
--- /dev/null
+++ b/static.files/down-arrow-927217e04c7463ac.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="Layer_1" width="128" height="128" enable-background="new 0 0 128 128" version="1.1" viewBox="-30 -20 176 176" xml:space="preserve"><g><line x1="111" x2="64" y1="40.5" y2="87.499" fill="none" stroke="#000000" stroke-linecap="square" stroke-miterlimit="10" stroke-width="12"/><line x1="64" x2="17" y1="87.499" y2="40.5" fill="none" stroke="#000000" stroke-linecap="square" stroke-miterlimit="10" stroke-width="12"/></g></svg> \ No newline at end of file
diff --git a/static.files/favicon-16x16-8b506e7a72182f1c.png b/static.files/favicon-16x16-8b506e7a72182f1c.png
new file mode 100644
index 0000000..ea4b45c
--- /dev/null
+++ b/static.files/favicon-16x16-8b506e7a72182f1c.png
Binary files differ
diff --git a/static.files/favicon-2c020d218678b618.svg b/static.files/favicon-2c020d218678b618.svg
new file mode 100644
index 0000000..8b34b51
--- /dev/null
+++ b/static.files/favicon-2c020d218678b618.svg
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;">
+<defs>
+ <style type="text/css"><![CDATA[
+ #logo {
+ fill-rule: nonzero;
+ }
+ #logo-teeth {
+ stroke: #000000;
+ stroke-width: 0.92px;
+ }
+ @media (prefers-color-scheme: dark) {
+ #logo {
+ fill: #FFFFFF;
+ fill-rule: nonzero;
+ }
+ #logo-teeth {
+ fill: #FFFFFF;
+ stroke: #FFFFFF;
+ stroke-width: 0.92px;
+ }
+ }
+ ]]></style>
+</defs>
+<path id="logo" d="M15.993,1.54c-7.972,0 -14.461,6.492 -14.461,14.462c0,7.969 6.492,14.461 14.461,14.461c7.97,0 14.462,-6.492 14.462,-14.461c0,-7.97 -6.492,-14.462 -14.462,-14.462Zm-0.021,1.285c0.511,0.013 0.924,0.439 0.924,0.951c0,0.522 -0.43,0.952 -0.952,0.952c-0.522,0 -0.951,-0.43 -0.951,-0.952c0,0 0,0 0,0c0,-0.522 0.429,-0.952 0.951,-0.952c0.01,0 0.019,0.001 0.028,0.001Zm2.178,1.566c3.379,0.633 6.313,2.723 8.016,5.709l-1.123,2.533c-0.193,0.438 0.006,0.952 0.44,1.147l2.16,0.958c0.067,0.675 0.076,1.355 0.025,2.031l-1.202,0c-0.12,0 -0.169,0.08 -0.169,0.196l0,0.551c0,1.297 -0.731,1.582 -1.373,1.652c-0.612,0.07 -1.288,-0.257 -1.374,-0.63c-0.361,-2.029 -0.961,-2.46 -1.909,-3.21c1.178,-0.746 2.401,-1.85 2.401,-3.325c0,-1.594 -1.092,-2.597 -1.835,-3.09c-1.046,-0.688 -2.203,-0.826 -2.515,-0.826l-12.421,0c1.717,-1.918 4.02,-3.218 6.55,-3.696l1.466,1.536c0.33,0.346 0.878,0.361 1.223,0.028l1.64,-1.564Zm-13.522,7.043c0.511,0.015 0.924,0.44 0.924,0.951c0,0.522 -0.43,0.952 -0.952,0.952c-0.522,0 -0.951,-0.43 -0.951,-0.952c0,0 0,0 0,0c0,-0.522 0.429,-0.951 0.951,-0.951c0.009,0 0.019,0 0.028,0Zm22.685,0.043c0.511,0.015 0.924,0.44 0.924,0.951c0,0.522 -0.43,0.952 -0.952,0.952c-0.522,0 -0.951,-0.43 -0.951,-0.952c0,0 0,0 0,0c0,-0.522 0.429,-0.952 0.951,-0.952c0.01,0 0.019,0 0.028,0.001Zm-20.892,0.153l1.658,0l0,7.477l-3.347,0c-0.414,-1.452 -0.542,-2.97 -0.38,-4.47l2.05,-0.912c0.438,-0.195 0.637,-0.706 0.441,-1.144l-0.422,-0.951Zm6.92,0.079l3.949,0c0.205,0 1.441,0.236 1.441,1.163c0,0.768 -0.948,1.043 -1.728,1.043l-3.665,0l0.003,-2.206Zm0,5.373l3.026,0c0.275,0 1.477,0.079 1.86,1.615c0.119,0.471 0.385,2.007 0.566,2.499c0.18,0.551 0.911,1.652 1.691,1.652l4.938,0c-0.331,0.444 -0.693,0.863 -1.083,1.255l-2.01,-0.432c-0.468,-0.101 -0.93,0.199 -1.031,0.667l-0.477,2.228c-3.104,1.406 -6.672,1.389 -9.762,-0.046l-0.478,-2.228c-0.101,-0.468 -0.56,-0.767 -1.028,-0.667l-1.967,0.423c-0.365,-0.377 -0.704,-0.778 -1.016,-1.2l9.567,0c0.107,0 0.181,-0.018 0.181,-0.119l0,-3.384c0,-0.097 -0.074,-0.119 -0.181,-0.119l-2.799,0l0.003,-2.144Zm-4.415,7.749c0.512,0.015 0.924,0.44 0.924,0.951c0,0.522 -0.429,0.952 -0.951,0.952c-0.522,0 -0.952,-0.43 -0.952,-0.952c0,0 0,0 0,0c0,-0.522 0.43,-0.952 0.952,-0.952c0.009,0 0.018,0.001 0.027,0.001Zm14.089,0.043c0.511,0.015 0.924,0.439 0.923,0.951c0,0.522 -0.429,0.952 -0.951,0.952c-0.522,0 -0.951,-0.43 -0.951,-0.952c0,0 0,0 0,0c0,-0.522 0.429,-0.952 0.951,-0.952c0.009,0 0.018,0 0.028,0.001Z"/><path id="logo-teeth" d="M29.647,16.002c0,7.49 -6.163,13.653 -13.654,13.653c-7.49,0 -13.654,-6.163 -13.654,-13.653c0,-7.491 6.164,-13.654 13.654,-13.654c7.491,0 13.654,6.163 13.654,13.654Zm-0.257,-1.319l2.13,1.319l-2.13,1.318l1.83,1.71l-2.344,0.878l1.463,2.035l-2.475,0.404l1.04,2.282l-2.506,-0.089l0.575,2.442l-2.441,-0.576l0.089,2.506l-2.283,-1.04l-0.403,2.475l-2.035,-1.462l-0.878,2.343l-1.71,-1.829l-1.319,2.129l-1.318,-2.129l-1.71,1.829l-0.878,-2.343l-2.035,1.462l-0.404,-2.475l-2.282,1.04l0.089,-2.506l-2.442,0.576l0.575,-2.442l-2.505,0.089l1.04,-2.282l-2.475,-0.404l1.462,-2.035l-2.343,-0.878l1.829,-1.71l-2.129,-1.318l2.129,-1.319l-1.829,-1.71l2.343,-0.878l-1.462,-2.035l2.475,-0.404l-1.04,-2.282l2.505,0.089l-0.575,-2.441l2.442,0.575l-0.089,-2.506l2.282,1.04l0.404,-2.475l2.035,1.463l0.878,-2.344l1.71,1.83l1.318,-2.13l1.319,2.13l1.71,-1.83l0.878,2.344l2.035,-1.463l0.403,2.475l2.283,-1.04l-0.089,2.506l2.441,-0.575l-0.575,2.441l2.506,-0.089l-1.04,2.282l2.475,0.404l-1.463,2.035l2.344,0.878l-1.83,1.71Z"/></svg>
diff --git a/static.files/favicon-32x32-422f7d1d52889060.png b/static.files/favicon-32x32-422f7d1d52889060.png
new file mode 100644
index 0000000..69b8613
--- /dev/null
+++ b/static.files/favicon-32x32-422f7d1d52889060.png
Binary files differ
diff --git a/static.files/light-777f3e9583f8c92d.css b/static.files/light-777f3e9583f8c92d.css
new file mode 100644
index 0000000..c8c5289
--- /dev/null
+++ b/static.files/light-777f3e9583f8c92d.css
@@ -0,0 +1,173 @@
+:root {
+ --main-background-color: white;
+ --main-color: black;
+ --settings-input-color: #2196f3;
+ --sidebar-background-color: #F5F5F5;
+ --sidebar-background-color-hover: #E0E0E0;
+ --code-block-background-color: #F5F5F5;
+ --scrollbar-track-background-color: #dcdcdc;
+ --scrollbar-thumb-background-color: rgba(36, 37, 39, 0.6);
+ --scrollbar-color: rgba(36, 37, 39, 0.6) #d9d9d9;
+ --headings-border-bottom-color: #ddd;
+ --border-color: #e0e0e0;
+ --button-background-color: #fff;
+ --right-side-color: grey;
+ --code-attribute-color: #999;
+ --toggles-color: #999;
+ --search-input-focused-border-color: #66afe9;
+ --copy-path-button-color: #999;
+ --copy-path-img-filter: invert(50%);
+ --copy-path-img-hover-filter: invert(35%);
+ --codeblock-error-hover-color: rgb(255, 0, 0);
+ --codeblock-error-color: rgba(255, 0, 0, .5);
+ --codeblock-ignore-hover-color: rgb(255, 142, 0);
+ --codeblock-ignore-color: rgba(255, 142, 0, .6);
+ --type-link-color: #ad378a;
+ --trait-link-color: #6e4fc9;
+ --assoc-item-link-color: #3873ad;
+ --function-link-color: #ad7c37;
+ --macro-link-color: #068000;
+ --keyword-link-color: #3873ad;
+ --mod-link-color: #3873ad;
+ --link-color: #3873ad;
+ --sidebar-link-color: #356da4;
+ --sidebar-current-link-background-color: #fff;
+ --search-result-link-focus-background-color: #ccc;
+ --search-result-border-color: #aaa3;
+ --stab-background-color: #fff5d6;
+ --stab-code-color: #000;
+ --search-color: #000;
+ --code-highlight-kw-color: #8959a8;
+ --code-highlight-kw-2-color: #4271ae;
+ --code-highlight-lifetime-color: #b76514;
+ --code-highlight-prelude-color: #4271ae;
+ --code-highlight-prelude-val-color: #c82829;
+ --code-highlight-number-color: #718c00;
+ --code-highlight-string-color: #718c00;
+ --code-highlight-literal-color: #c82829;
+ --code-highlight-attribute-color: #c82829;
+ --code-highlight-self-color: #c82829;
+ --code-highlight-macro-color: #3e999f;
+ --code-highlight-question-mark-color: #ff9011;
+ --code-highlight-comment-color: #8e908c;
+ --code-highlight-doc-comment-color: #4d4d4c;
+ --example-line-numbers-border-color: #c7c7c7;
+ --src-line-numbers-span-color: #c67e2d;
+ --src-line-number-highlighted-background-color: #fdffd3;
+ --test-arrow-color: #f5f5f5;
+ --test-arrow-background-color: rgba(78, 139, 202, 0.2);
+ --test-arrow-hover-color: #f5f5f5;
+ --test-arrow-hover-background-color: #4e8bca;
+ --target-background-color: #fdFfd3;
+ --target-border-color: #ad7c37;
+ --rust-logo-filter: initial;
+ /* match border-color; uses https://codepen.io/sosuke/pen/Pjoqqp */
+ --crate-search-div-filter: invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg)
+ brightness(114%) contrast(76%);
+ --crate-search-div-hover-filter: invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg)
+ brightness(96%) contrast(93%);
+ --crate-search-hover-border: #717171;
+}
+
+.slider {
+ background-color: #ccc;
+}
+.slider:before {
+ background-color: white;
+}
+input:focus + .slider {
+ box-shadow: 0 0 0 2px #0a84ff, 0 0 0 6px rgba(10, 132, 255, 0.3);
+}
+
+.content .item-info::before { color: #ccc; }
+
+body.source .example-wrap pre.rust a {
+ background: #eee;
+}
+
+.search-failed a {
+ color: #3873AD;
+}
+
+.tooltip::after {
+ background-color: #000;
+ color: #fff;
+}
+
+.tooltip::before {
+ border-color: transparent black transparent transparent;
+}
+
+.notable-traits-tooltiptext {
+ background-color: #eee;
+}
+
+#titles > button:not(.selected) {
+ background-color: #e6e6e6;
+ border-top-color: #e6e6e6;
+}
+
+#titles > button:hover, #titles > button.selected {
+ background-color: #ffffff;
+ border-top-color: #0089ff;
+}
+
+#titles > button > div.count {
+ color: #888;
+}
+
+kbd {
+ color: #000;
+ background-color: #fafbfc;
+ box-shadow: inset 0 -1px 0 #c6cbd1;
+}
+
+#settings-menu > a, #help-button > a {
+ color: #000;
+}
+
+#settings-menu > a:hover, #settings-menu > a:focus,
+#help-button > a:hover, #help-button > a:focus {
+ border-color: #717171;
+}
+
+.search-results .result-name span.alias {
+ color: #000;
+}
+.search-results .result-name span.grey {
+ color: #999;
+}
+
+#source-sidebar div.files > a:hover, details.dir-entry summary:hover,
+#source-sidebar div.files > a:focus, details.dir-entry summary:focus {
+ background-color: #E0E0E0;
+}
+#source-sidebar div.files > a.selected {
+ background-color: #fff;
+}
+.scraped-example-list .scrape-help {
+ border-color: #555;
+ color: #333;
+}
+.scraped-example-list .scrape-help:hover {
+ border-color: black;
+ color: black;
+}
+.scraped-example .example-wrap .rust span.highlight {
+ background: #fcffd6;
+}
+.scraped-example .example-wrap .rust span.highlight.focus {
+ background: #f6fdb0;
+}
+.scraped-example:not(.expanded) .code-wrapper:before {
+ background: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
+}
+.scraped-example:not(.expanded) .code-wrapper:after {
+ background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
+}
+.toggle-line-inner {
+ background: #ccc;
+}
+.toggle-line:hover .toggle-line-inner {
+ background: #999;
+}
diff --git a/static.files/main-c2d2a5dbaed13e6b.js b/static.files/main-c2d2a5dbaed13e6b.js
new file mode 100644
index 0000000..0426774
--- /dev/null
+++ b/static.files/main-c2d2a5dbaed13e6b.js
@@ -0,0 +1,1150 @@
+// Local js definitions:
+/* global addClass, getSettingValue, hasClass, searchState */
+/* global onEach, onEachLazy, removeClass */
+
+"use strict";
+
+// Get a value from the rustdoc-vars div, which is used to convey data from
+// Rust to the JS. If there is no such element, return null.
+function getVar(name) {
+ const el = document.getElementById("rustdoc-vars");
+ if (el) {
+ return el.attributes["data-" + name].value;
+ } else {
+ return null;
+ }
+}
+
+// Given a basename (e.g. "storage") and an extension (e.g. ".js"), return a URL
+// for a resource under the root-path, with the resource-suffix.
+function resourcePath(basename, extension) {
+ return getVar("root-path") + basename + getVar("resource-suffix") + extension;
+}
+
+function hideMain() {
+ addClass(document.getElementById(MAIN_ID), "hidden");
+}
+
+function showMain() {
+ removeClass(document.getElementById(MAIN_ID), "hidden");
+}
+
+function elemIsInParent(elem, parent) {
+ while (elem && elem !== document.body) {
+ if (elem === parent) {
+ return true;
+ }
+ elem = elem.parentElement;
+ }
+ return false;
+}
+
+function blurHandler(event, parentElem, hideCallback) {
+ if (!elemIsInParent(document.activeElement, parentElem) &&
+ !elemIsInParent(event.relatedTarget, parentElem)
+ ) {
+ hideCallback();
+ }
+}
+
+(function() {
+ window.rootPath = getVar("root-path");
+ window.currentCrate = getVar("current-crate");
+}());
+
+function setMobileTopbar() {
+ // FIXME: It would be nicer to generate this text content directly in HTML,
+ // but with the current code it's hard to get the right information in the right place.
+ const mobileLocationTitle = document.querySelector(".mobile-topbar h2");
+ const locationTitle = document.querySelector(".sidebar h2.location");
+ if (mobileLocationTitle && locationTitle) {
+ mobileLocationTitle.innerHTML = locationTitle.innerHTML;
+ }
+}
+
+// Gets the human-readable string for the virtual-key code of the
+// given KeyboardEvent, ev.
+//
+// This function is meant as a polyfill for KeyboardEvent#key,
+// since it is not supported in IE 11 or Chrome for Android. We also test for
+// KeyboardEvent#keyCode because the handleShortcut handler is
+// also registered for the keydown event, because Blink doesn't fire
+// keypress on hitting the Escape key.
+//
+// So I guess you could say things are getting pretty interoperable.
+function getVirtualKey(ev) {
+ if ("key" in ev && typeof ev.key !== "undefined") {
+ return ev.key;
+ }
+
+ const c = ev.charCode || ev.keyCode;
+ if (c === 27) {
+ return "Escape";
+ }
+ return String.fromCharCode(c);
+}
+
+const MAIN_ID = "main-content";
+const SETTINGS_BUTTON_ID = "settings-menu";
+const ALTERNATIVE_DISPLAY_ID = "alternative-display";
+const NOT_DISPLAYED_ID = "not-displayed";
+const HELP_BUTTON_ID = "help-button";
+
+function getSettingsButton() {
+ return document.getElementById(SETTINGS_BUTTON_ID);
+}
+
+function getHelpButton() {
+ return document.getElementById(HELP_BUTTON_ID);
+}
+
+// Returns the current URL without any query parameter or hash.
+function getNakedUrl() {
+ return window.location.href.split("?")[0].split("#")[0];
+}
+
+/**
+ * This function inserts `newNode` after `referenceNode`. It doesn't work if `referenceNode`
+ * doesn't have a parent node.
+ *
+ * @param {HTMLElement} newNode
+ * @param {HTMLElement} referenceNode
+ */
+function insertAfter(newNode, referenceNode) {
+ referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
+}
+
+/**
+ * This function creates a new `<section>` with the given `id` and `classes` if it doesn't already
+ * exist.
+ *
+ * More information about this in `switchDisplayedElement` documentation.
+ *
+ * @param {string} id
+ * @param {string} classes
+ */
+function getOrCreateSection(id, classes) {
+ let el = document.getElementById(id);
+
+ if (!el) {
+ el = document.createElement("section");
+ el.id = id;
+ el.className = classes;
+ insertAfter(el, document.getElementById(MAIN_ID));
+ }
+ return el;
+}
+
+/**
+ * Returns the `<section>` element which contains the displayed element.
+ *
+ * @return {HTMLElement}
+ */
+function getAlternativeDisplayElem() {
+ return getOrCreateSection(ALTERNATIVE_DISPLAY_ID, "content hidden");
+}
+
+/**
+ * Returns the `<section>` element which contains the not-displayed elements.
+ *
+ * @return {HTMLElement}
+ */
+function getNotDisplayedElem() {
+ return getOrCreateSection(NOT_DISPLAYED_ID, "hidden");
+}
+
+/**
+ * To nicely switch between displayed "extra" elements (such as search results or settings menu)
+ * and to alternate between the displayed and not displayed elements, we hold them in two different
+ * `<section>` elements. They work in pair: one holds the hidden elements while the other
+ * contains the displayed element (there can be only one at the same time!). So basically, we switch
+ * elements between the two `<section>` elements.
+ *
+ * @param {HTMLElement} elemToDisplay
+ */
+function switchDisplayedElement(elemToDisplay) {
+ const el = getAlternativeDisplayElem();
+
+ if (el.children.length > 0) {
+ getNotDisplayedElem().appendChild(el.firstElementChild);
+ }
+ if (elemToDisplay === null) {
+ addClass(el, "hidden");
+ showMain();
+ return;
+ }
+ el.appendChild(elemToDisplay);
+ hideMain();
+ removeClass(el, "hidden");
+}
+
+function browserSupportsHistoryApi() {
+ return window.history && typeof window.history.pushState === "function";
+}
+
+// eslint-disable-next-line no-unused-vars
+function loadCss(cssUrl) {
+ const link = document.createElement("link");
+ link.href = cssUrl;
+ link.type = "text/css";
+ link.rel = "stylesheet";
+ document.getElementsByTagName("head")[0].appendChild(link);
+}
+
+(function() {
+ const isHelpPage = window.location.pathname.endsWith("/help.html");
+
+ function loadScript(url) {
+ const script = document.createElement("script");
+ script.src = url;
+ document.head.append(script);
+ }
+
+ getSettingsButton().onclick = event => {
+ if (event.ctrlKey || event.altKey || event.metaKey) {
+ return;
+ }
+ addClass(getSettingsButton(), "rotate");
+ event.preventDefault();
+ // Sending request for the CSS and the JS files at the same time so it will
+ // hopefully be loaded when the JS will generate the settings content.
+ loadCss(getVar("static-root-path") + getVar("settings-css"));
+ loadScript(getVar("static-root-path") + getVar("settings-js"));
+ };
+
+ window.searchState = {
+ loadingText: "Loading search results...",
+ input: document.getElementsByClassName("search-input")[0],
+ outputElement: () => {
+ let el = document.getElementById("search");
+ if (!el) {
+ el = document.createElement("section");
+ el.id = "search";
+ getNotDisplayedElem().appendChild(el);
+ }
+ return el;
+ },
+ title: document.title,
+ titleBeforeSearch: document.title,
+ timeout: null,
+ // On the search screen, so you remain on the last tab you opened.
+ //
+ // 0 for "In Names"
+ // 1 for "In Parameters"
+ // 2 for "In Return Types"
+ currentTab: 0,
+ // tab and back preserves the element that was focused.
+ focusedByTab: [null, null, null],
+ clearInputTimeout: () => {
+ if (searchState.timeout !== null) {
+ clearTimeout(searchState.timeout);
+ searchState.timeout = null;
+ }
+ },
+ isDisplayed: () => searchState.outputElement().parentElement.id === ALTERNATIVE_DISPLAY_ID,
+ // Sets the focus on the search bar at the top of the page
+ focus: () => {
+ searchState.input.focus();
+ },
+ // Removes the focus from the search bar.
+ defocus: () => {
+ searchState.input.blur();
+ },
+ showResults: search => {
+ if (search === null || typeof search === "undefined") {
+ search = searchState.outputElement();
+ }
+ switchDisplayedElement(search);
+ searchState.mouseMovedAfterSearch = false;
+ document.title = searchState.title;
+ },
+ hideResults: () => {
+ switchDisplayedElement(null);
+ document.title = searchState.titleBeforeSearch;
+ // We also remove the query parameter from the URL.
+ if (browserSupportsHistoryApi()) {
+ history.replaceState(null, window.currentCrate + " - Rust",
+ getNakedUrl() + window.location.hash);
+ }
+ },
+ getQueryStringParams: () => {
+ const params = {};
+ window.location.search.substring(1).split("&").
+ map(s => {
+ const pair = s.split("=");
+ params[decodeURIComponent(pair[0])] =
+ typeof pair[1] === "undefined" ? null : decodeURIComponent(pair[1]);
+ });
+ return params;
+ },
+ setup: () => {
+ const search_input = searchState.input;
+ if (!searchState.input) {
+ return;
+ }
+ let searchLoaded = false;
+ function loadSearch() {
+ if (!searchLoaded) {
+ searchLoaded = true;
+ loadScript(getVar("static-root-path") + getVar("search-js"));
+ loadScript(resourcePath("search-index", ".js"));
+ }
+ }
+
+ search_input.addEventListener("focus", () => {
+ search_input.origPlaceholder = search_input.placeholder;
+ search_input.placeholder = "Type your search here.";
+ loadSearch();
+ });
+
+ if (search_input.value !== "") {
+ loadSearch();
+ }
+
+ const params = searchState.getQueryStringParams();
+ if (params.search !== undefined) {
+ const search = searchState.outputElement();
+ search.innerHTML = "<h3 class=\"search-loading\">" +
+ searchState.loadingText + "</h3>";
+ searchState.showResults(search);
+ loadSearch();
+ }
+ },
+ };
+
+ function getPageId() {
+ if (window.location.hash) {
+ const tmp = window.location.hash.replace(/^#/, "");
+ if (tmp.length > 0) {
+ return tmp;
+ }
+ }
+ return null;
+ }
+
+ const toggleAllDocsId = "toggle-all-docs";
+ let savedHash = "";
+
+ function handleHashes(ev) {
+ if (ev !== null && searchState.isDisplayed() && ev.newURL) {
+ // This block occurs when clicking on an element in the navbar while
+ // in a search.
+ switchDisplayedElement(null);
+ const hash = ev.newURL.slice(ev.newURL.indexOf("#") + 1);
+ if (browserSupportsHistoryApi()) {
+ // `window.location.search`` contains all the query parameters, not just `search`.
+ history.replaceState(null, "",
+ getNakedUrl() + window.location.search + "#" + hash);
+ }
+ const elem = document.getElementById(hash);
+ if (elem) {
+ elem.scrollIntoView();
+ }
+ }
+ // This part is used in case an element is not visible.
+ if (savedHash !== window.location.hash) {
+ savedHash = window.location.hash;
+ if (savedHash.length === 0) {
+ return;
+ }
+ expandSection(savedHash.slice(1)); // we remove the '#'
+ }
+ }
+
+ function onHashChange(ev) {
+ // If we're in mobile mode, we should hide the sidebar in any case.
+ hideSidebar();
+ handleHashes(ev);
+ }
+
+ function openParentDetails(elem) {
+ while (elem) {
+ if (elem.tagName === "DETAILS") {
+ elem.open = true;
+ }
+ elem = elem.parentNode;
+ }
+ }
+
+ function expandSection(id) {
+ openParentDetails(document.getElementById(id));
+ }
+
+ function handleEscape(ev) {
+ searchState.clearInputTimeout();
+ switchDisplayedElement(null);
+ if (browserSupportsHistoryApi()) {
+ history.replaceState(null, window.currentCrate + " - Rust",
+ getNakedUrl() + window.location.hash);
+ }
+ ev.preventDefault();
+ searchState.defocus();
+ window.hidePopoverMenus();
+ }
+
+ function handleShortcut(ev) {
+ // Don't interfere with browser shortcuts
+ const disableShortcuts = getSettingValue("disable-shortcuts") === "true";
+ if (ev.ctrlKey || ev.altKey || ev.metaKey || disableShortcuts) {
+ return;
+ }
+
+ if (document.activeElement.tagName === "INPUT" &&
+ document.activeElement.type !== "checkbox") {
+ switch (getVirtualKey(ev)) {
+ case "Escape":
+ handleEscape(ev);
+ break;
+ }
+ } else {
+ switch (getVirtualKey(ev)) {
+ case "Escape":
+ handleEscape(ev);
+ break;
+
+ case "s":
+ case "S":
+ ev.preventDefault();
+ searchState.focus();
+ break;
+
+ case "+":
+ ev.preventDefault();
+ expandAllDocs();
+ break;
+ case "-":
+ ev.preventDefault();
+ collapseAllDocs();
+ break;
+
+ case "?":
+ showHelp();
+ break;
+
+ default:
+ break;
+ }
+ }
+ }
+
+ document.addEventListener("keypress", handleShortcut);
+ document.addEventListener("keydown", handleShortcut);
+
+ function addSidebarItems() {
+ if (!window.SIDEBAR_ITEMS) {
+ return;
+ }
+ const sidebar = document.getElementsByClassName("sidebar-elems")[0];
+
+ /**
+ * Append to the sidebar a "block" of links - a heading along with a list (`<ul>`) of items.
+ *
+ * @param {string} shortty - A short type name, like "primitive", "mod", or "macro"
+ * @param {string} id - The HTML id of the corresponding section on the module page.
+ * @param {string} longty - A long, capitalized, plural name, like "Primitive Types",
+ * "Modules", or "Macros".
+ */
+ function block(shortty, id, longty) {
+ const filtered = window.SIDEBAR_ITEMS[shortty];
+ if (!filtered) {
+ return;
+ }
+
+ const h3 = document.createElement("h3");
+ h3.innerHTML = `<a href="index.html#${id}">${longty}</a>`;
+ const ul = document.createElement("ul");
+ ul.className = "block " + shortty;
+
+ for (const item of filtered) {
+ const name = item[0];
+ const desc = item[1]; // can be null
+
+ let path;
+ if (shortty === "mod") {
+ path = name + "/index.html";
+ } else {
+ path = shortty + "." + name + ".html";
+ }
+ const current_page = document.location.href.split("/").pop();
+ const link = document.createElement("a");
+ link.href = path;
+ link.title = desc;
+ if (path === current_page) {
+ link.className = "current";
+ }
+ link.textContent = name;
+ const li = document.createElement("li");
+ li.appendChild(link);
+ ul.appendChild(li);
+ }
+ sidebar.appendChild(h3);
+ sidebar.appendChild(ul);
+ }
+
+ if (sidebar) {
+ block("primitive", "primitives", "Primitive Types");
+ block("mod", "modules", "Modules");
+ block("macro", "macros", "Macros");
+ block("struct", "structs", "Structs");
+ block("enum", "enums", "Enums");
+ block("union", "unions", "Unions");
+ block("constant", "constants", "Constants");
+ block("static", "static", "Statics");
+ block("trait", "traits", "Traits");
+ block("fn", "functions", "Functions");
+ block("type", "types", "Type Definitions");
+ block("foreigntype", "foreign-types", "Foreign Types");
+ block("keyword", "keywords", "Keywords");
+ block("traitalias", "trait-aliases", "Trait Aliases");
+ }
+ }
+
+ window.register_implementors = imp => {
+ const implementors = document.getElementById("implementors-list");
+ const synthetic_implementors = document.getElementById("synthetic-implementors-list");
+ const inlined_types = new Set();
+
+ const TEXT_IDX = 0;
+ const SYNTHETIC_IDX = 1;
+ const TYPES_IDX = 2;
+
+ if (synthetic_implementors) {
+ // This `inlined_types` variable is used to avoid having the same implementation
+ // showing up twice. For example "String" in the "Sync" doc page.
+ //
+ // By the way, this is only used by and useful for traits implemented automatically
+ // (like "Send" and "Sync").
+ onEachLazy(synthetic_implementors.getElementsByClassName("impl"), el => {
+ const aliases = el.getAttribute("data-aliases");
+ if (!aliases) {
+ return;
+ }
+ aliases.split(",").forEach(alias => {
+ inlined_types.add(alias);
+ });
+ });
+ }
+
+ let currentNbImpls = implementors.getElementsByClassName("impl").length;
+ const traitName = document.querySelector("h1.fqn > .trait").textContent;
+ const baseIdName = "impl-" + traitName + "-";
+ const libs = Object.getOwnPropertyNames(imp);
+ // We don't want to include impls from this JS file, when the HTML already has them.
+ // The current crate should always be ignored. Other crates that should also be
+ // ignored are included in the attribute `data-ignore-extern-crates`.
+ const script = document
+ .querySelector("script[data-ignore-extern-crates]");
+ const ignoreExternCrates = script ? script.getAttribute("data-ignore-extern-crates") : "";
+ for (const lib of libs) {
+ if (lib === window.currentCrate || ignoreExternCrates.indexOf(lib) !== -1) {
+ continue;
+ }
+ const structs = imp[lib];
+
+ struct_loop:
+ for (const struct of structs) {
+ const list = struct[SYNTHETIC_IDX] ? synthetic_implementors : implementors;
+
+ // The types list is only used for synthetic impls.
+ // If this changes, `main.js` and `write_shared.rs` both need changed.
+ if (struct[SYNTHETIC_IDX]) {
+ for (const struct_type of struct[TYPES_IDX]) {
+ if (inlined_types.has(struct_type)) {
+ continue struct_loop;
+ }
+ inlined_types.add(struct_type);
+ }
+ }
+
+ const code = document.createElement("h3");
+ code.innerHTML = struct[TEXT_IDX];
+ addClass(code, "code-header");
+
+ onEachLazy(code.getElementsByTagName("a"), elem => {
+ const href = elem.getAttribute("href");
+
+ if (href && href.indexOf("http") !== 0) {
+ elem.setAttribute("href", window.rootPath + href);
+ }
+ });
+
+ const currentId = baseIdName + currentNbImpls;
+ const anchor = document.createElement("a");
+ anchor.href = "#" + currentId;
+ addClass(anchor, "anchor");
+
+ const display = document.createElement("div");
+ display.id = currentId;
+ addClass(display, "impl");
+ display.appendChild(anchor);
+ display.appendChild(code);
+ list.appendChild(display);
+ currentNbImpls += 1;
+ }
+ }
+ };
+ if (window.pending_implementors) {
+ window.register_implementors(window.pending_implementors);
+ }
+
+ function addSidebarCrates() {
+ if (!window.ALL_CRATES) {
+ return;
+ }
+ const sidebarElems = document.getElementsByClassName("sidebar-elems")[0];
+ if (!sidebarElems) {
+ return;
+ }
+ // Draw a convenient sidebar of known crates if we have a listing
+ const h3 = document.createElement("h3");
+ h3.innerHTML = "Crates";
+ const ul = document.createElement("ul");
+ ul.className = "block crate";
+
+ for (const crate of window.ALL_CRATES) {
+ const link = document.createElement("a");
+ link.href = window.rootPath + crate + "/index.html";
+ if (window.rootPath !== "./" && crate === window.currentCrate) {
+ link.className = "current";
+ }
+ link.textContent = crate;
+
+ const li = document.createElement("li");
+ li.appendChild(link);
+ ul.appendChild(li);
+ }
+ sidebarElems.appendChild(h3);
+ sidebarElems.appendChild(ul);
+ }
+
+ function expandAllDocs() {
+ const innerToggle = document.getElementById(toggleAllDocsId);
+ removeClass(innerToggle, "will-expand");
+ onEachLazy(document.getElementsByClassName("rustdoc-toggle"), e => {
+ if (!hasClass(e, "type-contents-toggle")) {
+ e.open = true;
+ }
+ });
+ innerToggle.title = "collapse all docs";
+ innerToggle.children[0].innerText = "\u2212"; // "\u2212" is "−" minus sign
+ }
+
+ function collapseAllDocs() {
+ const innerToggle = document.getElementById(toggleAllDocsId);
+ addClass(innerToggle, "will-expand");
+ onEachLazy(document.getElementsByClassName("rustdoc-toggle"), e => {
+ if (e.parentNode.id !== "implementations-list" ||
+ (!hasClass(e, "implementors-toggle") &&
+ !hasClass(e, "type-contents-toggle"))
+ ) {
+ e.open = false;
+ }
+ });
+ innerToggle.title = "expand all docs";
+ innerToggle.children[0].innerText = "+";
+ }
+
+ function toggleAllDocs() {
+ const innerToggle = document.getElementById(toggleAllDocsId);
+ if (!innerToggle) {
+ return;
+ }
+ if (hasClass(innerToggle, "will-expand")) {
+ expandAllDocs();
+ } else {
+ collapseAllDocs();
+ }
+ }
+
+ (function() {
+ const toggles = document.getElementById(toggleAllDocsId);
+ if (toggles) {
+ toggles.onclick = toggleAllDocs;
+ }
+
+ const hideMethodDocs = getSettingValue("auto-hide-method-docs") === "true";
+ const hideImplementations = getSettingValue("auto-hide-trait-implementations") === "true";
+ const hideLargeItemContents = getSettingValue("auto-hide-large-items") !== "false";
+
+ function setImplementorsTogglesOpen(id, open) {
+ const list = document.getElementById(id);
+ if (list !== null) {
+ onEachLazy(list.getElementsByClassName("implementors-toggle"), e => {
+ e.open = open;
+ });
+ }
+ }
+
+ if (hideImplementations) {
+ setImplementorsTogglesOpen("trait-implementations-list", false);
+ setImplementorsTogglesOpen("blanket-implementations-list", false);
+ }
+
+ onEachLazy(document.getElementsByClassName("rustdoc-toggle"), e => {
+ if (!hideLargeItemContents && hasClass(e, "type-contents-toggle")) {
+ e.open = true;
+ }
+ if (hideMethodDocs && hasClass(e, "method-toggle")) {
+ e.open = false;
+ }
+
+ });
+
+ const pageId = getPageId();
+ if (pageId !== null) {
+ expandSection(pageId);
+ }
+ }());
+
+ window.rustdoc_add_line_numbers_to_examples = () => {
+ onEachLazy(document.getElementsByClassName("rust-example-rendered"), x => {
+ const parent = x.parentNode;
+ const line_numbers = parent.querySelectorAll(".example-line-numbers");
+ if (line_numbers.length > 0) {
+ return;
+ }
+ const count = x.textContent.split("\n").length;
+ const elems = [];
+ for (let i = 0; i < count; ++i) {
+ elems.push(i + 1);
+ }
+ const node = document.createElement("pre");
+ addClass(node, "example-line-numbers");
+ node.innerHTML = elems.join("\n");
+ parent.insertBefore(node, x);
+ });
+ };
+
+ window.rustdoc_remove_line_numbers_from_examples = () => {
+ onEachLazy(document.getElementsByClassName("rust-example-rendered"), x => {
+ const parent = x.parentNode;
+ const line_numbers = parent.querySelectorAll(".example-line-numbers");
+ for (const node of line_numbers) {
+ parent.removeChild(node);
+ }
+ });
+ };
+
+ (function() {
+ // To avoid checking on "rustdoc-line-numbers" value on every loop...
+ if (getSettingValue("line-numbers") === "true") {
+ window.rustdoc_add_line_numbers_to_examples();
+ }
+ }());
+
+ let oldSidebarScrollPosition = null;
+
+ // Scroll locking used both here and in source-script.js
+
+ window.rustdocMobileScrollLock = function() {
+ const mobile_topbar = document.querySelector(".mobile-topbar");
+ if (window.innerWidth <= window.RUSTDOC_MOBILE_BREAKPOINT) {
+ // This is to keep the scroll position on mobile.
+ oldSidebarScrollPosition = window.scrollY;
+ document.body.style.width = `${document.body.offsetWidth}px`;
+ document.body.style.position = "fixed";
+ document.body.style.top = `-${oldSidebarScrollPosition}px`;
+ if (mobile_topbar) {
+ mobile_topbar.style.top = `${oldSidebarScrollPosition}px`;
+ mobile_topbar.style.position = "relative";
+ }
+ } else {
+ oldSidebarScrollPosition = null;
+ }
+ };
+
+ window.rustdocMobileScrollUnlock = function() {
+ const mobile_topbar = document.querySelector(".mobile-topbar");
+ if (oldSidebarScrollPosition !== null) {
+ // This is to keep the scroll position on mobile.
+ document.body.style.width = "";
+ document.body.style.position = "";
+ document.body.style.top = "";
+ if (mobile_topbar) {
+ mobile_topbar.style.top = "";
+ mobile_topbar.style.position = "";
+ }
+ // The scroll position is lost when resetting the style, hence why we store it in
+ // `oldSidebarScrollPosition`.
+ window.scrollTo(0, oldSidebarScrollPosition);
+ oldSidebarScrollPosition = null;
+ }
+ };
+
+ function showSidebar() {
+ window.rustdocMobileScrollLock();
+ const sidebar = document.getElementsByClassName("sidebar")[0];
+ addClass(sidebar, "shown");
+ }
+
+ function hideSidebar() {
+ window.rustdocMobileScrollUnlock();
+ const sidebar = document.getElementsByClassName("sidebar")[0];
+ removeClass(sidebar, "shown");
+ }
+
+ window.addEventListener("resize", () => {
+ if (window.innerWidth > window.RUSTDOC_MOBILE_BREAKPOINT &&
+ oldSidebarScrollPosition !== null) {
+ // If the user opens the sidebar in "mobile" mode, and then grows the browser window,
+ // we need to switch away from mobile mode and make the main content area scrollable.
+ hideSidebar();
+ }
+ if (window.CURRENT_NOTABLE_ELEMENT) {
+ // As a workaround to the behavior of `contains: layout` used in doc togglers, the
+ // notable traits popup is positioned using javascript.
+ //
+ // This means when the window is resized, we need to redo the layout.
+ const base = window.CURRENT_NOTABLE_ELEMENT.NOTABLE_BASE;
+ const force_visible = base.NOTABLE_FORCE_VISIBLE;
+ hideNotable();
+ if (force_visible) {
+ showNotable(base);
+ base.NOTABLE_FORCE_VISIBLE = true;
+ }
+ }
+ });
+
+ function handleClick(id, f) {
+ const elem = document.getElementById(id);
+ if (elem) {
+ elem.addEventListener("click", f);
+ }
+ }
+ handleClick(MAIN_ID, () => {
+ hideSidebar();
+ });
+
+ onEachLazy(document.getElementsByTagName("a"), el => {
+ // For clicks on internal links (<A> tags with a hash property), we expand the section we're
+ // jumping to *before* jumping there. We can't do this in onHashChange, because it changes
+ // the height of the document so we wind up scrolled to the wrong place.
+ if (el.hash) {
+ el.addEventListener("click", () => {
+ expandSection(el.hash.slice(1));
+ hideSidebar();
+ });
+ }
+ });
+
+ onEachLazy(document.querySelectorAll(".rustdoc-toggle > summary:not(.hideme)"), el => {
+ el.addEventListener("click", e => {
+ if (e.target.tagName !== "SUMMARY" && e.target.tagName !== "A") {
+ e.preventDefault();
+ }
+ });
+ });
+
+ function showNotable(e) {
+ if (!window.NOTABLE_TRAITS) {
+ const data = document.getElementById("notable-traits-data");
+ if (data) {
+ window.NOTABLE_TRAITS = JSON.parse(data.innerText);
+ } else {
+ throw new Error("showNotable() called on page without any notable traits!");
+ }
+ }
+ if (window.CURRENT_NOTABLE_ELEMENT && window.CURRENT_NOTABLE_ELEMENT.NOTABLE_BASE === e) {
+ // Make this function idempotent.
+ return;
+ }
+ hideNotable();
+ const ty = e.getAttribute("data-ty");
+ const tooltip = e.getElementsByClassName("notable-traits-tooltip")[0];
+ const wrapper = document.createElement("div");
+ wrapper.innerHTML = "<div class=\"docblock\">" + window.NOTABLE_TRAITS[ty] + "</div>";
+ wrapper.className = "notable-traits-tooltiptext";
+ tooltip.appendChild(wrapper);
+ const pos = wrapper.getBoundingClientRect();
+ tooltip.removeChild(wrapper);
+ wrapper.style.top = (pos.top + window.scrollY) + "px";
+ wrapper.style.left = (pos.left + window.scrollX) + "px";
+ wrapper.style.width = pos.width + "px";
+ const body = document.getElementsByTagName("body")[0];
+ body.appendChild(wrapper);
+ window.CURRENT_NOTABLE_ELEMENT = wrapper;
+ window.CURRENT_NOTABLE_ELEMENT.NOTABLE_BASE = e;
+ wrapper.onpointerleave = function(ev) {
+ // If this is a synthetic touch event, ignore it. A click event will be along shortly.
+ if (ev.pointerType !== "mouse") {
+ return;
+ }
+ if (!e.NOTABLE_FORCE_VISIBLE && !elemIsInParent(event.relatedTarget, e)) {
+ hideNotable();
+ }
+ };
+ }
+
+ function hideNotable() {
+ if (window.CURRENT_NOTABLE_ELEMENT) {
+ window.CURRENT_NOTABLE_ELEMENT.NOTABLE_BASE.NOTABLE_FORCE_VISIBLE = false;
+ const body = document.getElementsByTagName("body")[0];
+ body.removeChild(window.CURRENT_NOTABLE_ELEMENT);
+ window.CURRENT_NOTABLE_ELEMENT = null;
+ }
+ }
+
+ onEachLazy(document.getElementsByClassName("notable-traits"), e => {
+ e.onclick = function() {
+ this.NOTABLE_FORCE_VISIBLE = this.NOTABLE_FORCE_VISIBLE ? false : true;
+ if (window.CURRENT_NOTABLE_ELEMENT && !this.NOTABLE_FORCE_VISIBLE) {
+ hideNotable();
+ } else {
+ showNotable(this);
+ }
+ };
+ e.onpointerenter = function(ev) {
+ // If this is a synthetic touch event, ignore it. A click event will be along shortly.
+ if (ev.pointerType !== "mouse") {
+ return;
+ }
+ showNotable(this);
+ };
+ e.onpointerleave = function(ev) {
+ // If this is a synthetic touch event, ignore it. A click event will be along shortly.
+ if (ev.pointerType !== "mouse") {
+ return;
+ }
+ if (!this.NOTABLE_FORCE_VISIBLE &&
+ !elemIsInParent(event.relatedTarget, window.CURRENT_NOTABLE_ELEMENT)) {
+ hideNotable();
+ }
+ };
+ });
+
+ const sidebar_menu_toggle = document.getElementsByClassName("sidebar-menu-toggle")[0];
+ if (sidebar_menu_toggle) {
+ sidebar_menu_toggle.addEventListener("click", () => {
+ const sidebar = document.getElementsByClassName("sidebar")[0];
+ if (!hasClass(sidebar, "shown")) {
+ showSidebar();
+ } else {
+ hideSidebar();
+ }
+ });
+ }
+
+ function helpBlurHandler(event) {
+ blurHandler(event, getHelpButton(), window.hidePopoverMenus);
+ }
+
+ function buildHelpMenu() {
+ const book_info = document.createElement("span");
+ book_info.className = "top";
+ book_info.innerHTML = "You can find more information in \
+ <a href=\"https://doc.rust-lang.org/rustdoc/\">the rustdoc book</a>.";
+
+ const shortcuts = [
+ ["?", "Show this help dialog"],
+ ["S", "Focus the search field"],
+ ["↑", "Move up in search results"],
+ ["↓", "Move down in search results"],
+ ["← / →", "Switch result tab (when results focused)"],
+ ["&#9166;", "Go to active search result"],
+ ["+", "Expand all sections"],
+ ["-", "Collapse all sections"],
+ ].map(x => "<dt>" +
+ x[0].split(" ")
+ .map((y, index) => ((index & 1) === 0 ? "<kbd>" + y + "</kbd>" : " " + y + " "))
+ .join("") + "</dt><dd>" + x[1] + "</dd>").join("");
+ const div_shortcuts = document.createElement("div");
+ addClass(div_shortcuts, "shortcuts");
+ div_shortcuts.innerHTML = "<h2>Keyboard Shortcuts</h2><dl>" + shortcuts + "</dl></div>";
+
+ const infos = [
+ "Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to \
+ restrict the search to a given item kind.",
+ "Accepted kinds 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>.",
+ "Search functions by type signature (e.g., <code>vec -&gt; usize</code> or \
+ <code>-&gt; vec</code>)",
+ "Search multiple things at once by splitting your query with comma (e.g., \
+ <code>str,u8</code> or <code>String,struct:Vec,test</code>)",
+ "You can look for items with an exact name by putting double quotes around \
+ your request: <code>\"string\"</code>",
+ "Look for items inside another one by searching for a path: <code>vec::Vec</code>",
+ ].map(x => "<p>" + x + "</p>").join("");
+ const div_infos = document.createElement("div");
+ addClass(div_infos, "infos");
+ div_infos.innerHTML = "<h2>Search Tricks</h2>" + infos;
+
+ const rustdoc_version = document.createElement("span");
+ rustdoc_version.className = "bottom";
+ const rustdoc_version_code = document.createElement("code");
+ rustdoc_version_code.innerText = "rustdoc " + getVar("rustdoc-version");
+ rustdoc_version.appendChild(rustdoc_version_code);
+
+ const container = document.createElement("div");
+ if (!isHelpPage) {
+ container.className = "popover";
+ }
+ container.id = "help";
+ container.style.display = "none";
+
+ const side_by_side = document.createElement("div");
+ side_by_side.className = "side-by-side";
+ side_by_side.appendChild(div_shortcuts);
+ side_by_side.appendChild(div_infos);
+
+ container.appendChild(book_info);
+ container.appendChild(side_by_side);
+ container.appendChild(rustdoc_version);
+
+ if (isHelpPage) {
+ const help_section = document.createElement("section");
+ help_section.appendChild(container);
+ document.getElementById("main-content").appendChild(help_section);
+ container.style.display = "block";
+ } else {
+ const help_button = getHelpButton();
+ help_button.appendChild(container);
+
+ container.onblur = helpBlurHandler;
+ container.onclick = event => {
+ event.preventDefault();
+ };
+ help_button.onblur = helpBlurHandler;
+ help_button.children[0].onblur = helpBlurHandler;
+ }
+
+ return container;
+ }
+
+ /**
+ * Hide all the popover menus.
+ */
+ window.hidePopoverMenus = function() {
+ onEachLazy(document.querySelectorAll(".search-form .popover"), elem => {
+ elem.style.display = "none";
+ });
+ };
+
+ /**
+ * Returns the help menu element (not the button).
+ *
+ * @param {boolean} buildNeeded - If this argument is `false`, the help menu element won't be
+ * built if it doesn't exist.
+ *
+ * @return {HTMLElement}
+ */
+ function getHelpMenu(buildNeeded) {
+ let menu = getHelpButton().querySelector(".popover");
+ if (!menu && buildNeeded) {
+ menu = buildHelpMenu();
+ }
+ return menu;
+ }
+
+ /**
+ * Show the help popup menu.
+ */
+ function showHelp() {
+ const menu = getHelpMenu(true);
+ if (menu.style.display === "none") {
+ window.hidePopoverMenus();
+ menu.style.display = "";
+ }
+ }
+
+ if (isHelpPage) {
+ showHelp();
+ document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click", event => {
+ // Already on the help page, make help button a no-op.
+ const target = event.target;
+ if (target.tagName !== "A" ||
+ target.parentElement.id !== HELP_BUTTON_ID ||
+ event.ctrlKey ||
+ event.altKey ||
+ event.metaKey) {
+ return;
+ }
+ event.preventDefault();
+ });
+ } else {
+ document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click", event => {
+ // By default, have help button open docs in a popover.
+ // If user clicks with a moderator, though, use default browser behavior,
+ // probably opening in a new window or tab.
+ const target = event.target;
+ if (target.tagName !== "A" ||
+ target.parentElement.id !== HELP_BUTTON_ID ||
+ event.ctrlKey ||
+ event.altKey ||
+ event.metaKey) {
+ return;
+ }
+ event.preventDefault();
+ const menu = getHelpMenu(true);
+ const shouldShowHelp = menu.style.display === "none";
+ if (shouldShowHelp) {
+ showHelp();
+ } else {
+ window.hidePopoverMenus();
+ }
+ });
+ }
+
+ setMobileTopbar();
+ addSidebarItems();
+ addSidebarCrates();
+ onHashChange(null);
+ window.addEventListener("hashchange", onHashChange);
+ searchState.setup();
+}());
+
+(function() {
+ let reset_button_timeout = null;
+
+ window.copy_path = but => {
+ const parent = but.parentElement;
+ const path = [];
+
+ onEach(parent.childNodes, child => {
+ if (child.tagName === "A") {
+ path.push(child.textContent);
+ }
+ });
+
+ const el = document.createElement("textarea");
+ el.value = path.join("::");
+ el.setAttribute("readonly", "");
+ // To not make it appear on the screen.
+ el.style.position = "absolute";
+ el.style.left = "-9999px";
+
+ document.body.appendChild(el);
+ el.select();
+ document.execCommand("copy");
+ document.body.removeChild(el);
+
+ // There is always one children, but multiple childNodes.
+ but.children[0].style.display = "none";
+
+ let tmp;
+ if (but.childNodes.length < 2) {
+ tmp = document.createTextNode("✓");
+ but.appendChild(tmp);
+ } else {
+ onEachLazy(but.childNodes, e => {
+ if (e.nodeType === Node.TEXT_NODE) {
+ tmp = e;
+ return true;
+ }
+ });
+ tmp.textContent = "✓";
+ }
+
+ if (reset_button_timeout !== null) {
+ window.clearTimeout(reset_button_timeout);
+ }
+
+ function reset_button() {
+ tmp.textContent = "";
+ reset_button_timeout = null;
+ but.children[0].style.display = "";
+ }
+
+ reset_button_timeout = window.setTimeout(reset_button, 1000);
+ };
+}());
diff --git a/static.files/normalize-76eba96aa4d2e634.css b/static.files/normalize-76eba96aa4d2e634.css
new file mode 100644
index 0000000..fdb8a8c
--- /dev/null
+++ b/static.files/normalize-76eba96aa4d2e634.css
@@ -0,0 +1,2 @@
+/* ignore-tidy-linelength */
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace, monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type="button"],[type="reset"],[type="submit"],button{-webkit-appearance:button}[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}
diff --git a/static.files/noscript-13285aec31fa243e.css b/static.files/noscript-13285aec31fa243e.css
new file mode 100644
index 0000000..54e8b65
--- /dev/null
+++ b/static.files/noscript-13285aec31fa243e.css
@@ -0,0 +1,30 @@
+/*
+This whole CSS file is used only in case rustdoc is rendered with javascript disabled. Since a lot
+of content is hidden by default (depending on the settings too), we have to overwrite some of the
+rules.
+*/
+
+#main-content .attributes {
+ /* Since there is no toggle (the "[-]") when JS is disabled, no need for this margin either. */
+ margin-left: 0 !important;
+}
+
+#copy-path {
+ /* It requires JS to work so no need to display it in this case. */
+ display: none;
+}
+
+nav.sub {
+ /* The search bar and related controls don't work without JS */
+ display: none;
+}
+
+.source .sidebar {
+ display: none;
+}
+
+.notable-traits {
+ /* layout requires javascript
+ https://github.com/rust-lang/rust/issues/102576 */
+ display: none;
+}
diff --git a/static.files/rust-logo-151179464ae7ed46.svg b/static.files/rust-logo-151179464ae7ed46.svg
new file mode 100644
index 0000000..62424d8
--- /dev/null
+++ b/static.files/rust-logo-151179464ae7ed46.svg
@@ -0,0 +1,61 @@
+<svg version="1.1" height="106" width="106" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<g id="logo" transform="translate(53, 53)">
+ <path id="r" transform="translate(0.5, 0.5)" stroke="black" stroke-width="1" stroke-linejoin="round" d="
+ M -9,-15 H 4 C 12,-15 12,-7 4,-7 H -9 Z
+ M -40,22 H 0 V 11 H -9 V 3 H 1 C 12,3 6,22 15,22 H 40
+ V 3 H 34 V 5 C 34,13 25,12 24,7 C 23,2 19,-2 18,-2 C 33,-10 24,-26 12,-26 H -35
+ V -15 H -25 V 11 H -40 Z" />
+ <g id="gear" mask="url(#holes)">
+ <circle r="43" fill="none" stroke="black" stroke-width="9" />
+ <g id="cogs">
+ <polygon id="cog" stroke="black" stroke-width="3" stroke-linejoin="round" points="46,3 51,0 46,-3" />
+ <use xlink:href="#cog" transform="rotate(11.25)" />
+ <use xlink:href="#cog" transform="rotate(22.50)" />
+ <use xlink:href="#cog" transform="rotate(33.75)" />
+ <use xlink:href="#cog" transform="rotate(45.00)" />
+ <use xlink:href="#cog" transform="rotate(56.25)" />
+ <use xlink:href="#cog" transform="rotate(67.50)" />
+ <use xlink:href="#cog" transform="rotate(78.75)" />
+ <use xlink:href="#cog" transform="rotate(90.00)" />
+ <use xlink:href="#cog" transform="rotate(101.25)" />
+ <use xlink:href="#cog" transform="rotate(112.50)" />
+ <use xlink:href="#cog" transform="rotate(123.75)" />
+ <use xlink:href="#cog" transform="rotate(135.00)" />
+ <use xlink:href="#cog" transform="rotate(146.25)" />
+ <use xlink:href="#cog" transform="rotate(157.50)" />
+ <use xlink:href="#cog" transform="rotate(168.75)" />
+ <use xlink:href="#cog" transform="rotate(180.00)" />
+ <use xlink:href="#cog" transform="rotate(191.25)" />
+ <use xlink:href="#cog" transform="rotate(202.50)" />
+ <use xlink:href="#cog" transform="rotate(213.75)" />
+ <use xlink:href="#cog" transform="rotate(225.00)" />
+ <use xlink:href="#cog" transform="rotate(236.25)" />
+ <use xlink:href="#cog" transform="rotate(247.50)" />
+ <use xlink:href="#cog" transform="rotate(258.75)" />
+ <use xlink:href="#cog" transform="rotate(270.00)" />
+ <use xlink:href="#cog" transform="rotate(281.25)" />
+ <use xlink:href="#cog" transform="rotate(292.50)" />
+ <use xlink:href="#cog" transform="rotate(303.75)" />
+ <use xlink:href="#cog" transform="rotate(315.00)" />
+ <use xlink:href="#cog" transform="rotate(326.25)" />
+ <use xlink:href="#cog" transform="rotate(337.50)" />
+ <use xlink:href="#cog" transform="rotate(348.75)" />
+ </g>
+ <g id="mounts">
+ <polygon id="mount" stroke="black" stroke-width="6" stroke-linejoin="round" points="-7,-42 0,-35 7,-42" />
+ <use xlink:href="#mount" transform="rotate(72)" />
+ <use xlink:href="#mount" transform="rotate(144)" />
+ <use xlink:href="#mount" transform="rotate(216)" />
+ <use xlink:href="#mount" transform="rotate(288)" />
+ </g>
+ </g>
+ <mask id="holes">
+ <rect x="-60" y="-60" width="120" height="120" fill="white"/>
+ <circle id="hole" cy="-40" r="3" />
+ <use xlink:href="#hole" transform="rotate(72)" />
+ <use xlink:href="#hole" transform="rotate(144)" />
+ <use xlink:href="#hole" transform="rotate(216)" />
+ <use xlink:href="#hole" transform="rotate(288)" />
+ </mask>
+</g>
+</svg>
diff --git a/static.files/rustdoc-eabf764633b9d7be.css b/static.files/rustdoc-eabf764633b9d7be.css
new file mode 100644
index 0000000..6a068a3
--- /dev/null
+++ b/static.files/rustdoc-eabf764633b9d7be.css
@@ -0,0 +1,2123 @@
+/* See FiraSans-LICENSE.txt for the Fira Sans license. */
+@font-face {
+ font-family: 'Fira Sans';
+ font-style: normal;
+ font-weight: 400;
+ src: local('Fira Sans'),
+ url("FiraSans-Regular-018c141bf0843ffd.woff2") format("woff2");
+ font-display: swap;
+}
+@font-face {
+ font-family: 'Fira Sans';
+ font-style: normal;
+ font-weight: 500;
+ src: local('Fira Sans Medium'),
+ url("FiraSans-Medium-8f9a781e4970d388.woff2") format("woff2");
+ font-display: swap;
+}
+
+/* See SourceSerif4-LICENSE.md for the Source Serif 4 license. */
+@font-face {
+ font-family: 'Source Serif 4';
+ font-style: normal;
+ font-weight: 400;
+ src: local('Source Serif 4'),
+ url("SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2") format("woff2");
+ font-display: swap;
+}
+@font-face {
+ font-family: 'Source Serif 4';
+ font-style: italic;
+ font-weight: 400;
+ src: local('Source Serif 4 Italic'),
+ url("SourceSerif4-It-d034fe4ef9d0fa00.ttf.woff2") format("woff2");
+ font-display: swap;
+}
+@font-face {
+ font-family: 'Source Serif 4';
+ font-style: normal;
+ font-weight: 700;
+ src: local('Source Serif 4 Bold'),
+ url("SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2") format("woff2");
+ font-display: swap;
+}
+
+/* See SourceCodePro-LICENSE.txt for the Source Code Pro license. */
+@font-face {
+ font-family: 'Source Code Pro';
+ font-style: normal;
+ font-weight: 400;
+ /* Avoid using locally installed font because bad versions are in circulation:
+ * see https://github.com/rust-lang/rust/issues/24355 */
+ src: url("SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2") format("woff2");
+ font-display: swap;
+}
+@font-face {
+ font-family: 'Source Code Pro';
+ font-style: italic;
+ font-weight: 400;
+ src: url("SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2") format("woff2");
+ font-display: swap;
+}
+@font-face {
+ font-family: 'Source Code Pro';
+ font-style: normal;
+ font-weight: 600;
+ src: url("SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2") format("woff2");
+ font-display: swap;
+}
+
+/* Avoid using legacy CJK serif fonts in Windows like Batang. */
+@font-face {
+ font-family: 'NanumBarunGothic';
+ src: url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2");
+ font-display: swap;
+ unicode-range: U+AC00-D7AF, U+1100-11FF, U+3130-318F, U+A960-A97F, U+D7B0-D7FF;
+}
+
+* {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+/* This part handles the "default" theme being used depending on the system one. */
+html {
+ content: "";
+}
+@media (prefers-color-scheme: light) {
+ html {
+ content: "light";
+ }
+}
+@media (prefers-color-scheme: dark) {
+ html {
+ content: "dark";
+ }
+}
+
+/* General structure and fonts */
+
+body {
+ /* Line spacing at least 1.5 per Web Content Accessibility Guidelines
+ https://www.w3.org/WAI/WCAG21/Understanding/visual-presentation.html */
+ font: 1rem/1.5 "Source Serif 4", NanumBarunGothic, serif;
+ margin: 0;
+ position: relative;
+ /* We use overflow-wrap: break-word for Safari, which doesn't recognize
+ `anywhere`: https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap */
+ overflow-wrap: break-word;
+ /* Then override it with `anywhere`, which is required to make non-Safari browsers break
+ more aggressively when we want them to. */
+ overflow-wrap: anywhere;
+
+ -webkit-font-feature-settings: "kern", "liga";
+ -moz-font-feature-settings: "kern", "liga";
+ font-feature-settings: "kern", "liga";
+
+ background-color: var(--main-background-color);
+ color: var(--main-color);
+}
+
+h1 {
+ font-size: 1.5rem; /* 24px */
+}
+h2 {
+ font-size: 1.375rem; /* 22px */
+}
+h3 {
+ font-size: 1.25rem; /* 20px */
+}
+h1, h2, h3, h4, h5, h6 {
+ font-weight: 500;
+}
+h1, h2, h3, h4 {
+ margin: 25px 0 15px 0;
+ padding-bottom: 6px;
+}
+.docblock h3, .docblock h4, h5, h6 {
+ margin: 15px 0 5px 0;
+}
+.docblock > h2:first-child,
+.docblock > h3:first-child,
+.docblock > h4:first-child,
+.docblock > h5:first-child,
+.docblock > h6:first-child {
+ margin-top: 0;
+}
+h1.fqn {
+ margin: 0;
+ padding: 0;
+ flex-grow: 1;
+ /* We use overflow-wrap: break-word for Safari, which doesn't recognize
+ `anywhere`: https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap */
+ overflow-wrap: break-word;
+ /* Then override it with `anywhere`, which is required to make non-Safari browsers break
+ more aggressively when we want them to. */
+ overflow-wrap: anywhere;
+}
+.main-heading {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ padding-bottom: 6px;
+ margin-bottom: 15px;
+}
+/* The only headings that get underlines are:
+ Markdown-generated headings within the top-doc
+ Rustdoc-generated h2 section headings (e.g. "Implementations", "Required Methods", etc)
+ Underlines elsewhere in the documentation break up visual flow and tend to invert
+ section hierarchies. */
+.content h2,
+.top-doc .docblock > h3,
+.top-doc .docblock > h4 {
+ border-bottom: 1px solid var(--headings-border-bottom-color);
+}
+h3.code-header {
+ font-size: 1.125rem; /* 18px */
+}
+h4.code-header {
+ font-size: 1rem;
+}
+.code-header {
+ font-weight: 600;
+ margin: 0;
+ padding: 0;
+ /* position notable traits in mobile mode within the header */
+ position: relative;
+}
+
+#crate-search,
+h1, h2, h3, h4, h5, h6,
+.sidebar,
+.mobile-topbar,
+.search-input,
+.search-results .result-name,
+.item-left > a,
+.out-of-band,
+span.since,
+a.srclink,
+#help-button > a,
+details.rustdoc-toggle.top-doc > summary,
+details.rustdoc-toggle.non-exhaustive > summary,
+.scraped-example-title,
+.more-examples-toggle summary, .more-examples-toggle .hide-more,
+.example-links a,
+/* This selector is for the items listed in the "all items" page. */
+ul.all-items {
+ font-family: "Fira Sans", Arial, NanumBarunGothic, sans-serif;
+}
+
+#toggle-all-docs,
+a.anchor,
+.small-section-header a,
+#source-sidebar a,
+pre.rust a,
+.sidebar h2 a,
+.sidebar h3 a,
+.mobile-topbar h2 a,
+h1 a,
+.search-results a,
+.module-item .stab,
+.import-item .stab,
+.result-name .primitive > i, .result-name .keyword > i,
+.method .where,
+.fn .where,
+.where.fmt-newline {
+ color: var(--main-color);
+}
+
+.content span.enum, .content a.enum,
+.content span.struct, .content a.struct,
+.content span.union, .content a.union,
+.content span.primitive, .content a.primitive,
+.content span.type, .content a.type,
+.content span.foreigntype, .content a.foreigntype {
+ color: var(--type-link-color);
+}
+
+.content span.trait, .content a.trait,
+.content span.traitalias, .content a.traitalias {
+ color: var(--trait-link-color);
+}
+
+.content span.associatedtype, .content a.associatedtype,
+.content span.constant, .content a.constant,
+.content span.static, .content a.static {
+ color: var(--assoc-item-link-color);
+}
+
+.content span.fn, .content a.fn,
+.content .fnname,
+.content span.method, .content a.method,
+.content span.tymethod, .content a.tymethod {
+ color: var(--function-link-color);
+}
+
+.content span.attr, .content a.attr,
+.content span.derive, .content a.derive,
+.content span.macro, .content a.macro {
+ color: var(--macro-link-color);
+}
+
+.content span.mod, .content a.mod {
+ color: var(--mod-link-color);
+}
+
+.content span.keyword, .content a.keyword {
+ color: var(--keyword-link-color);
+}
+
+a {
+ color: var(--link-color);
+}
+
+ol, ul {
+ padding-left: 24px;
+}
+ul ul, ol ul, ul ol, ol ol {
+ margin-bottom: .625em;
+}
+
+p {
+ /* Paragraph spacing at least 1.5 times line spacing per Web Content Accessibility Guidelines.
+ Line-height is 1.5rem, so line spacing is .5rem; .75em is 1.5 times that.
+ https://www.w3.org/WAI/WCAG21/Understanding/visual-presentation.html */
+ margin: 0 0 .75em 0;
+}
+/* For the last child of a div, the margin will be taken care of
+ by the margin-top of the next item. */
+p:last-child {
+ margin: 0;
+}
+
+/* Fix some style changes due to normalize.css 8 */
+
+button {
+ /* Buttons on Safari have different default padding than other platforms. Make them the same. */
+ padding: 1px 6px;
+}
+
+button#toggle-all-docs {
+ padding: 0;
+ background: none;
+ border: none;
+ cursor: pointer;
+ /* iOS button gradient: https://stackoverflow.com/q/5438567 */
+ -webkit-appearance: none;
+ opacity: 1;
+}
+
+/* end tweaks for normalize.css 8 */
+
+.rustdoc {
+ display: flex;
+ flex-direction: row;
+ flex-wrap: nowrap;
+}
+
+main {
+ position: relative;
+ flex-grow: 1;
+ padding: 10px 15px 40px 45px;
+ min-width: 0;
+}
+
+.source main {
+ padding: 15px;
+}
+
+.width-limiter {
+ max-width: 960px;
+ margin-right: auto;
+}
+
+.source .width-limiter {
+ max-width: unset;
+}
+
+details:not(.rustdoc-toggle) summary {
+ margin-bottom: .6em;
+}
+
+code, pre, a.test-arrow, .code-header {
+ font-family: "Source Code Pro", monospace;
+}
+.docblock code, .docblock-short code {
+ border-radius: 3px;
+ padding: 0 0.125em;
+}
+.docblock pre code, .docblock-short pre code {
+ padding: 0;
+}
+pre {
+ padding: 14px;
+}
+.item-decl pre {
+ overflow-x: auto;
+}
+
+.source .content pre {
+ padding: 20px;
+}
+
+img {
+ max-width: 100%;
+}
+
+.source .content {
+ overflow: visible;
+}
+
+.sub-logo-container, .logo-container {
+ /* zero text boxes so that computed line height = image height exactly */
+ line-height: 0;
+}
+
+.sub-logo-container > img {
+ height: 60px;
+ width: 60px;
+ object-fit: contain;
+}
+
+.rust-logo {
+ filter: var(--rust-logo-filter);
+}
+
+.sidebar, .mobile-topbar, .sidebar-menu-toggle {
+ background-color: var(--sidebar-background-color);
+}
+
+.sidebar {
+ font-size: 0.875rem;
+ width: 200px;
+ min-width: 200px;
+ overflow-y: scroll;
+ position: sticky;
+ height: 100vh;
+ top: 0;
+ left: 0;
+}
+
+.rustdoc.source .sidebar {
+ width: 50px;
+ min-width: 0px;
+ max-width: 300px;
+ flex-grow: 0;
+ flex-shrink: 0;
+ flex-basis: auto;
+ border-right: 1px solid;
+ overflow-x: hidden;
+ /* The sidebar is by default hidden */
+ overflow-y: hidden;
+}
+
+.source .sidebar, #sidebar-toggle, #source-sidebar {
+ background-color: var(--sidebar-background-color);
+}
+
+#sidebar-toggle > button:hover, #sidebar-toggle > button:focus {
+ background-color: var(--sidebar-background-color-hover);
+}
+
+.source .sidebar > *:not(#sidebar-toggle) {
+ visibility: hidden;
+}
+
+.source-sidebar-expanded .source .sidebar {
+ overflow-y: auto;
+ width: 300px;
+}
+
+.source-sidebar-expanded .source .sidebar > *:not(#sidebar-toggle) {
+ visibility: visible;
+}
+
+#all-types {
+ margin-top: 1em;
+}
+
+/* Improve the scrollbar display on firefox */
+* {
+ scrollbar-width: initial;
+ scrollbar-color: var(--scrollbar-color);
+}
+.sidebar {
+ scrollbar-width: thin;
+ scrollbar-color: var(--scrollbar-color);
+}
+
+/* Improve the scrollbar display on webkit-based browsers */
+::-webkit-scrollbar {
+ width: 12px;
+}
+.sidebar::-webkit-scrollbar {
+ width: 8px;
+}
+::-webkit-scrollbar-track {
+ -webkit-box-shadow: inset 0;
+ background-color: var(--scrollbar-track-background-color);
+}
+.sidebar::-webkit-scrollbar-track {
+ background-color: var(--scrollbar-track-background-color);
+}
+::-webkit-scrollbar-thumb, .sidebar::-webkit-scrollbar-thumb {
+ background-color: var(--scrollbar-thumb-background-color);
+}
+
+/* Everything else */
+
+.hidden {
+ display: none !important;
+}
+
+.sidebar .logo-container {
+ margin-top: 10px;
+ margin-bottom: 10px;
+ text-align: center;
+}
+
+.version {
+ overflow-wrap: break-word;
+}
+
+.logo-container > img {
+ height: 100px;
+ width: 100px;
+}
+
+ul.block, .block li {
+ padding: 0;
+ margin: 0;
+ list-style: none;
+}
+
+.block a,
+.sidebar h2 a,
+.sidebar h3 a {
+ display: block;
+ padding: 0.25rem;
+ margin-left: -0.25rem;
+
+ text-overflow: ellipsis;
+ overflow: hidden;
+}
+
+.sidebar h2 {
+ overflow-wrap: anywhere;
+ padding: 0;
+ margin: 0.7rem 0;
+}
+
+.sidebar h3 {
+ font-size: 1.125rem; /* 18px */
+ padding: 0;
+ margin: 0;
+}
+
+.sidebar-elems,
+.sidebar > h2 {
+ padding-left: 24px;
+}
+
+.sidebar a, .sidebar .current {
+ color: var(--sidebar-link-color);
+}
+.sidebar .current,
+.sidebar a:hover {
+ background-color: var(--sidebar-current-link-background-color);
+}
+
+.sidebar-elems .block {
+ margin-bottom: 2em;
+}
+
+.sidebar-elems .block li a {
+ white-space: nowrap;
+}
+
+.mobile-topbar {
+ display: none;
+}
+
+.source .content pre.rust {
+ overflow: auto;
+ padding-left: 0;
+}
+
+.rustdoc .example-wrap {
+ display: flex;
+ position: relative;
+ margin-bottom: 10px;
+}
+/* For the last child of a div, the margin will be taken care of
+ by the margin-top of the next item. */
+.rustdoc .example-wrap:last-child {
+ margin-bottom: 0px;
+}
+
+.rustdoc .example-wrap > pre {
+ margin: 0;
+ flex-grow: 1;
+ overflow-x: auto;
+}
+
+.rustdoc .example-wrap > pre.example-line-numbers,
+.rustdoc .example-wrap > pre.src-line-numbers {
+ flex-grow: 0;
+ overflow: initial;
+ text-align: right;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.example-line-numbers {
+ border: 1px solid;
+ padding: 13px 8px;
+ border-top-left-radius: 5px;
+ border-bottom-left-radius: 5px;
+ border-color: var(--example-line-numbers-border-color);
+}
+
+.src-line-numbers span {
+ cursor: pointer;
+ color: var(--src-line-numbers-span-color);
+}
+.src-line-numbers .line-highlighted {
+ background-color: var(--src-line-number-highlighted-background-color);
+}
+.src-line-numbers :target {
+ background-color: transparent;
+}
+
+.search-loading {
+ text-align: center;
+}
+
+.docblock-short {
+ overflow-wrap: break-word;
+ overflow-wrap: anywhere;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+/* Wrap non-pre code blocks (`text`) but not (```text```). */
+.docblock > :not(pre) > code,
+.docblock-short > code {
+ white-space: pre-wrap;
+}
+
+.top-doc .docblock h2 { font-size: 1.375rem; }
+.top-doc .docblock h3 { font-size: 1.25rem; }
+.top-doc .docblock h4,
+.top-doc .docblock h5 {
+ font-size: 1.125rem;
+}
+.top-doc .docblock h6 {
+ font-size: 1rem;
+}
+
+.docblock h5 { font-size: 1rem; }
+.docblock h6 { font-size: 0.875rem; }
+
+.docblock {
+ margin-left: 24px;
+ position: relative;
+}
+
+.docblock > :not(.more-examples-toggle):not(.example-wrap) {
+ max-width: 100%;
+ overflow-x: auto;
+}
+
+.out-of-band {
+ flex-grow: 0;
+ font-size: 1.125rem;
+}
+
+.docblock code, .docblock-short code,
+pre, .rustdoc.source .example-wrap {
+ background-color: var(--code-block-background-color);
+}
+
+#main-content {
+ position: relative;
+}
+
+.docblock table {
+ margin: .5em 0;
+ width: calc(100% - 2px);
+ overflow-x: auto;
+ display: block;
+ border-collapse: collapse;
+}
+
+.docblock table td {
+ padding: .5em;
+ border: 1px dashed var(--border-color);
+ vertical-align: top;
+}
+
+.docblock table th {
+ padding: .5em;
+ text-align: left;
+ border: 1px solid var(--border-color);
+}
+
+/* Shift "where ..." part of method or fn definition down a line */
+.method .where,
+.fn .where,
+.where.fmt-newline {
+ display: block;
+ font-size: 0.875rem;
+}
+
+.item-info {
+ display: block;
+ margin-left: 24px;
+}
+
+.item-info code {
+ font-size: 0.875rem;
+}
+
+#main-content > .item-info {
+ margin-left: 0;
+}
+
+nav.sub {
+ flex-grow: 1;
+ flex-flow: row nowrap;
+ margin: 4px 0 25px 0;
+ display: flex;
+ align-items: center;
+}
+.search-form {
+ position: relative;
+ display: flex;
+ height: 34px;
+ flex-grow: 1;
+}
+.source nav.sub {
+ margin: 0 0 15px 0;
+}
+.source .search-form {
+ margin-left: 32px;
+}
+
+a {
+ text-decoration: none;
+}
+
+.small-section-header {
+ display: flex;
+ justify-content: space-between;
+ position: relative;
+}
+
+.small-section-header:hover > .anchor {
+ display: initial;
+}
+
+.impl:hover > .anchor, .trait-impl:hover > .anchor {
+ display: inline-block;
+ position: absolute;
+}
+.anchor {
+ display: none;
+ position: absolute;
+ left: -0.5em;
+ background: none !important;
+}
+.anchor.field {
+ left: -5px;
+}
+.small-section-header > .anchor {
+ left: -15px;
+ padding-right: 8px;
+}
+h2.small-section-header > .anchor {
+ padding-right: 6px;
+}
+.anchor::before {
+ content: '§';
+}
+
+.main-heading a:hover,
+.example-wrap > pre.rust a:hover,
+.all-items a:hover,
+.docblock a:not(.test-arrow):not(.scrape-help):hover,
+.docblock-short a:not(.test-arrow):not(.scrape-help):hover,
+.item-info a {
+ text-decoration: underline;
+}
+
+.crate.block a.current { font-weight: 500; }
+
+/* In most contexts we use `overflow-wrap: anywhere` to ensure that we can wrap
+ as much as needed on mobile (see
+ src/test/rustdoc-gui/type-declaration-overflow.goml for an example of why
+ this matters). The `anywhere` value means:
+
+ "Soft wrap opportunities introduced by the word break are considered when
+ calculating min-content intrinsic sizes."
+
+ https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap#values
+
+ For table layouts, that becomes a problem: the browser tries to make each
+ column as narrow as possible, and `overflow-wrap: anywhere` means it can do
+ so by breaking words - even if some other column could be shrunk without
+ breaking words! This shows up, for instance, in the `Structs` / `Modules` /
+ `Functions` (etcetera) sections of a module page, and when a docblock
+ contains a table.
+
+ So, for table layouts, override the default with break-word, which does
+ _not_ affect min-content intrinsic sizes.
+*/
+table,
+.item-table {
+ overflow-wrap: break-word;
+}
+
+.item-table {
+ display: table;
+}
+.item-row {
+ display: table-row;
+}
+.item-left, .item-right {
+ display: table-cell;
+}
+.item-left {
+ padding-right: 1.25rem;
+}
+
+.search-results-title {
+ margin-top: 0;
+ white-space: nowrap;
+ /* flex layout allows shrinking the <select> appropriately if it becomes too large */
+ display: inline-flex;
+ max-width: 100%;
+ /* make things look like in a line, despite the fact that we're using a layout
+ with boxes (i.e. from the flex layout) */
+ align-items: baseline;
+}
+#crate-search-div {
+ display: inline-block;
+ /* ensures that 100% in properties of #crate-search-div:after
+ are relative to the size of this div */
+ position: relative;
+ /* allows this div (and with it the <select>-element "#crate-search") to be shrunk */
+ min-width: 5em;
+}
+#crate-search {
+ min-width: 115px;
+ /* keep these two in sync with "@-moz-document url-prefix()" below */
+ padding: 0 23px 0 4px;
+ /* prevents the <select> from overflowing the containing div in case it's shrunk */
+ max-width: 100%;
+ /* contents can overflow because of max-width limit, then show ellipsis */
+ text-overflow: ellipsis;
+ border: 1px solid var(--border-color);
+ border-radius: 4px;
+ outline: none;
+ cursor: pointer;
+ -moz-appearance: none;
+ -webkit-appearance: none;
+ /* Removes default arrow from firefox */
+ text-indent: 0.01px;
+ background-color: var(--main-background-color);
+ color: inherit;
+ line-height: 1.5;
+ font-weight: 500;
+}
+#crate-search:hover, #crate-search:focus {
+ border-color: var(--crate-search-hover-border);
+}
+/* cancel stylistic differences in padding in firefox
+for "appearance: none"-style (or equivalent) <select>s */
+@-moz-document url-prefix() {
+ #crate-search {
+ padding-left: 0px; /* == 4px - 4px */
+ padding-right: 19px; /* == 23px - 4px */
+ }
+}
+/* pseudo-element for holding the dropdown-arrow image; needs to be a separate thing
+so that we can apply CSS-filters to change the arrow color in themes */
+#crate-search-div::after {
+ /* lets clicks through! */
+ pointer-events: none;
+ /* completely covers the underlying div */
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ top: 0;
+ left: 0;
+ content: "";
+ background-repeat: no-repeat;
+ background-size: 20px;
+ background-position: calc(100% - 2px) 56%;
+ /* image is black color */
+ background-image: url("down-arrow-927217e04c7463ac.svg");
+ /* changes the arrow image color */
+ filter: var(--crate-search-div-filter);
+}
+#crate-search-div:hover::after, #crate-search-div:focus-within::after {
+ filter: var(--crate-search-div-hover-filter);
+}
+#crate-search > option {
+ font-size: 1rem;
+}
+.search-input {
+ /* Override Normalize.css: it has a rule that sets
+ -webkit-appearance: textfield for search inputs. That
+ causes rounded corners and no border on iOS Safari. */
+ -webkit-appearance: none;
+ outline: none;
+ border: 1px solid var(--border-color);
+ border-radius: 2px;
+ padding: 8px;
+ font-size: 1rem;
+ flex-grow: 1;
+ background-color: var(--button-background-color);
+ color: var(--search-color);
+}
+.search-input:focus {
+ border-color: var(--search-input-focused-border-color);
+}
+
+.search-results {
+ display: none;
+}
+
+.search-results.active {
+ display: block;
+}
+
+.search-results > a {
+ display: flex;
+ /* A little margin ensures the browser's outlining of focused links has room to display. */
+ margin-left: 2px;
+ margin-right: 2px;
+ border-bottom: 1px solid var(--search-result-border-color);
+ gap: 1em;
+}
+
+.search-results > a > div {
+ flex: 1;
+}
+
+.search-results > a > div.desc {
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ display: block;
+}
+
+.search-results a:hover,
+.search-results a:focus {
+ background-color: var(--search-result-link-focus-background-color);
+}
+
+.popover {
+ font-size: 1rem;
+ position: absolute;
+ right: 0;
+ z-index: 2;
+ display: block;
+ margin-top: 7px;
+ border-radius: 3px;
+ border: 1px solid var(--border-color);
+ font-size: 1rem;
+}
+
+/* This rule is to draw the little arrow connecting the settings menu to the gear icon. */
+.popover::before {
+ content: '';
+ position: absolute;
+ right: 11px;
+ border: solid var(--border-color);
+ border-width: 1px 1px 0 0;
+ display: inline-block;
+ padding: 4px;
+ transform: rotate(-45deg);
+ top: -5px;
+}
+
+.popover, .popover::before {
+ background-color: var(--main-background-color);
+ color: var(--main-color);
+}
+
+/* use larger max-width for help popover, but not for help.html */
+#help.popover {
+ max-width: 600px;
+}
+
+#help.popover::before {
+ right: 48px;
+}
+
+#help dt {
+ float: left;
+ clear: left;
+ display: block;
+ margin-right: 0.5rem;
+}
+#help span.top, #help span.bottom {
+ text-align: center;
+ display: block;
+ font-size: 1.125rem;
+}
+#help span.top {
+ margin: 10px 0;
+ border-bottom: 1px solid var(--border-color);
+ padding-bottom: 4px;
+ margin-bottom: 6px;
+}
+#help span.bottom {
+ clear: both;
+ border-top: 1px solid var(--border-color);
+}
+.side-by-side > div {
+ width: 50%;
+ float: left;
+ padding: 0 20px 20px 17px;
+}
+
+.item-info .stab {
+ width: fit-content;
+ /* This min-height is needed to unify the height of the stab elements because some of them
+ have emojis.
+ */
+ min-height: 36px;
+ display: flex;
+ align-items: center;
+ white-space: pre-wrap;
+}
+.stab {
+ padding: 3px;
+ margin-bottom: 5px;
+ font-size: 0.875rem;
+ font-weight: normal;
+ color: var(--main-color);
+ background-color: var(--stab-background-color);
+}
+
+.stab.portability > code {
+ background: none;
+ color: var(--stab-code-color);
+}
+
+.stab .emoji {
+ font-size: 1.25rem;
+ margin-right: 0.3rem;
+}
+
+/* This is to prevent the `.stab` elements to overflow the .docblock elements. */
+.docblock .stab {
+ padding: 0 0.125em;
+ margin-bottom: 0;
+}
+
+/* Black one-pixel outline around emoji shapes */
+.emoji {
+ text-shadow:
+ 1px 0 0 black,
+ -1px 0 0 black,
+ 0 1px 0 black,
+ 0 -1px 0 black;
+}
+
+.module-item .stab,
+.import-item .stab {
+ border-radius: 3px;
+ display: inline-block;
+ font-size: 0.875rem;
+ line-height: 1.2;
+ margin-bottom: 0;
+ margin-left: 0.3125em;
+ padding: 2px;
+ vertical-align: text-bottom;
+}
+
+.module-item.unstable,
+.import-item.unstable {
+ opacity: 0.65;
+}
+
+.since {
+ font-weight: normal;
+ font-size: initial;
+}
+
+.rightside {
+ padding-left: 12px;
+ padding-right: 2px;
+ float: right;
+}
+
+.rightside:not(a),
+.out-of-band {
+ color: var(--right-side-color);
+}
+
+pre.rust {
+ tab-size: 4;
+ -moz-tab-size: 4;
+}
+
+/* Code highlighting */
+pre.rust .kw {
+ color: var(--code-highlight-kw-color);
+}
+pre.rust .kw-2 {
+ color: var(--code-highlight-kw-2-color);
+}
+pre.rust .lifetime {
+ color: var(--code-highlight-lifetime-color);
+}
+pre.rust .prelude-ty {
+ color: var(--code-highlight-prelude-color);
+}
+pre.rust .prelude-val {
+ color: var(--code-highlight-prelude-val-color);
+}
+pre.rust .string {
+ color: var(--code-highlight-string-color);
+}
+pre.rust .number {
+ color: var(--code-highlight-number-color);
+}
+pre.rust .bool-val {
+ color: var(--code-highlight-literal-color);
+}
+pre.rust .self {
+ color: var(--code-highlight-self-color);
+}
+pre.rust .attr {
+ color: var(--code-highlight-attribute-color);
+}
+pre.rust .macro,
+pre.rust .macro-nonterminal {
+ color: var(--code-highlight-macro-color);
+}
+pre.rust .question-mark {
+ font-weight: bold;
+ color: var(--code-highlight-question-mark-color);
+}
+pre.rust .comment {
+ color: var(--code-highlight-comment-color);
+}
+pre.rust .doccomment {
+ color: var(--code-highlight-doc-comment-color);
+}
+
+.example-wrap.compile_fail,
+.example-wrap.should_panic {
+ border-left: 2px solid var(--codeblock-error-color);
+}
+
+.ignore.example-wrap {
+ border-left: 2px solid var(--codeblock-ignore-color);
+}
+
+.example-wrap.compile_fail:hover,
+.example-wrap.should_panic:hover {
+ border-left: 2px solid var(--codeblock-error-hover-color);
+}
+
+.example-wrap.ignore:hover {
+ border-left: 2px solid var(--codeblock-ignore-hover-color);
+}
+
+.example-wrap.compile_fail .tooltip,
+.example-wrap.should_panic .tooltip {
+ color: var(--codeblock-error-color);
+}
+
+.example-wrap.ignore .tooltip {
+ color: var(--codeblock-ignore-color);
+}
+
+.example-wrap.compile_fail:hover .tooltip,
+.example-wrap.should_panic:hover .tooltip {
+ color: var(--codeblock-error-hover-color);
+}
+
+.example-wrap.ignore:hover .tooltip {
+ color: var(--codeblock-ignore-hover-color);
+}
+
+.example-wrap .tooltip {
+ position: absolute;
+ display: block;
+ cursor: pointer;
+ left: -25px;
+ top: 5px;
+}
+
+.example-wrap .tooltip::after {
+ display: none;
+ text-align: center;
+ padding: 5px 3px 3px 3px;
+ border-radius: 6px;
+ margin-left: 5px;
+ font-size: 1rem;
+ border: 1px solid var(--border-color);
+ position: absolute;
+ width: max-content;
+ top: -2px;
+ z-index: 1;
+}
+
+.example-wrap .tooltip::before {
+ content: " ";
+ position: absolute;
+ top: 50%;
+ left: 16px;
+ margin-top: -5px;
+ border-width: 5px;
+ border-style: solid;
+ display: none;
+ z-index: 1;
+}
+
+.example-wrap.ignore .tooltip::after {
+ content: "This example is not tested";
+}
+.example-wrap.compile_fail .tooltip::after {
+ content: "This example deliberately fails to compile";
+}
+.example-wrap.should_panic .tooltip::after {
+ content: "This example panics";
+}
+.example-wrap.edition .tooltip::after {
+ content: "This code runs with edition " attr(data-edition);
+}
+
+.example-wrap .tooltip:hover::before, .example-wrap .tooltip:hover::after {
+ display: inline;
+}
+
+.example-wrap.compile_fail .tooltip,
+.example-wrap.should_panic .tooltip,
+.example-wrap.ignore .tooltip {
+ font-weight: bold;
+ font-size: 1.25rem;
+}
+
+a.test-arrow {
+ display: inline-block;
+ visibility: hidden;
+ position: absolute;
+ padding: 5px 10px 5px 10px;
+ border-radius: 5px;
+ font-size: 1.375rem;
+ top: 5px;
+ right: 5px;
+ z-index: 1;
+ color: var(--test-arrow-color);
+ background-color: var(--test-arrow-background-color);
+}
+a.test-arrow:hover {
+ color: var(--test-arrow-hover-color);
+ background-color: var(--test-arrow-hover-background-color);
+}
+.example-wrap:hover .test-arrow {
+ visibility: visible;
+}
+
+.code-attribute {
+ font-weight: 300;
+ color: var(--code-attribute-color);
+}
+
+.item-spacer {
+ width: 100%;
+ height: 12px;
+}
+
+.out-of-band > span.since {
+ font-size: 1.25rem;
+}
+
+h3.variant {
+ font-weight: 600;
+ font-size: 1.125rem;
+ margin-bottom: 10px;
+}
+
+.sub-variant h4 {
+ font-size: 1rem;
+ font-weight: 400;
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+.sub-variant {
+ margin-left: 24px;
+ margin-bottom: 40px;
+}
+
+.sub-variant > .sub-variant-field {
+ margin-left: 24px;
+}
+
+:target > code, :target > .code-header {
+ opacity: 1;
+}
+
+:target {
+ padding-right: 3px;
+ background-color: var(--target-background-color);
+ border-right: 3px solid var(--target-border-color);
+}
+
+.notable-traits-tooltip {
+ display: inline-block;
+ cursor: pointer;
+}
+
+.notable-traits .notable-traits-tooltiptext {
+ display: inline-block;
+ visibility: hidden;
+}
+
+.notable-traits-tooltiptext {
+ padding: 5px 3px 3px 3px;
+ border-radius: 6px;
+ margin-left: 5px;
+ z-index: 10;
+ font-size: 1rem;
+ cursor: default;
+ position: absolute;
+ border: 1px solid;
+}
+
+.notable-traits-tooltip::after {
+ /* The margin on the tooltip does not capture hover events,
+ this extends the area of hover enough so that mouse hover is not
+ lost when moving the mouse to the tooltip */
+ content: "\00a0\00a0\00a0";
+}
+
+.notable-traits-tooltiptext .docblock {
+ margin: 0;
+}
+
+.notable-traits-tooltiptext .notable {
+ font-size: 1.1875rem;
+ font-weight: 600;
+ display: block;
+}
+
+.notable-traits-tooltiptext pre, .notable-traits-tooltiptext code {
+ background: transparent;
+}
+
+.notable-traits-tooltiptext .docblock pre.content {
+ margin: 0;
+ padding: 0;
+ font-size: 1.25rem;
+ white-space: pre-wrap;
+ overflow: hidden;
+}
+
+.search-failed {
+ text-align: center;
+ margin-top: 20px;
+ display: none;
+}
+
+.search-failed.active {
+ display: block;
+}
+
+.search-failed > ul {
+ text-align: left;
+ max-width: 570px;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+#titles {
+ display: flex;
+ flex-direction: row;
+ gap: 1px;
+ margin-bottom: 4px;
+}
+
+#titles > button {
+ text-align: center;
+ font-size: 1.125rem;
+ cursor: pointer;
+ border: 0;
+ border-top: 2px solid;
+ flex: 1;
+ line-height: 1.5;
+ color: inherit;
+}
+
+#titles > button > div.count {
+ display: inline-block;
+ font-size: 1rem;
+}
+
+.notable-traits {
+ cursor: pointer;
+ z-index: 2;
+ margin-left: 5px;
+}
+
+#sidebar-toggle {
+ position: sticky;
+ top: 0;
+ left: 0;
+ font-size: 1.25rem;
+ border-bottom: 1px solid;
+ display: flex;
+ height: 40px;
+ justify-content: center;
+ align-items: center;
+ z-index: 10;
+}
+#source-sidebar {
+ width: 100%;
+ overflow: auto;
+}
+#source-sidebar > .title {
+ font-size: 1.5rem;
+ text-align: center;
+ border-bottom: 1px solid var(--border-color);
+ margin-bottom: 6px;
+}
+#sidebar-toggle > button {
+ font-size: inherit;
+ font-weight: bold;
+ background: none;
+ color: inherit;
+ cursor: pointer;
+ text-align: center;
+ border: none;
+ outline: none;
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ /* work around button layout strangeness: https://stackoverflow.com/q/7271561 */
+ width: 100%;
+ /* iOS button gradient: https://stackoverflow.com/q/5438567 */
+ -webkit-appearance: none;
+ opacity: 1;
+}
+#settings-menu, #help-button {
+ margin-left: 4px;
+ outline: none;
+}
+
+#settings-menu > a, #help-button > a, #copy-path {
+ width: 33px;
+ cursor: pointer;
+ line-height: 1.5;
+}
+
+#settings-menu > a, #help-button > a {
+ padding: 5px;
+ height: 100%;
+ display: block;
+ background-color: var(--button-background-color);
+ border: 1px solid var(--border-color);
+ border-radius: 2px;
+}
+
+#copy-path {
+ color: var(--copy-path-button-color);
+ background: var(--main-background-color);
+ height: 34px;
+ margin-left: 10px;
+ padding: 0;
+ padding-left: 2px;
+ border: 0;
+}
+#copy-path > img {
+ filter: var(--copy-path-img-filter);
+}
+#copy-path:hover > img {
+ filter: var(--copy-path-img-hover-filter);
+}
+
+@keyframes rotating {
+ from {
+ transform: rotate(0deg);
+ }
+ to {
+ transform: rotate(360deg);
+ }
+}
+#settings-menu.rotate > a img {
+ animation: rotating 2s linear infinite;
+}
+
+#help-button > a {
+ text-align: center;
+ /* Rare exception to specifying font sizes in rem. Since this is acting
+ as an icon, it's okay to specify their sizes in pixels. */
+ font-size: 20px;
+ padding-top: 2px;
+}
+
+kbd {
+ display: inline-block;
+ padding: 3px 5px;
+ font: 15px monospace;
+ line-height: 10px;
+ vertical-align: middle;
+ border: solid 1px var(--border-color);
+ border-radius: 3px;
+ cursor: default;
+}
+
+ul.all-items > li {
+ list-style: none;
+}
+
+details.dir-entry {
+ padding-left: 4px;
+}
+
+details.dir-entry > summary::after {
+ content: " ►";
+ position: absolute;
+ left: -15px;
+ top: 0px;
+ font-size: 80%;
+ padding: 2px 0px;
+ /* set width to cover gap between arrow and text */
+ width: 25px;
+}
+
+details[open].dir-entry > summary::after {
+ content: " ▼";
+}
+
+details.dir-entry > summary::-webkit-details-marker,
+details.dir-entry > summary::marker {
+ display: none;
+}
+
+details.dir-entry > summary {
+ margin: 0 0 0 13px;
+ list-style: none;
+ cursor: pointer;
+ position: relative;
+}
+
+details.dir-entry div.folders, details.dir-entry div.files {
+ padding-left: 23px;
+}
+
+details.dir-entry a {
+ display: block;
+}
+
+/* We use CSS containment on the details elements because most sizeable elements
+ of the page are contained in one of these. This also makes re-rendering
+ faster on document changes (like closing and opening toggles).
+ Unfortunately we can't yet specify contain: content or contain: strict
+ because the [-]/[+] toggles extend past the boundaries of the <details>
+ https://developer.mozilla.org/en-US/docs/Web/CSS/contain */
+details.rustdoc-toggle {
+ contain: layout;
+ position: relative;
+}
+
+/* The hideme class is used on summary tags that contain a span with
+ placeholder text shown only when the toggle is closed. For instance,
+ "Expand description" or "Show methods". */
+details.rustdoc-toggle > summary.hideme {
+ cursor: pointer;
+}
+
+details.rustdoc-toggle > summary {
+ list-style: none;
+ /* focus outline is shown on `::before` instead of this */
+ outline: none;
+}
+details.rustdoc-toggle > summary::-webkit-details-marker,
+details.rustdoc-toggle > summary::marker {
+ display: none;
+}
+
+details.rustdoc-toggle > summary.hideme > span {
+ margin-left: 9px;
+}
+
+details.rustdoc-toggle > summary::before {
+ content: "";
+ cursor: pointer;
+ width: 16px;
+ height: 16px;
+ background-repeat: no-repeat;
+ background-position: top left;
+ display: inline-block;
+ vertical-align: middle;
+ opacity: .5;
+}
+
+details.rustdoc-toggle > summary.hideme > span,
+.more-examples-toggle summary, .more-examples-toggle .hide-more {
+ color: var(--toggles-color);
+}
+
+/* Screen readers see the text version at the end the line.
+ Visual readers see the icon at the start of the line, but small and transparent. */
+details.rustdoc-toggle > summary::after {
+ content: "Expand";
+ overflow: hidden;
+ width: 0;
+ height: 0;
+ position: absolute;
+}
+
+details.rustdoc-toggle > summary.hideme::after {
+ /* "hideme" toggles already have a description when they're contracted */
+ content: "";
+}
+
+details.rustdoc-toggle > summary:focus::before,
+details.rustdoc-toggle > summary:hover::before {
+ opacity: 1;
+}
+
+details.rustdoc-toggle > summary:focus-visible::before {
+ /* The SVG is black, and gets turned white using a filter in the dark themes.
+ Do the same with the outline.
+ The dotted 1px style is copied from Firefox's focus ring style.
+ */
+ outline: 1px dotted #000;
+ outline-offset: 1px;
+}
+
+details.rustdoc-toggle.top-doc > summary,
+details.rustdoc-toggle.top-doc > summary::before,
+details.rustdoc-toggle.non-exhaustive > summary,
+details.rustdoc-toggle.non-exhaustive > summary::before {
+ font-size: 1rem;
+}
+
+details.non-exhaustive {
+ margin-bottom: 8px;
+}
+
+details.rustdoc-toggle > summary.hideme::before {
+ position: relative;
+}
+
+details.rustdoc-toggle > summary:not(.hideme)::before {
+ position: absolute;
+ left: -24px;
+ top: 4px;
+}
+
+.impl-items > details.rustdoc-toggle > summary:not(.hideme)::before {
+ position: absolute;
+ left: -24px;
+}
+
+/* When a "hideme" summary is open and the "Expand description" or "Show
+ methods" text is hidden, we want the [-] toggle that remains to not
+ affect the layout of the items to its right. To do that, we use
+ absolute positioning. Note that we also set position: relative
+ on the parent <details> to make this work properly. */
+details.rustdoc-toggle[open] > summary.hideme {
+ position: absolute;
+}
+
+details.rustdoc-toggle[open] > summary.hideme > span {
+ display: none;
+}
+
+details.rustdoc-toggle[open] > summary::before,
+details.rustdoc-toggle[open] > summary.hideme::before {
+ background-image: url("toggle-minus-31bbd6e4c77f5c96.svg");
+}
+
+details.rustdoc-toggle > summary::before {
+ background-image: url("toggle-plus-1092eb4930d581b0.svg");
+}
+
+details.rustdoc-toggle[open] > summary::before,
+details.rustdoc-toggle[open] > summary.hideme::before {
+ width: 16px;
+ height: 16px;
+ background-repeat: no-repeat;
+ background-position: top left;
+ display: inline-block;
+ content: "";
+}
+
+details.rustdoc-toggle[open] > summary::after,
+details.rustdoc-toggle[open] > summary.hideme::after {
+ content: "Collapse";
+}
+
+/* This is needed in docblocks to have the "▶" element to be on the same line. */
+.docblock summary > * {
+ display: inline-block;
+}
+
+/* In case there is no documentation before a code block, we need to add some margin at the top
+to prevent an overlay between the "collapse toggle" and the information tooltip.
+However, it's not needed with smaller screen width because the doc/code block is always put
+"one line" below. */
+.docblock > .example-wrap:first-child .tooltip {
+ margin-top: 16px;
+}
+
+/* Media Queries */
+
+/*
+WARNING: RUSTDOC_MOBILE_BREAKPOINT MEDIA QUERY
+If you update this line, then you also need to update the line with the same warning
+in storage.js
+*/
+@media (max-width: 700px) {
+ /* When linking to an item with an `id` (for instance, by clicking a link in the sidebar,
+ or visiting a URL with a fragment like `#method.new`, we don't want the item to be obscured
+ by the topbar. Anything with an `id` gets scroll-margin-top equal to .mobile-topbar's size.
+ */
+ *[id] {
+ scroll-margin-top: 45px;
+ }
+
+ .rustdoc {
+ /* Sidebar should overlay main content, rather than pushing main content to the right.
+ Turn off `display: flex` on the body element. */
+ display: block;
+ }
+
+ main {
+ padding-left: 15px;
+ padding-top: 0px;
+ }
+
+ .main-heading {
+ flex-direction: column;
+ }
+
+ .out-of-band {
+ text-align: left;
+ margin-left: initial;
+ padding: initial;
+ }
+
+ .out-of-band .since::before {
+ content: "Since ";
+ }
+
+ #copy-path {
+ display: none;
+ }
+
+ /* Hide the logo and item name from the sidebar. Those are displayed
+ in the mobile-topbar instead. */
+ .sidebar .sidebar-logo,
+ .sidebar .location {
+ display: none;
+ }
+
+ .sidebar {
+ position: fixed;
+ top: 45px;
+ /* Hide the sidebar offscreen while not in use. Doing this instead of display: none means
+ the sidebar stays visible for screen readers, which is useful for navigation. */
+ left: -1000px;
+ margin: 0;
+ padding: 0;
+ z-index: 11;
+ /* Reduce height slightly to account for mobile topbar. */
+ height: calc(100vh - 45px);
+ }
+
+ /* The source view uses a different design for the sidebar toggle, and doesn't have a topbar,
+ so don't bump down the main content or the sidebar. */
+ .source main,
+ .rustdoc.source .sidebar {
+ top: 0;
+ padding: 0;
+ height: 100vh;
+ border: 0;
+ }
+
+ .sidebar.shown,
+ .source-sidebar-expanded .source .sidebar,
+ .sidebar:focus-within {
+ left: 0;
+ }
+
+ .rustdoc.source > .sidebar {
+ width: 0;
+ }
+
+ .mobile-topbar h2 {
+ padding-bottom: 0;
+ margin: auto 0.5em auto auto;
+ overflow: hidden;
+ /* Rare exception to specifying font sizes in rem. Since the topbar
+ height is specified in pixels, this also has to be specified in
+ pixels to avoid overflowing the topbar when the user sets a bigger
+ font size. */
+ font-size: 24px;
+ }
+
+ .mobile-topbar h2 a {
+ display: block;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ white-space: nowrap;
+ }
+
+ .mobile-topbar .logo-container > img {
+ max-width: 35px;
+ max-height: 35px;
+ margin: 5px 0 5px 20px;
+ }
+
+ .mobile-topbar {
+ display: flex;
+ flex-direction: row;
+ position: sticky;
+ z-index: 10;
+ font-size: 2rem;
+ height: 45px;
+ width: 100%;
+ left: 0;
+ top: 0;
+ }
+
+ .sidebar-menu-toggle {
+ width: 45px;
+ /* Rare exception to specifying font sizes in rem. Since this is acting
+ as an icon, it's okay to specify its sizes in pixels. */
+ font-size: 32px;
+ border: none;
+ color: var(--main-color);
+ }
+
+ .sidebar-elems {
+ margin-top: 1em;
+ }
+
+ .content {
+ margin-left: 0px;
+ }
+
+ .anchor {
+ display: none !important;
+ }
+
+ #titles > button > div.count {
+ display: block;
+ }
+
+ #main-content > details.rustdoc-toggle > summary::before,
+ #main-content > div > details.rustdoc-toggle > summary::before {
+ left: -11px;
+ }
+
+ #sidebar-toggle {
+ position: fixed;
+ left: 1px;
+ top: 100px;
+ width: 30px;
+ font-size: 1.5rem;
+ text-align: center;
+ padding: 0;
+ z-index: 10;
+ border-top-right-radius: 3px;
+ border-bottom-right-radius: 3px;
+ cursor: pointer;
+ border: 1px solid;
+ border-left: 0;
+ }
+
+ .source-sidebar-expanded #sidebar-toggle {
+ left: unset;
+ top: unset;
+ width: unset;
+ border-top-right-radius: unset;
+ border-bottom-right-radius: unset;
+ position: sticky;
+ border: 0;
+ border-bottom: 1px solid;
+ }
+
+ .notable-traits .notable-traits-tooltiptext {
+ left: 0;
+ top: 100%;
+ }
+
+ /* We don't display the help button on mobile devices. */
+ #help-button {
+ display: none;
+ }
+
+ /* Display an alternating layout on tablets and phones */
+ .item-table, .item-row, .item-left, .item-right,
+ .search-results > a, .search-results > a > div {
+ display: block;
+ }
+
+ /* Display an alternating layout on tablets and phones */
+ .search-results > a {
+ padding: 5px 0px;
+ }
+ .search-results > a > div.desc, .item-right {
+ padding-left: 2em;
+ }
+
+ .source-sidebar-expanded .source .sidebar {
+ max-width: 100vw;
+ width: 100vw;
+ }
+
+ /* Position of the "[-]" element. */
+ details.rustdoc-toggle:not(.top-doc) > summary {
+ margin-left: 10px;
+ }
+ .impl-items > details.rustdoc-toggle > summary:not(.hideme)::before,
+ #main-content > details.rustdoc-toggle:not(.top-doc) > summary::before,
+ #main-content > div > details.rustdoc-toggle > summary::before {
+ left: -11px;
+ }
+
+ /* Align summary-nested and unnested item-info gizmos. */
+ .impl-items > .item-info {
+ margin-left: 34px;
+ }
+
+ .source nav.sub {
+ margin: 0;
+ padding: 8px;
+ }
+}
+
+@media print {
+ nav.sidebar, nav.sub, .out-of-band, a.srclink, #copy-path,
+ details.rustdoc-toggle[open] > summary::before, details.rustdoc-toggle > summary::before,
+ details.rustdoc-toggle.top-doc > summary {
+ display: none;
+ }
+
+ .docblock {
+ margin-left: 0;
+ }
+
+ main {
+ padding: 10px;
+ }
+}
+
+@media (max-width: 464px) {
+ .docblock {
+ margin-left: 12px;
+ }
+
+ .docblock code {
+ overflow-wrap: break-word;
+ overflow-wrap: anywhere;
+ }
+
+ nav.sub {
+ flex-direction: column;
+ }
+
+ .search-form {
+ align-self: stretch;
+ }
+
+ .sub-logo-container > img {
+ height: 35px;
+ width: 35px;
+ }
+
+ #sidebar-toggle {
+ top: 10px;
+ }
+ .source-sidebar-expanded #sidebar-toggle {
+ top: unset;
+ }
+}
+
+.implementors-toggle > summary,
+.impl,
+#implementors-list > .docblock,
+.impl-items > section,
+.impl-items > .rustdoc-toggle > summary,
+.methods > section,
+.methods > .rustdoc-toggle > summary
+{
+ margin-bottom: 0.75em;
+}
+
+.impl-items > .rustdoc-toggle[open]:not(:last-child),
+.methods > .rustdoc-toggle[open]:not(:last-child),
+.implementors-toggle[open]:not(:last-child) {
+ margin-bottom: 2em;
+}
+
+#trait-implementations-list .impl-items > .rustdoc-toggle:not(:last-child),
+#synthetic-implementations-list .impl-items > .rustdoc-toggle:not(:last-child),
+#blanket-implementations-list .impl-items > .rustdoc-toggle:not(:last-child) {
+ margin-bottom: 1em;
+}
+
+/* Begin: styles for --scrape-examples feature */
+
+.scraped-example-list .scrape-help {
+ margin-left: 10px;
+ padding: 0 4px;
+ font-weight: normal;
+ font-size: 12px;
+ position: relative;
+ bottom: 1px;
+ background: transparent;
+ border-width: 1px;
+ border-style: solid;
+ border-radius: 50px;
+}
+
+.scraped-example .code-wrapper {
+ position: relative;
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+ width: 100%;
+}
+
+.scraped-example:not(.expanded) .code-wrapper {
+ max-height: 240px;
+}
+
+.scraped-example:not(.expanded) .code-wrapper pre {
+ overflow-y: hidden;
+ max-height: 240px;
+ padding-bottom: 0;
+}
+
+.scraped-example .code-wrapper .next,
+.scraped-example .code-wrapper .prev,
+.scraped-example .code-wrapper .expand {
+ position: absolute;
+ top: 0.25em;
+ z-index: 1;
+ cursor: pointer;
+}
+.scraped-example .code-wrapper .prev {
+ right: 2.25em;
+}
+.scraped-example .code-wrapper .next {
+ right: 1.25em;
+}
+.scraped-example .code-wrapper .expand {
+ right: 0.25em;
+}
+
+.scraped-example:not(.expanded) .code-wrapper:before,
+.scraped-example:not(.expanded) .code-wrapper:after {
+ content: " ";
+ width: 100%;
+ height: 5px;
+ position: absolute;
+ z-index: 1;
+}
+.scraped-example:not(.expanded) .code-wrapper:before {
+ top: 0;
+}
+.scraped-example:not(.expanded) .code-wrapper:after {
+ bottom: 0;
+}
+
+.scraped-example .code-wrapper .src-line-numbers {
+ margin: 0;
+ padding: 14px 0;
+}
+
+.scraped-example .code-wrapper .src-line-numbers span {
+ padding: 0 14px;
+}
+
+.scraped-example .code-wrapper .example-wrap {
+ flex: 1;
+ overflow-x: auto;
+ overflow-y: hidden;
+ margin-bottom: 0;
+}
+
+.scraped-example:not(.expanded) .code-wrapper .example-wrap {
+ overflow-x: hidden;
+}
+
+.scraped-example .code-wrapper .example-wrap pre.rust {
+ overflow-x: inherit;
+ width: inherit;
+ overflow-y: hidden;
+}
+
+
+.more-examples-toggle {
+ max-width: calc(100% + 25px);
+ margin-top: 10px;
+ margin-left: -25px;
+}
+
+.more-examples-toggle .hide-more {
+ margin-left: 25px;
+ margin-bottom: 5px;
+ cursor: pointer;
+}
+
+.more-scraped-examples {
+ margin-left: 5px;
+ display: flex;
+ flex-direction: row;
+}
+
+.more-scraped-examples-inner {
+ /* 20px is width of toggle-line + toggle-line-inner */
+ width: calc(100% - 20px);
+}
+
+.toggle-line {
+ align-self: stretch;
+ margin-right: 10px;
+ margin-top: 5px;
+ padding: 0 4px;
+ cursor: pointer;
+}
+
+.toggle-line-inner {
+ min-width: 2px;
+ height: 100%;
+}
+
+.more-scraped-examples .scraped-example {
+ margin-bottom: 20px;
+}
+
+.more-scraped-examples .scraped-example:last-child {
+ margin-bottom: 0;
+}
+
+.example-links a {
+ margin-top: 20px;
+}
+
+.example-links ul {
+ margin-bottom: 0;
+}
+
+/* End: styles for --scrape-examples feature */
diff --git a/static.files/scrape-examples-1f45318ad6bd2a81.js b/static.files/scrape-examples-1f45318ad6bd2a81.js
new file mode 100644
index 0000000..d0fd115
--- /dev/null
+++ b/static.files/scrape-examples-1f45318ad6bd2a81.js
@@ -0,0 +1,106 @@
+/* global addClass, hasClass, removeClass, onEachLazy */
+
+"use strict";
+
+(function() {
+ // Number of lines shown when code viewer is not expanded
+ const MAX_LINES = 10;
+
+ // Scroll code block to the given code location
+ function scrollToLoc(elt, loc) {
+ const lines = elt.querySelector(".src-line-numbers");
+ let scrollOffset;
+
+ // If the block is greater than the size of the viewer,
+ // then scroll to the top of the block. Otherwise scroll
+ // to the middle of the block.
+ if (loc[1] - loc[0] > MAX_LINES) {
+ const line = Math.max(0, loc[0] - 1);
+ scrollOffset = lines.children[line].offsetTop;
+ } else {
+ const wrapper = elt.querySelector(".code-wrapper");
+ const halfHeight = wrapper.offsetHeight / 2;
+ const offsetMid = (lines.children[loc[0]].offsetTop
+ + lines.children[loc[1]].offsetTop) / 2;
+ scrollOffset = offsetMid - halfHeight;
+ }
+
+ lines.scrollTo(0, scrollOffset);
+ elt.querySelector(".rust").scrollTo(0, scrollOffset);
+ }
+
+ function updateScrapedExample(example) {
+ const locs = JSON.parse(example.attributes.getNamedItem("data-locs").textContent);
+ let locIndex = 0;
+ const highlights = Array.prototype.slice.call(example.querySelectorAll(".highlight"));
+ const link = example.querySelector(".scraped-example-title a");
+
+ if (locs.length > 1) {
+ // Toggle through list of examples in a given file
+ const onChangeLoc = changeIndex => {
+ removeClass(highlights[locIndex], "focus");
+ changeIndex();
+ scrollToLoc(example, locs[locIndex][0]);
+ addClass(highlights[locIndex], "focus");
+
+ const url = locs[locIndex][1];
+ const title = locs[locIndex][2];
+
+ link.href = url;
+ link.innerHTML = title;
+ };
+
+ example.querySelector(".prev")
+ .addEventListener("click", () => {
+ onChangeLoc(() => {
+ locIndex = (locIndex - 1 + locs.length) % locs.length;
+ });
+ });
+
+ example.querySelector("next")
+ .addEventListener("click", () => {
+ onChangeLoc(() => {
+ locIndex = (locIndex + 1) % locs.length;
+ });
+ });
+ }
+
+ const expandButton = example.querySelector(".expand");
+ if (expandButton) {
+ expandButton.addEventListener("click", () => {
+ if (hasClass(example, "expanded")) {
+ removeClass(example, "expanded");
+ scrollToLoc(example, locs[0][0]);
+ } else {
+ addClass(example, "expanded");
+ }
+ });
+ }
+
+ // Start with the first example in view
+ scrollToLoc(example, locs[0][0]);
+ }
+
+ const firstExamples = document.querySelectorAll(".scraped-example-list > .scraped-example");
+ onEachLazy(firstExamples, updateScrapedExample);
+ onEachLazy(document.querySelectorAll(".more-examples-toggle"), toggle => {
+ // Allow users to click the left border of the <details> section to close it,
+ // since the section can be large and finding the [+] button is annoying.
+ onEachLazy(toggle.querySelectorAll(".toggle-line, .hide-more"), button => {
+ button.addEventListener("click", () => {
+ toggle.open = false;
+ });
+ });
+
+ const moreExamples = toggle.querySelectorAll(".scraped-example");
+ toggle.querySelector("summary").addEventListener("click", () => {
+ // Wrapping in setTimeout ensures the update happens after the elements are actually
+ // visible. This is necessary since updateScrapedExample calls scrollToLoc which
+ // depends on offsetHeight, a property that requires an element to be visible to
+ // compute correctly.
+ setTimeout(() => {
+ onEachLazy(moreExamples, updateScrapedExample);
+ });
+ }, {once: true});
+ });
+})();
diff --git a/static.files/search-39ee4160c7dc16c9.js b/static.files/search-39ee4160c7dc16c9.js
new file mode 100644
index 0000000..dd0531c
--- /dev/null
+++ b/static.files/search-39ee4160c7dc16c9.js
@@ -0,0 +1,2280 @@
+/* global addClass, getNakedUrl, getSettingValue */
+/* global onEachLazy, removeClass, searchState, browserSupportsHistoryApi, exports */
+
+"use strict";
+
+(function() {
+// This mapping table should match the discriminants of
+// `rustdoc::formats::item_type::ItemType` type in Rust.
+const itemTypes = [
+ "mod",
+ "externcrate",
+ "import",
+ "struct",
+ "enum",
+ "fn",
+ "type",
+ "static",
+ "trait",
+ "impl",
+ "tymethod",
+ "method",
+ "structfield",
+ "variant",
+ "macro",
+ "primitive",
+ "associatedtype",
+ "constant",
+ "associatedconstant",
+ "union",
+ "foreigntype",
+ "keyword",
+ "existential",
+ "attr",
+ "derive",
+ "traitalias",
+];
+
+// used for special search precedence
+const TY_PRIMITIVE = itemTypes.indexOf("primitive");
+const TY_KEYWORD = itemTypes.indexOf("keyword");
+const ROOT_PATH = typeof window !== "undefined" ? window.rootPath : "../";
+
+function hasOwnPropertyRustdoc(obj, property) {
+ return Object.prototype.hasOwnProperty.call(obj, property);
+}
+
+// In the search display, allows to switch between tabs.
+function printTab(nb) {
+ let iter = 0;
+ let foundCurrentTab = false;
+ let foundCurrentResultSet = false;
+ onEachLazy(document.getElementById("titles").childNodes, elem => {
+ if (nb === iter) {
+ addClass(elem, "selected");
+ foundCurrentTab = true;
+ } else {
+ removeClass(elem, "selected");
+ }
+ iter += 1;
+ });
+ iter = 0;
+ onEachLazy(document.getElementById("results").childNodes, elem => {
+ if (nb === iter) {
+ addClass(elem, "active");
+ foundCurrentResultSet = true;
+ } else {
+ removeClass(elem, "active");
+ }
+ iter += 1;
+ });
+ if (foundCurrentTab && foundCurrentResultSet) {
+ searchState.currentTab = nb;
+ } else if (nb !== 0) {
+ printTab(0);
+ }
+}
+
+/**
+ * A function to compute the Levenshtein distance between two strings
+ * Licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported
+ * Full License can be found at http://creativecommons.org/licenses/by-sa/3.0/legalcode
+ * This code is an unmodified version of the code written by Marco de Wit
+ * and was found at https://stackoverflow.com/a/18514751/745719
+ */
+const levenshtein_row2 = [];
+function levenshtein(s1, s2) {
+ if (s1 === s2) {
+ return 0;
+ }
+ const s1_len = s1.length, s2_len = s2.length;
+ if (s1_len && s2_len) {
+ let i1 = 0, i2 = 0, a, b, c, c2;
+ const row = levenshtein_row2;
+ while (i1 < s1_len) {
+ row[i1] = ++i1;
+ }
+ while (i2 < s2_len) {
+ c2 = s2.charCodeAt(i2);
+ a = i2;
+ ++i2;
+ b = i2;
+ for (i1 = 0; i1 < s1_len; ++i1) {
+ c = a + (s1.charCodeAt(i1) !== c2 ? 1 : 0);
+ a = row[i1];
+ b = b < a ? (b < c ? b + 1 : c) : (a < c ? a + 1 : c);
+ row[i1] = b;
+ }
+ }
+ return b;
+ }
+ return s1_len + s2_len;
+}
+
+function initSearch(rawSearchIndex) {
+ const MAX_LEV_DISTANCE = 3;
+ const MAX_RESULTS = 200;
+ const NO_TYPE_FILTER = -1;
+ /**
+ * @type {Array<Row>}
+ */
+ let searchIndex;
+ let currentResults;
+ const ALIASES = Object.create(null);
+
+ function isWhitespace(c) {
+ return " \t\n\r".indexOf(c) !== -1;
+ }
+
+ function isSpecialStartCharacter(c) {
+ return "<\"".indexOf(c) !== -1;
+ }
+
+ function isEndCharacter(c) {
+ return ",>-".indexOf(c) !== -1;
+ }
+
+ function isStopCharacter(c) {
+ return isWhitespace(c) || isEndCharacter(c);
+ }
+
+ function isErrorCharacter(c) {
+ return "()".indexOf(c) !== -1;
+ }
+
+ function itemTypeFromName(typename) {
+ for (let i = 0, len = itemTypes.length; i < len; ++i) {
+ if (itemTypes[i] === typename) {
+ return i;
+ }
+ }
+
+ throw new Error("Unknown type filter `" + typename + "`");
+ }
+
+ /**
+ * If we encounter a `"`, then we try to extract the string from it until we find another `"`.
+ *
+ * This function will throw an error in the following cases:
+ * * There is already another string element.
+ * * We are parsing a generic argument.
+ * * There is more than one element.
+ * * There is no closing `"`.
+ *
+ * @param {ParsedQuery} query
+ * @param {ParserState} parserState
+ * @param {boolean} isInGenerics
+ */
+ function getStringElem(query, parserState, isInGenerics) {
+ if (isInGenerics) {
+ throw new Error("`\"` cannot be used in generics");
+ } else if (query.literalSearch) {
+ throw new Error("Cannot have more than one literal search element");
+ } else if (parserState.totalElems - parserState.genericsElems > 0) {
+ throw new Error("Cannot use literal search when there is more than one element");
+ }
+ parserState.pos += 1;
+ const start = parserState.pos;
+ const end = getIdentEndPosition(parserState);
+ if (parserState.pos >= parserState.length) {
+ throw new Error("Unclosed `\"`");
+ } else if (parserState.userQuery[end] !== "\"") {
+ throw new Error(`Unexpected \`${parserState.userQuery[end]}\` in a string element`);
+ } else if (start === end) {
+ throw new Error("Cannot have empty string element");
+ }
+ // To skip the quote at the end.
+ parserState.pos += 1;
+ query.literalSearch = true;
+ }
+
+ /**
+ * Returns `true` if the current parser position is starting with "::".
+ *
+ * @param {ParserState} parserState
+ *
+ * @return {boolean}
+ */
+ function isPathStart(parserState) {
+ return parserState.userQuery.slice(parserState.pos, parserState.pos + 2) === "::";
+ }
+
+ /**
+ * Returns `true` if the current parser position is starting with "->".
+ *
+ * @param {ParserState} parserState
+ *
+ * @return {boolean}
+ */
+ function isReturnArrow(parserState) {
+ return parserState.userQuery.slice(parserState.pos, parserState.pos + 2) === "->";
+ }
+
+ /**
+ * Returns `true` if the given `c` character is valid for an ident.
+ *
+ * @param {string} c
+ *
+ * @return {boolean}
+ */
+ function isIdentCharacter(c) {
+ return (
+ c === "_" ||
+ (c >= "0" && c <= "9") ||
+ (c >= "a" && c <= "z") ||
+ (c >= "A" && c <= "Z"));
+ }
+
+ /**
+ * Returns `true` if the given `c` character is a separator.
+ *
+ * @param {string} c
+ *
+ * @return {boolean}
+ */
+ function isSeparatorCharacter(c) {
+ return c === "," || isWhitespaceCharacter(c);
+ }
+
+ /**
+ * Returns `true` if the given `c` character is a whitespace.
+ *
+ * @param {string} c
+ *
+ * @return {boolean}
+ */
+ function isWhitespaceCharacter(c) {
+ return c === " " || c === "\t";
+ }
+
+ /**
+ * @param {ParsedQuery} query
+ * @param {ParserState} parserState
+ * @param {string} name - Name of the query element.
+ * @param {Array<QueryElement>} generics - List of generics of this query element.
+ *
+ * @return {QueryElement} - The newly created `QueryElement`.
+ */
+ function createQueryElement(query, parserState, name, generics, isInGenerics) {
+ if (name === "*" || (name.length === 0 && generics.length === 0)) {
+ return;
+ }
+ if (query.literalSearch && parserState.totalElems - parserState.genericsElems > 0) {
+ throw new Error("You cannot have more than one element if you use quotes");
+ }
+ const pathSegments = name.split("::");
+ if (pathSegments.length > 1) {
+ for (let i = 0, len = pathSegments.length; i < len; ++i) {
+ const pathSegment = pathSegments[i];
+
+ if (pathSegment.length === 0) {
+ if (i === 0) {
+ throw new Error("Paths cannot start with `::`");
+ } else if (i + 1 === len) {
+ throw new Error("Paths cannot end with `::`");
+ }
+ throw new Error("Unexpected `::::`");
+ }
+ }
+ }
+ // In case we only have something like `<p>`, there is no name.
+ if (pathSegments.length === 0 || (pathSegments.length === 1 && pathSegments[0] === "")) {
+ throw new Error("Found generics without a path");
+ }
+ parserState.totalElems += 1;
+ if (isInGenerics) {
+ parserState.genericsElems += 1;
+ }
+ return {
+ name: name,
+ fullPath: pathSegments,
+ pathWithoutLast: pathSegments.slice(0, pathSegments.length - 1),
+ pathLast: pathSegments[pathSegments.length - 1],
+ generics: generics,
+ };
+ }
+
+ /**
+ * This function goes through all characters until it reaches an invalid ident character or the
+ * end of the query. It returns the position of the last character of the ident.
+ *
+ * @param {ParserState} parserState
+ *
+ * @return {integer}
+ */
+ function getIdentEndPosition(parserState) {
+ let end = parserState.pos;
+ let foundExclamation = false;
+ while (parserState.pos < parserState.length) {
+ const c = parserState.userQuery[parserState.pos];
+ if (!isIdentCharacter(c)) {
+ if (c === "!") {
+ if (foundExclamation) {
+ throw new Error("Cannot have more than one `!` in an ident");
+ } else if (parserState.pos + 1 < parserState.length &&
+ isIdentCharacter(parserState.userQuery[parserState.pos + 1])
+ ) {
+ throw new Error("`!` can only be at the end of an ident");
+ }
+ foundExclamation = true;
+ } else if (isErrorCharacter(c)) {
+ throw new Error(`Unexpected \`${c}\``);
+ } else if (
+ isStopCharacter(c) ||
+ isSpecialStartCharacter(c) ||
+ isSeparatorCharacter(c)
+ ) {
+ break;
+ } else if (c === ":") { // If we allow paths ("str::string" for example).
+ if (!isPathStart(parserState)) {
+ break;
+ }
+ // Skip current ":".
+ parserState.pos += 1;
+ foundExclamation = false;
+ } else {
+ throw new Error(`Unexpected \`${c}\``);
+ }
+ }
+ parserState.pos += 1;
+ end = parserState.pos;
+ }
+ return end;
+ }
+
+ /**
+ * @param {ParsedQuery} query
+ * @param {ParserState} parserState
+ * @param {Array<QueryElement>} elems - This is where the new {QueryElement} will be added.
+ * @param {boolean} isInGenerics
+ */
+ function getNextElem(query, parserState, elems, isInGenerics) {
+ const generics = [];
+
+ let start = parserState.pos;
+ let end;
+ // We handle the strings on their own mostly to make code easier to follow.
+ if (parserState.userQuery[parserState.pos] === "\"") {
+ start += 1;
+ getStringElem(query, parserState, isInGenerics);
+ end = parserState.pos - 1;
+ } else {
+ end = getIdentEndPosition(parserState);
+ }
+ if (parserState.pos < parserState.length &&
+ parserState.userQuery[parserState.pos] === "<"
+ ) {
+ if (isInGenerics) {
+ throw new Error("Unexpected `<` after `<`");
+ } else if (start >= end) {
+ throw new Error("Found generics without a path");
+ }
+ parserState.pos += 1;
+ getItemsBefore(query, parserState, generics, ">");
+ }
+ if (start >= end && generics.length === 0) {
+ return;
+ }
+ elems.push(
+ createQueryElement(
+ query,
+ parserState,
+ parserState.userQuery.slice(start, end),
+ generics,
+ isInGenerics
+ )
+ );
+ }
+
+ /**
+ * This function parses the next query element until it finds `endChar`, calling `getNextElem`
+ * to collect each element.
+ *
+ * If there is no `endChar`, this function will implicitly stop at the end without raising an
+ * error.
+ *
+ * @param {ParsedQuery} query
+ * @param {ParserState} parserState
+ * @param {Array<QueryElement>} elems - This is where the new {QueryElement} will be added.
+ * @param {string} endChar - This function will stop when it'll encounter this
+ * character.
+ */
+ function getItemsBefore(query, parserState, elems, endChar) {
+ let foundStopChar = true;
+
+ while (parserState.pos < parserState.length) {
+ const c = parserState.userQuery[parserState.pos];
+ if (c === endChar) {
+ break;
+ } else if (isSeparatorCharacter(c)) {
+ parserState.pos += 1;
+ foundStopChar = true;
+ continue;
+ } else if (c === ":" && isPathStart(parserState)) {
+ throw new Error("Unexpected `::`: paths cannot start with `::`");
+ } else if (c === ":" || isEndCharacter(c)) {
+ let extra = "";
+ if (endChar === ">") {
+ extra = "`<`";
+ } else if (endChar === "") {
+ extra = "`->`";
+ }
+ throw new Error("Unexpected `" + c + "` after " + extra);
+ }
+ if (!foundStopChar) {
+ if (endChar !== "") {
+ throw new Error(`Expected \`,\`, \` \` or \`${endChar}\`, found \`${c}\``);
+ }
+ throw new Error(`Expected \`,\` or \` \`, found \`${c}\``);
+ }
+ const posBefore = parserState.pos;
+ getNextElem(query, parserState, elems, endChar === ">");
+ // This case can be encountered if `getNextElem` encountered a "stop character" right
+ // from the start. For example if you have `,,` or `<>`. In this case, we simply move up
+ // the current position to continue the parsing.
+ if (posBefore === parserState.pos) {
+ parserState.pos += 1;
+ }
+ foundStopChar = false;
+ }
+ // We are either at the end of the string or on the `endChar`` character, let's move forward
+ // in any case.
+ parserState.pos += 1;
+ }
+
+ /**
+ * Checks that the type filter doesn't have unwanted characters like `<>` (which are ignored
+ * if empty).
+ *
+ * @param {ParserState} parserState
+ */
+ function checkExtraTypeFilterCharacters(parserState) {
+ const query = parserState.userQuery;
+
+ for (let pos = 0; pos < parserState.pos; ++pos) {
+ if (!isIdentCharacter(query[pos]) && !isWhitespaceCharacter(query[pos])) {
+ throw new Error(`Unexpected \`${query[pos]}\` in type filter`);
+ }
+ }
+ }
+
+ /**
+ * Parses the provided `query` input to fill `parserState`. If it encounters an error while
+ * parsing `query`, it'll throw an error.
+ *
+ * @param {ParsedQuery} query
+ * @param {ParserState} parserState
+ */
+ function parseInput(query, parserState) {
+ let c, before;
+ let foundStopChar = true;
+
+ while (parserState.pos < parserState.length) {
+ c = parserState.userQuery[parserState.pos];
+ if (isStopCharacter(c)) {
+ foundStopChar = true;
+ if (isSeparatorCharacter(c)) {
+ parserState.pos += 1;
+ continue;
+ } else if (c === "-" || c === ">") {
+ if (isReturnArrow(parserState)) {
+ break;
+ }
+ throw new Error(`Unexpected \`${c}\` (did you mean \`->\`?)`);
+ }
+ throw new Error(`Unexpected \`${c}\``);
+ } else if (c === ":" && !isPathStart(parserState)) {
+ if (parserState.typeFilter !== null) {
+ throw new Error("Unexpected `:`");
+ }
+ if (query.elems.length === 0) {
+ throw new Error("Expected type filter before `:`");
+ } else if (query.elems.length !== 1 || parserState.totalElems !== 1) {
+ throw new Error("Unexpected `:`");
+ } else if (query.literalSearch) {
+ throw new Error("You cannot use quotes on type filter");
+ }
+ checkExtraTypeFilterCharacters(parserState);
+ // The type filter doesn't count as an element since it's a modifier.
+ parserState.typeFilter = query.elems.pop().name;
+ parserState.pos += 1;
+ parserState.totalElems = 0;
+ query.literalSearch = false;
+ foundStopChar = true;
+ continue;
+ }
+ if (!foundStopChar) {
+ if (parserState.typeFilter !== null) {
+ throw new Error(`Expected \`,\`, \` \` or \`->\`, found \`${c}\``);
+ }
+ throw new Error(`Expected \`,\`, \` \`, \`:\` or \`->\`, found \`${c}\``);
+ }
+ before = query.elems.length;
+ getNextElem(query, parserState, query.elems, false);
+ if (query.elems.length === before) {
+ // Nothing was added, weird... Let's increase the position to not remain stuck.
+ parserState.pos += 1;
+ }
+ foundStopChar = false;
+ }
+ while (parserState.pos < parserState.length) {
+ c = parserState.userQuery[parserState.pos];
+ if (isReturnArrow(parserState)) {
+ parserState.pos += 2;
+ // Get returned elements.
+ getItemsBefore(query, parserState, query.returned, "");
+ // Nothing can come afterward!
+ if (query.returned.length === 0) {
+ throw new Error("Expected at least one item after `->`");
+ }
+ break;
+ } else {
+ parserState.pos += 1;
+ }
+ }
+ }
+
+ /**
+ * Takes the user search input and returns an empty `ParsedQuery`.
+ *
+ * @param {string} userQuery
+ *
+ * @return {ParsedQuery}
+ */
+ function newParsedQuery(userQuery) {
+ return {
+ original: userQuery,
+ userQuery: userQuery.toLowerCase(),
+ typeFilter: NO_TYPE_FILTER,
+ elems: [],
+ returned: [],
+ // Total number of "top" elements (does not include generics).
+ foundElems: 0,
+ literalSearch: false,
+ error: null,
+ };
+ }
+
+ /**
+ * Build an URL with search parameters.
+ *
+ * @param {string} search - The current search being performed.
+ * @param {string|null} filterCrates - The current filtering crate (if any).
+ *
+ * @return {string}
+ */
+ function buildUrl(search, filterCrates) {
+ let extra = "?search=" + encodeURIComponent(search);
+
+ if (filterCrates !== null) {
+ extra += "&filter-crate=" + encodeURIComponent(filterCrates);
+ }
+ return getNakedUrl() + extra + window.location.hash;
+ }
+
+ /**
+ * Return the filtering crate or `null` if there is none.
+ *
+ * @return {string|null}
+ */
+ function getFilterCrates() {
+ const elem = document.getElementById("crate-search");
+
+ if (elem &&
+ elem.value !== "all crates" &&
+ hasOwnPropertyRustdoc(rawSearchIndex, elem.value)
+ ) {
+ return elem.value;
+ }
+ return null;
+ }
+
+ /**
+ * Parses the query.
+ *
+ * The supported syntax by this parser is as follow:
+ *
+ * ident = *(ALPHA / DIGIT / "_") [!]
+ * path = ident *(DOUBLE-COLON ident)
+ * arg = path [generics]
+ * arg-without-generic = path
+ * type-sep = COMMA/WS *(COMMA/WS)
+ * nonempty-arg-list = *(type-sep) arg *(type-sep arg) *(type-sep)
+ * nonempty-arg-list-without-generics = *(type-sep) arg-without-generic
+ * *(type-sep arg-without-generic) *(type-sep)
+ * generics = OPEN-ANGLE-BRACKET [ nonempty-arg-list-without-generics ] *(type-sep)
+ * CLOSE-ANGLE-BRACKET/EOF
+ * return-args = RETURN-ARROW *(type-sep) nonempty-arg-list
+ *
+ * exact-search = [type-filter *WS COLON] [ RETURN-ARROW ] *WS QUOTE ident QUOTE [ generics ]
+ * type-search = [type-filter *WS COLON] [ nonempty-arg-list ] [ return-args ]
+ *
+ * query = *WS (exact-search / type-search) *WS
+ *
+ * type-filter = (
+ * "mod" /
+ * "externcrate" /
+ * "import" /
+ * "struct" /
+ * "enum" /
+ * "fn" /
+ * "type" /
+ * "static" /
+ * "trait" /
+ * "impl" /
+ * "tymethod" /
+ * "method" /
+ * "structfield" /
+ * "variant" /
+ * "macro" /
+ * "primitive" /
+ * "associatedtype" /
+ * "constant" /
+ * "associatedconstant" /
+ * "union" /
+ * "foreigntype" /
+ * "keyword" /
+ * "existential" /
+ * "attr" /
+ * "derive" /
+ * "traitalias")
+ *
+ * OPEN-ANGLE-BRACKET = "<"
+ * CLOSE-ANGLE-BRACKET = ">"
+ * COLON = ":"
+ * DOUBLE-COLON = "::"
+ * QUOTE = %x22
+ * COMMA = ","
+ * RETURN-ARROW = "->"
+ *
+ * ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
+ * DIGIT = %x30-39
+ * WS = %x09 / " "
+ *
+ * @param {string} val - The user query
+ *
+ * @return {ParsedQuery} - The parsed query
+ */
+ function parseQuery(userQuery) {
+ userQuery = userQuery.trim();
+ const parserState = {
+ length: userQuery.length,
+ pos: 0,
+ // Total number of elements (includes generics).
+ totalElems: 0,
+ genericsElems: 0,
+ typeFilter: null,
+ userQuery: userQuery.toLowerCase(),
+ };
+ let query = newParsedQuery(userQuery);
+
+ try {
+ parseInput(query, parserState);
+ if (parserState.typeFilter !== null) {
+ let typeFilter = parserState.typeFilter;
+ if (typeFilter === "const") {
+ typeFilter = "constant";
+ }
+ query.typeFilter = itemTypeFromName(typeFilter);
+ }
+ } catch (err) {
+ query = newParsedQuery(userQuery);
+ query.error = err.message;
+ query.typeFilter = -1;
+ return query;
+ }
+
+ if (!query.literalSearch) {
+ // If there is more than one element in the query, we switch to literalSearch in any
+ // case.
+ query.literalSearch = parserState.totalElems > 1;
+ }
+ query.foundElems = query.elems.length + query.returned.length;
+ return query;
+ }
+
+ /**
+ * Creates the query results.
+ *
+ * @param {Array<Result>} results_in_args
+ * @param {Array<Result>} results_returned
+ * @param {Array<Result>} results_in_args
+ * @param {ParsedQuery} parsedQuery
+ *
+ * @return {ResultsTable}
+ */
+ function createQueryResults(results_in_args, results_returned, results_others, parsedQuery) {
+ return {
+ "in_args": results_in_args,
+ "returned": results_returned,
+ "others": results_others,
+ "query": parsedQuery,
+ };
+ }
+
+ /**
+ * Executes the parsed query and builds a {ResultsTable}.
+ *
+ * @param {ParsedQuery} parsedQuery - The parsed user query
+ * @param {Object} searchWords - The list of search words to query against
+ * @param {Object} [filterCrates] - Crate to search in if defined
+ * @param {Object} [currentCrate] - Current crate, to rank results from this crate higher
+ *
+ * @return {ResultsTable}
+ */
+ function execQuery(parsedQuery, searchWords, filterCrates, currentCrate) {
+ const results_others = {}, results_in_args = {}, results_returned = {};
+
+ function transformResults(results) {
+ const duplicates = {};
+ const out = [];
+
+ for (const result of results) {
+ if (result.id > -1) {
+ const obj = searchIndex[result.id];
+ obj.lev = result.lev;
+ const res = buildHrefAndPath(obj);
+ obj.displayPath = pathSplitter(res[0]);
+ obj.fullPath = obj.displayPath + obj.name;
+ // To be sure than it some items aren't considered as duplicate.
+ obj.fullPath += "|" + obj.ty;
+
+ if (duplicates[obj.fullPath]) {
+ continue;
+ }
+ duplicates[obj.fullPath] = true;
+
+ obj.href = res[1];
+ out.push(obj);
+ if (out.length >= MAX_RESULTS) {
+ break;
+ }
+ }
+ }
+ return out;
+ }
+
+ function sortResults(results, isType, preferredCrate) {
+ const userQuery = parsedQuery.userQuery;
+ const ar = [];
+ for (const entry in results) {
+ if (hasOwnPropertyRustdoc(results, entry)) {
+ const result = results[entry];
+ result.word = searchWords[result.id];
+ result.item = searchIndex[result.id] || {};
+ ar.push(result);
+ }
+ }
+ results = ar;
+ // if there are no results then return to default and fail
+ if (results.length === 0) {
+ return [];
+ }
+
+ results.sort((aaa, bbb) => {
+ let a, b;
+
+ // sort by exact match with regard to the last word (mismatch goes later)
+ a = (aaa.word !== userQuery);
+ b = (bbb.word !== userQuery);
+ if (a !== b) {
+ return a - b;
+ }
+
+ // Sort by non levenshtein results and then levenshtein results by the distance
+ // (less changes required to match means higher rankings)
+ a = (aaa.lev);
+ b = (bbb.lev);
+ if (a !== b) {
+ return a - b;
+ }
+
+ // sort by crate (current crate comes first)
+ a = (aaa.item.crate !== preferredCrate);
+ b = (bbb.item.crate !== preferredCrate);
+ if (a !== b) {
+ return a - b;
+ }
+
+ // sort by item name length (longer goes later)
+ a = aaa.word.length;
+ b = bbb.word.length;
+ if (a !== b) {
+ return a - b;
+ }
+
+ // sort by item name (lexicographically larger goes later)
+ a = aaa.word;
+ b = bbb.word;
+ if (a !== b) {
+ return (a > b ? +1 : -1);
+ }
+
+ // sort by index of keyword in item name (no literal occurrence goes later)
+ a = (aaa.index < 0);
+ b = (bbb.index < 0);
+ if (a !== b) {
+ return a - b;
+ }
+ // (later literal occurrence, if any, goes later)
+ a = aaa.index;
+ b = bbb.index;
+ if (a !== b) {
+ return a - b;
+ }
+
+ // special precedence for primitive and keyword pages
+ if ((aaa.item.ty === TY_PRIMITIVE && bbb.item.ty !== TY_KEYWORD) ||
+ (aaa.item.ty === TY_KEYWORD && bbb.item.ty !== TY_PRIMITIVE)) {
+ return -1;
+ }
+ if ((bbb.item.ty === TY_PRIMITIVE && aaa.item.ty !== TY_PRIMITIVE) ||
+ (bbb.item.ty === TY_KEYWORD && aaa.item.ty !== TY_KEYWORD)) {
+ return 1;
+ }
+
+ // sort by description (no description goes later)
+ a = (aaa.item.desc === "");
+ b = (bbb.item.desc === "");
+ if (a !== b) {
+ return a - b;
+ }
+
+ // sort by type (later occurrence in `itemTypes` goes later)
+ a = aaa.item.ty;
+ b = bbb.item.ty;
+ if (a !== b) {
+ return a - b;
+ }
+
+ // sort by path (lexicographically larger goes later)
+ a = aaa.item.path;
+ b = bbb.item.path;
+ if (a !== b) {
+ return (a > b ? +1 : -1);
+ }
+
+ // que sera, sera
+ return 0;
+ });
+
+ let nameSplit = null;
+ if (parsedQuery.elems.length === 1) {
+ const hasPath = typeof parsedQuery.elems[0].path === "undefined";
+ nameSplit = hasPath ? null : parsedQuery.elems[0].path;
+ }
+
+ for (const result of results) {
+ // this validation does not make sense when searching by types
+ if (result.dontValidate) {
+ continue;
+ }
+ const name = result.item.name.toLowerCase(),
+ path = result.item.path.toLowerCase(),
+ parent = result.item.parent;
+
+ if (!isType && !validateResult(name, path, nameSplit, parent)) {
+ result.id = -1;
+ }
+ }
+ return transformResults(results);
+ }
+
+ /**
+ * This function checks if the object (`row`) generics match the given type (`elem`)
+ * generics. If there are no generics on `row`, `defaultLev` is returned.
+ *
+ * @param {Row} row - The object to check.
+ * @param {QueryElement} elem - The element from the parsed query.
+ * @param {integer} defaultLev - This is the value to return in case there are no generics.
+ *
+ * @return {integer} - Returns the best match (if any) or `MAX_LEV_DISTANCE + 1`.
+ */
+ function checkGenerics(row, elem, defaultLev) {
+ if (row.generics.length === 0) {
+ return elem.generics.length === 0 ? defaultLev : MAX_LEV_DISTANCE + 1;
+ } else if (row.generics.length > 0 && row.generics[0].name === null) {
+ return checkGenerics(row.generics[0], elem, defaultLev);
+ }
+ // The names match, but we need to be sure that all generics kinda
+ // match as well.
+ let elem_name;
+ if (elem.generics.length > 0 && row.generics.length >= elem.generics.length) {
+ const elems = Object.create(null);
+ for (const entry of row.generics) {
+ elem_name = entry.name;
+ if (elem_name === "") {
+ // Pure generic, needs to check into it.
+ if (checkGenerics(entry, elem, MAX_LEV_DISTANCE + 1) !== 0) {
+ return MAX_LEV_DISTANCE + 1;
+ }
+ continue;
+ }
+ if (elems[elem_name] === undefined) {
+ elems[elem_name] = 0;
+ }
+ elems[elem_name] += 1;
+ }
+ // We need to find the type that matches the most to remove it in order
+ // to move forward.
+ for (const generic of elem.generics) {
+ let match = null;
+ if (elems[generic.name]) {
+ match = generic.name;
+ } else {
+ for (elem_name in elems) {
+ if (!hasOwnPropertyRustdoc(elems, elem_name)) {
+ continue;
+ }
+ if (elem_name === generic) {
+ match = elem_name;
+ break;
+ }
+ }
+ }
+ if (match === null) {
+ return MAX_LEV_DISTANCE + 1;
+ }
+ elems[match] -= 1;
+ if (elems[match] === 0) {
+ delete elems[match];
+ }
+ }
+ return 0;
+ }
+ return MAX_LEV_DISTANCE + 1;
+ }
+
+ /**
+ * This function checks if the object (`row`) matches the given type (`elem`) and its
+ * generics (if any).
+ *
+ * @param {Row} row
+ * @param {QueryElement} elem - The element from the parsed query.
+ *
+ * @return {integer} - Returns a Levenshtein distance to the best match.
+ */
+ function checkIfInGenerics(row, elem) {
+ let lev = MAX_LEV_DISTANCE + 1;
+ for (const entry of row.generics) {
+ lev = Math.min(checkType(entry, elem, true), lev);
+ if (lev === 0) {
+ break;
+ }
+ }
+ return lev;
+ }
+
+ /**
+ * This function checks if the object (`row`) matches the given type (`elem`) and its
+ * generics (if any).
+ *
+ * @param {Row} row
+ * @param {QueryElement} elem - The element from the parsed query.
+ * @param {boolean} literalSearch
+ *
+ * @return {integer} - Returns a Levenshtein distance to the best match. If there is
+ * no match, returns `MAX_LEV_DISTANCE + 1`.
+ */
+ function checkType(row, elem, literalSearch) {
+ if (row.name === null) {
+ // This is a pure "generic" search, no need to run other checks.
+ if (row.generics.length > 0) {
+ return checkIfInGenerics(row, elem);
+ }
+ return MAX_LEV_DISTANCE + 1;
+ }
+
+ let lev = levenshtein(row.name, elem.name);
+ if (literalSearch) {
+ if (lev !== 0) {
+ // The name didn't match, let's try to check if the generics do.
+ if (elem.generics.length === 0) {
+ const checkGeneric = row.generics.length > 0;
+ if (checkGeneric && row.generics
+ .findIndex(tmp_elem => tmp_elem.name === elem.name) !== -1) {
+ return 0;
+ }
+ }
+ return MAX_LEV_DISTANCE + 1;
+ } else if (elem.generics.length > 0) {
+ return checkGenerics(row, elem, MAX_LEV_DISTANCE + 1);
+ }
+ return 0;
+ } else if (row.generics.length > 0) {
+ if (elem.generics.length === 0) {
+ if (lev === 0) {
+ return 0;
+ }
+ // The name didn't match so we now check if the type we're looking for is inside
+ // the generics!
+ lev = checkIfInGenerics(row, elem);
+ // Now whatever happens, the returned distance is "less good" so we should mark
+ // it as such, and so we add 0.5 to the distance to make it "less good".
+ return lev + 0.5;
+ } else if (lev > MAX_LEV_DISTANCE) {
+ // So our item's name doesn't match at all and has generics.
+ //
+ // Maybe it's present in a sub generic? For example "f<A<B<C>>>()", if we're
+ // looking for "B<C>", we'll need to go down.
+ return checkIfInGenerics(row, elem);
+ } else {
+ // At this point, the name kinda match and we have generics to check, so
+ // let's go!
+ const tmp_lev = checkGenerics(row, elem, lev);
+ if (tmp_lev > MAX_LEV_DISTANCE) {
+ return MAX_LEV_DISTANCE + 1;
+ }
+ // We compute the median value of both checks and return it.
+ return (tmp_lev + lev) / 2;
+ }
+ } else if (elem.generics.length > 0) {
+ // In this case, we were expecting generics but there isn't so we simply reject this
+ // one.
+ return MAX_LEV_DISTANCE + 1;
+ }
+ // No generics on our query or on the target type so we can return without doing
+ // anything else.
+ return lev;
+ }
+
+ /**
+ * This function checks if the object (`row`) has an argument with the given type (`elem`).
+ *
+ * @param {Row} row
+ * @param {QueryElement} elem - The element from the parsed query.
+ * @param {integer} typeFilter
+ *
+ * @return {integer} - Returns a Levenshtein distance to the best match. If there is no
+ * match, returns `MAX_LEV_DISTANCE + 1`.
+ */
+ function findArg(row, elem, typeFilter) {
+ let lev = MAX_LEV_DISTANCE + 1;
+
+ if (row && row.type && row.type.inputs && row.type.inputs.length > 0) {
+ for (const input of row.type.inputs) {
+ if (!typePassesFilter(typeFilter, input.ty)) {
+ continue;
+ }
+ lev = Math.min(lev, checkType(input, elem, parsedQuery.literalSearch));
+ if (lev === 0) {
+ return 0;
+ }
+ }
+ }
+ return parsedQuery.literalSearch ? MAX_LEV_DISTANCE + 1 : lev;
+ }
+
+ /**
+ * This function checks if the object (`row`) returns the given type (`elem`).
+ *
+ * @param {Row} row
+ * @param {QueryElement} elem - The element from the parsed query.
+ * @param {integer} typeFilter
+ *
+ * @return {integer} - Returns a Levenshtein distance to the best match. If there is no
+ * match, returns `MAX_LEV_DISTANCE + 1`.
+ */
+ function checkReturned(row, elem, typeFilter) {
+ let lev = MAX_LEV_DISTANCE + 1;
+
+ if (row && row.type && row.type.output.length > 0) {
+ const ret = row.type.output;
+ for (const ret_ty of ret) {
+ if (!typePassesFilter(typeFilter, ret_ty.ty)) {
+ continue;
+ }
+ lev = Math.min(lev, checkType(ret_ty, elem, parsedQuery.literalSearch));
+ if (lev === 0) {
+ return 0;
+ }
+ }
+ }
+ return parsedQuery.literalSearch ? MAX_LEV_DISTANCE + 1 : lev;
+ }
+
+ function checkPath(contains, ty) {
+ if (contains.length === 0) {
+ return 0;
+ }
+ let ret_lev = MAX_LEV_DISTANCE + 1;
+ const path = ty.path.split("::");
+
+ if (ty.parent && ty.parent.name) {
+ path.push(ty.parent.name.toLowerCase());
+ }
+
+ const length = path.length;
+ const clength = contains.length;
+ if (clength > length) {
+ return MAX_LEV_DISTANCE + 1;
+ }
+ for (let i = 0; i < length; ++i) {
+ if (i + clength > length) {
+ break;
+ }
+ let lev_total = 0;
+ let aborted = false;
+ for (let x = 0; x < clength; ++x) {
+ const lev = levenshtein(path[i + x], contains[x]);
+ if (lev > MAX_LEV_DISTANCE) {
+ aborted = true;
+ break;
+ }
+ lev_total += lev;
+ }
+ if (!aborted) {
+ ret_lev = Math.min(ret_lev, Math.round(lev_total / clength));
+ }
+ }
+ return ret_lev;
+ }
+
+ function typePassesFilter(filter, type) {
+ // No filter or Exact mach
+ if (filter <= NO_TYPE_FILTER || filter === type) return true;
+
+ // Match related items
+ const name = itemTypes[type];
+ switch (itemTypes[filter]) {
+ case "constant":
+ return name === "associatedconstant";
+ case "fn":
+ return name === "method" || name === "tymethod";
+ case "type":
+ return name === "primitive" || name === "associatedtype";
+ case "trait":
+ return name === "traitalias";
+ }
+
+ // No match
+ return false;
+ }
+
+ function createAliasFromItem(item) {
+ return {
+ crate: item.crate,
+ name: item.name,
+ path: item.path,
+ desc: item.desc,
+ ty: item.ty,
+ parent: item.parent,
+ type: item.type,
+ is_alias: true,
+ };
+ }
+
+ function handleAliases(ret, query, filterCrates, currentCrate) {
+ const lowerQuery = query.toLowerCase();
+ // We separate aliases and crate aliases because we want to have current crate
+ // aliases to be before the others in the displayed results.
+ const aliases = [];
+ const crateAliases = [];
+ if (filterCrates !== null) {
+ if (ALIASES[filterCrates] && ALIASES[filterCrates][lowerQuery]) {
+ const query_aliases = ALIASES[filterCrates][lowerQuery];
+ for (const alias of query_aliases) {
+ aliases.push(createAliasFromItem(searchIndex[alias]));
+ }
+ }
+ } else {
+ Object.keys(ALIASES).forEach(crate => {
+ if (ALIASES[crate][lowerQuery]) {
+ const pushTo = crate === currentCrate ? crateAliases : aliases;
+ const query_aliases = ALIASES[crate][lowerQuery];
+ for (const alias of query_aliases) {
+ pushTo.push(createAliasFromItem(searchIndex[alias]));
+ }
+ }
+ });
+ }
+
+ const sortFunc = (aaa, bbb) => {
+ if (aaa.path < bbb.path) {
+ return 1;
+ } else if (aaa.path === bbb.path) {
+ return 0;
+ }
+ return -1;
+ };
+ crateAliases.sort(sortFunc);
+ aliases.sort(sortFunc);
+
+ const pushFunc = alias => {
+ alias.alias = query;
+ const res = buildHrefAndPath(alias);
+ alias.displayPath = pathSplitter(res[0]);
+ alias.fullPath = alias.displayPath + alias.name;
+ alias.href = res[1];
+
+ ret.others.unshift(alias);
+ if (ret.others.length > MAX_RESULTS) {
+ ret.others.pop();
+ }
+ };
+
+ aliases.forEach(pushFunc);
+ crateAliases.forEach(pushFunc);
+ }
+
+ /**
+ * This function adds the given result into the provided `results` map if it matches the
+ * following condition:
+ *
+ * * If it is a "literal search" (`parsedQuery.literalSearch`), then `lev` must be 0.
+ * * If it is not a "literal search", `lev` must be <= `MAX_LEV_DISTANCE`.
+ *
+ * The `results` map contains information which will be used to sort the search results:
+ *
+ * * `fullId` is a `string`` used as the key of the object we use for the `results` map.
+ * * `id` is the index in both `searchWords` and `searchIndex` arrays for this element.
+ * * `index` is an `integer`` used to sort by the position of the word in the item's name.
+ * * `lev` is the main metric used to sort the search results.
+ *
+ * @param {Results} results
+ * @param {string} fullId
+ * @param {integer} id
+ * @param {integer} index
+ * @param {integer} lev
+ */
+ function addIntoResults(results, fullId, id, index, lev) {
+ if (lev === 0 || (!parsedQuery.literalSearch && lev <= MAX_LEV_DISTANCE)) {
+ if (results[fullId] !== undefined) {
+ const result = results[fullId];
+ if (result.dontValidate || result.lev <= lev) {
+ return;
+ }
+ }
+ results[fullId] = {
+ id: id,
+ index: index,
+ dontValidate: parsedQuery.literalSearch,
+ lev: lev,
+ };
+ }
+ }
+
+ /**
+ * This function is called in case the query is only one element (with or without generics).
+ * This element will be compared to arguments' and returned values' items and also to items.
+ *
+ * Other important thing to note: since there is only one element, we use levenshtein
+ * distance for name comparisons.
+ *
+ * @param {Row} row
+ * @param {integer} pos - Position in the `searchIndex`.
+ * @param {QueryElement} elem - The element from the parsed query.
+ * @param {Results} results_others - Unqualified results (not in arguments nor in
+ * returned values).
+ * @param {Results} results_in_args - Matching arguments results.
+ * @param {Results} results_returned - Matching returned arguments results.
+ */
+ function handleSingleArg(
+ row,
+ pos,
+ elem,
+ results_others,
+ results_in_args,
+ results_returned
+ ) {
+ if (!row || (filterCrates !== null && row.crate !== filterCrates)) {
+ return;
+ }
+ let lev, lev_add = 0, index = -1;
+ const fullId = row.id;
+
+ const in_args = findArg(row, elem, parsedQuery.typeFilter);
+ const returned = checkReturned(row, elem, parsedQuery.typeFilter);
+
+ addIntoResults(results_in_args, fullId, pos, index, in_args);
+ addIntoResults(results_returned, fullId, pos, index, returned);
+
+ if (!typePassesFilter(parsedQuery.typeFilter, row.ty)) {
+ return;
+ }
+ const searchWord = searchWords[pos];
+
+ if (parsedQuery.literalSearch) {
+ if (searchWord === elem.name) {
+ addIntoResults(results_others, fullId, pos, -1, 0);
+ }
+ return;
+ }
+
+ // No need to check anything else if it's a "pure" generics search.
+ if (elem.name.length === 0) {
+ if (row.type !== null) {
+ lev = checkGenerics(row.type, elem, MAX_LEV_DISTANCE + 1);
+ addIntoResults(results_others, fullId, pos, index, lev);
+ }
+ return;
+ }
+
+ if (elem.fullPath.length > 1) {
+ lev = checkPath(elem.pathWithoutLast, row);
+ if (lev > MAX_LEV_DISTANCE || (parsedQuery.literalSearch && lev !== 0)) {
+ return;
+ } else if (lev > 0) {
+ lev_add = lev / 10;
+ }
+ }
+
+ if (searchWord.indexOf(elem.pathLast) > -1 ||
+ row.normalizedName.indexOf(elem.pathLast) > -1
+ ) {
+ index = row.normalizedName.indexOf(elem.pathLast);
+ }
+ lev = levenshtein(searchWord, elem.pathLast);
+ if (lev > 0 && elem.pathLast.length > 2 && searchWord.indexOf(elem.pathLast) > -1) {
+ if (elem.pathLast.length < 6) {
+ lev = 1;
+ } else {
+ lev = 0;
+ }
+ }
+ lev += lev_add;
+ if (lev > MAX_LEV_DISTANCE) {
+ return;
+ } else if (index !== -1 && elem.fullPath.length < 2) {
+ lev -= 1;
+ }
+ if (lev < 0) {
+ lev = 0;
+ }
+ addIntoResults(results_others, fullId, pos, index, lev);
+ }
+
+ /**
+ * This function is called in case the query has more than one element. In this case, it'll
+ * try to match the items which validates all the elements. For `aa -> bb` will look for
+ * functions which have a parameter `aa` and has `bb` in its returned values.
+ *
+ * @param {Row} row
+ * @param {integer} pos - Position in the `searchIndex`.
+ * @param {Object} results
+ */
+ function handleArgs(row, pos, results) {
+ if (!row || (filterCrates !== null && row.crate !== filterCrates)) {
+ return;
+ }
+
+ let totalLev = 0;
+ let nbLev = 0;
+
+ // If the result is too "bad", we return false and it ends this search.
+ function checkArgs(elems, callback) {
+ for (const elem of elems) {
+ // There is more than one parameter to the query so all checks should be "exact"
+ const lev = callback(row, elem, NO_TYPE_FILTER);
+ if (lev <= 1) {
+ nbLev += 1;
+ totalLev += lev;
+ } else {
+ return false;
+ }
+ }
+ return true;
+ }
+ if (!checkArgs(parsedQuery.elems, findArg)) {
+ return;
+ }
+ if (!checkArgs(parsedQuery.returned, checkReturned)) {
+ return;
+ }
+
+ if (nbLev === 0) {
+ return;
+ }
+ const lev = Math.round(totalLev / nbLev);
+ addIntoResults(results, row.id, pos, 0, lev);
+ }
+
+ function innerRunQuery() {
+ let elem, i, nSearchWords, in_returned, row;
+
+ if (parsedQuery.foundElems === 1) {
+ if (parsedQuery.elems.length === 1) {
+ elem = parsedQuery.elems[0];
+ for (i = 0, nSearchWords = searchWords.length; i < nSearchWords; ++i) {
+ // It means we want to check for this element everywhere (in names, args and
+ // returned).
+ handleSingleArg(
+ searchIndex[i],
+ i,
+ elem,
+ results_others,
+ results_in_args,
+ results_returned
+ );
+ }
+ } else if (parsedQuery.returned.length === 1) {
+ // We received one returned argument to check, so looking into returned values.
+ elem = parsedQuery.returned[0];
+ for (i = 0, nSearchWords = searchWords.length; i < nSearchWords; ++i) {
+ row = searchIndex[i];
+ in_returned = checkReturned(row, elem, parsedQuery.typeFilter);
+ addIntoResults(results_others, row.id, i, -1, in_returned);
+ }
+ }
+ } else if (parsedQuery.foundElems > 0) {
+ for (i = 0, nSearchWords = searchWords.length; i < nSearchWords; ++i) {
+ handleArgs(searchIndex[i], i, results_others);
+ }
+ }
+ }
+
+ if (parsedQuery.error === null) {
+ innerRunQuery();
+ }
+
+ const ret = createQueryResults(
+ sortResults(results_in_args, true, currentCrate),
+ sortResults(results_returned, true, currentCrate),
+ sortResults(results_others, false, currentCrate),
+ parsedQuery);
+ handleAliases(ret, parsedQuery.original.replace(/"/g, ""), filterCrates, currentCrate);
+ if (parsedQuery.error !== null && ret.others.length !== 0) {
+ // It means some doc aliases were found so let's "remove" the error!
+ ret.query.error = null;
+ }
+ return ret;
+ }
+
+ /**
+ * Validate performs the following boolean logic. For example:
+ * "File::open" will give IF A PARENT EXISTS => ("file" && "open")
+ * exists in (name || path || parent) OR => ("file" && "open") exists in
+ * (name || path )
+ *
+ * This could be written functionally, but I wanted to minimise
+ * functions on stack.
+ *
+ * @param {string} name - The name of the result
+ * @param {string} path - The path of the result
+ * @param {string} keys - The keys to be used (["file", "open"])
+ * @param {Object} parent - The parent of the result
+ *
+ * @return {boolean} - Whether the result is valid or not
+ */
+ function validateResult(name, path, keys, parent) {
+ if (!keys || !keys.length) {
+ return true;
+ }
+ for (const key of keys) {
+ // each check is for validation so we negate the conditions and invalidate
+ if (!(
+ // check for an exact name match
+ name.indexOf(key) > -1 ||
+ // then an exact path match
+ path.indexOf(key) > -1 ||
+ // next if there is a parent, check for exact parent match
+ (parent !== undefined && parent.name !== undefined &&
+ parent.name.toLowerCase().indexOf(key) > -1) ||
+ // lastly check to see if the name was a levenshtein match
+ levenshtein(name, key) <= MAX_LEV_DISTANCE)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ function nextTab(direction) {
+ const next = (searchState.currentTab + direction + 3) % searchState.focusedByTab.length;
+ searchState.focusedByTab[searchState.currentTab] = document.activeElement;
+ printTab(next);
+ focusSearchResult();
+ }
+
+ // Focus the first search result on the active tab, or the result that
+ // was focused last time this tab was active.
+ function focusSearchResult() {
+ const target = searchState.focusedByTab[searchState.currentTab] ||
+ document.querySelectorAll(".search-results.active a").item(0) ||
+ document.querySelectorAll("#titles > button").item(searchState.currentTab);
+ if (target) {
+ target.focus();
+ }
+ }
+
+ function buildHrefAndPath(item) {
+ let displayPath;
+ let href;
+ const type = itemTypes[item.ty];
+ const name = item.name;
+ let path = item.path;
+
+ if (type === "mod") {
+ displayPath = path + "::";
+ href = ROOT_PATH + path.replace(/::/g, "/") + "/" +
+ name + "/index.html";
+ } else if (type === "import") {
+ displayPath = item.path + "::";
+ href = ROOT_PATH + item.path.replace(/::/g, "/") + "/index.html#reexport." + name;
+ } else if (type === "primitive" || type === "keyword") {
+ displayPath = "";
+ href = ROOT_PATH + path.replace(/::/g, "/") +
+ "/" + type + "." + name + ".html";
+ } else if (type === "externcrate") {
+ displayPath = "";
+ href = ROOT_PATH + name + "/index.html";
+ } else if (item.parent !== undefined) {
+ const myparent = item.parent;
+ let anchor = "#" + type + "." + name;
+ const parentType = itemTypes[myparent.ty];
+ let pageType = parentType;
+ let pageName = myparent.name;
+
+ if (parentType === "primitive") {
+ displayPath = myparent.name + "::";
+ } else if (type === "structfield" && parentType === "variant") {
+ // Structfields belonging to variants are special: the
+ // final path element is the enum name.
+ const enumNameIdx = item.path.lastIndexOf("::");
+ const enumName = item.path.substr(enumNameIdx + 2);
+ path = item.path.substr(0, enumNameIdx);
+ displayPath = path + "::" + enumName + "::" + myparent.name + "::";
+ anchor = "#variant." + myparent.name + ".field." + name;
+ pageType = "enum";
+ pageName = enumName;
+ } else {
+ displayPath = path + "::" + myparent.name + "::";
+ }
+ href = ROOT_PATH + path.replace(/::/g, "/") +
+ "/" + pageType +
+ "." + pageName +
+ ".html" + anchor;
+ } else {
+ displayPath = item.path + "::";
+ href = ROOT_PATH + item.path.replace(/::/g, "/") +
+ "/" + type + "." + name + ".html";
+ }
+ return [displayPath, href];
+ }
+
+ function pathSplitter(path) {
+ const tmp = "<span>" + path.replace(/::/g, "::</span><span>");
+ if (tmp.endsWith("<span>")) {
+ return tmp.slice(0, tmp.length - 6);
+ }
+ return tmp;
+ }
+
+ /**
+ * Render a set of search results for a single tab.
+ * @param {Array<?>} array - The search results for this tab
+ * @param {ParsedQuery} query
+ * @param {boolean} display - True if this is the active tab
+ */
+ function addTab(array, query, display) {
+ let extraClass = "";
+ if (display === true) {
+ extraClass = " active";
+ }
+
+ const output = document.createElement("div");
+ let length = 0;
+ if (array.length > 0) {
+ output.className = "search-results " + extraClass;
+
+ array.forEach(item => {
+ const name = item.name;
+ const type = itemTypes[item.ty];
+
+ length += 1;
+
+ let extra = "";
+ if (type === "primitive") {
+ extra = " <i>(primitive type)</i>";
+ } else if (type === "keyword") {
+ extra = " <i>(keyword)</i>";
+ }
+
+ const link = document.createElement("a");
+ link.className = "result-" + type;
+ link.href = item.href;
+
+ const resultName = document.createElement("div");
+ resultName.className = "result-name";
+
+ if (item.is_alias) {
+ const alias = document.createElement("span");
+ alias.className = "alias";
+
+ const bold = document.createElement("b");
+ bold.innerText = item.alias;
+ alias.appendChild(bold);
+
+ alias.insertAdjacentHTML(
+ "beforeend",
+ "<span class=\"grey\"><i>&nbsp;- see&nbsp;</i></span>");
+
+ resultName.appendChild(alias);
+ }
+ resultName.insertAdjacentHTML(
+ "beforeend",
+ item.displayPath + "<span class=\"" + type + "\">" + name + extra + "</span>");
+ link.appendChild(resultName);
+
+ const description = document.createElement("div");
+ description.className = "desc";
+ description.insertAdjacentHTML("beforeend", item.desc);
+
+ link.appendChild(description);
+ output.appendChild(link);
+ });
+ } else if (query.error === null) {
+ output.className = "search-failed" + extraClass;
+ output.innerHTML = "No results :(<br/>" +
+ "Try on <a href=\"https://duckduckgo.com/?q=" +
+ encodeURIComponent("rust " + query.userQuery) +
+ "\">DuckDuckGo</a>?<br/><br/>" +
+ "Or try looking in one of these:<ul><li>The <a " +
+ "href=\"https://doc.rust-lang.org/reference/index.html\">Rust Reference</a> " +
+ " for technical details about the language.</li><li><a " +
+ "href=\"https://doc.rust-lang.org/rust-by-example/index.html\">Rust By " +
+ "Example</a> for expository code examples.</a></li><li>The <a " +
+ "href=\"https://doc.rust-lang.org/book/index.html\">Rust Book</a> for " +
+ "introductions to language features and the language itself.</li><li><a " +
+ "href=\"https://docs.rs\">Docs.rs</a> for documentation of crates released on" +
+ " <a href=\"https://crates.io/\">crates.io</a>.</li></ul>";
+ }
+ return [output, length];
+ }
+
+ function makeTabHeader(tabNb, text, nbElems) {
+ if (searchState.currentTab === tabNb) {
+ return "<button class=\"selected\">" + text +
+ " <div class=\"count\">(" + nbElems + ")</div></button>";
+ }
+ return "<button>" + text + " <div class=\"count\">(" + nbElems + ")</div></button>";
+ }
+
+ /**
+ * @param {ResultsTable} results
+ * @param {boolean} go_to_first
+ * @param {string} filterCrates
+ */
+ function showResults(results, go_to_first, filterCrates) {
+ const search = searchState.outputElement();
+ if (go_to_first || (results.others.length === 1
+ && getSettingValue("go-to-only-result") === "true"
+ // By default, the search DOM element is "empty" (meaning it has no children not
+ // text content). Once a search has been run, it won't be empty, even if you press
+ // ESC or empty the search input (which also "cancels" the search).
+ && (!search.firstChild || search.firstChild.innerText !== searchState.loadingText))
+ ) {
+ const elem = document.createElement("a");
+ elem.href = results.others[0].href;
+ removeClass(elem, "active");
+ // For firefox, we need the element to be in the DOM so it can be clicked.
+ document.body.appendChild(elem);
+ elem.click();
+ return;
+ }
+ if (results.query === undefined) {
+ results.query = parseQuery(searchState.input.value);
+ }
+
+ currentResults = results.query.userQuery;
+
+ const ret_others = addTab(results.others, results.query, true);
+ const ret_in_args = addTab(results.in_args, results.query, false);
+ const ret_returned = addTab(results.returned, results.query, false);
+
+ // Navigate to the relevant tab if the current tab is empty, like in case users search
+ // for "-> String". If they had selected another tab previously, they have to click on
+ // it again.
+ let currentTab = searchState.currentTab;
+ if ((currentTab === 0 && ret_others[1] === 0) ||
+ (currentTab === 1 && ret_in_args[1] === 0) ||
+ (currentTab === 2 && ret_returned[1] === 0)) {
+ if (ret_others[1] !== 0) {
+ currentTab = 0;
+ } else if (ret_in_args[1] !== 0) {
+ currentTab = 1;
+ } else if (ret_returned[1] !== 0) {
+ currentTab = 2;
+ }
+ }
+
+ let crates = "";
+ const crates_list = Object.keys(rawSearchIndex);
+ if (crates_list.length > 1) {
+ crates = " in&nbsp;<div id=\"crate-search-div\"><select id=\"crate-search\">" +
+ "<option value=\"all crates\">all crates</option>";
+ for (const c of crates_list) {
+ crates += `<option value="${c}" ${c === filterCrates && "selected"}>${c}</option>`;
+ }
+ crates += "</select></div>";
+ }
+
+ let output = `<h1 class="search-results-title">Results${crates}</h1>`;
+ if (results.query.error !== null) {
+ output += `<h3>Query parser error: "${results.query.error}".</h3>`;
+ output += "<div id=\"titles\">" +
+ makeTabHeader(0, "In Names", ret_others[1]) +
+ "</div>";
+ currentTab = 0;
+ } else if (results.query.foundElems <= 1 && results.query.returned.length === 0) {
+ output += "<div id=\"titles\">" +
+ makeTabHeader(0, "In Names", ret_others[1]) +
+ makeTabHeader(1, "In Parameters", ret_in_args[1]) +
+ makeTabHeader(2, "In Return Types", ret_returned[1]) +
+ "</div>";
+ } else {
+ const signatureTabTitle =
+ results.query.elems.length === 0 ? "In Function Return Types" :
+ results.query.returned.length === 0 ? "In Function Parameters" :
+ "In Function Signatures";
+ output += "<div id=\"titles\">" +
+ makeTabHeader(0, signatureTabTitle, ret_others[1]) +
+ "</div>";
+ currentTab = 0;
+ }
+
+ const resultsElem = document.createElement("div");
+ resultsElem.id = "results";
+ resultsElem.appendChild(ret_others[0]);
+ resultsElem.appendChild(ret_in_args[0]);
+ resultsElem.appendChild(ret_returned[0]);
+
+ search.innerHTML = output;
+ const crateSearch = document.getElementById("crate-search");
+ if (crateSearch) {
+ crateSearch.addEventListener("input", updateCrate);
+ }
+ search.appendChild(resultsElem);
+ // Reset focused elements.
+ searchState.showResults(search);
+ const elems = document.getElementById("titles").childNodes;
+ searchState.focusedByTab = [];
+ let i = 0;
+ for (const elem of elems) {
+ const j = i;
+ elem.onclick = () => printTab(j);
+ searchState.focusedByTab.push(null);
+ i += 1;
+ }
+ printTab(currentTab);
+ }
+
+ /**
+ * Perform a search based on the current state of the search input element
+ * and display the results.
+ * @param {Event} [e] - The event that triggered this search, if any
+ * @param {boolean} [forced]
+ */
+ function search(e, forced) {
+ const params = searchState.getQueryStringParams();
+ const query = parseQuery(searchState.input.value.trim());
+
+ if (e) {
+ e.preventDefault();
+ }
+
+ if (!forced && query.userQuery === currentResults) {
+ if (query.userQuery.length > 0) {
+ putBackSearch();
+ }
+ return;
+ }
+
+ let filterCrates = getFilterCrates();
+
+ // In case we have no information about the saved crate and there is a URL query parameter,
+ // we override it with the URL query parameter.
+ if (filterCrates === null && params["filter-crate"] !== undefined) {
+ filterCrates = params["filter-crate"];
+ }
+
+ // Update document title to maintain a meaningful browser history
+ searchState.title = "Results for " + query.original + " - Rust";
+
+ // Because searching is incremental by character, only the most
+ // recent search query is added to the browser history.
+ if (browserSupportsHistoryApi()) {
+ const newURL = buildUrl(query.original, filterCrates);
+
+ if (!history.state && !params.search) {
+ history.pushState(null, "", newURL);
+ } else {
+ history.replaceState(null, "", newURL);
+ }
+ }
+
+ showResults(
+ execQuery(query, searchWords, filterCrates, window.currentCrate),
+ params.go_to_first,
+ filterCrates);
+ }
+
+ /**
+ * Convert a list of RawFunctionType / ID to object-based FunctionType.
+ *
+ * Crates often have lots of functions in them, and it's common to have a large number of
+ * functions that operate on a small set of data types, so the search index compresses them
+ * by encoding function parameter and return types as indexes into an array of names.
+ *
+ * Even when a general-purpose compression algorithm is used, this is still a win. I checked.
+ * https://github.com/rust-lang/rust/pull/98475#issue-1284395985
+ *
+ * The format for individual function types is encoded in
+ * librustdoc/html/render/mod.rs: impl Serialize for RenderType
+ *
+ * @param {null|Array<RawFunctionType>} types
+ * @param {Array<{name: string, ty: number}>} lowercasePaths
+ *
+ * @return {Array<FunctionSearchType>}
+ */
+ function buildItemSearchTypeAll(types, lowercasePaths) {
+ const PATH_INDEX_DATA = 0;
+ const GENERICS_DATA = 1;
+ return types.map(type => {
+ let pathIndex, generics;
+ if (typeof type === "number") {
+ pathIndex = type;
+ generics = [];
+ } else {
+ pathIndex = type[PATH_INDEX_DATA];
+ generics = buildItemSearchTypeAll(type[GENERICS_DATA], lowercasePaths);
+ }
+ return {
+ // `0` is used as a sentinel because it's fewer bytes than `null`
+ name: pathIndex === 0 ? null : lowercasePaths[pathIndex - 1].name,
+ ty: pathIndex === 0 ? null : lowercasePaths[pathIndex - 1].ty,
+ generics: generics,
+ };
+ });
+ }
+
+ /**
+ * Convert from RawFunctionSearchType to FunctionSearchType.
+ *
+ * Crates often have lots of functions in them, and function signatures are sometimes complex,
+ * so rustdoc uses a pretty tight encoding for them. This function converts it to a simpler,
+ * object-based encoding so that the actual search code is more readable and easier to debug.
+ *
+ * The raw function search type format is generated using serde in
+ * librustdoc/html/render/mod.rs: impl Serialize for IndexItemFunctionType
+ *
+ * @param {RawFunctionSearchType} functionSearchType
+ * @param {Array<{name: string, ty: number}>} lowercasePaths
+ *
+ * @return {null|FunctionSearchType}
+ */
+ function buildFunctionSearchType(functionSearchType, lowercasePaths) {
+ const INPUTS_DATA = 0;
+ const OUTPUT_DATA = 1;
+ // `0` is used as a sentinel because it's fewer bytes than `null`
+ if (functionSearchType === 0) {
+ return null;
+ }
+ let inputs, output;
+ if (typeof functionSearchType[INPUTS_DATA] === "number") {
+ const pathIndex = functionSearchType[INPUTS_DATA];
+ inputs = [{
+ name: pathIndex === 0 ? null : lowercasePaths[pathIndex - 1].name,
+ ty: pathIndex === 0 ? null : lowercasePaths[pathIndex - 1].ty,
+ generics: [],
+ }];
+ } else {
+ inputs = buildItemSearchTypeAll(functionSearchType[INPUTS_DATA], lowercasePaths);
+ }
+ if (functionSearchType.length > 1) {
+ if (typeof functionSearchType[OUTPUT_DATA] === "number") {
+ const pathIndex = functionSearchType[OUTPUT_DATA];
+ output = [{
+ name: pathIndex === 0 ? null : lowercasePaths[pathIndex - 1].name,
+ ty: pathIndex === 0 ? null : lowercasePaths[pathIndex - 1].ty,
+ generics: [],
+ }];
+ } else {
+ output = buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA], lowercasePaths);
+ }
+ } else {
+ output = [];
+ }
+ return {
+ inputs, output,
+ };
+ }
+
+ function buildIndex(rawSearchIndex) {
+ searchIndex = [];
+ /**
+ * @type {Array<string>}
+ */
+ const searchWords = [];
+ let i, word;
+ let currentIndex = 0;
+ let id = 0;
+
+ for (const crate in rawSearchIndex) {
+ if (!hasOwnPropertyRustdoc(rawSearchIndex, crate)) {
+ continue;
+ }
+
+ let crateSize = 0;
+
+ /**
+ * The raw search data for a given crate. `n`, `t`, `d`, and `q`, `i`, and `f`
+ * are arrays with the same length. n[i] contains the name of an item.
+ * t[i] contains the type of that item (as a small integer that represents an
+ * offset in `itemTypes`). d[i] contains the description of that item.
+ *
+ * q[i] contains the full path of the item, or an empty string indicating
+ * "same as q[i-1]".
+ *
+ * i[i] contains an item's parent, usually a module. For compactness,
+ * it is a set of indexes into the `p` array.
+ *
+ * f[i] contains function signatures, or `0` if the item isn't a function.
+ * Functions are themselves encoded as arrays. The first item is a list of
+ * types representing the function's inputs, and the second list item is a list
+ * of types representing the function's output. Tuples are flattened.
+ * Types are also represented as arrays; the first item is an index into the `p`
+ * array, while the second is a list of types representing any generic parameters.
+ *
+ * `a` defines aliases with an Array of pairs: [name, offset], where `offset`
+ * points into the n/t/d/q/i/f arrays.
+ *
+ * `doc` contains the description of the crate.
+ *
+ * `p` is a list of path/type pairs. It is used for parents and function parameters.
+ *
+ * @type {{
+ * doc: string,
+ * a: Object,
+ * n: Array<string>,
+ * t: Array<Number>,
+ * d: Array<string>,
+ * q: Array<string>,
+ * i: Array<Number>,
+ * f: Array<RawFunctionSearchType>,
+ * p: Array<Object>,
+ * }}
+ */
+ const crateCorpus = rawSearchIndex[crate];
+
+ searchWords.push(crate);
+ // This object should have exactly the same set of fields as the "row"
+ // object defined below. Your JavaScript runtime will thank you.
+ // https://mathiasbynens.be/notes/shapes-ics
+ const crateRow = {
+ crate: crate,
+ ty: 1, // == ExternCrate
+ name: crate,
+ path: "",
+ desc: crateCorpus.doc,
+ parent: undefined,
+ type: null,
+ id: id,
+ normalizedName: crate.indexOf("_") === -1 ? crate : crate.replace(/_/g, ""),
+ };
+ id += 1;
+ searchIndex.push(crateRow);
+ currentIndex += 1;
+
+ // an array of (Number) item types
+ const itemTypes = crateCorpus.t;
+ // an array of (String) item names
+ const itemNames = crateCorpus.n;
+ // an array of (String) full paths (or empty string for previous path)
+ const itemPaths = crateCorpus.q;
+ // an array of (String) descriptions
+ const itemDescs = crateCorpus.d;
+ // an array of (Number) the parent path index + 1 to `paths`, or 0 if none
+ const itemParentIdxs = crateCorpus.i;
+ // an array of (Object | null) the type of the function, if any
+ const itemFunctionSearchTypes = crateCorpus.f;
+ // an array of [(Number) item type,
+ // (String) name]
+ const paths = crateCorpus.p;
+ // an array of [(String) alias name
+ // [Number] index to items]
+ const aliases = crateCorpus.a;
+
+ // an array of [{name: String, ty: Number}]
+ const lowercasePaths = [];
+
+ // convert `rawPaths` entries into object form
+ // generate normalizedPaths for function search mode
+ let len = paths.length;
+ for (i = 0; i < len; ++i) {
+ lowercasePaths.push({ty: paths[i][0], name: paths[i][1].toLowerCase()});
+ paths[i] = {ty: paths[i][0], name: paths[i][1]};
+ }
+
+ // convert `item*` into an object form, and construct word indices.
+ //
+ // before any analysis is performed lets gather the search terms to
+ // search against apart from the rest of the data. This is a quick
+ // operation that is cached for the life of the page state so that
+ // all other search operations have access to this cached data for
+ // faster analysis operations
+ len = itemTypes.length;
+ let lastPath = "";
+ for (i = 0; i < len; ++i) {
+ // This object should have exactly the same set of fields as the "crateRow"
+ // object defined above.
+ if (typeof itemNames[i] === "string") {
+ word = itemNames[i].toLowerCase();
+ searchWords.push(word);
+ } else {
+ word = "";
+ searchWords.push("");
+ }
+ const row = {
+ crate: crate,
+ ty: itemTypes[i],
+ name: itemNames[i],
+ path: itemPaths[i] ? itemPaths[i] : lastPath,
+ desc: itemDescs[i],
+ parent: itemParentIdxs[i] > 0 ? paths[itemParentIdxs[i] - 1] : undefined,
+ type: buildFunctionSearchType(itemFunctionSearchTypes[i], lowercasePaths),
+ id: id,
+ normalizedName: word.indexOf("_") === -1 ? word : word.replace(/_/g, ""),
+ };
+ id += 1;
+ searchIndex.push(row);
+ lastPath = row.path;
+ crateSize += 1;
+ }
+
+ if (aliases) {
+ ALIASES[crate] = Object.create(null);
+ for (const alias_name in aliases) {
+ if (!hasOwnPropertyRustdoc(aliases, alias_name)) {
+ continue;
+ }
+
+ if (!hasOwnPropertyRustdoc(ALIASES[crate], alias_name)) {
+ ALIASES[crate][alias_name] = [];
+ }
+ for (const local_alias of aliases[alias_name]) {
+ ALIASES[crate][alias_name].push(local_alias + currentIndex);
+ }
+ }
+ }
+ currentIndex += crateSize;
+ }
+ return searchWords;
+ }
+
+ /**
+ * Callback for when the search form is submitted.
+ * @param {Event} [e] - The event that triggered this call, if any
+ */
+ function onSearchSubmit(e) {
+ e.preventDefault();
+ searchState.clearInputTimeout();
+ search();
+ }
+
+ function putBackSearch() {
+ const search_input = searchState.input;
+ if (!searchState.input) {
+ return;
+ }
+ if (search_input.value !== "" && !searchState.isDisplayed()) {
+ searchState.showResults();
+ if (browserSupportsHistoryApi()) {
+ history.replaceState(null, "",
+ buildUrl(search_input.value, getFilterCrates()));
+ }
+ document.title = searchState.title;
+ }
+ }
+
+ function registerSearchEvents() {
+ const params = searchState.getQueryStringParams();
+
+ // Populate search bar with query string search term when provided,
+ // but only if the input bar is empty. This avoid the obnoxious issue
+ // where you start trying to do a search, and the index loads, and
+ // suddenly your search is gone!
+ if (searchState.input.value === "") {
+ searchState.input.value = params.search || "";
+ }
+
+ const searchAfter500ms = () => {
+ searchState.clearInputTimeout();
+ if (searchState.input.value.length === 0) {
+ if (browserSupportsHistoryApi()) {
+ history.replaceState(null, window.currentCrate + " - Rust",
+ getNakedUrl() + window.location.hash);
+ }
+ searchState.hideResults();
+ } else {
+ searchState.timeout = setTimeout(search, 500);
+ }
+ };
+ searchState.input.onkeyup = searchAfter500ms;
+ searchState.input.oninput = searchAfter500ms;
+ document.getElementsByClassName("search-form")[0].onsubmit = onSearchSubmit;
+ searchState.input.onchange = e => {
+ if (e.target !== document.activeElement) {
+ // To prevent doing anything when it's from a blur event.
+ return;
+ }
+ // Do NOT e.preventDefault() here. It will prevent pasting.
+ searchState.clearInputTimeout();
+ // zero-timeout necessary here because at the time of event handler execution the
+ // pasted content is not in the input field yet. Shouldn’t make any difference for
+ // change, though.
+ setTimeout(search, 0);
+ };
+ searchState.input.onpaste = searchState.input.onchange;
+
+ searchState.outputElement().addEventListener("keydown", e => {
+ // We only handle unmodified keystrokes here. We don't want to interfere with,
+ // for instance, alt-left and alt-right for history navigation.
+ if (e.altKey || e.ctrlKey || e.shiftKey || e.metaKey) {
+ return;
+ }
+ // up and down arrow select next/previous search result, or the
+ // search box if we're already at the top.
+ if (e.which === 38) { // up
+ const previous = document.activeElement.previousElementSibling;
+ if (previous) {
+ previous.focus();
+ } else {
+ searchState.focus();
+ }
+ e.preventDefault();
+ } else if (e.which === 40) { // down
+ const next = document.activeElement.nextElementSibling;
+ if (next) {
+ next.focus();
+ }
+ const rect = document.activeElement.getBoundingClientRect();
+ if (window.innerHeight - rect.bottom < rect.height) {
+ window.scrollBy(0, rect.height);
+ }
+ e.preventDefault();
+ } else if (e.which === 37) { // left
+ nextTab(-1);
+ e.preventDefault();
+ } else if (e.which === 39) { // right
+ nextTab(1);
+ e.preventDefault();
+ }
+ });
+
+ searchState.input.addEventListener("keydown", e => {
+ if (e.which === 40) { // down
+ focusSearchResult();
+ e.preventDefault();
+ }
+ });
+
+ searchState.input.addEventListener("focus", () => {
+ putBackSearch();
+ });
+
+ searchState.input.addEventListener("blur", () => {
+ searchState.input.placeholder = searchState.input.origPlaceholder;
+ });
+
+ // Push and pop states are used to add search results to the browser
+ // history.
+ if (browserSupportsHistoryApi()) {
+ // Store the previous <title> so we can revert back to it later.
+ const previousTitle = document.title;
+
+ window.addEventListener("popstate", e => {
+ const params = searchState.getQueryStringParams();
+ // Revert to the previous title manually since the History
+ // API ignores the title parameter.
+ document.title = previousTitle;
+ // When browsing forward to search results the previous
+ // search will be repeated, so the currentResults are
+ // cleared to ensure the search is successful.
+ currentResults = null;
+ // Synchronize search bar with query string state and
+ // perform the search. This will empty the bar if there's
+ // nothing there, which lets you really go back to a
+ // previous state with nothing in the bar.
+ if (params.search && params.search.length > 0) {
+ searchState.input.value = params.search;
+ // Some browsers fire "onpopstate" for every page load
+ // (Chrome), while others fire the event only when actually
+ // popping a state (Firefox), which is why search() is
+ // called both here and at the end of the startSearch()
+ // function.
+ search(e);
+ } else {
+ searchState.input.value = "";
+ // When browsing back from search results the main page
+ // visibility must be reset.
+ searchState.hideResults();
+ }
+ });
+ }
+
+ // This is required in firefox to avoid this problem: Navigating to a search result
+ // with the keyboard, hitting enter, and then hitting back would take you back to
+ // the doc page, rather than the search that should overlay it.
+ // This was an interaction between the back-forward cache and our handlers
+ // that try to sync state between the URL and the search input. To work around it,
+ // do a small amount of re-init on page show.
+ window.onpageshow = () => {
+ const qSearch = searchState.getQueryStringParams().search;
+ if (searchState.input.value === "" && qSearch) {
+ searchState.input.value = qSearch;
+ }
+ search();
+ };
+ }
+
+ function updateCrate(ev) {
+ if (ev.target.value === "all crates") {
+ // If we don't remove it from the URL, it'll be picked up again by the search.
+ const params = searchState.getQueryStringParams();
+ const query = searchState.input.value.trim();
+ if (!history.state && !params.search) {
+ history.pushState(null, "", buildUrl(query, null));
+ } else {
+ history.replaceState(null, "", buildUrl(query, null));
+ }
+ }
+ // In case you "cut" the entry from the search input, then change the crate filter
+ // before paste back the previous search, you get the old search results without
+ // the filter. To prevent this, we need to remove the previous results.
+ currentResults = null;
+ search(undefined, true);
+ }
+
+ /**
+ * @type {Array<string>}
+ */
+ const searchWords = buildIndex(rawSearchIndex);
+ if (typeof window !== "undefined") {
+ registerSearchEvents();
+ // If there's a search term in the URL, execute the search now.
+ if (window.searchState.getQueryStringParams().search) {
+ search();
+ }
+ }
+
+ if (typeof exports !== "undefined") {
+ exports.initSearch = initSearch;
+ exports.execQuery = execQuery;
+ exports.parseQuery = parseQuery;
+ }
+ return searchWords;
+}
+
+if (typeof window !== "undefined") {
+ window.initSearch = initSearch;
+ if (window.searchIndex !== undefined) {
+ initSearch(window.searchIndex);
+ }
+} else {
+ // Running in Node, not a browser. Run initSearch just to produce the
+ // exports.
+ initSearch({});
+}
+
+
+})();
diff --git a/static.files/settings-3a0b9947ba1bd99a.js b/static.files/settings-3a0b9947ba1bd99a.js
new file mode 100644
index 0000000..141563b
--- /dev/null
+++ b/static.files/settings-3a0b9947ba1bd99a.js
@@ -0,0 +1,283 @@
+// Local js definitions:
+/* global getSettingValue, getVirtualKey, updateLocalStorage, updateSystemTheme */
+/* global addClass, removeClass, onEach, onEachLazy, blurHandler, elemIsInParent */
+/* global MAIN_ID, getVar, getSettingsButton */
+
+"use strict";
+
+(function() {
+ const isSettingsPage = window.location.pathname.endsWith("/settings.html");
+
+ function changeSetting(settingName, value) {
+ updateLocalStorage(settingName, value);
+
+ switch (settingName) {
+ case "theme":
+ case "preferred-dark-theme":
+ case "preferred-light-theme":
+ case "use-system-theme":
+ updateSystemTheme();
+ updateLightAndDark();
+ break;
+ case "line-numbers":
+ if (value === true) {
+ window.rustdoc_add_line_numbers_to_examples();
+ } else {
+ window.rustdoc_remove_line_numbers_from_examples();
+ }
+ break;
+ }
+ }
+
+ function handleKey(ev) {
+ // Don't interfere with browser shortcuts
+ if (ev.ctrlKey || ev.altKey || ev.metaKey) {
+ return;
+ }
+ switch (getVirtualKey(ev)) {
+ case "Enter":
+ case "Return":
+ case "Space":
+ ev.target.checked = !ev.target.checked;
+ ev.preventDefault();
+ break;
+ }
+ }
+
+ function showLightAndDark() {
+ addClass(document.getElementById("theme").parentElement, "hidden");
+ removeClass(document.getElementById("preferred-light-theme").parentElement, "hidden");
+ removeClass(document.getElementById("preferred-dark-theme").parentElement, "hidden");
+ }
+
+ function hideLightAndDark() {
+ addClass(document.getElementById("preferred-light-theme").parentElement, "hidden");
+ addClass(document.getElementById("preferred-dark-theme").parentElement, "hidden");
+ removeClass(document.getElementById("theme").parentElement, "hidden");
+ }
+
+ function updateLightAndDark() {
+ if (getSettingValue("use-system-theme") !== "false") {
+ showLightAndDark();
+ } else {
+ hideLightAndDark();
+ }
+ }
+
+ function setEvents(settingsElement) {
+ updateLightAndDark();
+ onEachLazy(settingsElement.getElementsByClassName("slider"), elem => {
+ const toggle = elem.previousElementSibling;
+ const settingId = toggle.id;
+ const settingValue = getSettingValue(settingId);
+ if (settingValue !== null) {
+ toggle.checked = settingValue === "true";
+ }
+ toggle.onchange = function() {
+ changeSetting(this.id, this.checked);
+ };
+ toggle.onkeyup = handleKey;
+ toggle.onkeyrelease = handleKey;
+ });
+ onEachLazy(settingsElement.getElementsByClassName("select-wrapper"), elem => {
+ const select = elem.getElementsByTagName("select")[0];
+ const settingId = select.id;
+ const settingValue = getSettingValue(settingId);
+ if (settingValue !== null) {
+ select.value = settingValue;
+ }
+ select.onchange = function() {
+ changeSetting(this.id, this.value);
+ };
+ });
+ onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"), elem => {
+ const settingId = elem.name;
+ const settingValue = getSettingValue(settingId);
+ if (settingValue !== null && settingValue !== "null") {
+ elem.checked = settingValue === elem.value;
+ }
+ elem.addEventListener("change", ev => {
+ changeSetting(ev.target.name, ev.target.value);
+ });
+ });
+ }
+
+ /**
+ * This function builds the sections inside the "settings page". It takes a `settings` list
+ * as argument which describes each setting and how to render it. It returns a string
+ * representing the raw HTML.
+ *
+ * @param {Array<Object>} settings
+ *
+ * @return {string}
+ */
+ function buildSettingsPageSections(settings) {
+ let output = "";
+
+ for (const setting of settings) {
+ output += "<div class=\"setting-line\">";
+ const js_data_name = setting["js_name"];
+ const setting_name = setting["name"];
+
+ if (setting["options"] !== undefined) {
+ // This is a select setting.
+ output += `<div class="radio-line" id="${js_data_name}">\
+ <span class="setting-name">${setting_name}</span>\
+ <div class="choices">`;
+ onEach(setting["options"], option => {
+ const checked = option === setting["default"] ? " checked" : "";
+
+ output += `<label for="${js_data_name}-${option}" class="choice">\
+ <input type="radio" name="${js_data_name}" \
+ id="${js_data_name}-${option}" value="${option}"${checked}>\
+ <span>${option}</span>\
+ </label>`;
+ });
+ output += "</div></div>";
+ } else {
+ // This is a toggle.
+ const checked = setting["default"] === true ? " checked" : "";
+ output += `<label class="toggle">\
+ <input type="checkbox" id="${js_data_name}"${checked}>\
+ <span class="slider"></span>\
+ <span class="label">${setting_name}</span>\
+ </label>`;
+ }
+ output += "</div>";
+ }
+ return output;
+ }
+
+ /**
+ * This function builds the "settings page" and returns the generated HTML element.
+ *
+ * @return {HTMLElement}
+ */
+ function buildSettingsPage() {
+ const theme_names = getVar("themes").split(",").filter(t => t);
+ theme_names.push("light", "dark", "ayu");
+
+ const settings = [
+ {
+ "name": "Use system theme",
+ "js_name": "use-system-theme",
+ "default": true,
+ },
+ {
+ "name": "Theme",
+ "js_name": "theme",
+ "default": "light",
+ "options": theme_names,
+ },
+ {
+ "name": "Preferred light theme",
+ "js_name": "preferred-light-theme",
+ "default": "light",
+ "options": theme_names,
+ },
+ {
+ "name": "Preferred dark theme",
+ "js_name": "preferred-dark-theme",
+ "default": "dark",
+ "options": theme_names,
+ },
+ {
+ "name": "Auto-hide item contents for large items",
+ "js_name": "auto-hide-large-items",
+ "default": true,
+ },
+ {
+ "name": "Auto-hide item methods' documentation",
+ "js_name": "auto-hide-method-docs",
+ "default": false,
+ },
+ {
+ "name": "Auto-hide trait implementation documentation",
+ "js_name": "auto-hide-trait-implementations",
+ "default": false,
+ },
+ {
+ "name": "Directly go to item in search if there is only one result",
+ "js_name": "go-to-only-result",
+ "default": false,
+ },
+ {
+ "name": "Show line numbers on code examples",
+ "js_name": "line-numbers",
+ "default": false,
+ },
+ {
+ "name": "Disable keyboard shortcuts",
+ "js_name": "disable-shortcuts",
+ "default": false,
+ },
+ ];
+
+ // Then we build the DOM.
+ const elementKind = isSettingsPage ? "section" : "div";
+ const innerHTML = `<div class="settings">${buildSettingsPageSections(settings)}</div>`;
+ const el = document.createElement(elementKind);
+ el.id = "settings";
+ if (!isSettingsPage) {
+ el.className = "popover";
+ }
+ el.innerHTML = innerHTML;
+
+ if (isSettingsPage) {
+ document.getElementById(MAIN_ID).appendChild(el);
+ } else {
+ el.setAttribute("tabindex", "-1");
+ getSettingsButton().appendChild(el);
+ }
+ return el;
+ }
+
+ const settingsMenu = buildSettingsPage();
+
+ function displaySettings() {
+ settingsMenu.style.display = "";
+ }
+
+ function settingsBlurHandler(event) {
+ blurHandler(event, getSettingsButton(), window.hidePopoverMenus);
+ }
+
+ if (isSettingsPage) {
+ // We replace the existing "onclick" callback to do nothing if clicked.
+ getSettingsButton().onclick = function(event) {
+ event.preventDefault();
+ };
+ } else {
+ // We replace the existing "onclick" callback.
+ const settingsButton = getSettingsButton();
+ const settingsMenu = document.getElementById("settings");
+ settingsButton.onclick = function(event) {
+ if (elemIsInParent(event.target, settingsMenu)) {
+ return;
+ }
+ event.preventDefault();
+ const shouldDisplaySettings = settingsMenu.style.display === "none";
+
+ window.hidePopoverMenus();
+ if (shouldDisplaySettings) {
+ displaySettings();
+ }
+ };
+ settingsButton.onblur = settingsBlurHandler;
+ settingsButton.querySelector("a").onblur = settingsBlurHandler;
+ onEachLazy(settingsMenu.querySelectorAll("input"), el => {
+ el.onblur = settingsBlurHandler;
+ });
+ settingsMenu.onblur = settingsBlurHandler;
+ }
+
+ // We now wait a bit for the web browser to end re-computing the DOM...
+ setTimeout(() => {
+ setEvents(settingsMenu);
+ // The setting menu is already displayed if we're on the settings page.
+ if (!isSettingsPage) {
+ displaySettings();
+ }
+ removeClass(getSettingsButton(), "rotate");
+ }, 0);
+})();
diff --git a/static.files/settings-a66f7524084a489a.css b/static.files/settings-a66f7524084a489a.css
new file mode 100644
index 0000000..83939f6
--- /dev/null
+++ b/static.files/settings-a66f7524084a489a.css
@@ -0,0 +1,110 @@
+.setting-line {
+ margin: 0.6em 0 0.6em 0.3em;
+ position: relative;
+}
+
+.setting-line .choices {
+ display: flex;
+ flex-wrap: wrap;
+}
+
+.setting-line .radio-line input {
+ margin-right: 0.3em;
+ height: 1.2rem;
+ width: 1.2rem;
+ color: inherit;
+ border: 1px solid currentColor;
+ outline: none;
+ -webkit-appearance: none;
+ cursor: pointer;
+ border-radius: 50%;
+}
+.setting-line .radio-line input + span {
+ padding-bottom: 1px;
+}
+
+.radio-line .setting-name {
+ width: 100%;
+}
+
+.radio-line .choice {
+ margin-top: 0.1em;
+ margin-bottom: 0.1em;
+ min-width: 3.8em;
+ padding: 0.3em;
+ display: flex;
+ align-items: center;
+ cursor: pointer;
+}
+.radio-line .choice + .choice {
+ margin-left: 0.5em;
+}
+
+.toggle {
+ position: relative;
+ width: 100%;
+ margin-right: 20px;
+ display: flex;
+ align-items: center;
+ cursor: pointer;
+}
+
+.toggle input {
+ opacity: 0;
+ position: absolute;
+}
+
+.slider {
+ position: relative;
+ width: 45px;
+ min-width: 45px;
+ display: block;
+ height: 28px;
+ margin-right: 20px;
+ cursor: pointer;
+ background-color: #ccc;
+ transition: .3s;
+}
+
+.slider:before {
+ position: absolute;
+ content: "";
+ height: 19px;
+ width: 19px;
+ left: 4px;
+ bottom: 4px;
+ transition: .3s;
+}
+
+input:checked + .slider:before {
+ transform: translateX(19px);
+}
+
+.setting-line > .sub-settings {
+ padding-left: 42px;
+ width: 100%;
+ display: block;
+}
+
+#settings .setting-line {
+ margin: 1.2em 0.6em;
+}
+
+.setting-line .radio-line input:checked {
+ box-shadow: inset 0 0 0 3px var(--main-background-color);
+ background-color: var(--settings-input-color);
+}
+.setting-line .radio-line input:focus {
+ box-shadow: 0 0 1px 1px var(--settings-input-color);
+}
+/* In here we combine both `:focus` and `:checked` properties. */
+.setting-line .radio-line input:checked:focus {
+ box-shadow: inset 0 0 0 3px var(--main-background-color),
+ 0 0 2px 2px var(--settings-input-color);
+}
+.setting-line .radio-line input:hover {
+ border-color: var(--settings-input-color) !important;
+}
+input:checked + .slider {
+ background-color: var(--settings-input-color);
+}
diff --git a/static.files/source-script-74087aa2e88f4475.js b/static.files/source-script-74087aa2e88f4475.js
new file mode 100644
index 0000000..0b9368d
--- /dev/null
+++ b/static.files/source-script-74087aa2e88f4475.js
@@ -0,0 +1,228 @@
+// From rust:
+/* global sourcesIndex */
+
+// Local js definitions:
+/* global addClass, getCurrentValue, onEachLazy, removeClass, browserSupportsHistoryApi */
+/* global updateLocalStorage */
+
+"use strict";
+
+(function() {
+
+const rootPath = document.getElementById("rustdoc-vars").attributes["data-root-path"].value;
+
+const NAME_OFFSET = 0;
+const DIRS_OFFSET = 1;
+const FILES_OFFSET = 2;
+
+function closeSidebarIfMobile() {
+ if (window.innerWidth < window.RUSTDOC_MOBILE_BREAKPOINT) {
+ updateLocalStorage("source-sidebar-show", "false");
+ }
+}
+
+function createDirEntry(elem, parent, fullPath, hasFoundFile) {
+ const dirEntry = document.createElement("details");
+ const summary = document.createElement("summary");
+
+ dirEntry.className = "dir-entry";
+
+ fullPath += elem[NAME_OFFSET] + "/";
+
+ summary.innerText = elem[NAME_OFFSET];
+ dirEntry.appendChild(summary);
+
+ const folders = document.createElement("div");
+ folders.className = "folders";
+ if (elem[DIRS_OFFSET]) {
+ for (const dir of elem[DIRS_OFFSET]) {
+ if (createDirEntry(dir, folders, fullPath, false)) {
+ dirEntry.open = true;
+ hasFoundFile = true;
+ }
+ }
+ }
+ dirEntry.appendChild(folders);
+
+ const files = document.createElement("div");
+ files.className = "files";
+ if (elem[FILES_OFFSET]) {
+ for (const file_text of elem[FILES_OFFSET]) {
+ const file = document.createElement("a");
+ file.innerText = file_text;
+ file.href = rootPath + "src/" + fullPath + file_text + ".html";
+ file.addEventListener("click", closeSidebarIfMobile);
+ const w = window.location.href.split("#")[0];
+ if (!hasFoundFile && w === file.href) {
+ file.className = "selected";
+ dirEntry.open = true;
+ hasFoundFile = true;
+ }
+ files.appendChild(file);
+ }
+ }
+ dirEntry.appendChild(files);
+ parent.appendChild(dirEntry);
+ return hasFoundFile;
+}
+
+function toggleSidebar() {
+ const child = this.parentNode.children[0];
+ if (child.innerText === ">") {
+ window.rustdocMobileScrollLock();
+ addClass(document.documentElement, "source-sidebar-expanded");
+ child.innerText = "<";
+ updateLocalStorage("source-sidebar-show", "true");
+ } else {
+ window.rustdocMobileScrollUnlock();
+ removeClass(document.documentElement, "source-sidebar-expanded");
+ child.innerText = ">";
+ updateLocalStorage("source-sidebar-show", "false");
+ }
+}
+
+function createSidebarToggle() {
+ const sidebarToggle = document.createElement("div");
+ sidebarToggle.id = "sidebar-toggle";
+
+ const inner = document.createElement("button");
+
+ if (getCurrentValue("source-sidebar-show") === "true") {
+ inner.innerText = "<";
+ } else {
+ inner.innerText = ">";
+ }
+ inner.onclick = toggleSidebar;
+
+ sidebarToggle.appendChild(inner);
+ return sidebarToggle;
+}
+
+// This function is called from "source-files.js", generated in `html/render/write_shared.rs`.
+// eslint-disable-next-line no-unused-vars
+function createSourceSidebar() {
+ const container = document.querySelector("nav.sidebar");
+
+ const sidebarToggle = createSidebarToggle();
+ container.insertBefore(sidebarToggle, container.firstChild);
+
+ const sidebar = document.createElement("div");
+ sidebar.id = "source-sidebar";
+
+ let hasFoundFile = false;
+
+ const title = document.createElement("div");
+ title.className = "title";
+ title.innerText = "Files";
+ sidebar.appendChild(title);
+ Object.keys(sourcesIndex).forEach(key => {
+ sourcesIndex[key][NAME_OFFSET] = key;
+ hasFoundFile = createDirEntry(sourcesIndex[key], sidebar, "",
+ hasFoundFile);
+ });
+
+ container.appendChild(sidebar);
+ // Focus on the current file in the source files sidebar.
+ const selected_elem = sidebar.getElementsByClassName("selected")[0];
+ if (typeof selected_elem !== "undefined") {
+ selected_elem.focus();
+ }
+}
+
+const lineNumbersRegex = /^#?(\d+)(?:-(\d+))?$/;
+
+function highlightSourceLines(match) {
+ if (typeof match === "undefined") {
+ match = window.location.hash.match(lineNumbersRegex);
+ }
+ if (!match) {
+ return;
+ }
+ let from = parseInt(match[1], 10);
+ let to = from;
+ if (typeof match[2] !== "undefined") {
+ to = parseInt(match[2], 10);
+ }
+ if (to < from) {
+ const tmp = to;
+ to = from;
+ from = tmp;
+ }
+ let elem = document.getElementById(from);
+ if (!elem) {
+ return;
+ }
+ const x = document.getElementById(from);
+ if (x) {
+ x.scrollIntoView();
+ }
+ onEachLazy(document.getElementsByClassName("src-line-numbers"), e => {
+ onEachLazy(e.getElementsByTagName("span"), i_e => {
+ removeClass(i_e, "line-highlighted");
+ });
+ });
+ for (let i = from; i <= to; ++i) {
+ elem = document.getElementById(i);
+ if (!elem) {
+ break;
+ }
+ addClass(elem, "line-highlighted");
+ }
+}
+
+const handleSourceHighlight = (function() {
+ let prev_line_id = 0;
+
+ const set_fragment = name => {
+ const x = window.scrollX,
+ y = window.scrollY;
+ if (browserSupportsHistoryApi()) {
+ history.replaceState(null, null, "#" + name);
+ highlightSourceLines();
+ } else {
+ location.replace("#" + name);
+ }
+ // Prevent jumps when selecting one or many lines
+ window.scrollTo(x, y);
+ };
+
+ return ev => {
+ let cur_line_id = parseInt(ev.target.id, 10);
+ // It can happen when clicking not on a line number span.
+ if (isNaN(cur_line_id)) {
+ return;
+ }
+ ev.preventDefault();
+
+ if (ev.shiftKey && prev_line_id) {
+ // Swap selection if needed
+ if (prev_line_id > cur_line_id) {
+ const tmp = prev_line_id;
+ prev_line_id = cur_line_id;
+ cur_line_id = tmp;
+ }
+
+ set_fragment(prev_line_id + "-" + cur_line_id);
+ } else {
+ prev_line_id = cur_line_id;
+
+ set_fragment(cur_line_id);
+ }
+ };
+}());
+
+window.addEventListener("hashchange", () => {
+ const match = window.location.hash.match(lineNumbersRegex);
+ if (match) {
+ return highlightSourceLines(match);
+ }
+});
+
+onEachLazy(document.getElementsByClassName("src-line-numbers"), el => {
+ el.addEventListener("click", handleSourceHighlight);
+});
+
+highlightSourceLines();
+
+window.createSourceSidebar = createSourceSidebar;
+})();
diff --git a/static.files/storage-d43fa987303ecbbb.js b/static.files/storage-d43fa987303ecbbb.js
new file mode 100644
index 0000000..db2db83
--- /dev/null
+++ b/static.files/storage-d43fa987303ecbbb.js
@@ -0,0 +1,264 @@
+// storage.js is loaded in the `<head>` of all rustdoc pages and doesn't
+// use `async` or `defer`. That means it blocks further parsing and rendering
+// of the page: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script.
+// This makes it the correct place to act on settings that affect the display of
+// the page, so we don't see major layout changes during the load of the page.
+"use strict";
+
+const darkThemes = ["dark", "ayu"];
+window.currentTheme = document.getElementById("themeStyle");
+window.mainTheme = document.getElementById("mainThemeStyle");
+
+// WARNING: RUSTDOC_MOBILE_BREAKPOINT MEDIA QUERY
+// If you update this line, then you also need to update the media query with the same
+// warning in rustdoc.css
+window.RUSTDOC_MOBILE_BREAKPOINT = 700;
+
+const settingsDataset = (function() {
+ const settingsElement = document.getElementById("default-settings");
+ if (settingsElement === null) {
+ return null;
+ }
+ const dataset = settingsElement.dataset;
+ if (dataset === undefined) {
+ return null;
+ }
+ return dataset;
+})();
+
+function getSettingValue(settingName) {
+ const current = getCurrentValue(settingName);
+ if (current !== null) {
+ return current;
+ }
+ if (settingsDataset !== null) {
+ // See the comment for `default_settings.into_iter()` etc. in
+ // `Options::from_matches` in `librustdoc/config.rs`.
+ const def = settingsDataset[settingName.replace(/-/g,"_")];
+ if (def !== undefined) {
+ return def;
+ }
+ }
+ return null;
+}
+
+const localStoredTheme = getSettingValue("theme");
+
+const savedHref = [];
+
+// eslint-disable-next-line no-unused-vars
+function hasClass(elem, className) {
+ return elem && elem.classList && elem.classList.contains(className);
+}
+
+// eslint-disable-next-line no-unused-vars
+function addClass(elem, className) {
+ if (!elem || !elem.classList) {
+ return;
+ }
+ elem.classList.add(className);
+}
+
+// eslint-disable-next-line no-unused-vars
+function removeClass(elem, className) {
+ if (!elem || !elem.classList) {
+ return;
+ }
+ elem.classList.remove(className);
+}
+
+/**
+ * Run a callback for every element of an Array.
+ * @param {Array<?>} arr - The array to iterate over
+ * @param {function(?)} func - The callback
+ * @param {boolean} [reversed] - Whether to iterate in reverse
+ */
+function onEach(arr, func, reversed) {
+ if (arr && arr.length > 0 && func) {
+ if (reversed) {
+ const length = arr.length;
+ for (let i = length - 1; i >= 0; --i) {
+ if (func(arr[i])) {
+ return true;
+ }
+ }
+ } else {
+ for (const elem of arr) {
+ if (func(elem)) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+}
+
+/**
+ * Turn an HTMLCollection or a NodeList into an Array, then run a callback
+ * for every element. This is useful because iterating over an HTMLCollection
+ * or a "live" NodeList while modifying it can be very slow.
+ * https://developer.mozilla.org/en-US/docs/Web/API/HTMLCollection
+ * https://developer.mozilla.org/en-US/docs/Web/API/NodeList
+ * @param {NodeList<?>|HTMLCollection<?>} lazyArray - An array to iterate over
+ * @param {function(?)} func - The callback
+ * @param {boolean} [reversed] - Whether to iterate in reverse
+ */
+function onEachLazy(lazyArray, func, reversed) {
+ return onEach(
+ Array.prototype.slice.call(lazyArray),
+ func,
+ reversed);
+}
+
+function updateLocalStorage(name, value) {
+ try {
+ window.localStorage.setItem("rustdoc-" + name, value);
+ } catch (e) {
+ // localStorage is not accessible, do nothing
+ }
+}
+
+function getCurrentValue(name) {
+ try {
+ return window.localStorage.getItem("rustdoc-" + name);
+ } catch (e) {
+ return null;
+ }
+}
+
+function switchTheme(styleElem, mainStyleElem, newThemeName, saveTheme) {
+ // If this new value comes from a system setting or from the previously
+ // saved theme, no need to save it.
+ if (saveTheme) {
+ updateLocalStorage("theme", newThemeName);
+ }
+
+ if (savedHref.length === 0) {
+ onEachLazy(document.getElementsByTagName("link"), el => {
+ savedHref.push(el.href);
+ });
+ }
+ const newHref = savedHref.find(url => {
+ const m = url.match(/static\.files\/(.*)-[a-f0-9]{16}\.css$/);
+ if (m && m[1] === newThemeName) {
+ return true;
+ }
+ const m2 = url.match(/\/([^/]*)\.css$/);
+ if (m2 && m2[1].startsWith(newThemeName)) {
+ return true;
+ }
+ });
+ if (newHref && newHref !== styleElem.href) {
+ styleElem.href = newHref;
+ }
+}
+
+// This function is called from "main.js".
+// eslint-disable-next-line no-unused-vars
+function useSystemTheme(value) {
+ if (value === undefined) {
+ value = true;
+ }
+
+ updateLocalStorage("use-system-theme", value);
+
+ // update the toggle if we're on the settings page
+ const toggle = document.getElementById("use-system-theme");
+ if (toggle && toggle instanceof HTMLInputElement) {
+ toggle.checked = value;
+ }
+}
+
+const updateSystemTheme = (function() {
+ if (!window.matchMedia) {
+ // fallback to the CSS computed value
+ return () => {
+ const cssTheme = getComputedStyle(document.documentElement)
+ .getPropertyValue("content");
+
+ switchTheme(
+ window.currentTheme,
+ window.mainTheme,
+ JSON.parse(cssTheme) || "light",
+ true
+ );
+ };
+ }
+
+ // only listen to (prefers-color-scheme: dark) because light is the default
+ const mql = window.matchMedia("(prefers-color-scheme: dark)");
+
+ function handlePreferenceChange(mql) {
+ const use = theme => {
+ switchTheme(window.currentTheme, window.mainTheme, theme, true);
+ };
+ // maybe the user has disabled the setting in the meantime!
+ if (getSettingValue("use-system-theme") !== "false") {
+ const lightTheme = getSettingValue("preferred-light-theme") || "light";
+ const darkTheme = getSettingValue("preferred-dark-theme") || "dark";
+
+ if (mql.matches) {
+ use(darkTheme);
+ } else {
+ // prefers a light theme, or has no preference
+ use(lightTheme);
+ }
+ // note: we save the theme so that it doesn't suddenly change when
+ // the user disables "use-system-theme" and reloads the page or
+ // navigates to another page
+ } else {
+ use(getSettingValue("theme"));
+ }
+ }
+
+ mql.addListener(handlePreferenceChange);
+
+ return () => {
+ handlePreferenceChange(mql);
+ };
+})();
+
+function switchToSavedTheme() {
+ switchTheme(
+ window.currentTheme,
+ window.mainTheme,
+ getSettingValue("theme") || "light",
+ false
+ );
+}
+
+if (getSettingValue("use-system-theme") !== "false" && window.matchMedia) {
+ // update the preferred dark theme if the user is already using a dark theme
+ // See https://github.com/rust-lang/rust/pull/77809#issuecomment-707875732
+ if (getSettingValue("use-system-theme") === null
+ && getSettingValue("preferred-dark-theme") === null
+ && darkThemes.indexOf(localStoredTheme) >= 0) {
+ updateLocalStorage("preferred-dark-theme", localStoredTheme);
+ }
+
+ // call the function to initialize the theme at least once!
+ updateSystemTheme();
+} else {
+ switchToSavedTheme();
+}
+
+if (getSettingValue("source-sidebar-show") === "true") {
+ // At this point in page load, `document.body` is not available yet.
+ // Set a class on the `<html>` element instead.
+ addClass(document.documentElement, "source-sidebar-expanded");
+}
+
+// If we navigate away (for example to a settings page), and then use the back or
+// forward button to get back to a page, the theme may have changed in the meantime.
+// But scripts may not be re-loaded in such a case due to the bfcache
+// (https://web.dev/bfcache/). The "pageshow" event triggers on such navigations.
+// Use that opportunity to update the theme.
+// We use a setTimeout with a 0 timeout here to put the change on the event queue.
+// For some reason, if we try to change the theme while the `pageshow` event is
+// running, it sometimes fails to take effect. The problem manifests on Chrome,
+// specifically when talking to a remote website with no caching.
+window.addEventListener("pageshow", ev => {
+ if (ev.persisted) {
+ setTimeout(switchToSavedTheme, 0);
+ }
+});
diff --git a/static.files/toggle-minus-31bbd6e4c77f5c96.svg b/static.files/toggle-minus-31bbd6e4c77f5c96.svg
new file mode 100644
index 0000000..7315478
--- /dev/null
+++ b/static.files/toggle-minus-31bbd6e4c77f5c96.svg
@@ -0,0 +1 @@
+<svg width="17" height="17" shape-rendering="crispEdges" stroke="#000" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5 2.5H2.5v12H5m7-12h2.5v12H12M5 8.5h7"/></svg> \ No newline at end of file
diff --git a/static.files/toggle-plus-1092eb4930d581b0.svg b/static.files/toggle-plus-1092eb4930d581b0.svg
new file mode 100644
index 0000000..08b1703
--- /dev/null
+++ b/static.files/toggle-plus-1092eb4930d581b0.svg
@@ -0,0 +1 @@
+<svg width="17" height="17" shape-rendering="crispEdges" stroke="#000" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5 2.5H2.5v12H5m7-12h2.5v12H12M5 8.5h7M8.5 12V8.625v0V5"/></svg> \ No newline at end of file
diff --git a/static.files/wheel-5ec35bf9ca753509.svg b/static.files/wheel-5ec35bf9ca753509.svg
new file mode 100644
index 0000000..01da3b2
--- /dev/null
+++ b/static.files/wheel-5ec35bf9ca753509.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="Capa_1" width="27.434" height="29.5" enable-background="new 0 0 27.434 29.5" version="1.1" viewBox="0 0 27.434 29.5" xml:space="preserve"><g><path d="M27.315,18.389c-0.165-0.604-0.509-1.113-0.981-1.459c-0.042-0.144-0.083-0.429-0.015-0.761l0.037-0.177v-0.182V14.8 c0-1.247-0.006-1.277-0.048-1.472c-0.076-0.354-0.035-0.653,0.007-0.803c0.477-0.346,0.828-0.861,0.996-1.476 c0.261-0.956,0.076-2.091-0.508-3.114l-0.591-1.032c-0.746-1.307-1.965-2.119-3.182-2.119c-0.378,0-0.75,0.081-1.085,0.235 c-0.198-0.025-0.554-0.15-0.855-0.389l-0.103-0.082l-0.114-0.065l-1.857-1.067L18.92,3.36l-0.105-0.044 c-0.376-0.154-0.658-0.41-0.768-0.556C17.918,1.172,16.349,0,14.296,0H13.14c-2.043,0-3.608,1.154-3.749,2.721 C9.277,2.862,8.999,3.104,8.633,3.25l-0.1,0.039L8.439,3.341L6.495,4.406L6.363,4.479L6.245,4.573 C5.936,4.82,5.596,4.944,5.416,4.977c-0.314-0.139-0.66-0.21-1.011-0.21c-1.198,0-2.411,0.819-3.165,2.139L0.65,7.938 c-0.412,0.72-0.642,1.521-0.644,2.258c-0.003,0.952,0.362,1.756,1.013,2.256c0.034,0.155,0.061,0.448-0.016,0.786 c-0.038,0.168-0.062,0.28-0.062,1.563c0,1.148,0,1.148,0.015,1.262l0.009,0.073l0.017,0.073c0.073,0.346,0.045,0.643,0.011,0.802 C0.348,17.512-0.01,18.314,0,19.268c0.008,0.729,0.238,1.523,0.648,2.242l0.589,1.031c0.761,1.331,1.967,2.159,3.15,2.159 c0.324,0,0.645-0.064,0.938-0.187c0.167,0.038,0.492,0.156,0.813,0.416l0.11,0.088l0.124,0.07l2.045,1.156l0.102,0.057l0.107,0.043 c0.364,0.147,0.646,0.381,0.766,0.521c0.164,1.52,1.719,2.634,3.745,2.634h1.155c2.037,0,3.598-1.134,3.747-2.675 c0.117-0.145,0.401-0.393,0.774-0.549l0.111-0.047l0.105-0.062l1.96-1.159l0.105-0.062l0.097-0.075 c0.309-0.246,0.651-0.371,0.832-0.402c0.313,0.138,0.662,0.212,1.016,0.212c1.199,0,2.412-0.82,3.166-2.139l0.59-1.032 C27.387,20.48,27.575,19.342,27.315,18.389z M25.274,20.635l-0.59,1.032c-0.438,0.765-1.104,1.251-1.639,1.251 c-0.133,0-0.258-0.029-0.369-0.094c-0.15-0.086-0.346-0.127-0.566-0.127c-0.596,0-1.383,0.295-2.01,0.796l-1.96,1.157 c-1.016,0.425-1.846,1.291-1.846,1.929s-0.898,1.159-1.998,1.159H13.14c-1.1,0-1.998-0.514-1.998-1.141s-0.834-1.477-1.854-1.888 l-2.046-1.157c-0.636-0.511-1.425-0.814-2.006-0.814c-0.202,0-0.379,0.037-0.516,0.115c-0.101,0.057-0.214,0.084-0.333,0.084 c-0.518,0-1.179-0.498-1.62-1.271l-0.591-1.032c-0.545-0.954-0.556-1.983-0.024-2.286c0.532-0.305,0.78-1.432,0.551-2.506 c0,0,0-0.003,0-1.042c0-1.088,0.021-1.18,0.021-1.18c0.238-1.072-0.01-2.203-0.552-2.513C1.631,10.8,1.634,9.765,2.18,8.812 L2.769,7.78c0.438-0.766,1.103-1.251,1.636-1.251c0.131,0,0.255,0.029,0.365,0.092C4.92,6.707,5.114,6.747,5.334,6.747 c0.596,0,1.38-0.296,2.007-0.795l1.944-1.065c1.021-0.407,1.856-1.277,1.856-1.933c0-0.656,0.898-1.192,1.998-1.192h1.156V1.761 c1.1,0,1.998,0.545,1.998,1.211c0,0.667,0.832,1.554,1.849,1.973L20,6.013c0.618,0.489,1.401,0.775,2.012,0.775 c0.24,0,0.454-0.045,0.62-0.139c0.122-0.069,0.259-0.102,0.403-0.102c0.551,0,1.221,0.476,1.653,1.231l0.59,1.032 c0.544,0.953,0.518,2.004-0.062,2.334c-0.577,0.331-0.859,1.48-0.627,2.554c0,0,0.01,0.042,0.01,1.103c0,1.012,0,1.012,0,1.012 c-0.218,1.049,0.068,2.174,0.636,2.498C25.802,18.635,25.819,19.68,25.274,20.635z"/><path d="M13.61,7.611c-3.913,0-7.084,3.173-7.084,7.085c0,3.914,3.171,7.085,7.084,7.085s7.085-3.172,7.085-7.085 C20.695,10.784,17.523,7.611,13.61,7.611z M13.61,20.02c-2.936,0-5.323-2.388-5.323-5.323c0-2.935,2.388-5.323,5.323-5.323 s5.324,2.388,5.324,5.323C18.934,17.632,16.546,20.02,13.61,20.02z"/><path d="M13.682,9.908c-2.602,0-4.718,2.116-4.718,4.718c0,2.601,2.116,4.716,4.718,4.716c2.601,0,4.717-2.115,4.717-4.716 C18.399,12.024,16.283,9.908,13.682,9.908z M13.682,17.581c-1.633,0-2.956-1.323-2.956-2.955s1.323-2.956,2.956-2.956 c1.632,0,2.956,1.324,2.956,2.956S15.314,17.581,13.682,17.581z"/></g></svg> \ No newline at end of file