<!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 `Vec`-like container that can store a small number of elements inline."><title>SmallVec in smallvec - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><linkrel="stylesheet"href="../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../static.files/rustdoc-dd39b87e5fcfba68.css"><metaname="rustdoc-vars"data-root-path="../"data-static-root-path="../static.files/"data-current-crate="smallvec"data-themes=""data-resource-suffix=""data-rustdoc-version="1.80.0 (051478957 2024-07-21)"data-channel="1.80.0"data-search-js="search-d52510db62a78183.js"data-settings-js="settings-4313503d2e1961c2.js"><scriptsrc="../static.files/storage-118b08c4c78b968e.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../static.files/main-20a3ad099b048cf2.js"></script><noscript><linkrel="stylesheet"href="../static.files/noscript-df360f571f6edeae.css"></noscript><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 struct"><!--[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="../smallvec/index.html">smallvec</a><spanclass="version">1.13.2</span></h2></div><h2class="location"><ahref="#">SmallVec</a></h2><divclass="sidebar-elems"><section><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.dedup">dedup</a></li><li><ahref="#method.dedup_by">dedup_by</a></li><li><ahref="#method.dedup_by_key">dedup_by_key</a></li><li><ahref="#method.drain">drain</a></li><li><ahref="#method.extend_from_slice">extend_from_slice</a></li><li><ahref="#method.from_buf">from_buf</a></li><li><ahref="#method.from_buf_and_len">from_buf_and_len</a></li><li><ahref="#method.from_buf_and_len_unchecked">from_buf_and_len_unchecked</a></li><li><ahref="#method.from_elem">from_elem</a></li><li><ahref="#method.from_raw_parts">from_raw_parts</a></li><li><ahref="#method.from_slice">from_slice</a></li><li><ahref="#method.from_vec">from_vec</a></li><li><ahref="#method.grow">grow</a></li><li><ahref="#method.inline_size">inline_size</a></li><li><ahref="#method.insert">insert</a></li><li><ahref="#method.insert_from_slice">insert_from_slice</a></li><li><ahref="#method.insert_many">insert_many</a></li><li><ahref="#method.into_boxed_slice">into_boxed_slice</a></li><li><ahref="#method.into_inner">into_inner</a></li><li><ahref="#method.into_vec">into_vec</a></li><li><ahref="#method.is_empty">is_empty</a></li><li><ahref="#method.len">len</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><
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.with_capacity"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#806-810">source</a><h4class="code-header">pub fn <ahref="#method.with_capacity"class="fn">with_capacity</a>(n: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.usize.html">usize</a>) -> Self</h4></section></summary><divclass="docblock"><p>Construct an empty vector with enough capacity pre-allocated to store at least <code>n</code>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.from_vec"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#825-852">source</a><h4class="code-header">pub fn <ahref="#method.from_vec"class="fn">from_vec</a>(vec: <aclass="struct"href="https://doc.rust-lang.org/1.80.0/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>>) -><aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</a><A></h4></section></summary><divclass="docblock"><p>Construct a new <code>SmallVec</code> from a <code>Vec<A::Item></code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.from_buf"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#866-871">source</a><h4class="code-header">pub fn <ahref="#method.from_buf"class="fn">from_buf</a>(buf: A) -><aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</a><A></h4></section></summary><divclass="docblock"><p>Constructs a new <code>SmallVec</code> on the stack from an <code>A</code> without
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.from_buf_and_len"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#886-889">source</a><h4class="code-header">pub fn <ahref="#method.from_buf_and_len"class="fn">from_buf_and_len</a>(buf: A, len: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.usize.html">usize</a>) -><aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</a><A></h4></section></summary><divclass="docblock"><p>Constructs a new <code>SmallVec</code> on the stack from an <code>A</code> without
) -><aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</a><A></h4></section></summary><divclass="docblock"><p>Constructs a new <code>SmallVec</code> on the stack from an <code>A</code> without
copying elements. Also sets the length. The user is responsible
for ensuring that <code>len <= A::size()</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.set_len"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#919-922">source</a><h4class="code-header">pub unsafe fn <ahref="#method.set_len"class="fn">set_len</a>(&mut self, new_len: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.usize.html">usize</a>)</h4></section></summary><divclass="docblock"><p>Sets the length of a vector.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.inline_size"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#946-948">source</a><h4class="code-header">pub fn <ahref="#method.inline_size"class="fn">inline_size</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>The maximum number of elements this vector can hold inline</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.len"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#952-954">source</a><h4class="code-header">pub fn <ahref="#method.len"class="fn">len</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>The number of elements stored in the vector</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_empty"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#958-960">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.80.0/core/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if the vector is empty</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.capacity"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#964-966">source</a><h4class="code-header">pub fn <ahref="#method.capacity"class="fn">capacity</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>The number of items the vector can hold without reallocating</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.spilled"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1001-1003">source</a><h4class="code-header">pub fn <ahref="#method.spilled"class="fn">spilled</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if the data has spilled into a separate heap-allocated buffer.</p>
R: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/ops/range/trait.RangeBounds.html"title="trait core::ops::range::RangeBounds">RangeBounds</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.usize.html">usize</a>>,</div></h4></section></summary><divclass="docblock"><p>Creates a draining iterator that removes the specified range in the vector
<p>Panics if the starting point is greater than the end point or if
the end point is greater than the length of the vector.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.push"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1114-1126">source</a><h4class="code-header">pub fn <ahref="#method.push"class="fn">push</a>(&mut self, value: A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>)</h4></section></summary><divclass="docblock"><p>Append an item to the vector.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.pop"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1130-1141">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.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>></h4></section></summary><divclass="docblock"><p>Remove an item from the end of the vector and return it, or None if empty.</p>
B: <aclass="trait"href="trait.Array.html"title="trait smallvec::Array">Array</a><Item = A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>>,</div></h4></section></summary><divclass="docblock"><p>Moves all the elements of <code>other</code> into <code>self</code>, leaving <code>other</code> empty.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.grow"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1166-1168">source</a><h4class="code-header">pub fn <ahref="#method.grow"class="fn">grow</a>(&mut self, new_cap: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.usize.html">usize</a>)</h4></section></summary><divclass="docblock"><p>Re-allocate to set the capacity to <code>max(new_cap, inline_size())</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_grow"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1173-1211">source</a><h4class="code-header">pub fn <ahref="#method.try_grow"class="fn">try_grow</a>(&mut self, new_cap: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.usize.html">usize</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.unit.html">()</a>, <aclass="enum"href="enum.CollectionAllocErr.html"title="enum smallvec::CollectionAllocErr">CollectionAllocErr</a>></h4></section></summary><divclass="docblock"><p>Re-allocate to set the capacity to <code>max(new_cap, inline_size())</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.reserve"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1219-1221">source</a><h4class="code-header">pub fn <ahref="#method.reserve"class="fn">reserve</a>(&mut self, additional: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.usize.html">usize</a>)</h4></section></summary><divclass="docblock"><p>Reserve capacity for <code>additional</code> more elements to be inserted.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.unit.html">()</a>, <aclass="enum"href="enum.CollectionAllocErr.html"title="enum smallvec::CollectionAllocErr">CollectionAllocErr</a>></h4></section></summary><divclass="docblock"><p>Reserve capacity for <code>additional</code> more elements to be inserted.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.reserve_exact"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1254-1256">source</a><h4class="code-header">pub fn <ahref="#method.reserve_exact"class="fn">reserve_exact</a>(&mut self, additional: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.usize.html">usize</a>)</h4></section></summary><divclass="docblock"><p>Reserve the minimum capacity for <code>additional</code> more elements to be inserted.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.unit.html">()</a>, <aclass="enum"href="enum.CollectionAllocErr.html"title="enum smallvec::CollectionAllocErr">CollectionAllocErr</a>></h4></section></summary><divclass="docblock"><p>Reserve the minimum capacity for <code>additional</code> more elements to be inserted.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.shrink_to_fit"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1274-1290">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>Shrink the capacity of the vector as much as possible.</p>
<p>When possible, this will move data from an external heap buffer to the vector’s inline
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.truncate"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1299-1309">source</a><h4class="code-header">pub fn <ahref="#method.truncate"class="fn">truncate</a>(&mut self, len: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.usize.html">usize</a>)</h4></section></summary><divclass="docblock"><p>Shorten the vector, keeping the first <code>len</code> elements and dropping the rest.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.swap_remove"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1331-1336">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.80.0/core/primitive.usize.html">usize</a>) -> A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a></h4></section></summary><divclass="docblock"><p>Remove the element at position <code>index</code>, replacing it with the last element.</p>
<p>This does not preserve ordering, but is O(1).</p>
<p>Panics if <code>index</code> is out of bounds.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clear"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1340-1342">source</a><h4class="code-header">pub fn <ahref="#method.clear"class="fn">clear</a>(&mut self)</h4></section></summary><divclass="docblock"><p>Remove all elements from the vector.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.remove"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1348-1359">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.80.0/core/primitive.usize.html">usize</a>) -> A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a></h4></section></summary><divclass="docblock"><p>Remove and return the element at position <code>index</code>, shifting all elements after it to the
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.insert"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1364-1387">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.80.0/core/primitive.usize.html">usize</a>, element: A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>)</h4></section></summary><divclass="docblock"><p>Insert an element at position <code>index</code>, shifting all elements after it to the right.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.into_vec"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1477-1488">source</a><h4class="code-header">pub fn <ahref="#method.into_vec"class="fn">into_vec</a>(self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>></h4></section></summary><divclass="docblock"><p>Convert a <code>SmallVec</code> to a <code>Vec</code>, without reallocating if the <code>SmallVec</code> has already spilled onto
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.into_boxed_slice"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1494-1496">source</a><h4class="code-header">pub fn <ahref="#method.into_boxed_slice"class="fn">into_boxed_slice</a>(self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/alloc/boxed/struct.Box.html"title="struct alloc::boxed::Box">Box</a><[A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>]></h4></section></summary><divclass="docblock"><p>Converts a <code>SmallVec</code> into a <code>Box<[T]></code> without reallocating if the <code>SmallVec</code> has already spilled
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.into_inner"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1502-1513">source</a><h4class="code-header">pub fn <ahref="#method.into_inner"class="fn">into_inner</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><A, Self></h4></section></summary><divclass="docblock"><p>Convert the <code>SmallVec</code> into an <code>A</code> if possible. Otherwise return <code>Err(Self)</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.retain"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1520-1531">source</a><h4class="code-header">pub fn <ahref="#method.retain"class="fn">retain</a><F: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(&mut A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.bool.html">bool</a>>(&mut self, f: F)</h4></section></summary><divclass="docblock"><p>Retains only the elements specified by the predicate.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.retain_mut"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1538-1540">source</a><h4class="code-header">pub fn <ahref="#method.retain_mut"class="fn">retain_mut</a><F: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(&mut A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.bool.html">bool</a>>(&mut self, f: F)</h4></section></summary><divclass="docblock"><p>Retains only the elements specified by the predicate.</p>
F: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(&mut A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>, &mut A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.bool.html">bool</a>,</div></h4></section></summary><divclass="docblock"><p>Removes consecutive duplicate elements using the given equality relation.</p>
K: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><K>,</div></h4></section></summary><divclass="docblock"><p>Removes consecutive elements that map to the same key.</p>
F: <aclass="trait"href="https://doc.rust-lang.org/1.80.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 smallvec::Array::Item">Item</a>,</div></h4></section></summary><divclass="docblock"><p>Resizes the <code>SmallVec</code> in-place so that <code>len</code> is equal to <code>new_len</code>.</p>
) -><aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</a><A></h4></section></summary><divclass="docblock"><p>Creates a <code>SmallVec</code> directly from the raw components of another
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_ptr"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1716-1721">source</a><h4class="code-header">pub fn <ahref="#method.as_ptr"class="fn">as_ptr</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.pointer.html">*const </a>A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a></h4></section></summary><divclass="docblock"><p>Returns a raw pointer to the vector’s buffer.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_mut_ptr"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1724-1729">source</a><h4class="code-header">pub fn <ahref="#method.as_mut_ptr"class="fn">as_mut_ptr</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.pointer.html">*mut </a>A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a></h4></section></summary><divclass="docblock"><p>Returns a raw mutable pointer to the vector’s buffer.</p>
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Copy.html"title="trait core::marker::Copy">Copy</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.from_slice"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1739-1764">source</a><h4class="code-header">pub fn <ahref="#method.from_slice"class="fn">from_slice</a>(slice: &[A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>]) -> Self</h4></section></summary><divclass="docblock"><p>Copy the elements from a slice into a new <code>SmallVec</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.insert_from_slice"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1771-1784">source</a><h4class="code-header">pub fn <ahref="#method.insert_from_slice"class="fn">insert_from_slice</a>(&mut self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.usize.html">usize</a>, slice: &[A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>])</h4></section></summary><divclass="docblock"><p>Copy elements from a slice into the vector at position <code>index</code>, shifting any following
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.extend_from_slice"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1790-1793">source</a><h4class="code-header">pub fn <ahref="#method.extend_from_slice"class="fn">extend_from_slice</a>(&mut self, slice: &[A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>])</h4></section></summary><divclass="docblock"><p>Copy elements from a slice and append them to the vector.</p>
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.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.resize"class="method"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1806-1814">source</a><h4class="code-header">pub fn <ahref="#method.resize"class="fn">resize</a>(&mut self, len: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.usize.html">usize</a>, value: A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>)</h4></section></summary><divclass="docblock"><p>Resizes the vector so that its length is equal to <code>len</code>.</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.80.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 smallvec::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.80.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.80.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.80.0/src/core/slice/mod.rs.html#157">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.80.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.80.0/src/core/slice/mod.rs.html#176">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.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#199">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.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#219">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.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#241">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.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&mut T</a>, &mut <aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#261">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.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#283">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.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&mut T</a>, &mut <aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#302">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.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#325">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.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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, or <code>None</code> if it is empty.</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.80.0/src/core/slice/mod.rs.html#348">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.80.0/core/primitive.usize.html">usize</a>>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<aclass="primitive"href="https://doc.rust-lang.org/1.80.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>
</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.80.0/src/core/slice/mod.rs.html#378">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.80.0/core/primitive.usize.html">usize</a>>(&mut self) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&mut <aclass="primitive"href="https://doc.rust-lang.org/1.80.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>
</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.80.0/src/core/slice/mod.rs.html#408">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.80.0/core/primitive.usize.html">usize</a>>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(&<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.array.html">[T; N]</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.80.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>
</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.80.0/src/core/slice/mod.rs.html#443-445">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.80.0/core/primitive.usize.html">usize</a>>(
&mut self,
) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(&mut <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.array.html">[T; N]</a>, &mut <aclass="primitive"href="https://doc.rust-lang.org/1.80.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
</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.80.0/src/core/slice/mod.rs.html#478">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.80.0/core/primitive.usize.html">usize</a>>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(&<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.slice.html">[T]</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.80.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>
</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.80.0/src/core/slice/mod.rs.html#513-515">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.80.0/core/primitive.usize.html">usize</a>>(
&mut self,
) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(&mut <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.slice.html">[T]</a>, &mut <aclass="primitive"href="https://doc.rust-lang.org/1.80.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
</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.80.0/src/core/slice/mod.rs.html#548">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.80.0/core/primitive.usize.html">usize</a>>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<aclass="primitive"href="https://doc.rust-lang.org/1.80.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>
</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.80.0/src/core/slice/mod.rs.html#582">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.80.0/core/primitive.usize.html">usize</a>>(&mut self) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&mut <aclass="primitive"href="https://doc.rust-lang.org/1.80.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>
</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.80.0/src/core/slice/mod.rs.html#617-619">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.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<I as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.slice.html">[T]</a>>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.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.80.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#642-644">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.80.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.80.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.slice.html">[T]</a>>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.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.80.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.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.80.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.slice.html">[T]</a>>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.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.80.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.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.80.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.slice.html">[T]</a>>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.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.80.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.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.80.0/src/core/slice/mod.rs.html#762">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.80.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.80.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.80.0/src/core/slice/mod.rs.html#793">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.80.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.80.0/src/core/slice/mod.rs.html#829">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.80.0/core/ops/range/struct.Range.html"title="struct core::ops::range::Range">Range</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.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.80.0/src/core/slice/mod.rs.html#873">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.80.0/core/ops/range/struct.Range.html"title="struct core::ops::range::Range">Range</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.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.80.0/src/core/slice/mod.rs.html#904">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.80.0/core/primitive.usize.html">usize</a>, b: <aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#947">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.80.0/core/primitive.usize.html">usize</a>, b: <aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.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.80.0/src/core/slice/mod.rs.html#976">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.80.0/src/core/slice/mod.rs.html#1034">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.80.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.80.0/src/core/slice/mod.rs.html#1053">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.80.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.80.0/src/core/slice/mod.rs.html#1102">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.80.0/core/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.80.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.80.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.80.0/src/core/slice/mod.rs.html#1137">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.80.0/core/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.0/src/core/slice/mod.rs.html#1176">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.80.0/core/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.0/src/core/slice/mod.rs.html#1214">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.80.0/core/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.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.80.0/src/core/slice/mod.rs.html#1257">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.80.0/core/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.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.80.0/src/core/slice/mod.rs.html#1292">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.80.0/core/primitive.usize.html">usize</a>>(&self) ->&[<aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#1338">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.80.0/core/primitive.usize.html">usize</a>>(&self) -> (&[<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.array.html">[T; N]</a>], &<aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#1372">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.80.0/core/primitive.usize.html">usize</a>>(&self) -> (&<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.slice.html">[T]</a>, &[<aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#1412">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.80.0/core/primitive.usize.html">usize</a>>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.0/src/core/slice/mod.rs.html#1490">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.80.0/core/primitive.usize.html">usize</a>>(&mut self) -> (&mut [<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.array.html">[T; N]</a>], &mut <aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#1530">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.80.0/core/primitive.usize.html">usize</a>>(&mut self) -> (&mut <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.slice.html">[T]</a>, &mut [<aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#1572">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.80.0/core/primitive.usize.html">usize</a>>(&mut self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.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.80.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.80.0/src/core/slice/mod.rs.html#1605">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.80.0/core/primitive.usize.html">usize</a>>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.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.80.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.80.0/src/core/slice/mod.rs.html#1640">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.80.0/core/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.0/src/core/slice/mod.rs.html#1679">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.80.0/core/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.0/src/core/slice/mod.rs.html#1719">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.80.0/core/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.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.80.0/src/core/slice/mod.rs.html#1763">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.80.0/core/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.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.80.0/src/core/slice/mod.rs.html#1802-1804">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.80.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.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#1843-1845">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.80.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.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#1890">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.80.0/core/primitive.usize.html">usize</a>) -> (&<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.slice.html">[T]</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#1924">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.80.0/core/primitive.usize.html">usize</a>) -> (&mut <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.slice.html">[T]</a>, &mut <aclass="primitive"href="https://doc.rust-lang.org/1.80.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"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.79.0">1.79.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/slice/mod.rs.html#1975">source</a></span><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.80.0/core/primitive.usize.html">usize</a>) -> (&<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.slice.html">[T]</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.slice.html">[T]</a>)</h4></section></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.80.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.80.0/core/primitive.slice.html">[T]</a>, &mut <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.slice.html">[T]</a>)</h4></section></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.80.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"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.80.0">1.80.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/slice/mod.rs.html#2089">source</a></span><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.80.0/core/primitive.usize.html">usize</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(&<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.slice.html">[T]</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.slice.html">[T]</a>)></h4></section></summary><divclass="docblock"><p>Divides one slice into two at an index, returning <code>None</code> if the slice is
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_at_mut_checked"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.80.0">1.80.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/slice/mod.rs.html#2128">source</a></span><h4class="code-header">pub fn <ahref="#method.split_at_mut_checked"class="fn">split_at_mut_checked</a>(
) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(&mut <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.slice.html">[T]</a>, &mut <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.slice.html">[T]</a>)></h4></section></summary><divclass="docblock"><p>Divides one mutable slice into two at an index, returning <code>None</code> if the
</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.80.0/src/core/slice/mod.rs.html#2180-2182">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.80.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.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#2202-2204">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.80.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.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#2238-2240">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.80.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.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#2262-2264">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.80.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.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#2298-2300">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.80.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.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#2324-2326">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.80.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.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#2352-2354">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.80.0/core/primitive.usize.html">usize</a>, pred: F) -><aclass="struct"href="https://doc.rust-lang.org/1.80.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.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#2378-2380">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.80.0/core/primitive.usize.html">usize</a>, pred: F) -><aclass="struct"href="https://doc.rust-lang.org/1.80.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.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#2407-2409">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.80.0/core/primitive.usize.html">usize</a>, pred: F) -><aclass="struct"href="https://doc.rust-lang.org/1.80.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.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#2434-2436">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.80.0/core/primitive.usize.html">usize</a>, pred: F) -><aclass="struct"href="https://doc.rust-lang.org/1.80.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.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#2525-2527">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.80.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.bool.html">bool</a><divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.80.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.80.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.80.0/src/core/slice/mod.rs.html#2555-2557">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.80.0/core/primitive.slice.html">[T]</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.bool.html">bool</a><divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.80.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 or equal to 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.80.0/src/core/slice/mod.rs.html#2586-2588">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.80.0/core/primitive.slice.html">[T]</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.bool.html">bool</a><divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.80.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 or equal to the slice.</p>
T: <aclass="trait"href="https://doc.rust-lang.org/1.80.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.80.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.80.0/src/core/slice/mod.rs.html#2740-2742">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.80.0/core/primitive.reference.html">&T</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.usize.html">usize</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.usize.html">usize</a>><divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.0/src/core/slice/mod.rs.html#2791-2793">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.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.usize.html">usize</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.usize.html">usize</a>><divclass="where">where
F: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&'a T</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.0/src/core/slice/mod.rs.html#2915-2917">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.80.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.80.0/src/core/slice/mod.rs.html#2970-2972">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.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.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.80.0/core/primitive.f64.html"title="primitive f64"><code>f64</code></a> doesn’t implement <ahref="https://doc.rust-lang.org/1.80.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.80.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.80.0/src/core/slice/mod.rs.html#3063-3065">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.80.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> after the reordering is at its final sorted position.</p>
the basis for <ahref="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#3119-3125">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.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.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> after the reordering is at
the basis for <ahref="https://doc.rust-lang.org/1.80.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.80.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> after the reordering is
the basis for <ahref="https://doc.rust-lang.org/1.80.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.80.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.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&mut T</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&mut T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.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.80.0/src/core/slice/mod.rs.html#3412">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.80.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.80.0/src/core/slice/mod.rs.html#3455">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.80.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.80.0/src/core/slice/mod.rs.html#3478-3480">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.80.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.80.0/src/core/slice/mod.rs.html#3502-3504">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.80.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.80.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.80.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.80.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.80.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.80.0/src/core/slice/mod.rs.html#3565-3567">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.80.0/core/primitive.slice.html">[T]</a>)<divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.80.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.80.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.80.0/src/core/slice/mod.rs.html#3629-3631">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.80.0/core/primitive.slice.html">[T]</a>)<divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.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.80.0/src/core/slice/mod.rs.html#3750">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.80.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.80.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.80.0/src/core/slice/mod.rs.html#3827">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.80.0/core/primitive.slice.html">[T]</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.slice.html">[U]</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#3892">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.80.0/core/primitive.slice.html">[T]</a>, &mut <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.slice.html">[U]</a>, &mut <aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&'a T</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&'a T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.0/src/core/slice/mod.rs.html#4191-4193">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.80.0/core/primitive.usize.html">usize</a><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.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.80.0/core/ops/range/trait.OneSidedRange.html"title="trait core::ops::range::OneSidedRange">OneSidedRange</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/core/ops/range/trait.OneSidedRange.html"title="trait core::ops::range::OneSidedRange">OneSidedRange</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#4357">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.80.0/core/primitive.slice.html">[T]</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#4382">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.80.0/core/primitive.slice.html">[T]</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#4406">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.80.0/core/primitive.slice.html">[T]</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/slice/mod.rs.html#4431">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.80.0/core/primitive.slice.html">[T]</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/core/primitive.reference.html">&mut T</a>; <aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.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.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><[<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&mut T</a>; <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.array.html">N</a>], <aclass="struct"href="https://doc.rust-lang.org/1.80.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.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.80.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.80.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.80.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.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&[<aclass="enum"href="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.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.80.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.80.0/core/primitive.u8.html">u8</a>]) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.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.80.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"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.80.0">1.80.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/slice/ascii.rs.html#129">source</a></span><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.80.0/core/primitive.u8.html">u8</a>]</h4></section></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_end"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.80.0">1.80.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/slice/ascii.rs.html#158">source</a></span><h4class="code-header">pub fn <ahref="#method.trim_ascii_end"class="fn">trim_ascii_end</a>(&self) ->&[<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.u8.html">u8</a>]</h4></section></summary><divclass="docblock"><p>Returns a byte slice with trailing ASCII whitespace bytes removed.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim_ascii"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.80.0">1.80.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/slice/ascii.rs.html#188">source</a></span><h4class="code-header">pub fn <ahref="#method.trim_ascii"class="fn">trim_ascii</a>(&self) ->&[<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.u8.html">u8</a>]</h4></section></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.sort_floats"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/core/slice/mod.rs.html#4622">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>
<p>This sort is in-place (i.e. does not allocate), <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case, and uses
the ordering defined by <ahref="https://doc.rust-lang.org/1.80.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.80.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.as_flattened"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.80.0">1.80.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/slice/mod.rs.html#4549">source</a></span><h4class="code-header">pub fn <ahref="#method.as_flattened"class="fn">as_flattened</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.slice.html">[T]</a></h4></section></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.as_flattened_mut"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.80.0">1.80.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/slice/mod.rs.html#4585">source</a></span><h4class="code-header">pub fn <ahref="#method.as_flattened_mut"class="fn">as_flattened_mut</a>(&mut self) ->&mut <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.slice.html">[T]</a></h4></section></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.utf8_chunks"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.79.0">1.79.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/lossy.rs.html#44">source</a></span><h4class="code-header">pub fn <ahref="#method.utf8_chunks"class="fn">utf8_chunks</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/core/str/lossy/struct.Utf8Chunks.html"title="struct core::str::lossy::Utf8Chunks">Utf8Chunks</a><'_></h4></section></summary><divclass="docblock"><p>Creates an iterator over the contiguous valid UTF-8 ranges of this
slice, and the non-UTF-8 fragments in between.</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.80.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.80.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.80.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.80.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.80.0/src/core/slice/mod.rs.html#4651">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>
<p>This sort is in-place (i.e. does not allocate), <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case, and uses
the ordering defined by <ahref="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.0/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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
<p>To uppercase the value in-place, use <ahref="https://doc.rust-lang.org/1.80.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.80.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.80.0/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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
<p>To lowercase the value in-place, use <ahref="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.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.80.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.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.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.80.0/core/primitive.f64.html"title="primitive f64"><code>f64</code></a> doesn’t implement <ahref="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.0/core/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.0/core/primitive.slice.html">[T]</a> as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/alloc/slice/trait.Concat.html"title="trait alloc::slice::Concat">Concat</a><Item>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.0/core/primitive.slice.html">[T]</a> as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/alloc/slice/trait.Join.html"title="trait alloc::slice::Join">Join</a><Separator>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.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.80.0/core/primitive.slice.html">[T]</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.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.80.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.80.0/core/primitive.slice.html">[T]</a> as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/alloc/slice/trait.Join.html"title="trait alloc::slice::Join">Join</a><Separator>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.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.80.0/core/primitive.slice.html">[T]</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.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-SmallVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1871-1876">source</a><ahref="#impl-AsMut%3C%5B%3CA+as+Array%3E::Item%5D%3E-for-SmallVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait smallvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.AsMut.html"title="trait core::convert::AsMut">AsMut</a><[<A as <aclass="trait"href="trait.Array.html"title="trait smallvec::Array">Array</a>>::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>]> for <aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</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/smallvec/lib.rs.html#1873-1875">source</a><ahref="#method.as_mut"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.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 smallvec::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-SmallVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1864-1869">source</a><ahref="#impl-AsRef%3C%5B%3CA+as+Array%3E::Item%5D%3E-for-SmallVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait smallvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.AsRef.html"title="trait core::convert::AsRef">AsRef</a><[<A as <aclass="trait"href="trait.Array.html"title="trait smallvec::Array">Array</a>>::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>]> for <aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</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/smallvec/lib.rs.html#1866-1868">source</a><ahref="#method.as_ref"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.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 smallvec::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-Borrow%3C%5B%3CA+as+Array%3E::Item%5D%3E-for-SmallVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1878-1883">source</a><ahref="#impl-Borrow%3C%5B%3CA+as+Array%3E::Item%5D%3E-for-SmallVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait smallvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/borrow/trait.Borrow.html"title="trait core::borrow::Borrow">Borrow</a><[<A as <aclass="trait"href="trait.Array.html"title="traitsmal
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.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/smallvec/lib.rs.html#2135-2137">source</a><ahref="#method.clone"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/clone/trait.Clone.html#tymethod.clone"class="fn">clone</a>(&self) -><aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</a><A></h4></section></summary><divclass='docblock'>Returns a copy of the value. <ahref="https://doc.rust-lang.org/1.80.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/smallvec/lib.rs.html#2139-2152">source</a><ahref="#method.clone_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/clone/trait.Clone.html#method.clone_from"class="fn">clone_from</a>(&mut self, source: <aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.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-SmallVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/smallvec/lib.rs.html#2086-2093">source</a><ahref="#impl-Debug-for-SmallVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait smallvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/fmt/trait.Debug.html"title="trait core::fmt::Debug">Debug</a> for <aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</a><A><divclass="where">where
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.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"class="method trait-impl"><aclass="src rightside"href="../src/smallvec/lib.rs.html#2090-2092">source</a><ahref="#method.fmt"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/fmt/trait.Debug.html#tymethod.fmt"class="fn">fmt</a>(&self, f: &mut <aclass="struct"href="https://doc.rust-lang.org/1.80.0/core/fmt/struct.Formatter.html"title="struct core::fmt::Formatter">Formatter</a><'_>) -><aclass="type"href="https://doc.rust-lang.org/1.80.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.80.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-SmallVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/smallvec/lib.rs.html#2095-2100">source</a><ahref="#impl-Default-for-SmallVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait smallvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/default/trait.Default.html"title="trait core::default::Default">Default</a> for <aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</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/smallvec/lib.rs.html#2097-2099">source</a><ahref="#method.default"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/default/trait.Default.html#tymethod.default"class="fn">default</a>() -><aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</a><A></h4></section></summary><divclass='docblock'>Returns the “default value” for a type. <ahref="https://doc.rust-lang.org/1.80.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-SmallVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/smallvec/lib.rs.html#1843-1852">source</a><ahref="#impl-Deref-for-SmallVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait smallvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/ops/deref/trait.Deref.html"title="trait core::ops::deref::Deref">Deref</a> for <aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</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.80.0/core/ops/deref/trait.Deref.html#associatedtype.Target"class="associatedtype">Target</a> = [<A as <aclass="trait"href="trait.Array.html"title="trait smallvec::Array">Array</a>>::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::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/smallvec/lib.rs.html#1846-1851">source</a><ahref="#method.deref"class="anchor"><EFBFBD>
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.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.from-1"class="method trait-impl"><aclass="src rightside"href="../src/smallvec/lib.rs.html#2002-2004">source</a><ahref="#method.from-1"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/convert/trait.From.html#tymethod.from"class="fn">from</a>(slice: &'a [A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>]) -><aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</a><A></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-SmallVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/smallvec/lib.rs.html#2020-2025">source</a><ahref="#impl-From%3CA%3E-for-SmallVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait smallvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.From.html"title="trait core::convert::From">From</a><A> for <aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</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/smallvec/lib.rs.html#2022-2024">source</a><ahref="#method.from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/convert/trait.From.html#tymethod.from"class="fn">from</a>(array: A) -><aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</a><A></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%3CVec%3C%3CA+as+Array%3E::Item%3E%3E-for-SmallVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/smallvec/lib.rs.html#2013-2018">source</a><ahref="#impl-From%3CVec%3C%3CA+as+Array%3E::Item%3E%3E-for-SmallVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait smallvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.From.html"title="trait core::convert::From">From</a><<aclass="struct"href="https://doc.rust-lang.org/1.80.0/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<A as <aclass="trait"href="trait.Array.html"title="trait smallvec::Array">Array</a>>::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>>> for <aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</a><A></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/smallvec/lib.rs.html#2015-2017">source</a><ahref="#method.from-2"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/convert/trait.From.html#tymethod.from"class="fn">from</a>(vec: <aclass="struct"href="https://doc.rust-lang.org/1.80.0/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>>) -><aclass="struct"href="struct.SmallVec.html"title="structsmallvec::SmallV
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.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/smallvec/lib.rs.html#2191-2193">source</a><ahref="#method.hash"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/hash/trait.Hash.html#tymethod.hash"class="fn">hash</a><H: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.Hasher.html"title="trait core::hash::Hasher">Hasher</a>>(&self, state: <aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/core/hash/trait.Hasher.html"title="trait core::hash::Hasher"><code>Hasher</code></a>. <ahref="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.0/core/primitive.slice.html">[Self]</a>, state: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&mut H</a>)<divclass="where">where
Self: <aclass="trait"href="https://doc.rust-lang.org/1.80.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.80.0/core/hash/trait.Hasher.html"title="trait core::hash::Hasher"><code>Hasher</code></a>. <ahref="https://doc.rust-lang.org/1.80.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-SmallVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/smallvec/lib.rs.html#2027-2033">source</a><ahref="#impl-Index%3CI%3E-for-SmallVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait smallvec::Array">Array</a>, I: <aclass="trait"href="https://doc.rust-lang.org/1.80.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 smallvec::Array::Item">Item</a>]>><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/ops/index/trait.Index.html"title="trait core::ops::index::Index">Index</a><I> for <aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</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.80.0/core/ops/index/trait.Index.html#associatedtype.Output"class="associatedtype">Output</a> = <I as <aclass="trait"href="https://doc.rust-lang.org/1.80.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 smallvec::Array">Array</a>>::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>]>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.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/smallvec/lib.rs.html#2030-2032">source</a><ahref="#method.index"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/ops/index/trait.Index.html#tymethod.index"class="fn">index</a>(&self, index: I) ->&I::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/slice/index/trait.SliceIndex.html#associatedtype.Output"title="type core::slice::index::SliceIndex::Output">Output</a></h4></section></summary><divclass='docblock'>Performs the indexing (<code>container[index]</code>) operation. <ahref="https://doc.rust-lang.org/1.80.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-SmallVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/smallvec/lib.rs.html#2035-2039">source</a><ahref="#impl-IndexMut%3CI%3E-for-SmallVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait smallvec::Array">Array</a>, I: <aclass="trait"href="https://doc.rust-lang.org/1.80.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 smallvec::Array::Item">Item</a>]>><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/ops/index/trait.IndexMut.html"title="
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.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/smallvec/lib.rs.html#2182-2184">source</a><ahref="#method.cmp"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.Ord.html#tymethod.cmp"class="fn">cmp</a>(&self, other: &<aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</a><A>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.0/src/core/cmp.rs.html#856-858">source</a></span><ahref="#method.max"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.0/src/core/cmp.rs.html#877-879">source</a></span><ahref="#method.min"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.0/src/core/cmp.rs.html#903-906">source</a></span><ahref="#method.clamp"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.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.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a> + <aclass="trait"href="https://doc.rust-lang.org/1.80.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.80.0/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialEq%3CSmallVec%3CB%3E%3E-for-SmallVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/smallvec/lib.rs.html#2155-2163">source</a><ahref="#impl-PartialEq%3CSmallVec%3CB%3E%3E-for-SmallVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait smallvec::Array">Array</a>, B: <aclass="trait"href="trait.Array.html"title="trait smallvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><<aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</a><B>> for <aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</a><A><divclass="where">where
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><B::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</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/smallvec/lib.rs.html#2160-2162">source</a><ahref="#method.eq"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialEq.html#tymethod.eq"class="fn">eq</a>(&self, other: &<aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</a><B>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/cmp.rs.html#263">source</a></span><ahref="#method.ne"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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-SmallVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/smallvec/lib.rs.html#2167-2175">source</a><ahref="#impl-PartialOrd-for-SmallVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait smallvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialOrd.html"title="trait core::cmp::PartialOrd">PartialOrd</a> for <aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</a><A><divclass="where">where
A::<aclass="associatedtype"href="trait.Array.html#associatedtype.Item"title="type smallvec::Array::Item">Item</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.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/smallvec/lib.rs.html#2172-2174">source</a><ahref="#method.partial_cmp"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp"class="fn">partial_cmp</a>(&self, other: &<aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</a><A>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="enum"href="https://doc.rust-lang.org/1.80.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.80.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.80.0/src/core/cmp.rs.html#1180">source</a></span><ahref="#method.lt"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialOrd.html#method.lt"class="fn">lt</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.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.80.0/src/core/cmp.rs.html#1198">source</a></span><ahref="#method.le"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialOrd.html#method.le"class="fn">le</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.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.80.0/src/core/cmp.rs.html#1215">source</a></span><ahref="#method.gt"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialOrd.html#method.gt"class="fn">gt</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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.80.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.80.0/src/core/cmp.rs.html#1233">source</a></span><ahref="#method.ge"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialOrd.html#method.ge"class="fn">ge</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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>
operator. <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><sectionid="impl-Eq-for-SmallVec%3CA%3E"class="impl"><aclass="src rightside"href="../src/smallvec/lib.rs.html#2165">source</a><ahref="#impl-Eq-for-SmallVec%3CA%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="trait.Array.html"title="trait smallvec::Array">Array</a>><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/cmp/trait.Eq.html"title="trait core::cmp::Eq">Eq</a> for <aclass="struct"href="struct.SmallVec.html"title="struct smallvec::SmallVec">SmallVec</a><A><divclass="where">where
<code><ahref="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.0/alloc/borrow/trait.ToOwned.html#method.clone_into">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.80.0/src/core/convert/mod.rs.html#805-807">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.80.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.80.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"class="associatedtype trait-impl"><ahref="#associatedtype.Error"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html#associatedtype.Error"class="associatedtype">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/convert/mod.rs.html#812">source</a><ahref="#method.try_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.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.80.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.80.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/convert/mod.rs.html#790-792">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.80.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.80.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-1"class="associatedtype trait-impl"><ahref="#associatedtype.Error-1"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryInto.html#associatedtype.Error"class="associatedtype">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.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.80.0/src/core/convert/mod.rs.html#797">source</a><ahref="#method.try_into"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryInto.html#tymethod.try_into"class="fn">try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.80.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.80.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.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">{"Drain<'_, A>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.Drain.html\" title=\"struct smallvec::Drain\">Drain</a><'a, T></code></h3><pre><code><div class=\"where\">impl<'a, T: 'a + <a class=\"trait\" href=\"trait.Array.html\" title=\"trait smallvec::Array\">Array</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.Drain.html\" title=\"struct smallvec::Drain\">Drain</a><'a, T></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = T::<a class=\"associatedtype\" href=\"trait.Array.html#associatedtype.Item\" title=\"type smallvec::Array::Item\">Item</a>;</div>"}</script></section></div></main></body></html>