<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="A vector that starts inline, but can automatically move to the heap."><title>TinyVec in tinyvec - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><linkrel="stylesheet"href="../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../static.files/rustdoc-5bc39a1768837dd0.css"><metaname="rustdoc-vars"data-root-path="../"data-static-root-path="../static.files/"data-current-crate="tinyvec"data-themes=""data-resource-suffix=""data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)"data-channel="1.77.0"data-search-js="search-dd67cee4cfa65049.js"data-settings-js="settings-4313503d2e1961c2.js"><scriptsrc="../static.files/storage-4c98445ec4002617.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../static.files/main-48f368f3872407c8.js"></script><noscript><linkrel="stylesheet"href="../static.files/noscript-04d5337699b92874.css"></noscript><linkrel="alternate icon"type="image/png"href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><linkrel="alternate icon"type="image/png"href="../static.files/favicon-32x32-422f7d1d52889060.png"><linkrel="icon"type="image/svg+xml"href="../static.files/favicon-2c020d218678b618.svg"></head><bodyclass="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle"title="show sidebar"></button></nav><navclass="sidebar"><divclass="sidebar-crate"><h2><ahref="../tinyvec/index.html">tinyvec</a><spanclass="version">1.6.0</span></h2></div><h2class="location"><ahref="#">TinyVec</a></h2><divclass="sidebar-elems"><section><h3><ahref="#variants">Variants</a></h3><ulclass="block variant"><li><ahref="#variant.Heap">Heap</a></li><li><ahref="#variant.Inline">Inline</a></li></ul><h3><ahref="#implementations">Methods</a></h3><ulclass="block method"><li><ahref="#method.append">append</a></li><li><ahref="#method.as_mut_ptr">as_mut_ptr</a></li><li><ahref="#method.as_mut_slice">as_mut_slice</a></li><li><ahref="#method.as_ptr">as_ptr</a></li><li><ahref="#method.as_slice">as_slice</a></li><li><ahref="#method.capacity">capacity</a></li><li><ahref="#method.clear">clear</a></li><li><ahref="#method.drain">drain</a></li><li><ahref="#method.extend_from_slice">extend_from_slice</a></li><li><ahref="#method.from_array_len">from_array_len</a></li><li><ahref="#method.insert">insert</a></li><li><ahref="#method.is_empty">is_empty</a></li><li><ahref="#method.is_heap">is_heap</a></li><li><ahref="#method.is_inline">is_inline</a></li><li><ahref="#method.len">len</a></li><li><ahref="#method.move_to_the_heap">move_to_the_heap</a></li><li><ahref="#method.move_to_the_heap_and_reserve">move_to_the_heap_and_reserve</a></li><li><ahref="#method.new">new</a></li><li><ahref="#method.pop">pop</a></li><li><ahref="#method.push">push</a></li><li><ahref="#method.remove">remove</a></li><li><ahref="#method.reserve">reserve</a></li><li><ahref="#method.reserve_exact">reserve_exact</a></li><li><ahref="#method.resize">resize</a></li><li><ahref="#method.resize_with">resize_with</a></li><li><ahref="#method.retain">retain</a></li><li><ahref="#method.shrink_to_fit">shrink_to_fit</a></li><li><ahref="#method.splic
<main><divclass="width-limiter"><navclass="sub"><formclass="search-form"><span></span><divid="sidebar-button"tabindex="-1"><ahref="../tinyvec/all.html"title="show sidebar"></a></div><inputclass="search-input"name="search"aria-label="Run search in the documentation"autocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"><divid="help-button"tabindex="-1"><ahref="../help.html"title="help">?</a></div><divid="settings-menu"tabindex="-1"><ahref="../settings.html"title="settings"><imgwidth="22"height="22"alt="Change settings"src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><sectionid="main-content"class="content"><divclass="main-heading"><h1>Enum <ahref="index.html">tinyvec</a>::<wbr><aclass="enum"href="#">TinyVec</a><buttonid="copy-path"title="Copy item path to clipboard"><imgsrc="../static.files/clipboard-7571035ce49a181d.svg"width="19"height="18"alt="Copy item path"></button></h1><spanclass="out-of-band"><aclass="src"href="../src/tinyvec/tinyvec.rs.html#98-103">source</a> · <buttonid="toggle-all-docs"title="collapse all docs">[<span>−</span>]</button></span></div><preclass="rust item-decl"><code>pub enum TinyVec<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>> {
}</code></pre><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>A vector that starts inline, but can automatically move to the heap.</p>
<ul>
<li>Requires the <code>alloc</code> feature</li>
</ul>
<p>A <code>TinyVec</code> is either an Inline(<ahref="struct.ArrayVec.html"title="struct tinyvec::ArrayVec"><code>ArrayVec</code></a>) or
Heap(<ahref="https://doc.rust-lang.org/alloc/vec/struct.Vec.html"><code>Vec</code></a>). The
interface for the type as a whole is a bunch of methods that just match on
the enum variant and then call the same method on the inner vec.</p>
</div></details><h2id="variants"class="variants section-header">Variants<ahref="#variants"class="anchor">§</a></h2><divclass="variants"><sectionid="variant.Inline"class="variant"><ahref="#variant.Inline"class="anchor">§</a><h3class="code-header">Inline(<aclass="struct"href="struct.ArrayVec.html"title="struct tinyvec::ArrayVec">ArrayVec</a><A>)</h3></section><sectionid="variant.Heap"class="variant"><ahref="#variant.Heap"class="anchor">§</a><h3class="code-header">Heap(<aclass="struct"href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>>)</h3></section></div><h2id="implementations"class="section-header">Implementations<ahref="#implementations"class="anchor">§</a></h2><divid="implementations-list"><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#241-529">source</a><ahref="#impl-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_heap"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#245-250">source</a><h4class="code-header">pub fn <ahref="#method.is_heap"class="fn">is_heap</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Returns whether elements are on heap</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_inline"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#254-256">source</a><h4class="code-header">pub fn <ahref="#method.is_inline"class="fn">is_inline</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Returns whether elements are on stack</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.shrink_to_fit"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#269-285">source</a><h4class="code-header">pub fn <ahref="#method.shrink_to_fit"class="fn">shrink_to_fit</a>(&mut self)</h4></section></summary><divclass="docblock"><p>Shrinks the capacity of the vector as much as possible.<br/>
It is inlined if length is less than <code>A::CAPACITY</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.move_to_the_heap"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#296-304">source</a><h4class="code-header">pub fn <ahref="#method.move_to_the_heap"class="fn">move_to_the_heap</a>(&mut self)</h4></section></summary><divclass="docblock"><p>Moves the content of the TinyVec to the heap, if it’s inline.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.move_to_the_heap_and_reserve"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#342-350">source</a><h4class="code-header">pub fn <ahref="#method.move_to_the_heap_and_reserve"class="fn">move_to_the_heap_and_reserve</a>(&mut self, n: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>)</h4></section></summary><divclass="docblock"><p>If TinyVec is inline, moves the content of it to the heap.
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.with_capacity"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#522-528">source</a><h4class="code-header">pub fn <ahref="#method.with_capacity"class="fn">with_capacity</a>(cap: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>) -> Self</h4></section></summary><divclass="docblock"><p>Makes a new TinyVec with <em>at least</em> the given capacity.</p>
</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-TinyVec%3CA%3E-1"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#531-1057">source</a><ahref="#impl-TinyVec%3CA%3E-1"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.append"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#549-554">source</a><h4class="code-header">pub fn <ahref="#method.append"class="fn">append</a>(&mut self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&mut Self</a>)</h4></section></summary><divclass="docblock"><p>Move all values from <code>other</code> into this vec.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.swap_remove"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#556-640">source</a><h4class="code-header">pub fn <ahref="#method.swap_remove"class="fn">swap_remove</a>(&mut self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>) -> A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a></h4></section></summary><divclass="docblock"><p>Remove an element, swapping the end of the vec into its place.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.pop"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#556-640">source</a><h4class="code-header">pub fn <ahref="#method.pop"class="fn">pop</a>(&mut self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>></h4></section></summary><divclass="docblock"><p>Remove and return the last element of the vec, if there is one.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.remove"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#556-640">source</a><h4class="code-header">pub fn <ahref="#method.remove"class="fn">remove</a>(&mut self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>) -> A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a></h4></section></summary><divclass="docblock"><p>Removes the item at <code>index</code>, shifting all others down by one index.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.len"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#556-640">source</a><h4class="code-header">pub fn <ahref="#method.len"class="fn">len</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>The length of the vec (in elements).</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.capacity"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#556-640">source</a><h4class="code-header">pub fn <ahref="#method.capacity"class="fn">capacity</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>The capacity of the <code>TinyVec</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.truncate"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#556-640">source</a><h4class="code-header">pub fn <ahref="#method.truncate"class="fn">truncate</a>(&mut self, new_len: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>)</h4></section></summary><divclass="docblock"><p>Reduces the vec’s length to the given value.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.retain"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#654-659">source</a><h4class="code-header">pub fn <ahref="#method.retain"class="fn">retain</a><F: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(&A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a>>(&mut self, acceptable: F)</h4></section></summary><divclass="docblock"><p>Walk the vec and keep only the elements that pass the predicate given.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_mut_slice"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#664-666">source</a><h4class="code-header">pub fn <ahref="#method.as_mut_slice"class="fn">as_mut_slice</a>(&mut self) ->&mut [A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>]</h4></section></summary><divclass="docblock"><p>Helper for getting the mut slice.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_slice"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#671-673">source</a><h4class="code-header">pub fn <ahref="#method.as_slice"class="fn">as_slice</a>(&self) ->&[A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>]</h4></section></summary><divclass="docblock"><p>Helper for getting the shared slice.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clear"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#677-679">source</a><h4class="code-header">pub fn <ahref="#method.clear"class="fn">clear</a>(&mut self)</h4></section></summary><divclass="docblock"><p>Removes all elements from the vec.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.drain"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#740-747">source</a><h4class="code-header">pub fn <ahref="#method.drain"class="fn">drain</a><R: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/range/trait.RangeBounds.html"title="trait core::ops::range::RangeBounds">RangeBounds</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>>>(&mut self, range: R) -><aclass="enum"href="enum.TinyVecDrain.html"title="enum tinyvec::TinyVecDrain">TinyVecDrain</a><'_, A><ahref="#"class="tooltip"data-notable-ty="TinyVecDrain<'_, A>">ⓘ</a></h4></section></summary><divclass="docblock"><p>Creates a draining iterator that removes the specified range in the vector
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a>,</div></h4></section></summary><divclass="docblock"><p>Clone each element of the slice into this vec.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.from_array_len"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#778-785">source</a><h4class="code-header">pub fn <ahref="#method.from_array_len"class="fn">from_array_len</a>(data: A, len: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>) -> Self</h4></section></summary><divclass="docblock"><p>Wraps up an array and uses the given length as the initial length.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.insert"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#816-838">source</a><h4class="code-header">pub fn <ahref="#method.insert"class="fn">insert</a>(&mut self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>, item: A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>)</h4></section></summary><divclass="docblock"><p>Inserts an item at the position given, moving all following elements +1
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_empty"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#843-845">source</a><h4class="code-header">pub fn <ahref="#method.is_empty"class="fn">is_empty</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>If the vec is empty.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.push"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#864-892">source</a><h4class="code-header">pub fn <ahref="#method.push"class="fn">push</a>(&mut self, val: A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>)</h4></section></summary><divclass="docblock"><p>Place an element onto the end of the vec.</p>
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a>,</div></h4></section></summary><divclass="docblock"><p>Resize the vec to the new length.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_off"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#973-978">source</a><h4class="code-header">pub fn <ahref="#method.split_off"class="fn">split_off</a>(&mut self, at: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>) -> Self</h4></section></summary><divclass="docblock"><p>Splits the collection at the point given.</p>
) -><aclass="struct"href="struct.TinyVecSplice.html"title="struct tinyvec::TinyVecSplice">TinyVecSplice</a><'_, A, <aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/iter/adapters/fuse/struct.Fuse.html"title="struct core::iter::adapters::fuse::Fuse">Fuse</a><I::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter"title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a>>><ahref="#"class="tooltip"data-notable-ty="TinyVecSplice<'_, A, Fuse<I::IntoIter>>">ⓘ</a><divclass="where">where
I: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html"title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>>,</div></h4></section></summary><divclass="docblock"><p>Creates a splicing iterator that removes the specified range in the
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_from_array_len"class="method"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1053-1056">source</a><h4class="code-header">pub fn <ahref="#method.try_from_array_len"class="fn">try_from_array_len</a>(data: A, len: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><Self, A></h4></section></summary><divclass="docblock"><p>Wraps an array, using the given length as the starting length.</p>
</div></details></div></details></div><h2id="deref-methods-%5BA::Item%5D"class="section-header"><span>Methods from <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html"title="trait core::ops::deref::Deref">Deref</a><Target = [A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>]></span><ahref="#deref-methods-%5BA::Item%5D"class="anchor">§</a></h2><divid="deref-methods-%5BA::Item%5D-1"class="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.len-1"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#138">source</a></span><h4class="code-header">pub fn <ahref="#method.len-1"class="fn">len</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>Returns the number of elements in the slice.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_empty-1"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#154">source</a></span><h4class="code-header">pub fn <ahref="#method.is_empty-1"class="fn">is_empty</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if the slice has a length of 0.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.first"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#173">source</a></span><h4class="code-header">pub fn <ahref="#method.first"class="fn">first</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>></h4></section></summary><divclass="docblock"><p>Returns the first element of the slice, or <code>None</code> if it is empty.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.first_mut"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#193">source</a></span><h4class="code-header">pub fn <ahref="#method.first_mut"class="fn">first_mut</a>(&mut self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&mut T</a>></h4></section></summary><divclass="docblock"><p>Returns a mutable pointer to the first element of the slice, or <code>None</code> if it is empty.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_first"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.5.0">1.5.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#213">source</a></span><h4class="code-header">pub fn <ahref="#method.split_first"class="fn">split_first</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>)></h4></section></summary><divclass="docblock"><p>Returns the first and all the rest of the elements of the slice, or <code>None</code> if it is empty.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_first_mut"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.5.0">1.5.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#235">source</a></span><h4class="code-header">pub fn <ahref="#method.split_first_mut"class="fn">split_first_mut</a>(&mut self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&mut T</a>, &mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>)></h4></section></summary><divclass="docblock"><p>Returns the first and all the rest of the elements of the slice, or <code>None</code> if it is empty.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_last"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.5.0">1.5.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#255">source</a></span><h4class="code-header">pub fn <ahref="#method.split_last"class="fn">split_last</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>)></h4></section></summary><divclass="docblock"><p>Returns the last and all the rest of the elements of the slice, or <code>None</code> if it is empty.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_last_mut"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.5.0">1.5.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#277">source</a></span><h4class="code-header">pub fn <ahref="#method.split_last_mut"class="fn">split_last_mut</a>(&mut self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&mut T</a>, &mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>)></h4></section></summary><divclass="docblock"><p>Returns the last and all the rest of the elements of the slice, or <code>None</code> if it is empty.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.last"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#296">source</a></span><h4class="code-header">pub fn <ahref="#method.last"class="fn">last</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>></h4></section></summary><divclass="docblock"><p>Returns the last element of the slice, or <code>None</code> if it is empty.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.last_mut"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#316">source</a></span><h4class="code-header">pub fn <ahref="#method.last_mut"class="fn">last_mut</a>(&mut self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&mut T</a>></h4></section></summary><divclass="docblock"><p>Returns a mutable reference to the last item in the slice.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.first_chunk"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.77.0">1.77.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#339">source</a></span><h4class="code-header">pub fn <ahref="#method.first_chunk"class="fn">first_chunk</a><const N: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.array.html">[T; N]</a>></h4></section></summary><divclass="docblock"><p>Return an array reference to the first <code>N</code> items in the slice.</p>
<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.first_chunk_mut"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.77.0">1.77.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#369">source</a></span><h4class="code-header">pub fn <ahref="#method.first_chunk_mut"class="fn">first_chunk_mut</a><const N: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>>(&mut self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.array.html">[T; N]</a>></h4></section></summary><divclass="docblock"><p>Return a mutable array reference to the first <code>N</code> items in the slice.</p>
<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_first_chunk"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.77.0">1.77.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#399">source</a></span><h4class="code-header">pub fn <ahref="#method.split_first_chunk"class="fn">split_first_chunk</a><const N: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.array.html">[T; N]</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>)></h4></section></summary><divclass="docblock"><p>Return an array reference to the first <code>N</code> items in the slice and the remaining slice.</p>
<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_first_chunk_mut"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.77.0">1.77.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#434-436">source</a></span><h4class="code-header">pub fn <ahref="#method.split_first_chunk_mut"class="fn">split_first_chunk_mut</a><const N: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>>(
&mut self
) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(&mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.array.html">[T; N]</a>, &mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>)></h4></section></summary><divclass="docblock"><p>Return a mutable array reference to the first <code>N</code> items in the slice and the remaining
slice.</p>
<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_last_chunk"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.77.0">1.77.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#469">source</a></span><h4class="code-header">pub fn <ahref="#method.split_last_chunk"class="fn">split_last_chunk</a><const N: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.array.html">[T; N]</a>)></h4></section></summary><divclass="docblock"><p>Return an array reference to the last <code>N</code> items in the slice and the remaining slice.</p>
<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_last_chunk_mut"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.77.0">1.77.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#504-506">source</a></span><h4class="code-header">pub fn <ahref="#method.split_last_chunk_mut"class="fn">split_last_chunk_mut</a><const N: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>>(
&mut self
) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(&mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>, &mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.array.html">[T; N]</a>)></h4></section></summary><divclass="docblock"><p>Return a mutable array reference to the last <code>N</code> items in the slice and the remaining
slice.</p>
<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.last_chunk"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.77.0">1.77.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#539">source</a></span><h4class="code-header">pub fn <ahref="#method.last_chunk"class="fn">last_chunk</a><const N: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.array.html">[T; N]</a>></h4></section></summary><divclass="docblock"><p>Return an array reference to the last <code>N</code> items in the slice.</p>
<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.last_chunk_mut"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.77.0">1.77.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#573">source</a></span><h4class="code-header">pub fn <ahref="#method.last_chunk_mut"class="fn">last_chunk_mut</a><const N: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>>(&mut self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.array.html">[T; N]</a>></h4></section></summary><divclass="docblock"><p>Return a mutable array reference to the last <code>N</code> items in the slice.</p>
<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#608-610">source</a></span><h4class="code-header">pub fn <ahref="#method.get"class="fn">get</a><I>(&self, index: I) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<I as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html#associatedtype.Output"title="type core::slice::index::SliceIndex::Output">Output</a>><divclass="where">where
I: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>>,</div></h4></section></summary><divclass="docblock"><p>Returns a reference to an element or subslice depending on the type of
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_mut"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#633-635">source</a></span><h4class="code-header">pub fn <ahref="#method.get_mut"class="fn">get_mut</a><I>(
) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&mut <I as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html#associatedtype.Output"title="type core::slice::index::SliceIndex::Output">Output</a>><divclass="where">where
I: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>>,</div></h4></section></summary><divclass="docblock"><p>Returns a mutable reference to an element or subslice depending on the
type of index (see <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.get"title="method slice::get"><code>get</code></a>) or <code>None</code> if the index is out of bounds.</p>
) ->&<I as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html#associatedtype.Output"title="type core::slice::index::SliceIndex::Output">Output</a><divclass="where">where
I: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>>,</div></h4></section></summary><divclass="docblock"><p>Returns a reference to an element or subslice, without doing bounds
<p>For a safe alternative see <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.get"title="method slice::get"><code>get</code></a>.</p>
<p>Calling this method with an out-of-bounds index is <em><ahref="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em>
even if the resulting reference is not used.</p>
<p>You can think of this like <code>.get(index).unwrap_unchecked()</code>. It’s UB
to call <code>.get_unchecked(len)</code>, even if you immediately convert to a
pointer. And it’s UB to call <code>.get_unchecked(..len + 1)</code>,
<code>.get_unchecked(..=len)</code>, or similar.</p>
) ->&mut <I as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html#associatedtype.Output"title="type core::slice::index::SliceIndex::Output">Output</a><divclass="where">where
I: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>>,</div></h4></section></summary><divclass="docblock"><p>Returns a mutable reference to an element or subslice, without doing
<p>For a safe alternative see <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.get_mut"title="method slice::get_mut"><code>get_mut</code></a>.</p>
<p>Calling this method with an out-of-bounds index is <em><ahref="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em>
even if the resulting reference is not used.</p>
<p>You can think of this like <code>.get_mut(index).unwrap_unchecked()</code>. It’s
UB to call <code>.get_unchecked_mut(len)</code>, even if you immediately convert
to a pointer. And it’s UB to call <code>.get_unchecked_mut(..len + 1)</code>,
<code>.get_unchecked_mut(..=len)</code>, or similar.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_ptr-1"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#753">source</a></span><h4class="code-header">pub fn <ahref="#method.as_ptr-1"class="fn">as_ptr</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.pointer.html">*const T</a></h4></section></summary><divclass="docblock"><p>Returns a raw pointer to the slice’s buffer.</p>
derived from it. If you need to mutate the contents of the slice, use <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.as_mut_ptr"title="method slice::as_mut_ptr"><code>as_mut_ptr</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_mut_ptr-1"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#784">source</a></span><h4class="code-header">pub fn <ahref="#method.as_mut_ptr-1"class="fn">as_mut_ptr</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.pointer.html">*mut T</a></h4></section></summary><divclass="docblock"><p>Returns an unsafe mutable pointer to the slice’s buffer.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_ptr_range"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.48.0">1.48.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#820">source</a></span><h4class="code-header">pub fn <ahref="#method.as_ptr_range"class="fn">as_ptr_range</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.Range.html"title="struct core::ops::range::Range">Range</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.pointer.html">*const T</a>></h4></section></summary><divclass="docblock"><p>Returns the two raw pointers spanning the slice.</p>
<p>See <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.as_ptr"title="method slice::as_ptr"><code>as_ptr</code></a> for warnings on using these pointers. The end pointer
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_mut_ptr_range"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.48.0">1.48.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#864">source</a></span><h4class="code-header">pub fn <ahref="#method.as_mut_ptr_range"class="fn">as_mut_ptr_range</a>(&mut self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.Range.html"title="struct core::ops::range::Range">Range</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.pointer.html">*mut T</a>></h4></section></summary><divclass="docblock"><p>Returns the two unsafe mutable pointers spanning the slice.</p>
<p>See <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.as_mut_ptr"title="method slice::as_mut_ptr"><code>as_mut_ptr</code></a> for warnings on using these pointers. The end
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.swap"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#895">source</a></span><h4class="code-header">pub fn <ahref="#method.swap"class="fn">swap</a>(&mut self, a: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>, b: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>)</h4></section></summary><divclass="docblock"><p>Swaps two elements in the slice.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.swap_unchecked"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#938">source</a><h4class="code-header">pub unsafe fn <ahref="#method.swap_unchecked"class="fn">swap_unchecked</a>(&mut self, a: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>, b: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>)</h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_swap_unchecked</code>)</span></div></span></summary><divclass="docblock"><p>Swaps two elements in the slice, without doing bounds checking.</p>
<p>For a safe alternative see <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.swap"title="method slice::swap"><code>swap</code></a>.</p>
<p>Calling this method with an out-of-bounds index is <em><ahref="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em>.
The caller has to ensure that <code>a < self.len()</code> and <code>b < self.len()</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.reverse"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#962">source</a></span><h4class="code-header">pub fn <ahref="#method.reverse"class="fn">reverse</a>(&mut self)</h4></section></summary><divclass="docblock"><p>Reverses the order of elements in the slice, in place.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.iter"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1020">source</a></span><h4class="code-header">pub fn <ahref="#method.iter"class="fn">iter</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.Iter.html"title="struct core::slice::iter::Iter">Iter</a><'_, T></h4></section></summary><divclass="docblock"><p>Returns an iterator over the slice.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.iter_mut"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1039">source</a></span><h4class="code-header">pub fn <ahref="#method.iter_mut"class="fn">iter_mut</a>(&mut self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.IterMut.html"title="struct core::slice::iter::IterMut">IterMut</a><'_, T></h4></section></summary><divclass="docblock"><p>Returns an iterator that allows modifying each value.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.windows"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1088">source</a></span><h4class="code-header">pub fn <ahref="#method.windows"class="fn">windows</a>(&self, size: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.Windows.html"title="struct core::slice::iter::Windows">Windows</a><'_, T></h4></section></summary><divclass="docblock"><p>Returns an iterator over all contiguous windows of length
use <ahref="https://doc.rust-lang.org/1.77.0/core/cell/struct.Cell.html#method.as_slice_of_cells"title="method core::cell::Cell::as_slice_of_cells"><code>Cell::as_slice_of_cells</code></a> in
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.chunks"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1123">source</a></span><h4class="code-header">pub fn <ahref="#method.chunks"class="fn">chunks</a>(&self, chunk_size: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.Chunks.html"title="struct core::slice::iter::Chunks">Chunks</a><'_, T></h4></section></summary><divclass="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the
<p>See <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.chunks_exact"title="method slice::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 <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.rchunks"title="method slice::rchunks"><code>rchunks</code></a> for the same iterator but starting at the end of the
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.chunks_mut"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1162">source</a></span><h4class="code-header">pub fn <ahref="#method.chunks_mut"class="fn">chunks_mut</a>(&mut self, chunk_size: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ChunksMut.html"title="struct core::slice::iter::ChunksMut">ChunksMut</a><'_, T></h4></section></summary><divclass="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the
<p>See <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.chunks_exact_mut"title="method slice::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 <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.rchunks_mut"title="method slice::rchunks_mut"><code>rchunks_mut</code></a> for the same iterator but starting at
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.chunks_exact"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.31.0">1.31.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1200">source</a></span><h4class="code-header">pub fn <ahref="#method.chunks_exact"class="fn">chunks_exact</a>(&self, chunk_size: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ChunksExact.html"title="struct core::slice::iter::ChunksExact">ChunksExact</a><'_, T></h4></section></summary><divclass="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the
resulting code better than in the case of <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.chunks"title="method slice::chunks"><code>chunks</code></a>.</p>
<p>See <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.chunks"title="method slice::chunks"><code>chunks</code></a> for a variant of this iterator that also returns the remainder as a smaller
chunk, and <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.rchunks_exact"title="method slice::rchunks_exact"><code>rchunks_exact</code></a> for the same iterator but starting at the end of the slice.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.chunks_exact_mut"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.31.0">1.31.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1243">source</a></span><h4class="code-header">pub fn <ahref="#method.chunks_exact_mut"class="fn">chunks_exact_mut</a>(&mut self, chunk_size: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ChunksExactMut.html"title="struct core::slice::iter::ChunksExactMut">ChunksExactMut</a><'_, T></h4></section></summary><divclass="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the
resulting code better than in the case of <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.chunks_mut"title="method slice::chunks_mut"><code>chunks_mut</code></a>.</p>
<p>See <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.chunks_mut"title="method slice::chunks_mut"><code>chunks_mut</code></a> for a variant of this iterator that also returns the remainder as a
smaller chunk, and <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.rchunks_exact_mut"title="method slice::rchunks_exact_mut"><code>rchunks_exact_mut</code></a> for the same iterator but starting at the end of
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_chunks_unchecked"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1278">source</a><h4class="code-header">pub unsafe fn <ahref="#method.as_chunks_unchecked"class="fn">as_chunks_unchecked</a><const N: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>>(&self) ->&[<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.array.html">[T; N]</a>]</h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><divclass="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays,
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_chunks"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1323">source</a><h4class="code-header">pub fn <ahref="#method.as_chunks"class="fn">as_chunks</a><const N: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>>(&self) -> (&[<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.array.html">[T; N]</a>], &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>)</h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><divclass="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays,
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_rchunks"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1355">source</a><h4class="code-header">pub fn <ahref="#method.as_rchunks"class="fn">as_rchunks</a><const N: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>>(&self) -> (&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>, &[<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.array.html">[T; N]</a>])</h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><divclass="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays,
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.array_chunks"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1395">source</a><h4class="code-header">pub fn <ahref="#method.array_chunks"class="fn">array_chunks</a><const N: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ArrayChunks.html"title="struct core::slice::iter::ArrayChunks">ArrayChunks</a><'_, T, N></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>array_chunks</code>)</span></div></span></summary><divclass="docblock"><p>Returns an iterator over <code>N</code> elements of the slice at a time, starting at the
<p>This method is the const generic equivalent of <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.chunks_exact"title="method slice::chunks_exact"><code>chunks_exact</code></a>.</p>
) ->&mut [<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.array.html">[T; N]</a>]</h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><divclass="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays,
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_chunks_mut"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1472">source</a><h4class="code-header">pub fn <ahref="#method.as_chunks_mut"class="fn">as_chunks_mut</a><const N: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>>(&mut self) -> (&mut [<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.array.html">[T; N]</a>], &mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>)</h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><divclass="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays,
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_rchunks_mut"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1510">source</a><h4class="code-header">pub fn <ahref="#method.as_rchunks_mut"class="fn">as_rchunks_mut</a><const N: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>>(&mut self) -> (&mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>, &mut [<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.array.html">[T; N]</a>])</h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><divclass="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays,
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.array_chunks_mut"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1552">source</a><h4class="code-header">pub fn <ahref="#method.array_chunks_mut"class="fn">array_chunks_mut</a><const N: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>>(&mut self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ArrayChunksMut.html"title="struct core::slice::iter::ArrayChunksMut">ArrayChunksMut</a><'_, T, N></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>array_chunks</code>)</span></div></span></summary><divclass="docblock"><p>Returns an iterator over <code>N</code> elements of the slice at a time, starting at the
<p>This method is the const generic equivalent of <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.chunks_exact_mut"title="method slice::chunks_exact_mut"><code>chunks_exact_mut</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.array_windows"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1585">source</a><h4class="code-header">pub fn <ahref="#method.array_windows"class="fn">array_windows</a><const N: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ArrayWindows.html"title="struct core::slice::iter::ArrayWindows">ArrayWindows</a><'_, T, N></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>array_windows</code>)</span></div></span></summary><divclass="docblock"><p>Returns an iterator over overlapping windows of <code>N</code> elements of a slice,
<p>This is the const generic equivalent of <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.windows"title="method slice::windows"><code>windows</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.rchunks"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.31.0">1.31.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1620">source</a></span><h4class="code-header">pub fn <ahref="#method.rchunks"class="fn">rchunks</a>(&self, chunk_size: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RChunks.html"title="struct core::slice::iter::RChunks">RChunks</a><'_, T></h4></section></summary><divclass="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the end
<p>See <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.rchunks_exact"title="method slice::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 <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.chunks"title="method slice::chunks"><code>chunks</code></a> for the same iterator but starting at the beginning
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.rchunks_mut"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.31.0">1.31.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1659">source</a></span><h4class="code-header">pub fn <ahref="#method.rchunks_mut"class="fn">rchunks_mut</a>(&mut self, chunk_size: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RChunksMut.html"title="struct core::slice::iter::RChunksMut">RChunksMut</a><'_, T></h4></section></summary><divclass="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the end
<p>See <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.rchunks_exact_mut"title="method slice::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 <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.chunks_mut"title="method slice::chunks_mut"><code>chunks_mut</code></a> for the same iterator but starting at the
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.rchunks_exact"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.31.0">1.31.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1699">source</a></span><h4class="code-header">pub fn <ahref="#method.rchunks_exact"class="fn">rchunks_exact</a>(&self, chunk_size: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RChunksExact.html"title="struct core::slice::iter::RChunksExact">RChunksExact</a><'_, T></h4></section></summary><divclass="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the
resulting code better than in the case of <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.rchunks"title="method slice::rchunks"><code>rchunks</code></a>.</p>
<p>See <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.rchunks"title="method slice::rchunks"><code>rchunks</code></a> for a variant of this iterator that also returns the remainder as a smaller
chunk, and <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.chunks_exact"title="method slice::chunks_exact"><code>chunks_exact</code></a> for the same iterator but starting at the beginning of the
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.rchunks_exact_mut"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.31.0">1.31.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1743">source</a></span><h4class="code-header">pub fn <ahref="#method.rchunks_exact_mut"class="fn">rchunks_exact_mut</a>(&mut self, chunk_size: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RChunksExactMut.html"title="struct core::slice::iter::RChunksExactMut">RChunksExactMut</a><'_, T></h4></section></summary><divclass="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the end
resulting code better than in the case of <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.chunks_mut"title="method slice::chunks_mut"><code>chunks_mut</code></a>.</p>
<p>See <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.rchunks_mut"title="method slice::rchunks_mut"><code>rchunks_mut</code></a> for a variant of this iterator that also returns the remainder as a
smaller chunk, and <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.chunks_exact_mut"title="method slice::chunks_exact_mut"><code>chunks_exact_mut</code></a> for the same iterator but starting at the beginning
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.chunk_by"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.77.0">1.77.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1782-1784">source</a></span><h4class="code-header">pub fn <ahref="#method.chunk_by"class="fn">chunk_by</a><F>(&self, pred: F) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ChunkBy.html"title="struct core::slice::iter::ChunkBy">ChunkBy</a><'_, T, F><divclass="where">where
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a>,</div></h4></section></summary><divclass="docblock"><p>Returns an iterator over the slice producing non-overlapping runs
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.chunk_by_mut"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.77.0">1.77.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1823-1825">source</a></span><h4class="code-header">pub fn <ahref="#method.chunk_by_mut"class="fn">chunk_by_mut</a><F>(&mut self, pred: F) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ChunkByMut.html"title="struct core::slice::iter::ChunkByMut">ChunkByMut</a><'_, T, F><divclass="where">where
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a>,</div></h4></section></summary><divclass="docblock"><p>Returns an iterator over the slice producing non-overlapping mutable
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_at"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1870">source</a></span><h4class="code-header">pub fn <ahref="#method.split_at"class="fn">split_at</a>(&self, mid: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>) -> (&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>)</h4></section></summary><divclass="docblock"><p>Divides one slice into two at an index.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_at_mut"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1904">source</a></span><h4class="code-header">pub fn <ahref="#method.split_at_mut"class="fn">split_at_mut</a>(&mut self, mid: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>) -> (&mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>, &mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>)</h4></section></summary><divclass="docblock"><p>Divides one mutable slice into two at an index.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_at_unchecked"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1960">source</a><h4class="code-header">pub unsafe fn <ahref="#method.split_at_unchecked"class="fn">split_at_unchecked</a>(&self, mid: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>) -> (&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>)</h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_split_at_unchecked</code>)</span></div></span></summary><divclass="docblock"><p>Divides one slice into two at an index, without doing bounds checking.</p>
<p>For a safe alternative see <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.split_at"title="method slice::split_at"><code>split_at</code></a>.</p>
<p>Calling this method with an out-of-bounds index is <em><ahref="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
) -> (&mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>, &mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>)</h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_split_at_unchecked</code>)</span></div></span></summary><divclass="docblock"><p>Divides one mutable slice into two at an index, without doing bounds checking.</p>
<p>For a safe alternative see <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.split_at_mut"title="method slice::split_at_mut"><code>split_at_mut</code></a>.</p>
<p>Calling this method with an out-of-bounds index is <em><ahref="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
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_at_checked"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2071">source</a><h4class="code-header">pub fn <ahref="#method.split_at_checked"class="fn">split_at_checked</a>(&self, mid: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>)></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>split_at_checked</code>)</span></div></span></summary><divclass="docblock"><p>Divides one slice into two at an index, returning <code>None</code> if the slice is
too short.</p>
<p>If <code>mid ≤ len</code> returns a pair of slices where 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>Otherwise, if <code>mid > len</code>, returns <code>None</code>.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(&mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>, &mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>)></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>split_at_checked</code>)</span></div></span></summary><divclass="docblock"><p>Divides one mutable slice into two at an index, returning <code>None</code> if the
slice is too short.</p>
<p>If <code>mid ≤ len</code> returns a pair of slices where 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>Otherwise, if <code>mid > len</code>, returns <code>None</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2164-2166">source</a></span><h4class="code-header">pub fn <ahref="#method.split"class="fn">split</a><F>(&self, pred: F) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.Split.html"title="struct core::slice::iter::Split">Split</a><'_, T, F><divclass="where">where
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a>,</div></h4></section></summary><divclass="docblock"><p>Returns an iterator over subslices separated by elements that match
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_mut"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2186-2188">source</a></span><h4class="code-header">pub fn <ahref="#method.split_mut"class="fn">split_mut</a><F>(&mut self, pred: F) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.SplitMut.html"title="struct core::slice::iter::SplitMut">SplitMut</a><'_, T, F><divclass="where">where
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a>,</div></h4></section></summary><divclass="docblock"><p>Returns an iterator over mutable subslices separated by elements that
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_inclusive"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.51.0">1.51.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2222-2224">source</a></span><h4class="code-header">pub fn <ahref="#method.split_inclusive"class="fn">split_inclusive</a><F>(&self, pred: F) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.SplitInclusive.html"title="struct core::slice::iter::SplitInclusive">SplitInclusive</a><'_, T, F><divclass="where">where
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a>,</div></h4></section></summary><divclass="docblock"><p>Returns an iterator over subslices separated by elements that match
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_inclusive_mut"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.51.0">1.51.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2246-2248">source</a></span><h4class="code-header">pub fn <ahref="#method.split_inclusive_mut"class="fn">split_inclusive_mut</a><F>(&mut self, pred: F) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.SplitInclusiveMut.html"title="struct core::slice::iter::SplitInclusiveMut">SplitInclusiveMut</a><'_, T, F><divclass="where">where
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a>,</div></h4></section></summary><divclass="docblock"><p>Returns an iterator over mutable subslices separated by elements that
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.rsplit"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.27.0">1.27.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2282-2284">source</a></span><h4class="code-header">pub fn <ahref="#method.rsplit"class="fn">rsplit</a><F>(&self, pred: F) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RSplit.html"title="struct core::slice::iter::RSplit">RSplit</a><'_, T, F><divclass="where">where
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a>,</div></h4></section></summary><divclass="docblock"><p>Returns an iterator over subslices separated by elements that match
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.rsplit_mut"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.27.0">1.27.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2308-2310">source</a></span><h4class="code-header">pub fn <ahref="#method.rsplit_mut"class="fn">rsplit_mut</a><F>(&mut self, pred: F) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RSplitMut.html"title="struct core::slice::iter::RSplitMut">RSplitMut</a><'_, T, F><divclass="where">where
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a>,</div></h4></section></summary><divclass="docblock"><p>Returns an iterator over mutable subslices separated by elements that
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.splitn"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2336-2338">source</a></span><h4class="code-header">pub fn <ahref="#method.splitn"class="fn">splitn</a><F>(&self, n: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>, pred: F) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.SplitN.html"title="struct core::slice::iter::SplitN">SplitN</a><'_, T, F><divclass="where">where
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a>,</div></h4></section></summary><divclass="docblock"><p>Returns an iterator over subslices separated by elements that match
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.splitn_mut"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2362-2364">source</a></span><h4class="code-header">pub fn <ahref="#method.splitn_mut"class="fn">splitn_mut</a><F>(&mut self, n: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>, pred: F) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.SplitNMut.html"title="struct core::slice::iter::SplitNMut">SplitNMut</a><'_, T, F><divclass="where">where
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a>,</div></h4></section></summary><divclass="docblock"><p>Returns an iterator over mutable subslices separated by elements that match
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.rsplitn"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2391-2393">source</a></span><h4class="code-header">pub fn <ahref="#method.rsplitn"class="fn">rsplitn</a><F>(&self, n: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>, pred: F) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RSplitN.html"title="struct core::slice::iter::RSplitN">RSplitN</a><'_, T, F><divclass="where">where
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a>,</div></h4></section></summary><divclass="docblock"><p>Returns an iterator over subslices separated by elements that match
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.rsplitn_mut"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2418-2420">source</a></span><h4class="code-header">pub fn <ahref="#method.rsplitn_mut"class="fn">rsplitn_mut</a><F>(&mut self, n: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>, pred: F) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RSplitNMut.html"title="struct core::slice::iter::RSplitNMut">RSplitNMut</a><'_, T, F><divclass="where">where
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a>,</div></h4></section></summary><divclass="docblock"><p>Returns an iterator over subslices separated by elements that match
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a>,</div></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_split_once</code>)</span></div></span></summary><divclass="docblock"><p>Splits the slice on the first element that matches the specified
<spanclass="macro">assert_eq!</span>(s.split_once(|<spanclass="kw-2">&</span>x| x == <spanclass="number">2</span>), <spanclass="prelude-val">Some</span>((
<spanclass="macro">assert_eq!</span>(s.split_once(|<spanclass="kw-2">&</span>x| x == <spanclass="number">0</span>), <spanclass="prelude-val">None</span>);</code></pre></div>
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a>,</div></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_split_once</code>)</span></div></span></summary><divclass="docblock"><p>Splits the slice on the last element that matches the specified
<spanclass="macro">assert_eq!</span>(s.rsplit_once(|<spanclass="kw-2">&</span>x| x == <spanclass="number">2</span>), <spanclass="prelude-val">Some</span>((
<spanclass="macro">assert_eq!</span>(s.rsplit_once(|<spanclass="kw-2">&</span>x| x == <spanclass="number">0</span>), <spanclass="prelude-val">None</span>);</code></pre></div>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.contains"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2509-2511">source</a></span><h4class="code-header">pub fn <ahref="#method.contains"class="fn">contains</a>(&self, x: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a><divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if the slice contains an element with the given value.</p>
<p>Note that if you have a sorted slice, <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.binary_search"title="method slice::binary_search"><code>binary_search</code></a> may be faster.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.starts_with"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2538-2540">source</a></span><h4class="code-header">pub fn <ahref="#method.starts_with"class="fn">starts_with</a>(&self, needle: &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a><divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if <code>needle</code> is a prefix of the slice.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ends_with"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2568-2570">source</a></span><h4class="code-header">pub fn <ahref="#method.ends_with"class="fn">ends_with</a>(&self, needle: &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a><divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if <code>needle</code> is a suffix of the slice.</p>
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section></summary><divclass="docblock"><p>Returns a subslice with the prefix removed.</p>
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section></summary><divclass="docblock"><p>Returns a subslice with the suffix removed.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.binary_search"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2716-2718">source</a></span><h4class="code-header">pub fn <ahref="#method.binary_search"class="fn">binary_search</a>(&self, x: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>><divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html"title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><divclass="docblock"><p>Binary searches this slice for a given element.
<p>If the value is found then <ahref="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok"title="variant core::result::Result::Ok"><code>Result::Ok</code></a> is returned, containing the
If the value is not found then <ahref="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err"title="variant core::result::Result::Err"><code>Result::Err</code></a> is returned, containing
<p>See also <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.binary_search_by"title="method slice::binary_search_by"><code>binary_search_by</code></a>, <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.binary_search_by_key"title="method slice::binary_search_by_key"><code>binary_search_by_key</code></a>, and <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.partition_point"title="method slice::partition_point"><code>partition_point</code></a>.</p>
an arbitrary matching one, that can be done using <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.partition_point"title="method slice::partition_point"><code>partition_point</code></a>:</p>
<spanclass="macro">assert!</span>(s[..low].iter().all(|<spanclass="kw-2">&</span>x| x <<spanclass="number">1</span>));
<spanclass="macro">assert!</span>(s[low..high].iter().all(|<spanclass="kw-2">&</span>x| x == <spanclass="number">1</span>));
<spanclass="macro">assert!</span>(s[high..].iter().all(|<spanclass="kw-2">&</span>x| x ><spanclass="number">1</span>));
<spanclass="comment">// For something not found, the "range" of equal items is empty
</span><spanclass="macro">assert_eq!</span>(s.partition_point(|x| x <<spanclass="kw-2">&</span><spanclass="number">11</span>), <spanclass="number">9</span>);
<spanclass="macro">assert_eq!</span>(s.partition_point(|x| x <= <spanclass="kw-2">&</span><spanclass="number">11</span>), <spanclass="number">9</span>);
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.binary_search_by"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2767-2769">source</a></span><h4class="code-header">pub fn <ahref="#method.binary_search_by"class="fn">binary_search_by</a><'a, F>(&'a self, f: F) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>><divclass="where">where
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&'a T</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering">Ordering</a>,</div></h4></section></summary><divclass="docblock"><p>Binary searches this slice with a comparator function.</p>
<p>If the value is found then <ahref="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok"title="variant core::result::Result::Ok"><code>Result::Ok</code></a> is returned, containing the
If the value is not found then <ahref="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err"title="variant core::result::Result::Err"><code>Result::Err</code></a> is returned, containing
<p>See also <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.binary_search"title="method slice::binary_search"><code>binary_search</code></a>, <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.binary_search_by_key"title="method slice::binary_search_by_key"><code>binary_search_by_key</code></a>, and <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.partition_point"title="method slice::partition_point"><code>partition_point</code></a>.</p>
B: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html"title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><divclass="docblock"><p>Binary searches this slice with a key extraction function.</p>
<ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.sort_by_key"title="method slice::sort_by_key"><code>sort_by_key</code></a> using the same key extraction function.
<p>If the value is found then <ahref="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok"title="variant core::result::Result::Ok"><code>Result::Ok</code></a> is returned, containing the
If the value is not found then <ahref="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err"title="variant core::result::Result::Err"><code>Result::Err</code></a> is returned, containing
<p>See also <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.binary_search"title="method slice::binary_search"><code>binary_search</code></a>, <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.binary_search_by"title="method slice::binary_search_by"><code>binary_search_by</code></a>, and <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.partition_point"title="method slice::partition_point"><code>partition_point</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.sort_unstable"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.20.0">1.20.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2891-2893">source</a></span><h4class="code-header">pub fn <ahref="#method.sort_unstable"class="fn">sort_unstable</a>(&mut self)<divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html"title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><divclass="docblock"><p>Sorts the slice, but might not preserve the order of equal elements.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.sort_unstable_by"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.20.0">1.20.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2946-2948">source</a></span><h4class="code-header">pub fn <ahref="#method.sort_unstable_by"class="fn">sort_unstable_by</a><F>(&mut self, compare: F)<divclass="where">where
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering">Ordering</a>,</div></h4></section></summary><divclass="docblock"><p>Sorts the slice with a comparator function, but might not preserve the order of equal
<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 < b</code>, <code>a == b</code> or <code>a > b</code> is true, and</li>
<li>transitive, <code>a < b</code> and <code>b < c</code> implies <code>a < c</code>. The same must hold for both <code>==</code> and <code>></code>.</li>
<p>For example, while <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.f64.html"title="primitive f64"><code>f64</code></a> doesn’t implement <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html"title="trait core::cmp::Ord"><code>Ord</code></a> because <code>NaN != NaN</code>, we can use
K: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html"title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><divclass="docblock"><p>Sorts the slice with a key extraction function, but might not preserve the order of equal
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.select_nth_unstable"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.49.0">1.49.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3034-3036">source</a></span><h4class="code-header">pub fn <ahref="#method.select_nth_unstable"class="fn">select_nth_unstable</a>(
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html"title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><divclass="docblock"><p>Reorder the slice such that the element at <code>index</code> is at its final sorted position.</p>
the basis for <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.sort_unstable"title="method slice::sort_unstable"><code>sort_unstable</code></a>. The fallback algorithm is Median of Medians using Tukey’s Ninther for
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.select_nth_unstable_by"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.49.0">1.49.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3085-3091">source</a></span><h4class="code-header">pub fn <ahref="#method.select_nth_unstable_by"class="fn">select_nth_unstable_by</a><F>(
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering">Ordering</a>,</div></h4></section></summary><divclass="docblock"><p>Reorder the slice with a comparator function such that the element at <code>index</code> is at its
the basis for <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.sort_unstable"title="method slice::sort_unstable"><code>sort_unstable</code></a>. The fallback algorithm is Median of Medians using Tukey’s Ninther for
K: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html"title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><divclass="docblock"><p>Reorder the slice with a key extraction function such that the element at <code>index</code> is at its
the basis for <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.sort_unstable"title="method slice::sort_unstable"><code>sort_unstable</code></a>. The fallback algorithm is Median of Medians using Tukey’s Ninther for
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_partition_dedup</code>)</span></div></span></summary><divclass="docblock"><p>Moves all consecutive repeated elements to the end of the slice according to the
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&mut T</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&mut T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a>,</div></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_partition_dedup</code>)</span></div></span></summary><divclass="docblock"><p>Moves all but the first of consecutive elements to the end of the slice satisfying
K: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_partition_dedup</code>)</span></div></span></summary><divclass="docblock"><p>Moves all but the first of consecutive elements to the end of the slice that resolve
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.rotate_left"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.26.0">1.26.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3373">source</a></span><h4class="code-header">pub fn <ahref="#method.rotate_left"class="fn">rotate_left</a>(&mut self, mid: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>)</h4></section></summary><divclass="docblock"><p>Rotates the slice in-place such that the first <code>mid</code> elements of the
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.rotate_right"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.26.0">1.26.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3416">source</a></span><h4class="code-header">pub fn <ahref="#method.rotate_right"class="fn">rotate_right</a>(&mut self, k: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>)</h4></section></summary><divclass="docblock"><p>Rotates the slice in-place such that the first <code>self.len() - k</code>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.fill"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.50.0">1.50.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3439-3441">source</a></span><h4class="code-header">pub fn <ahref="#method.fill"class="fn">fill</a>(&mut self, value: T)<divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a>,</div></h4></section></summary><divclass="docblock"><p>Fills <code>self</code> with elements by cloning <code>value</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.fill_with"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.51.0">1.51.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3463-3465">source</a></span><h4class="code-header">pub fn <ahref="#method.fill_with"class="fn">fill_with</a><F>(&mut self, f: F)<divclass="where">where
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>() -> T,</div></h4></section></summary><divclass="docblock"><p>Fills <code>self</code> with elements returned by calling a closure repeatedly.</p>
<ahref="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html"title="trait core::clone::Clone"><code>Clone</code></a> a given value, use <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.fill"title="method slice::fill"><code>fill</code></a>. If you want to use the <ahref="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html"title="trait core::default::Default"><code>Default</code></a>
trait to generate values, you can pass <ahref="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default"title="associated function core::default::Default::default"><code>Default::default</code></a> as the
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clone_from_slice"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.7.0">1.7.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3526-3528">source</a></span><h4class="code-header">pub fn <ahref="#method.clone_from_slice"class="fn">clone_from_slice</a>(&mut self, src: &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>)<divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a>,</div></h4></section></summary><divclass="docblock"><p>Copies the elements from <code>src</code> into <code>self</code>.</p>
<p>To work around this, we can use <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.split_at_mut"title="method slice::split_at_mut"><code>split_at_mut</code></a> to create two distinct
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.copy_from_slice"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.9.0">1.9.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3590-3592">source</a></span><h4class="code-header">pub fn <ahref="#method.copy_from_slice"class="fn">copy_from_slice</a>(&mut self, src: &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>)<divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html"title="trait core::marker::Copy">Copy</a>,</div></h4></section></summary><divclass="docblock"><p>Copies all elements from <code>src</code> into <code>self</code>, using a memcpy.</p>
<p>If <code>T</code> does not implement <code>Copy</code>, use <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.clone_from_slice"title="method slice::clone_from_slice"><code>clone_from_slice</code></a>.</p>
<p>To work around this, we can use <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.split_at_mut"title="method slice::split_at_mut"><code>split_at_mut</code></a> to create two distinct
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html"title="trait core::marker::Copy">Copy</a>,</div></h4></section></summary><divclass="docblock"><p>Copies elements from one part of the slice to another part of itself,
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.swap_with_slice"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.27.0">1.27.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3711">source</a></span><h4class="code-header">pub fn <ahref="#method.swap_with_slice"class="fn">swap_with_slice</a>(&mut self, other: &mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>)</h4></section></summary><divclass="docblock"><p>Swaps all elements in <code>self</code> with those in <code>other</code>.</p>
<p>To work around this, we can use <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.split_at_mut"title="method slice::split_at_mut"><code>split_at_mut</code></a> to create two distinct
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.align_to"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.30.0">1.30.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3791">source</a></span><h4class="code-header">pub unsafe fn <ahref="#method.align_to"class="fn">align_to</a><U>(&self) -> (&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[U]</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>)</h4></section></summary><divclass="docblock"><p>Transmute the slice to a slice of another type, ensuring alignment of the types is
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.align_to_mut"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.30.0">1.30.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3859">source</a></span><h4class="code-header">pub unsafe fn <ahref="#method.align_to_mut"class="fn">align_to_mut</a><U>(&mut self) -> (&mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>, &mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[U]</a>, &mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>)</h4></section></summary><divclass="docblock"><p>Transmute the mutable slice to a mutable slice of another type, ensuring alignment of the
<aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/core_simd/lane_count/struct.LaneCount.html"title="struct core::core_simd::lane_count::LaneCount">LaneCount</a><LANES>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/core_simd/lane_count/trait.SupportedLaneCount.html"title="trait core::core_simd::lane_count::SupportedLaneCount">SupportedLaneCount</a>,</div></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>portable_simd</code>)</span></div></span></summary><divclass="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 <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.align_to"title="method slice::align_to"><code>slice::align_to</code></a>, so has the same weak
<aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/core_simd/lane_count/struct.LaneCount.html"title="struct core::core_simd::lane_count::LaneCount">LaneCount</a><LANES>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/core_simd/lane_count/trait.SupportedLaneCount.html"title="trait core::core_simd::lane_count::SupportedLaneCount">SupportedLaneCount</a>,</div></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>portable_simd</code>)</span></div></span></summary><divclass="docblock"><p>Split a mutable slice into a mutable prefix, a middle of aligned SIMD types,
<p>This is a safe wrapper around <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.align_to_mut"title="method slice::align_to_mut"><code>slice::align_to_mut</code></a>, so has the same weak
<p>This is the mutable version of <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.as_simd"title="method slice::as_simd"><code>slice::as_simd</code></a>; see that for examples.</p>
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html"title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>is_sorted</code>)</span></div></span></summary><divclass="docblock"><p>Checks if the elements of this slice are sorted.</p>
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&'a T</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&'a T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a>,</div></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>is_sorted</code>)</span></div></span></summary><divclass="docblock"><p>Checks if the elements of this slice are sorted using the given comparator function.</p>
K: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html"title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>is_sorted</code>)</span></div></span></summary><divclass="docblock"><p>Checks if the elements of this slice are sorted using the given key extraction function.</p>
elements, as determined by <code>f</code>. Apart from that, it’s equivalent to <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.is_sorted"title="method slice::is_sorted"><code>is_sorted</code></a>; see its
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.partition_point"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.52.0">1.52.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4158-4160">source</a></span><h4class="code-header">pub fn <ahref="#method.partition_point"class="fn">partition_point</a><P>(&self, pred: P) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a>,</div></h4></section></summary><divclass="docblock"><p>Returns the index of the partition point according to the given predicate
<p>See also <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.binary_search"title="method slice::binary_search"><code>binary_search</code></a>, <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.binary_search_by"title="method slice::binary_search_by"><code>binary_search_by</code></a>, and <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.binary_search_by_key"title="method slice::binary_search_by_key"><code>binary_search_by_key</code></a>.</p>
<spanclass="macro">assert_eq!</span>(a.partition_point(|x| x <<spanclass="kw-2">&</span><spanclass="number">100</span>), <spanclass="number">0</span>);</code></pre></div>
<p>If you want to insert an item to a sorted vector, while maintaining
R: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/range/trait.OneSidedRange.html"title="trait core::ops::range::OneSidedRange">OneSidedRange</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>>,</div></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><divclass="docblock"><p>Removes the subslice corresponding to the given range
R: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/range/trait.OneSidedRange.html"title="trait core::ops::range::OneSidedRange">OneSidedRange</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>>,</div></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><divclass="docblock"><p>Removes the subslice corresponding to the given range
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.take_first"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4324">source</a><h4class="code-header">pub fn <ahref="#method.take_first"class="fn">take_first</a><'a>(self: &mut &'a <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&'a T</a>></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><divclass="docblock"><p>Removes the first element of the slice and returns a reference
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.take_first_mut"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4349">source</a><h4class="code-header">pub fn <ahref="#method.take_first_mut"class="fn">take_first_mut</a><'a>(self: &mut &'a mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&'a mut T</a>></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><divclass="docblock"><p>Removes the first element of the slice and returns a mutable
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.take_last"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4373">source</a><h4class="code-header">pub fn <ahref="#method.take_last"class="fn">take_last</a><'a>(self: &mut &'a <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&'a T</a>></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><divclass="docblock"><p>Removes the last element of the slice and returns a reference
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.take_last_mut"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4398">source</a><h4class="code-header">pub fn <ahref="#method.take_last_mut"class="fn">take_last_mut</a><'a>(self: &mut &'a mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&'a mut T</a>></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><divclass="docblock"><p>Removes the last element of the slice and returns a mutable
) -> [<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&mut T</a>; <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.array.html">N</a>]</h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>get_many_mut</code>)</span></div></span></summary><divclass="docblock"><p>Returns mutable references to many indices at once, without doing any checks.</p>
<p>For a safe alternative see <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.get_many_mut"title="method slice::get_many_mut"><code>get_many_mut</code></a>.</p>
<p>Calling this method with overlapping or out-of-bounds indices is <em><ahref="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em>
even if the resulting references are not used.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><[<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&mut T</a>; <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.array.html">N</a>], <aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/struct.GetManyMutError.html"title="struct core::slice::GetManyMutError">GetManyMutError</a><N>></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>get_many_mut</code>)</span></div></span></summary><divclass="docblock"><p>Returns mutable references to many indices at once.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.sort_floats"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4592">source</a><h4class="code-header">pub fn <ahref="#method.sort_floats"class="fn">sort_floats</a>(&mut self)</h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>sort_floats</code>)</span></div></span></summary><divclass="docblock"><p>Sorts the slice of floats.</p>
the ordering defined by <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.f32.html#method.total_cmp"title="method f32::total_cmp"><code>f32::total_cmp</code></a>.</p>
<p>This uses the same sorting algorithm as <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.sort_unstable_by"title="method slice::sort_unstable_by"><code>sort_unstable_by</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_ascii"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.23.0">1.23.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#17">source</a></span><h4class="code-header">pub fn <ahref="#method.is_ascii"class="fn">is_ascii</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Checks if all bytes in this slice are within the ASCII range.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_ascii"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#26">source</a><h4class="code-header">pub fn <ahref="#method.as_ascii"class="fn">as_ascii</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&[<aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/ascii/ascii_char/enum.AsciiChar.html"title="enum core::ascii::ascii_char::AsciiChar">AsciiChar</a>]></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>ascii_char</code>)</span></div></span></summary><divclass="docblock"><p>If this slice <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.is_ascii"title="method slice::is_ascii"><code>is_ascii</code></a>, returns it as a slice of
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_ascii_unchecked"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#44">source</a><h4class="code-header">pub unsafe fn <ahref="#method.as_ascii_unchecked"class="fn">as_ascii_unchecked</a>(&self) ->&[<aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/ascii/ascii_char/enum.AsciiChar.html"title="enum core::ascii::ascii_char::AsciiChar">AsciiChar</a>]</h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>ascii_char</code>)</span></div></span></summary><divclass="docblock"><p>Converts this slice of bytes into a slice of ASCII characters,
<p>Every byte in the slice must be in <code>0..=127</code>, or else this is UB.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq_ignore_ascii_case"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.23.0">1.23.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#58">source</a></span><h4class="code-header">pub fn <ahref="#method.eq_ignore_ascii_case"class="fn">eq_ignore_ascii_case</a>(&self, other: &[<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.u8.html">u8</a>]) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a></h4></section></summary><divclass="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><detailsclass="toggle method-toggle"open><summary><sectionid="method.make_ascii_uppercase"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.23.0">1.23.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#73">source</a></span><h4class="code-header">pub fn <ahref="#method.make_ascii_uppercase"class="fn">make_ascii_uppercase</a>(&mut self)</h4></section></summary><divclass="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
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.make_ascii_lowercase"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.23.0">1.23.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#90">source</a></span><h4class="code-header">pub fn <ahref="#method.make_ascii_lowercase"class="fn">make_ascii_lowercase</a>(&mut self)</h4></section></summary><divclass="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
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.escape_ascii"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.60.0">1.60.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#110">source</a></span><h4class="code-header">pub fn <ahref="#method.escape_ascii"class="fn">escape_ascii</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/slice/ascii/struct.EscapeAscii.html"title="struct core::slice::ascii::EscapeAscii">EscapeAscii</a><'_></h4></section></summary><divclass="docblock"><p>Returns an iterator that produces an escaped version of this slice,
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim_ascii_start"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#130">source</a><h4class="code-header">pub fn <ahref="#method.trim_ascii_start"class="fn">trim_ascii_start</a>(&self) ->&[<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.u8.html">u8</a>]</h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>byte_slice_trim_ascii</code>)</span></div></span></summary><divclass="docblock"><p>Returns a byte slice with leading ASCII whitespace bytes removed.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim_ascii"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#191">source</a><h4class="code-header">pub fn <ahref="#method.trim_ascii"class="fn">trim_ascii</a>(&self) ->&[<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.u8.html">u8</a>]</h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>byte_slice_trim_ascii</code>)</span></div></span></summary><divclass="docblock"><p>Returns a byte slice with leading and trailing ASCII whitespace bytes
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.flatten"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4517">source</a><h4class="code-header">pub fn <ahref="#method.flatten"class="fn">flatten</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_flatten</code>)</span></div></span></summary><divclass="docblock"><p>Takes a <code>&[[T; N]]</code>, and flattens it to a <code>&[T]</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.flatten_mut"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4555">source</a><h4class="code-header">pub fn <ahref="#method.flatten_mut"class="fn">flatten_mut</a>(&mut self) ->&mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_flatten</code>)</span></div></span></summary><divclass="docblock"><p>Takes a <code>&mut [[T; N]]</code>, and flattens it to a <code>&mut [T]</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_str"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/ascii/ascii_char.rs.html#560">source</a><h4class="code-header">pub fn <ahref="#method.as_str"class="fn">as_str</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.str.html">str</a></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>ascii_char</code>)</span></div></span></summary><divclass="docblock"><p>Views this slice of ASCII characters as a UTF-8 <code>str</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_bytes"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/ascii/ascii_char.rs.html#571">source</a><h4class="code-header">pub fn <ahref="#method.as_bytes"class="fn">as_bytes</a>(&self) ->&[<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.u8.html">u8</a>]</h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>ascii_char</code>)</span></div></span></summary><divclass="docblock"><p>Views this slice of ASCII characters as a slice of <code>u8</code> bytes.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.sort_floats-1"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4621">source</a><h4class="code-header">pub fn <ahref="#method.sort_floats-1"class="fn">sort_floats</a>(&mut self)</h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>sort_floats</code>)</span></div></span></summary><divclass="docblock"><p>Sorts the slice of floats.</p>
the ordering defined by <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.f64.html#method.total_cmp"title="method f64::total_cmp"><code>f64::total_cmp</code></a>.</p>
<p>This uses the same sorting algorithm as <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.sort_unstable_by"title="method slice::sort_unstable_by"><code>sort_unstable_by</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.to_ascii_uppercase"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.23.0">1.23.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#621">source</a></span><h4class="code-header">pub fn <ahref="#method.to_ascii_uppercase"class="fn">to_ascii_uppercase</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.u8.html">u8</a>></h4></section></summary><divclass="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 <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.make_ascii_uppercase"title="method slice::make_ascii_uppercase"><code>make_ascii_uppercase</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.to_ascii_lowercase"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.23.0">1.23.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#642">source</a></span><h4class="code-header">pub fn <ahref="#method.to_ascii_lowercase"class="fn">to_ascii_lowercase</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.u8.html">u8</a>></h4></section></summary><divclass="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 <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.make_ascii_lowercase"title="method slice::make_ascii_lowercase"><code>make_ascii_lowercase</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.sort"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#207-209">source</a></span><h4class="code-header">pub fn <ahref="#method.sort"class="fn">sort</a>(&mut self)<divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html"title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><divclass="docblock"><p>Sorts the slice.</p>
See <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.sort_unstable"title="method slice::sort_unstable"><code>sort_unstable</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.sort_by"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#263-265">source</a></span><h4class="code-header">pub fn <ahref="#method.sort_by"class="fn">sort_by</a><F>(&mut self, compare: F)<divclass="where">where
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&T</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering">Ordering</a>,</div></h4></section></summary><divclass="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 < b</code>, <code>a == b</code> or <code>a > b</code> is true, and</li>
<li>transitive, <code>a < b</code> and <code>b < c</code> implies <code>a < c</code>. The same must hold for both <code>==</code> and <code>></code>.</li>
<p>For example, while <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.f64.html"title="primitive f64"><code>f64</code></a> doesn’t implement <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html"title="trait core::cmp::Ord"><code>Ord</code></a> because <code>NaN != NaN</code>, we can use
See <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.sort_unstable_by"title="method slice::sort_unstable_by"><code>sort_unstable_by</code></a>.</p>
K: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html"title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><divclass="docblock"><p>Sorts the slice with a key extraction function.</p>
basic operations), <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.sort_by_cached_key"title="method slice::sort_by_cached_key"><code>sort_by_cached_key</code></a> is likely to be
See <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.sort_unstable_by_key"title="method slice::sort_unstable_by_key"><code>sort_unstable_by_key</code></a>.</p>
K: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html"title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><divclass="docblock"><p>Sorts the slice with a key extraction function.</p>
basic operations), <ahref="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html#method.sort_by_key"title="method slice::sort_by_key"><code>sort_by_key</code></a> is likely to be
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.to_vec"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#412-414">source</a></span><h4class="code-header">pub fn <ahref="#method.to_vec"class="fn">to_vec</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><T><divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a>,</div></h4></section></summary><divclass="docblock"><p>Copies <code>self</code> into a new <code>Vec</code>.</p>
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a>,</div></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>allocator_api</code>)</span></div></span></summary><divclass="docblock"><p>Copies <code>self</code> into a new <code>Vec</code> with an allocator.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.repeat"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.40.0">1.40.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#489-491">source</a></span><h4class="code-header">pub fn <ahref="#method.repeat"class="fn">repeat</a>(&self, n: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><T><divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html"title="trait core::marker::Copy">Copy</a>,</div></h4></section></summary><divclass="docblock"><p>Creates a vector by copying a slice <code>n</code> times.</p>
<divclass="example-wrap should_panic"><ahref="#"class="tooltip"title="This example panics">ⓘ</a><preclass="rust rust-example-rendered"><code><spanclass="comment">// this will panic at runtime
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.concat"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#557-559">source</a></span><h4class="code-header">pub fn <ahref="#method.concat"class="fn">concat</a><Item>(&self) -><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a> as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Concat.html"title="trait alloc::slice::Concat">Concat</a><Item>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Concat.html#associatedtype.Output"title="type alloc::slice::Concat::Output">Output</a><divclass="where">where
Item: ?<aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><divclass="docblock"><p>Flattens a slice of <code>T</code> into a single value <code>Self::Output</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.join"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.3.0">1.3.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#576-578">source</a></span><h4class="code-header">pub fn <ahref="#method.join"class="fn">join</a><Separator>(
) -><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a> as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Join.html"title="trait alloc::slice::Join">Join</a><Separator>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Join.html#associatedtype.Output"title="type alloc::slice::Join::Output">Output</a><divclass="where">where
<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Join.html"title="trait alloc::slice::Join">Join</a><Separator>,</div></h4></section></summary><divclass="docblock"><p>Flattens a slice of <code>T</code> into a single value <code>Self::Output</code>, placing a
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.connect"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#596-598">source</a></span><h4class="code-header">pub fn <ahref="#method.connect"class="fn">connect</a><Separator>(
) -><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a> as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Join.html"title="trait alloc::slice::Join">Join</a><Separator>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Join.html#associatedtype.Output"title="type alloc::slice::Join::Output">Output</a><divclass="where">where
<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Join.html"title="trait alloc::slice::Join">Join</a><Separator>,</div></h4></section><spanclass="item-info"><divclass="stab deprecated"><spanclass="emoji">👎</span><span>Deprecated since 1.3.0: renamed to join</span></div></span></summary><divclass="docblock"><p>Flattens a slice of <code>T</code> into a single value <code>Self::Output</code>, placing a
</div></details></div><h2id="trait-implementations"class="section-header">Trait Implementations<ahref="#trait-implementations"class="anchor">§</a></h2><divid="trait-implementations-list"><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-AsMut%3C%5B%3CA+as+Array%3E::Item%5D%3E-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1220-1226">source</a><ahref="#impl-AsMut%3C%5B%3CA+as+Array%3E::Item%5D%3E-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html"title="trait core::convert::AsMut">AsMut</a><[<A as <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>>::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>]> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_mut"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1223-1225">source</a><ahref="#method.as_mut"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html#tymethod.as_mut"class="fn">as_mut</a>(&mut self) ->&mut [A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>]</h4></section></summary><divclass='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-AsRef%3C%5B%3CA+as+Array%3E::Item%5D%3E-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1228-1234">source</a><ahref="#impl-AsRef%3C%5B%3CA+as+Array%3E::Item%5D%3E-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html"title="trait core::convert::AsRef">AsRef</a><[<A as <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>>::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>]> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_ref"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1231-1233">source</a><ahref="#method.as_ref"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html#tymethod.as_ref"class="fn">as_ref</a>(&self) ->&[A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>]</h4></section></summary><divclass='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Binary-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1501-1522">source</a><ahref="#impl-Binary-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Binary.html"title="trait core::fmt::Binary">Binary</a> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A><divclass="where">where
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Binary.html"title="trait core::fmt::Binary">Binary</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.fmt-6"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1506-1521">source</a><ahref="#method.fmt-6"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Binary.html#tymethod.fmt"class="fn">fmt</a>(&self, f: &mut <aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html"title="struct core::fmt::Formatter">Formatter</a><'_>) -><aclass="type"href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html"title="type core::fmt::Result">Result</a></h4></section></summary><divclass='docblock'>Formats the value using the given formatter.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Borrow%3C%5B%3CA+as+Array%3E::Item%5D%3E-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1236-1242">source</a><ahref="#impl-Borrow%3C%5B%3CA+as+Array%3E::Item%5D%3E-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html"title="trait core::borrow::Borrow">Borrow</a><[<A as <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>>::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>]> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.borrow"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1239-1241">source</a><ahref="#method.borrow"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow"class="fn">borrow</a>(&self) ->&[A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>]</h4></section></summary><divclass='docblock'>Immutably borrows from an owned value. <ahref="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-BorrowMut%3C%5B%3CA+as+Array%3E::Item%5D%3E-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1244-1250">source</a><ahref="#impl-BorrowMut%3C%5B%3CA+as+Array%3E::Item%5D%3E-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html"title="trait core::borrow::BorrowMut">BorrowMut</a><[<A as <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>>::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>]> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.borrow_mut"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1247-1249">source</a><ahref="#method.borrow_mut"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut"class="f
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.clone"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#111-116">source</a><ahref="#method.clone"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone"class="fn">clone</a>(&self) -> Self</h4></section></summary><divclass='docblock'>Returns a copy of the value. <ahref="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clone_from"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#119-130">source</a><ahref="#method.clone_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from"class="fn">clone_from</a>(&mut self, o: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&Self</a>)</h4></section></summary><divclass='docblock'>Performs copy-assignment from <code>source</code>. <ahref="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Debug-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1524-1545">source</a><ahref="#impl-Debug-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html"title="trait core::fmt::Debug">Debug</a> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A><divclass="where">where
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html"title="trait core::fmt::Debug">Debug</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.fmt-2"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1529-1544">source</a><ahref="#method.fmt-2"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt"class="fn">fmt</a>(&self, f: &mut <aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html"title="struct core::fmt::Formatter">Formatter</a><'_>) -><aclass="type"href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html"title="type core::fmt::Result">Result</a></h4></section></summary><divclass='docblock'>Formats the value using the given formatter. <ahref="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Default-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#133-139">source</a><ahref="#impl-Default-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html"title="trait core::default::Default">Default</a> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.default"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#136-138">source</a><ahref="#method.default"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default"class="fn">default</a>() -> Self</h4></section></summary><divclass='docblock'>Returns the “default value” for a type. <ahref="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Deref-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#141-150">source</a><ahref="#impl-Deref-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html"title="trait core::ops::deref::Deref">Deref</a> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Target"class="associatedtype trait-impl"><ahref="#associatedtype.Target"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#associatedtype.Target"class="associatedtype">Target</a> = [<A as <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>>::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>]</h4></section></summary><divclass='docblock'>The resulting type after dereferencing.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.deref"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#144-149">source</a><ahref="#method.deref"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#tymethod.
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html"title="trait core::fmt::Display">Display</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.fmt-7"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1552-1567">source</a><ahref="#method.fmt-7"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html#tymethod.fmt"class="fn">fmt</a>(&self, f: &mut <aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html"title="struct core::fmt::Formatter">Formatter</a><'_>) -><aclass="type"href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html"title="type core::fmt::Result">Result</a></h4></section></summary><divclass='docblock'>Formats the value using the given formatter. <ahref="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Extend%3C%3CA+as+Array%3E::Item%3E-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1252-1277">source</a><ahref="#impl-Extend%3C%3CA+as+Array%3E::Item%3E-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.Extend.html"title="trait core::iter::traits::collect::Extend">Extend</a><<A as <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>>::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.extend"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1254-1276">source</a><ahref="#method.extend"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.Extend.html#tymethod.extend"class="fn">extend</a><T: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html"title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>>>(&mut self, iter: T)</h4></section></summary><divclass='docblock'>Extends a collection with the contents of an iterator. <ahref="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.Extend.html#tymethod.extend">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.extend_one"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/iter/traits/collect.rs.html#376">source</a><ahref="#method.extend_one"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.Extend.html#method.extend_one"class="fn">extend_one</a>(&mut self, item: A)</h4></section></summary><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><divclass='docblock'>Extends a collection with exactly one element.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.extend_reserve"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/iter/traits/collect.rs.html#384">source</a><ahref="#method.
A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a><Item = T>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.from-1"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1300-1306">source</a><ahref="#method.from-1"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from"class="fn">from</a>(slice: &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>) -> Self</h4></section></summary><divclass='docblock'>Converts to this type from the input type.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-From%3C%26mut+%5BT%5D%3E-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1309-1319">source</a><ahref="#impl-From%3C%26mut+%5BT%5D%3E-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<T, A><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html"title="trait core::convert::From">From</a><&mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A><divclass="where">where
A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a><Item = T>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.from-2"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1316-1318">source</a><ahref="#method.from-2"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from"class="fn">from</a>(slice: &mut <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[T]</a>) -> Self</h4></section></summary><divclass='docblock'>Converts to this type from the input type.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-From%3CA%3E-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1287-1291">source</a><ahref="#impl-From%3CA%3E-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html"title="trait core::convert::From">From</a><A> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.from"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1288-1290">source</a><ahref="#method.from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from"class="fn">from</a>(array: A) -> Self</h4></section></summary><divclass='docblock'>Converts to this type from the input type.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-From%3CArrayVec%3CA%3E%3E-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1279-1285">source</a><ahref="#impl-From%3CArrayVec%3CA%3E%3E-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html"title="trait core::convert::From">From</a><<aclass="struct"href="struct.ArrayVec.html"title="struct tinyvec::ArrayVec">ArrayVec</a><A>> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.from-3"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1282-1284">source</a><ahref="#method.from-3"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from"class="fn">from</a>(arr: <aclass="struct"href="struct.ArrayVec.html"title="struct tinyvec::ArrayVec">ArrayVec</a><A>) -> Self</h4></section></summary><divclass='docblock'>Converts to this type from the input type.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-FromIterator%3C%3CA+as+Array%3E::Item%3E-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1321-1329">source</a><ahref="#impl-FromIterator%3C%3CA+as+Array%3E::Item%3E-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html"title="trait core::iter::traits::collect::FromIterator">FromIterator</a><<A as <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>>::<aclass="associa
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hash.html"title="trait core::hash::Hash">Hash</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.hash"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1492-1494">source</a><ahref="#method.hash"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hash.html#tymethod.hash"class="fn">hash</a><H: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hasher.html"title="trait core::hash::Hasher">Hasher</a>>(&self, state: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&mut H</a>)</h4></section></summary><divclass='docblock'>Feeds this value into the given <ahref="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hasher.html"title="trait core::hash::Hasher"><code>Hasher</code></a>. <ahref="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hash.html#tymethod.hash">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.hash_slice"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.3.0">1.3.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/hash/mod.rs.html#238-240">source</a></span><ahref="#method.hash_slice"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hash.html#method.hash_slice"class="fn">hash_slice</a><H>(data: &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.slice.html">[Self]</a>, state: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&mut H</a>)<divclass="where">where
Self: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><divclass='docblock'>Feeds a slice of this type into the given <ahref="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hasher.html"title="trait core::hash::Hasher"><code>Hasher</code></a>. <ahref="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hash.html#method.hash_slice">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Index%3CI%3E-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#161-168">source</a><ahref="#impl-Index%3CI%3E-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>, I: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><[A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>]>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html"title="trait core::ops::index::Index">Index</a><I> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Output"class="associatedtype trait-impl"><ahref="#associatedtype.Output"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#associatedtype.Output"class="associatedtype">Output</a> = <I as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><[<A as <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>>::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>]>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html#associatedtype.Output"title="type core::slice::index::SliceIndex::Output">Output</a></h4></section></summary><divclass='docblock'>The returned type after indexing.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.index"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#165-167">source</a><ahref="#method.index"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#tymethod.index"class="fn">index</a>(&self, index: I) ->&Self::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#associatedtype.Output"title="type core::ops::index::Index::Output">Output</a></h4></section></summary><divclass='docblock'>Performs the indexing (<code>container[index]</code>) operation. <ahref="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#tymethod.index">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-IndexMut%3CI%3E-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#170-176">source</a><ahref="#impl-IndexMut%3CI%3E-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>, I: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><[A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>]>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html"title="traitcore::ops::index::Inde
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.LowerExp.html"title="trait core::fmt::LowerExp">LowerExp</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.fmt-8"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1575-1590">source</a><ahref="#method.fmt-8"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/fmt/trait.LowerExp.html#tymethod.fmt"class="fn">fmt</a>(&self, f: &mut <aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html"title="struct core::fmt::Formatter">Formatter</a><'_>) -><aclass="type"href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html"title="type core::fmt::Result">Result</a></h4></section></summary><divclass='docblock'>Formats the value using the given formatter.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-LowerHex-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1593-1614">source</a><ahref="#impl-LowerHex-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.LowerHex.html"title="trait core::fmt::LowerHex">LowerHex</a> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A><divclass="where">where
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.LowerHex.html"title="trait core::fmt::LowerHex">LowerHex</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.fmt-1"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1598-1613">source</a><ahref="#method.fmt-1"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/fmt/trait.LowerHex.html#tymethod.fmt"class="fn">fmt</a>(&self, f: &mut <aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html"title="struct core::fmt::Formatter">Formatter</a><'_>) -><aclass="type"href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html"title="type core::fmt::Result">Result</a></h4></section></summary><divclass='docblock'>Formats the value using the given formatter.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Octal-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1616-1637">source</a><ahref="#impl-Octal-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Octal.html"title="trait core::fmt::Octal">Octal</a> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A><divclass="where">where
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Octal.html"title="trait core::fmt::Octal">Octal</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.fmt-5"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1621-1636">source</a><ahref="#method.fmt-5"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Octal.html#tymethod.fmt"class="fn">fmt</a>(&self, f: &mut <aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html"title="struct core::fmt::Formatter">Formatter</a><'_>) -><aclass="type"href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html"title="type core::fmt::Result">Result</a></h4></section></summary><divclass='docblock'>Formats the value using the given formatter.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Ord-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1454-1463">source</a><ahref="#impl-Ord-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html"title="trait core::cmp::Ord">Ord</a> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A><divclass="where">where
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html"title="trait core::cmp::Ord">Ord</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.cmp"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1460-1462">source</a><ahref="#method.cmp"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp"class="fn">cmp</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&Self</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><divclass='docblock'>This method returns an <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.max"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.21.0">1.21.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#830-832">source</a></span><ahref="#method.max"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max"class="fn">max</a>(self, other: Self) -> Self<divclass="where">where
Self: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><divclass='docblock'>Compares and returns the maximum of two values. <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.min"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.21.0">1.21.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#850-852">source</a></span><ahref="#method.min"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min"class="fn">min</a>(self, other: Self) -> Self<divclass="where">where
Self: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><divclass='docblock'>Compares and returns the minimum of two values. <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clamp"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.50.0">1.50.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#875-878">source</a></span><ahref="#method.clamp"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp"class="fn">clamp</a>(self, min: Self, max: Self) -> Self<divclass="where">where
Self: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a> + <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html"title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section></summary><divclass='docblock'>Restrict a value to a certain interval. <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialEq%3C%26%5B%3CA+as+Array%3E::Item%5D%3E-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1476-1485">source</a><ahref="#impl-PartialEq%3C%26%5B%3CA+as+Array%3E::Item%5D%3E-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><&[<A as <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>>::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>]> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A><divclass="where">where
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1482-1484">source</a><ahref="#method.eq"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq"class="fn">eq</a>(&self, other: &&[A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>]) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><ahref="#method.ne"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialEq%3C%26A%3E-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1465-1474">source</a><ahref="#impl-PartialEq%3C%26A%3E-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&A</a>> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A><divclass="where">where
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq-1"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1471-1473">source</a><ahref="#method.eq-1"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq"class="fn">eq</a>(&self, other: &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&A</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne-1"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><ahref="#method.ne-1"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialEq-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1432-1441">source</a><ahref="#impl-PartialEq-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A><divclass="where">where
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq-2"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1438-1440">source</a><ahref="#method.eq-2"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq"class="fn">eq</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&Self</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne-2"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><ahref="#method.ne-2"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialOrd-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1444-1453">source</a><ahref="#impl-PartialOrd-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html"title="trait core::cmp::PartialOrd">PartialOrd</a> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A><divclass="where">where
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html"title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.partial_cmp"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1450-1452">source</a><ahref="#method.partial_cmp"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp"class="fn">partial_cmp</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&Self</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><divclass='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.lt"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><ahref="#method.lt"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt"class="fn">lt</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.le"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><ahref="#method.le"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le"class="fn">le</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code>
operator. <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.gt"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><ahref="#method.gt"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt"class="fn">gt</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ge"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><ahref="#method.ge"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge"class="fn">ge</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code>
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Pointer.html"title="trait core::fmt::Pointer">Pointer</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.fmt"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1644-1659">source</a><ahref="#method.fmt"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Pointer.html#tymethod.fmt"class="fn">fmt</a>(&self, f: &mut <aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html"title="struct core::fmt::Formatter">Formatter</a><'_>) -><aclass="type"href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html"title="type core::fmt::Result">Result</a></h4></section></summary><divclass='docblock'>Formats the value using the given formatter.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-UpperExp-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1662-1683">source</a><ahref="#impl-UpperExp-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.UpperExp.html"title="trait core::fmt::UpperExp">UpperExp</a> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A><divclass="where">where
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.UpperExp.html"title="trait core::fmt::UpperExp">UpperExp</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.fmt-3"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1667-1682">source</a><ahref="#method.fmt-3"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/fmt/trait.UpperExp.html#tymethod.fmt"class="fn">fmt</a>(&self, f: &mut <aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html"title="struct core::fmt::Formatter">Formatter</a><'_>) -><aclass="type"href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html"title="type core::fmt::Result">Result</a></h4></section></summary><divclass='docblock'>Formats the value using the given formatter.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-UpperHex-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1685-1706">source</a><ahref="#impl-UpperHex-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.UpperHex.html"title="trait core::fmt::UpperHex">UpperHex</a> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A><divclass="where">where
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.UpperHex.html"title="trait core::fmt::UpperHex">UpperHex</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.fmt-4"class="method trait-impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1690-1705">source</a><ahref="#method.fmt-4"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/fmt/trait.UpperHex.html#tymethod.fmt"class="fn">fmt</a>(&self, f: &mut <aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html"title="struct core::fmt::Formatter">Formatter</a><'_>) -><aclass="type"href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html"title="type core::fmt::Result">Result</a></h4></section></summary><divclass='docblock'>Formats the value using the given formatter.</div></details></div></details><sectionid="impl-Eq-for-TinyVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/tinyvec/tinyvec.rs.html#1442">source</a><ahref="#impl-Eq-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait tinyvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html"title="trait core::cmp::Eq">Eq</a> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A><divclass="where">where
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type tinyvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html"title="trait core::cmp::Eq">Eq</a>,</div></h3></section></div><h2id="synthetic-implementations"class="section-header">Auto Trait Implementations<ahref="#synthetic-implementations"class="anchor">§</a></h2><divid="synthetic-implementations-list"><sectionid="impl-RefUnwindSafe-for-TinyVec%3CA%3E"class="impl"><ahref="#impl-RefUnwindSafe-for-TinyVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html"title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <aclass="enum"href="enum.TinyVec.html"title="enum tinyvec::TinyVec">TinyVec</a><A><divclass="where">where
<code><ahref="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html"title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-ToOwned-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><ahref="#impl-ToOwned-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html"title="trait alloc::borrow::ToOwned">ToOwned</a> for T<divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Owned"class="associatedtype trait-impl"><ahref="#associatedtype.Owned"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned"class="associatedtype">Owned</a> = T</h4></section></summary><divclass='docblock'>The resulting type after obtaining ownership.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.to_owned"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><ahref="#method.to_owned"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned"class="fn">to_owned</a>(&self) -> T</h4></section></summary><divclass='docblock'>Creates owned data from borrowed data, usually by cloning. <ahref="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clone_into"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><ahref="#method.clone_into"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into"class="fn">clone_into</a>(&self, target: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/core/primitive.reference.html">&mut T</a>)</h4></section></summary><divclass='docblock'>Uses borrowed data to replace owned data, usually by cloning. <ahref="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-ToString-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/alloc/string.rs.html#2600">source</a><ahref="#impl-ToString-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html"title="trait alloc::string::ToString">ToString</a> for T<divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html"title="trait core::fmt::Display">Display</a> + ?<aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.to_string"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/alloc/string.rs.html#2606">source</a><ahref="#method.to_string"class="anchor">§</a><h4class="code-header">default fn <ahref="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html#tymethod.to_string"class="fn">to_string</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a></h4></section></summary><divclass='docblock'>Converts the given value to a <code>String</code>. <ahref="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryFrom%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><ahref="#impl-TryFrom%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U> for T<divclass="where">where
U: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error-1"class="associatedtype trait-impl"><ahref="#associatedtype.Error-1"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error"class="associatedtype">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html"title="enum core::convert::Infallible">Infallible</a></h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_from"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><ahref="#method.try_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from"class="fn">try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, <T as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryInto%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><ahref="#impl-TryInto%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html"title="trait core::convert::TryInto">TryInto</a><U> for T<divclass="where">where
U: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error"class="associatedtype trait-impl"><ahref="#associatedtype.Error"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error"class="associatedtype">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_into"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><ahref="#method.try_into"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into"class="fn">try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><U, <U as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details></div><scripttype="text/json"id="notable-traits-data">{"TinyVecDrain<'_,A>":"<h3>Notabletraitsfor<code><aclass=\"enum\"href=\"enum.TinyVecDrain.html\"title=\"enumtinyvec::TinyVecDrain\">TinyVecDrain</a><'p,A></code></h3><pre><code><divclass=\"where\">impl<'p,A:<aclass=\"trait\"href=\"trait.Array.html\"title=\"traittinyvec::Array\">Array</a>><aclass=\"trait\"href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html\"title=\"traitcore::iter::traits::iterator::Iterator\">Iterator</a>for<aclass=\"enum\"href=\"enum.TinyVecDrain.html\"title=\"enumtinyvec::TinyVecDrain\">TinyVecDrain</a><'p,A></div><divclass=\"where\">type<ahref=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\"class=\"associatedtype\">Item</a>=A::<aclass=\"associatedtype\"href=\"trait.Array.html#associatedtype.Item\"title=\"typetinyvec::Array::Item\">Item</a>;</div>","TinyVecSplice<'_,A,Fuse<I::IntoIter>>":"<h3>Notabletraitsfor<code><aclass=\"struct\"href=\"struct.TinyVecSplice.html\"title=\"structtinyvec::TinyVecSplice\">TinyVecSplice</a><'p,A,I></code></h3><pre><code><divclass=\"where\">impl<'p,A,I><aclass=\"trait\"href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html\"title=\"traitcore::iter::traits::iterator::Iterator\">Iterator</a>for<aclass=\"struct\"href=\"struct.TinyVecSplice.html\"title=\"structtinyvec::TinyVecSplice\">TinyVecSplice</a><'p,A,I><divclass=\"where\">where\nA:<aclass=\"trait\"href=\"trait.Array.html\"title=\"traittinyvec::Array\">Array</a>,\nI:<aclass=\"trait\"href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html\"title=\"traitcore::iter::traits::iterator::Iterator\">Iterator</a><Item=A::<aclass=\"associatedtype\"href=\"trait.Array.html#associatedtype.Item\"title=\"typetinyvec::Array::Item\">Item</a>>,</div></div><divclass=\"where\">type<ahref=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.ht