<!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="An oid array structure used by libgit2"><title>OidArray in git2::oid_array - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><linkrel="stylesheet"href="../../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../../static.files/rustdoc-ac92e1bbe349e143.css"><metaname="rustdoc-vars"data-root-path="../../"data-static-root-path="../../static.files/"data-current-crate="git2"data-themes=""data-resource-suffix=""data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)"data-channel="1.76.0"data-search-js="search-2b6ce74ff89ae146.js"data-settings-js="settings-4313503d2e1961c2.js"><scriptsrc="../../static.files/storage-f2adc0d6ca4d09fb.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../../static.files/main-305769736d49e732.js"></script><noscript><linkrel="stylesheet"href="../../static.files/noscript-feafe1bb7466e4bd.css"></noscript><linkrel="alternate icon"type="image/png"href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><linkrel="alternate icon"type="image/png"href="../../static.files/favicon-32x32-422f7d1d52889060.png"><linkrel="icon"type="image/svg+xml"href="../../static.files/favicon-2c020d218678b618.svg"></head><bodyclass="rustdoc 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">☰</button></nav><navclass="sidebar"><divclass="sidebar-crate"><h2><ahref="../../git2/index.html">git2</a><spanclass="version">0.18.2</span></h2></div><h2class="location"><ahref="#">OidArray</a></h2><divclass="sidebar-elems"><section><h3><ahref="#deref-methods-%5BOid%5D">Methods from Deref<Target=[Oid]></a></h3><ulclass="block deref-methods"><li><ahref="#method.align_to">align_to</a></li><li><ahref="#method.array_chunks">array_chunks</a></li><li><ahref="#method.array_windows">array_windows</a></li><li><ahref="#method.as_ascii">as_ascii</a></li><li><ahref="#method.as_ascii_unchecked">as_ascii_unchecked</a></li><li><ahref="#method.as_bytes">as_bytes</a></li><li><ahref="#method.as_chunks">as_chunks</a></li><li><ahref="#method.as_chunks_unchecked">as_chunks_unchecked</a></li><li><ahref="#method.as_ptr">as_ptr</a></li><li><ahref="#method.as_ptr_range">as_ptr_range</a></li><li><ahref="#method.as_rchunks">as_rchunks</a></li><li><ahref="#method.as_simd">as_simd</a></li><li><ahref="#method.as_str">as_str</a></li><li><ahref="#method.binary_search">binary_search</a></li><li><ahref="#method.binary_search_by">binary_search_by</a></li><li><ahref="#method.binary_search_by_key">binary_search_by_key</a></li><li><ahref="#method.chunks">chunks</a></li><li><ahref="#method.chunks_exact">chunks_exact</a></li><li><ahref="#method.concat">concat</a></li><li><ahref="#method.connect">connect</a></li><li><ahref="#method.contains">contains</a></li><li><ahref="#method.ends_with">ends_with</a></li><li><ahref="#method.eq_ignore_ascii_case">eq_ignore_ascii_case</a></li><li><ahref="#method.escape_ascii">escape_ascii</a></li><li><ahref="#method.first">first</a></li><li><ahref="#method.first_chunk">first_chunk</a></li><li><ahref="#method.flatten">flatten</a></li><li><ahref="#method.get">get</a><
<main><divclass="width-limiter"><navclass="sub"><formclass="search-form"><span></span><divid="sidebar-button"tabindex="-1"><ahref="../../git2/all.html"title="show sidebar"></a></div><inputclass="search-input"name="search"aria-label="Run search in the documentation"autocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"><divid="help-button"tabindex="-1"><ahref="../../help.html"title="help">?</a></div><divid="settings-menu"tabindex="-1"><ahref="../../settings.html"title="settings"><imgwidth="22"height="22"alt="Change settings"src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><sectionid="main-content"class="content"><divclass="main-heading"><h1>Struct <ahref="../index.html">git2</a>::<wbr><ahref="index.html">oid_array</a>::<wbr><aclass="struct"href="#">OidArray</a><buttonid="copy-path"title="Copy item path to clipboard"><imgsrc="../../static.files/clipboard-7571035ce49a181d.svg"width="19"height="18"alt="Copy item path"></button></h1><spanclass="out-of-band"><aclass="src"href="../../src/git2/oid_array.rs.html#16-18">source</a> · <buttonid="toggle-all-docs"title="collapse all docs">[<span>−</span>]</button></span></div><preclass="rust item-decl"><code>pub struct OidArray { <spanclass="comment">/* private fields */</span> }</code></pre><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>An oid array structure used by libgit2</p>
<p>Some APIs return arrays of OIDs which originate from libgit2. This
wrapper type behaves a little like <code>Vec<&Oid></code> but does so without copying
the underlying Oids until necessary.</p>
</div></details><h2id="deref-methods-%5BOid%5D"class="section-header"><span>Methods from <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/ops/deref/trait.Deref.html"title="trait core::ops::deref::Deref">Deref</a><Target = [<aclass="struct"href="../struct.Oid.html"title="struct git2::Oid">Oid</a>]></span><ahref="#deref-methods-%5BOid%5D"class="anchor">§</a></h2><divid="deref-methods-%5BOid%5D-1"class="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_str"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/ascii/ascii_char.rs.html#544">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.76.0/std/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.76.0/src/core/ascii/ascii_char.rs.html#555">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.76.0/std/primitive.u8.html">u8</a>] <ahref="#"class="tooltip"data-notable-ty="&[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.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.76.0/src/core/slice/ascii.rs.html#16">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.76.0/std/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.76.0/src/core/slice/ascii.rs.html#25">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.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&[<aclass="enum"href="https://doc.rust-lang.org/1.76.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.76.0/std/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.76.0/src/core/slice/ascii.rs.html#43">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.76.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,
without checking whether they’re valid.</p>
<h5id="safety"><ahref="#safety">Safety</a></h5>
<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.76.0/src/core/slice/ascii.rs.html#57">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.76.0/std/primitive.u8.html">u8</a>]) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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.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.76.0/src/core/slice/ascii.rs.html#109">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.76.0/core/slice/ascii/struct.EscapeAscii.html"title="struct core::slice::ascii::EscapeAscii">EscapeAscii</a><'_></h4></section></summary><divclass="docblock"><p>Returns an iterator that produces an escaped version of this slice,
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim_ascii_start"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/slice/ascii.rs.html#129">source</a><h4class="code-header">pub fn <ahref="#method.trim_ascii_start"class="fn">trim_ascii_start</a>(&self) ->&[<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.u8.html">u8</a>] <ahref="#"class="tooltip"data-notable-ty="&[u8]">ⓘ</a></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>byte_slice_trim_ascii</code>)</span></div></span></summary><divclass="docblock"><p>Returns a byte slice with leading ASCII whitespace bytes removed.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim_ascii"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/slice/ascii.rs.html#190">source</a><h4class="code-header">pub fn <ahref="#method.trim_ascii"class="fn">trim_ascii</a>(&self) ->&[<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.u8.html">u8</a>] <ahref="#"class="tooltip"data-notable-ty="&[u8]">ⓘ</a></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>byte_slice_trim_ascii</code>)</span></div></span></summary><divclass="docblock"><p>Returns a byte slice with leading and trailing ASCII whitespace bytes
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.len"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.76.0/src/core/slice/mod.rs.html#137">source</a></span><h4class="code-header">pub fn <ahref="#method.len"class="fn">len</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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"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.76.0/src/core/slice/mod.rs.html#153">source</a></span><h4class="code-header">pub fn <ahref="#method.is_empty"class="fn">is_empty</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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.76.0/src/core/slice/mod.rs.html#172">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.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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.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.76.0/src/core/slice/mod.rs.html#212">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.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&T</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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.76.0/src/core/slice/mod.rs.html#254">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.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&T</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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.76.0/src/core/slice/mod.rs.html#295">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.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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.first_chunk"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/slice/mod.rs.html#338">source</a><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.76.0/std/primitive.usize.html">usize</a>>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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_first_last_chunk</code>)</span></div></span></summary><divclass="docblock"><p>Returns the first <code>N</code> elements of the slice, or <code>None</code> if it has fewer than <code>N</code> elements.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_first_chunk"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/slice/mod.rs.html#396">source</a><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.76.0/std/primitive.usize.html">usize</a>>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(&<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.array.html">[T; N]</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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_first_last_chunk</code>)</span></div></span></summary><divclass="docblock"><p>Returns the first <code>N</code> elements of the slice and the remainder,
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_last_chunk"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/slice/mod.rs.html#463">source</a><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.76.0/std/primitive.usize.html">usize</a>>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(&<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.array.html">[T; N]</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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_first_last_chunk</code>)</span></div></span></summary><divclass="docblock"><p>Returns the last <code>N</code> elements of the slice and the remainder,
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.last_chunk"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/slice/mod.rs.html#530">source</a><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.76.0/std/primitive.usize.html">usize</a>>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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_first_last_chunk</code>)</span></div></span></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.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.76.0/src/core/slice/mod.rs.html#597-599">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.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<I as <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.slice.html">[T]</a>>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.76.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.76.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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
) ->&<I as <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.slice.html">[T]</a>>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.76.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.76.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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.76.0/std/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>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_ptr"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.76.0/src/core/slice/mod.rs.html#742">source</a></span><h4class="code-header">pub fn <ahref="#method.as_ptr"class="fn">as_ptr</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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.76.0/std/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_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.76.0/src/core/slice/mod.rs.html#809">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.76.0/core/ops/range/struct.Range.html"title="struct core::ops::range::Range">Range</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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.76.0/std/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.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.76.0/src/core/slice/mod.rs.html#1009">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.76.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>
<p>The iterator yields all items from start to end.</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.76.0/src/core/slice/mod.rs.html#1077">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.76.0/std/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.76.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
<p>There’s no <code>windows_mut</code>, as that existing would let safe code violate the
“only one <code>&mut</code> at a time to the same thing” rule. However, you can sometimes
use <ahref="https://doc.rust-lang.org/1.76.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
conjunction with <code>windows</code> to accomplish something similar:</p>
</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.76.0/src/core/slice/mod.rs.html#1112">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.76.0/std/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.76.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.76.0/std/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.76.0/std/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_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.76.0/src/core/slice/mod.rs.html#1189">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.76.0/std/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.76.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.76.0/std/primitive.slice.html#method.chunks"title="method slice::chunks"><code>chunks</code></a>.</p>
<p>See <ahref="https://doc.rust-lang.org/1.76.0/std/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.76.0/std/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.as_chunks_unchecked"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/slice/mod.rs.html#1267">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.76.0/std/primitive.usize.html">usize</a>>(&self) ->&[<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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.76.0/src/core/slice/mod.rs.html#1312">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.76.0/std/primitive.usize.html">usize</a>>(&self) -> (&[<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.array.html">[T; N]</a>], &<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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.76.0/src/core/slice/mod.rs.html#1344">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.76.0/std/primitive.usize.html">usize</a>>(&self) -> (&<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.slice.html">[T]</a>, &[<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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.76.0/src/core/slice/mod.rs.html#1384">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.76.0/std/primitive.usize.html">usize</a>>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.76.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.76.0/std/primitive.slice.html#method.chunks_exact"title="method slice::chunks_exact"><code>chunks_exact</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.76.0/src/core/slice/mod.rs.html#1574">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.76.0/std/primitive.usize.html">usize</a>>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.76.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.76.0/std/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.76.0/src/core/slice/mod.rs.html#1609">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.76.0/std/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.76.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.76.0/std/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.76.0/std/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_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.76.0/src/core/slice/mod.rs.html#1688">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.76.0/std/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.76.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.76.0/std/primitive.slice.html#method.rchunks"title="method slice::rchunks"><code>rchunks</code></a>.</p>
<p>See <ahref="https://doc.rust-lang.org/1.76.0/std/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.76.0/std/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
F: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&T</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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_group_by</code>)</span></div></span></summary><divclass="docblock"><p>Returns an iterator over the slice producing non-overlapping runs
</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.76.0/src/core/slice/mod.rs.html#1866">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.76.0/std/primitive.usize.html">usize</a>) -> (&<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.slice.html">[T]</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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_unchecked"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/slice/mod.rs.html#1952">source</a><h4class="code-header">pub unsafe fn <ahref="#method.split_at_unchecked"class="fn">split_at_unchecked</a>(&self, mid: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>) -> (&<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.slice.html">[T]</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.slice.html">[T]</a>)</h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_split_at_unchecked</code>)</span></div></span></summary><divclass="docblock"><p>Divides one slice into two at an index, without doing bounds checking.</p>
<p>For a safe alternative see <ahref="https://doc.rust-lang.org/1.76.0/std/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
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_array_ref"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/slice/mod.rs.html#2061">source</a><h4class="code-header">pub fn <ahref="#method.split_array_ref"class="fn">split_array_ref</a><const N: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>>(&self) -> (&<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.array.html">[T; N]</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.slice.html">[T]</a>)</h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>split_array</code>)</span></div></span></summary><divclass="docblock"><p>Divides one slice into an array and a remainder slice at an index.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.rsplit_array_ref"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/slice/mod.rs.html#2139">source</a><h4class="code-header">pub fn <ahref="#method.rsplit_array_ref"class="fn">rsplit_array_ref</a><const N: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>>(&self) -> (&<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.slice.html">[T]</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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>split_array</code>)</span></div></span></summary><divclass="docblock"><p>Divides one slice into an array and a remainder slice at an index from
F: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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.76.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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.76.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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"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.76.0/src/core/slice/mod.rs.html#2394-2396">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.76.0/std/primitive.usize.html">usize</a>, pred: F) -><aclass="struct"href="https://doc.rust-lang.org/1.76.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.76.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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"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.76.0/src/core/slice/mod.rs.html#2449-2451">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.76.0/std/primitive.usize.html">usize</a>, pred: F) -><aclass="struct"href="https://doc.rust-lang.org/1.76.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.76.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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.76.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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.76.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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>
T: <aclass="trait"href="https://doc.rust-lang.org/1.76.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.76.0/std/primitive.slice.html#method.binary_search"title="method slice::binary_search"><code>binary_search</code></a> may be faster.</p>
T: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if <code>needle</code> is a prefix of the slice.</p>
T: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if <code>needle</code> is a suffix of the slice.</p>
T: <aclass="trait"href="https://doc.rust-lang.org/1.76.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>
<p>If the slice starts with <code>prefix</code>, returns the subslice after the prefix, wrapped in <code>Some</code>.
If <code>prefix</code> is empty, simply returns the original slice.</p>
<p>If the slice does not start with <code>prefix</code>, returns <code>None</code>.</p>
T: <aclass="trait"href="https://doc.rust-lang.org/1.76.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>
<p>If the slice ends with <code>suffix</code>, returns the subslice before the suffix, wrapped in <code>Some</code>.
If <code>suffix</code> is empty, simply returns the original slice.</p>
<p>If the slice does not end with <code>suffix</code>, returns <code>None</code>.</p>
T: <aclass="trait"href="https://doc.rust-lang.org/1.76.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.
If the slice is not sorted, the returned result is unspecified and
meaningless.</p>
<p>If the value is found then <ahref="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html#variant.Ok"title="variant core::result::Result::Ok"><code>Result::Ok</code></a> is returned, containing the
index of the matching element. If there are multiple matches, then any
one of the matches could be returned. The index is chosen
deterministically, but is subject to change in future versions of Rust.
If the value is not found then <ahref="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html#variant.Err"title="variant core::result::Result::Err"><code>Result::Err</code></a> is returned, containing
the index where a matching element could be inserted while maintaining
<p>See also <ahref="https://doc.rust-lang.org/1.76.0/std/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.76.0/std/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.76.0/std/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.76.0/std/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.76.0/src/core/slice/mod.rs.html#2825-2827">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.76.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>><divclass="where">where
F: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&'a T</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.76.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>The comparator function should return an order code that indicates
whether its argument is <code>Less</code>, <code>Equal</code> or <code>Greater</code> the desired
target.
If the slice is not sorted or if the comparator function does not
implement an order consistent with the sort order of the underlying
slice, the returned result is unspecified and meaningless.</p>
<p>If the value is found then <ahref="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html#variant.Ok"title="variant core::result::Result::Ok"><code>Result::Ok</code></a> is returned, containing the
index of the matching element. If there are multiple matches, then any
one of the matches could be returned. The index is chosen
deterministically, but is subject to change in future versions of Rust.
If the value is not found then <ahref="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html#variant.Err"title="variant core::result::Result::Err"><code>Result::Err</code></a> is returned, containing
the index where a matching element could be inserted while maintaining
<p>See also <ahref="https://doc.rust-lang.org/1.76.0/std/primitive.slice.html#method.binary_search"title="method slice::binary_search"><code>binary_search</code></a>, <ahref="https://doc.rust-lang.org/1.76.0/std/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.76.0/std/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.76.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>
<p>Assumes that the slice is sorted by the key, for instance with
<ahref="https://doc.rust-lang.org/1.76.0/std/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.
If the slice is not sorted by the key, the returned result is
unspecified and meaningless.</p>
<p>If the value is found then <ahref="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html#variant.Ok"title="variant core::result::Result::Ok"><code>Result::Ok</code></a> is returned, containing the
index of the matching element. If there are multiple matches, then any
one of the matches could be returned. The index is chosen
deterministically, but is subject to change in future versions of Rust.
If the value is not found then <ahref="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html#variant.Err"title="variant core::result::Result::Err"><code>Result::Err</code></a> is returned, containing
the index where a matching element could be inserted while maintaining
<p>See also <ahref="https://doc.rust-lang.org/1.76.0/std/primitive.slice.html#method.binary_search"title="method slice::binary_search"><code>binary_search</code></a>, <ahref="https://doc.rust-lang.org/1.76.0/std/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.76.0/std/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.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.76.0/src/core/slice/mod.rs.html#3849">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.76.0/std/primitive.slice.html">[T]</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.slice.html">[U]</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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
<aclass="struct"href="https://doc.rust-lang.org/1.76.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.76.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.76.0/std/primitive.slice.html#method.align_to"title="method slice::align_to"><code>slice::align_to</code></a>, so has the same weak
T: <aclass="trait"href="https://doc.rust-lang.org/1.76.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>
<p>That is, for each element <code>a</code> and its following element <code>b</code>, <code>a <= b</code> must hold. If the
slice yields exactly zero or one element, <code>true</code> is returned.</p>
<p>Note that if <code>Self::Item</code> is only <code>PartialOrd</code>, but not <code>Ord</code>, the above definition
implies that this function returns <code>false</code> if any two consecutive items are not
F: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&'a T</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&'a T</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering">Ordering</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>
<ahref="https://doc.rust-lang.org/1.76.0/std/primitive.slice.html#method.is_sorted"title="method slice::is_sorted"><code>is_sorted</code></a>; see its documentation for more information.</p>
K: <aclass="trait"href="https://doc.rust-lang.org/1.76.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>
<p>Instead of comparing the slice’s elements directly, this function compares the keys of the
elements, as determined by <code>f</code>. Apart from that, it’s equivalent to <ahref="https://doc.rust-lang.org/1.76.0/std/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.76.0/src/core/slice/mod.rs.html#4203-4205">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.76.0/std/primitive.usize.html">usize</a><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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.76.0/std/primitive.slice.html#method.binary_search"title="method slice::binary_search"><code>binary_search</code></a>, <ahref="https://doc.rust-lang.org/1.76.0/std/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.76.0/std/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
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.flatten"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/slice/mod.rs.html#4562">source</a><h4class="code-header">pub fn <ahref="#method.flatten"class="fn">flatten</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.slice.html">[T]</a></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_flatten</code>)</span></div></span></summary><divclass="docblock"><p>Takes a <code>&[[T; N]]</code>, and flattens it to a <code>&[T]</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.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.76.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.76.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.76.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.76.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>
T: <aclass="trait"href="https://doc.rust-lang.org/1.76.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.76.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.76.0/std/primitive.slice.html">[T]</a> as <aclass="trait"href="https://doc.rust-lang.org/1.76.0/alloc/slice/trait.Concat.html"title="trait alloc::slice::Concat">Concat</a><Item>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.76.0/alloc/slice/trait.Concat.html#associatedtype.Output"title="type alloc::slice::Concat::Output">Output</a><ahref="#"class="tooltip"data-notable-ty="<[T] as Concat<Item>>::Output">ⓘ</a><divclass="where">where
Item: ?<aclass="trait"href="https://doc.rust-lang.org/1.76.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.76.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.76.0/std/primitive.slice.html">[T]</a> as <aclass="trait"href="https://doc.rust-lang.org/1.76.0/alloc/slice/trait.Join.html"title="trait alloc::slice::Join">Join</a><Separator>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.76.0/alloc/slice/trait.Join.html#associatedtype.Output"title="type alloc::slice::Join::Output">Output</a><ahref="#"class="tooltip"data-notable-ty="<[T] as Join<Separator>>::Output">ⓘ</a><divclass="where">where
<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.slice.html">[T]</a>: <aclass="trait"href="https://doc.rust-lang.org/1.76.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.76.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.76.0/std/primitive.slice.html">[T]</a> as <aclass="trait"href="https://doc.rust-lang.org/1.76.0/alloc/slice/trait.Join.html"title="trait alloc::slice::Join">Join</a><Separator>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.76.0/alloc/slice/trait.Join.html#associatedtype.Output"title="type alloc::slice::Join::Output">Output</a><ahref="#"class="tooltip"data-notable-ty="<[T] as Join<Separator>>::Output">ⓘ</a><divclass="where">where
<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.slice.html">[T]</a>: <aclass="trait"href="https://doc.rust-lang.org/1.76.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><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.76.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.76.0/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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.76.0/std/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.76.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.76.0/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/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.76.0/std/primitive.slice.html#method.make_ascii_lowercase"title="method slice::make_ascii_lowercase"><code>make_ascii_lowercase</code></a>.</p>
</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-Debug-for-OidArray"class="impl"><aclass="src rightside"href="../../src/git2/oid_array.rs.html#42-46">source</a><ahref="#impl-Debug-for-OidArray"class="anchor">§</a><h3class="code-header">impl<'repo><aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html"title="trait core::fmt::Debug">Debug</a> for <aclass="struct"href="struct.OidArray.html"title="struct git2::oid_array::OidArray">OidArray</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.fmt"class="method trait-impl"><aclass="src rightside"href="../../src/git2/oid_array.rs.html#43-45">source</a><ahref="#method.fmt"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html#tymethod.fmt"class="fn">fmt</a>(&self, f: &mut <aclass="struct"href="https://doc.rust-lang.org/1.76.0/core/fmt/struct.Formatter.html"title="struct core::fmt::Formatter">Formatter</a><'_>) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.unit.html">()</a>, <aclass="struct"href="https://doc.rust-lang.org/1.76.0/core/fmt/struct.Error.html"title="struct core::fmt::Error">Error</a>></h4></section></summary><divclass='docblock'>Formats the value using the given formatter. <ahref="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Deref-for-OidArray"class="impl"><aclass="src rightside"href="../../src/git2/oid_array.rs.html#20-30">source</a><ahref="#impl-Deref-for-OidArray"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/ops/deref/trait.Deref.html"title="trait core::ops::deref::Deref">Deref</a> for <aclass="struct"href="struct.OidArray.html"title="struct git2::oid_array::OidArray">OidArray</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.76.0/core/ops/deref/trait.Deref.html#associatedtype.Target"class="associatedtype">Target</a> = [<aclass="struct"href="../struct.Oid.html"title="struct git2::Oid">Oid</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/git2/oid_array.rs.html#23-29">source</a><ahref="#method.deref"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/ops/deref/trait.Deref.html#tymethod.deref"class="fn">deref</a>(&self) ->&[<aclass="struct"href="../struct.Oid.html"title="struct git2::Oid">Oid</a>]</h4></section></summary><divclass='docblock'>Dereferences the value.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Drop-for-OidArray"class="impl"><aclass="src rightside"href="../../src/git2/oid_array.rs.html#48-52">source</a><ahref="#impl-Drop-for-OidArray"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/ops/drop/trait.Drop.html"title="trait core::ops::drop::Drop">Drop</a> for <aclass="struct"href="struct.OidArray.html"title="struct git2::oid_array::OidArray">OidArray</a></h3></section></summary><divclass="impl-items"><detailsclass="togglemethod-tog
<p>That is, this conversion is whatever the implementation of
<code><ahref="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html"title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
U: <aclass="trait"href="https://doc.rust-lang.org/1.76.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.76.0/core/convert/trait.TryFrom.html#associatedtype.Error"class="associatedtype">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/1.76.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.76.0/src/core/convert/mod.rs.html#810">source</a><ahref="#method.try_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.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.76.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.76.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.76.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.76.0/src/core/convert/mod.rs.html#788-790">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.76.0/core/convert/trait.TryInto.html"title="trait core::convert::TryInto">TryInto</a><U> for T<divclass="where">where