<!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 dynamically-sized slice of key-value pairs in an `IndexMap`."><title>Slice in indexmap::map - 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="indexmap"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="../../indexmap/index.html">indexmap</a><spanclass="version">2.3.0</span></h2></div><h2class="location"><ahref="#">Slice</a></h2><divclass="sidebar-elems"><section><h3><ahref="#implementations">Methods</a></h3><ulclass="block method"><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.binary_search_keys">binary_search_keys</a></li><li><ahref="#method.first">first</a></li><li><ahref="#method.first_mut">first_mut</a></li><li><ahref="#method.get_index">get_index</a></li><li><ahref="#method.get_index_mut">get_index_mut</a></li><li><ahref="#method.get_range">get_range</a></li><li><ahref="#method.get_range_mut">get_range_mut</a></li><li><ahref="#method.into_keys">into_keys</a></li><li><ahref="#method.into_values">into_values</a></li><li><ahref="#method.is_empty">is_empty</a></li><li><ahref="#method.iter">iter</a></li><li><ahref="#method.iter_mut">iter_mut</a></li><li><ahref="#method.keys">keys</a></li><li><ahref="#method.last">last</a></li><li><ahref="#method.last_mut">last_mut</a></li><li><ahref="#method.len">len</a></li><li><ahref="#method.new">new</a></li><li><ahref="#method.new_mut">new_mut</a></li><li><ahref="#method.partition_point">partition_point</a></li><li><ahref="#method.split_at">split_at</a></li><li><ahref="#method.split_at_mut">split_at_mut</a></li><li><ahref="#method.split_first">split_first</a></li><li><ahref="#method.split_first_mut">split_first_mut</a></li><li><ahref="#method.split_last">split_last</a></li><li><ahref="#method.split_last_mut">split_last_mut</a></li><li><ahref="#method.values">values</a></li><li><ahref="#method.values_mut">values_mut</a></li></ul><h3><ahref="#trait-implementations">Trait Implementations</a></h3><ulclass="block trait-implementation"><li><ahref="#impl-Clone-for-Box%3CSlice%3CK,+V%3E%3E">Clone</a></li><li><ahref="#impl-Debug-for-Slice%3CK,+V%3E">Debug</a></li><li><ahref="#impl-Default-for-%26Slice%3CK,+V%3E">Default
<p>Unlike <code>IndexMap</code>, <code>Slice</code> does consider the order for <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq"><code>PartialEq</code></a>
and <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.Eq.html"title="trait core::cmp::Eq"><code>Eq</code></a>, and it also implements <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialOrd.html"title="trait core::cmp::PartialOrd"><code>PartialOrd</code></a>, <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.Ord.html"title="trait core::cmp::Ord"><code>Ord</code></a>, and <ahref="https://doc.rust-lang.org/1.80.0/core/hash/trait.Hash.html"title="trait core::hash::Hash"><code>Hash</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.len"class="method"><aclass="src rightside"href="../../src/indexmap/map/slice.rs.html#64-66">source</a><h4class="code-header">pub const fn <ahref="#method.len"class="fn">len</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>Return the number of key-value pairs in the map slice.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_empty"class="method"><aclass="src rightside"href="../../src/indexmap/map/slice.rs.html#70-72">source</a><h4class="code-header">pub const fn <ahref="#method.is_empty"class="fn">is_empty</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Returns true if the map slice contains no elements.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_index"class="method"><aclass="src rightside"href="../../src/indexmap/map/slice.rs.html#77-79">source</a><h4class="code-header">pub fn <ahref="#method.get_index"class="fn">get_index</a>(&self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/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/std/primitive.reference.html">&K</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&V</a>)></h4></section></summary><divclass="docblock"><p>Get a key-value pair by index.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_index_mut"class="method"><aclass="src rightside"href="../../src/indexmap/map/slice.rs.html#84-86">source</a><h4class="code-header">pub fn <ahref="#method.get_index_mut"class="fn">get_index_mut</a>(&mut self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/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/std/primitive.reference.html">&K</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&mut V</a>)></h4></section></summary><divclass="docblock"><p>Get a key-value pair by index, with mutable access to the value.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_range"class="method"><aclass="src rightside"href="../../src/indexmap/map/slice.rs.html#91-94">source</a><h4class="code-header">pub fn <ahref="#method.get_range"class="fn">get_range</a><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/std/primitive.usize.html">usize</a>>>(&self, range: R) -><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/std/primitive.reference.html">&Self</a>></h4></section></summary><divclass="docblock"><p>Returns a slice of key-value pairs in the given range of indices.</p>
) -><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/std/primitive.reference.html">&mut Self</a>></h4></section></summary><divclass="docblock"><p>Returns a mutable slice of key-value pairs in the given range of indices.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.first"class="method"><aclass="src rightside"href="../../src/indexmap/map/slice.rs.html#105-107">source</a><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/std/primitive.reference.html">&K</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&V</a>)></h4></section></summary><divclass="docblock"><p>Get the first key-value pair.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.first_mut"class="method"><aclass="src rightside"href="../../src/indexmap/map/slice.rs.html#110-112">source</a><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/std/primitive.reference.html">&K</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&mut V</a>)></h4></section></summary><divclass="docblock"><p>Get the first key-value pair, with mutable access to the value.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.last"class="method"><aclass="src rightside"href="../../src/indexmap/map/slice.rs.html#115-117">source</a><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/std/primitive.reference.html">&K</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&V</a>)></h4></section></summary><divclass="docblock"><p>Get the last key-value pair.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.last_mut"class="method"><aclass="src rightside"href="../../src/indexmap/map/slice.rs.html#120-122">source</a><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/std/primitive.reference.html">&K</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&mut V</a>)></h4></section></summary><divclass="docblock"><p>Get the last key-value pair, with mutable access to the value.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_at"class="method"><aclass="src rightside"href="../../src/indexmap/map/slice.rs.html#127-130">source</a><h4class="code-header">pub fn <ahref="#method.split_at"class="fn">split_at</a>(&self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>) -> (<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&Self</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&Self</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"><aclass="src rightside"href="../../src/indexmap/map/slice.rs.html#135-138">source</a><h4class="code-header">pub fn <ahref="#method.split_at_mut"class="fn">split_at_mut</a>(&mut self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>) -> (<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&mut Self</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&mut Self</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_first"class="method"><aclass="src rightside"href="../../src/indexmap/map/slice.rs.html#142-148">source</a><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/std/primitive.reference.html">&K</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&V</a>), <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&Self</a>)></h4></section></summary><divclass="docblock"><p>Returns the first key-value pair and the rest of the slice,
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_first_mut"class="method"><aclass="src rightside"href="../../src/indexmap/map/slice.rs.html#152-158">source</a><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/std/primitive.reference.html">&K</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&mut V</a>), <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&mut Self</a>)></h4></section></summary><divclass="docblock"><p>Returns the first key-value pair and the rest of the slice,
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_last"class="method"><aclass="src rightside"href="../../src/indexmap/map/slice.rs.html#162-168">source</a><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/std/primitive.reference.html">&K</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&V</a>), <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&Self</a>)></h4></section></summary><divclass="docblock"><p>Returns the last key-value pair and the rest of the slice,
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_last_mut"class="method"><aclass="src rightside"href="../../src/indexmap/map/slice.rs.html#172-178">source</a><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/std/primitive.reference.html">&K</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&mut V</a>), <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&mut Self</a>)></h4></section></summary><divclass="docblock"><p>Returns the last key-value pair and the rest of the slice,
with mutable access to the value, or <code>None</code> if it is empty.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.iter"class="method"><aclass="src rightside"href="../../src/indexmap/map/slice.rs.html#181-183">source</a><h4class="code-header">pub fn <ahref="#method.iter"class="fn">iter</a>(&self) -><aclass="struct"href="struct.Iter.html"title="struct indexmap::map::Iter">Iter</a><'_, K, V><ahref="#"class="tooltip"data-notable-ty="Iter<'_, K, V>">ⓘ</a></h4></section></summary><divclass="docblock"><p>Return an iterator over the key-value pairs of the map slice.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.iter_mut"class="method"><aclass="src rightside"href="../../src/indexmap/map/slice.rs.html#186-188">source</a><h4class="code-header">pub fn <ahref="#method.iter_mut"class="fn">iter_mut</a>(&mut self) -><aclass="struct"href="struct.IterMut.html"title="struct indexmap::map::IterMut">IterMut</a><'_, K, V><ahref="#"class="tooltip"data-notable-ty="IterMut<'_, K, V>">ⓘ</a></h4></section></summary><divclass="docblock"><p>Return an iterator over the key-value pairs of the map slice.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.keys"class="method"><aclass="src rightside"href="../../src/indexmap/map/slice.rs.html#191-193">source</a><h4class="code-header">pub fn <ahref="#method.keys"class="fn">keys</a>(&self) -><aclass="struct"href="struct.Keys.html"title="struct indexmap::map::Keys">Keys</a><'_, K, V><ahref="#"class="tooltip"data-notable-ty="Keys<'_, K, V>">ⓘ</a></h4></section></summary><divclass="docblock"><p>Return an iterator over the keys of the map slice.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.into_keys"class="method"><aclass="src rightside"href="../../src/indexmap/map/slice.rs.html#196-198">source</a><h4class="code-header">pub fn <ahref="#method.into_keys"class="fn">into_keys</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><Self>) -><aclass="struct"href="struct.IntoKeys.html"title="struct indexmap::map::IntoKeys">IntoKeys</a><K, V><ahref="#"class="tooltip"data-notable-ty="IntoKeys<K, V>">ⓘ</a></h4></section></summary><divclass="docblock"><p>Return an owning iterator over the keys of the map slice.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.values"class="method"><aclass="src rightside"href="../../src/indexmap/map/slice.rs.html#201-203">source</a><h4class="code-header">pub fn <ahref="#method.values"class="fn">values</a>(&self) -><aclass="struct"href="struct.Values.html"title="struct indexmap::map::Values">Values</a><'_, K, V><ahref="#"class="tooltip"data-notable-ty="Values<'_, K, V>">ⓘ</a></h4></section></summary><divclass="docblock"><p>Return an iterator over the values of the map slice.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.values_mut"class="method"><aclass="src rightside"href="../../src/indexmap/map/slice.rs.html#206-208">source</a><h4class="code-header">pub fn <ahref="#method.values_mut"class="fn">values_mut</a>(&mut self) -><aclass="struct"href="struct.ValuesMut.html"title="struct indexmap::map::ValuesMut">ValuesMut</a><'_, K, V><ahref="#"class="tooltip"data-notable-ty="ValuesMut<'_, K, V>">ⓘ</a></h4></section></summary><divclass="docblock"><p>Return an iterator over mutable references to the the values of the map slice.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.into_values"class="method"><aclass="src rightside"href="../../src/indexmap/map/slice.rs.html#211-213">source</a><h4class="code-header">pub fn <ahref="#method.into_values"class="fn">into_values</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><Self>) -><aclass="struct"href="struct.IntoValues.html"title="struct indexmap::map::IntoValues">IntoValues</a><K, V><ahref="#"class="tooltip"data-notable-ty="IntoValues<K, V>">ⓘ</a></h4></section></summary><divclass="docblock"><p>Return an owning iterator over the values of the map slice.</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>Search over a sorted map for a key.</p>
maintain the sort. See <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.slice.html#method.binary_search"title="method slice::binary_search"><code>slice::binary_search</code></a> for more details.</p>
<p>Computes in <strong>O(log(n))</strong> time, which is notably less scalable than looking the key up in
the map this is a slice from using <ahref="struct.IndexMap.html#method.get_index_of"title="method indexmap::map::IndexMap::get_index_of"><code>IndexMap::get_index_of</code></a>, but this can also position
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/std/primitive.reference.html">&'a K</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&'a V</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>Search over a sorted map with a comparator function.</p>
to maintain the sort. See <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.slice.html#method.binary_search_by"title="method slice::binary_search_by"><code>slice::binary_search_by</code></a> for more details.</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>Search over a sorted map with an extraction function.</p>
to maintain the sort. See <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.slice.html#method.binary_search_by_key"title="method slice::binary_search_by_key"><code>slice::binary_search_by_key</code></a> for more details.</p>
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/std/primitive.reference.html">&K</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&V</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><divclass="docblock"><p>Returns the index of the partition point of a sorted map according to the given predicate
<p>See <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.slice.html#method.partition_point"title="method slice::partition_point"><code>slice::partition_point</code></a> for more details.</p>
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/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/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-Slice%3CK,+V%3E"class="impl"><aclass="src rightside"href="../../src/indexmap/map/slice.rs.html#346-350">source</a><ahref="#impl-PartialOrd-for-Slice%3CK,+V%3E"class="anchor">§</a><h3class="code-header">impl<K: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialOrd.html"title="trait core::cmp::PartialOrd">PartialOrd</a>, V: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialOrd.html"title="trait core::cmp::PartialOrd">PartialOrd</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.Slice.html"title="struct indexmap::map::Slice">Slice</a><K, V></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/indexmap/map/slice.rs.html#347-349">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="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&Self</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/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/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/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/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/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/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/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/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>
K: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/borrow/trait.Borrow.html"title="trait core::borrow::Borrow">Borrow</a><Q> + ?<aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.equivalent"class="method trait-impl"><aclass="src rightside"href="../../src/hashbrown/lib.rs.html#171">source</a><ahref="#method.equivalent"class="anchor">§</a><h4class="code-header">fn <ahref="../../hashbrown/trait.Equivalent.html#tymethod.equivalent"class="fn">equivalent</a>(&self, key: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&K</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>Checks if this value is equivalent to the given key. <ahref="../../hashbrown/trait.Equivalent.html#tymethod.equivalent">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-Equivalent%3CK%3E-for-Q-1"class="impl"><aclass="src rightside"href="../../src/equivalent/lib.rs.html#82-85">source</a><ahref="#impl-Equivalent%3CK%3E-for-Q-1"class="anchor">§</a><h3class="code-header">impl<Q, K><aclass="trait"href="../trait.Equivalent.html"title="trait indexmap::Equivalent">Equivalent</a><K> for Q<divclass="where">where
K: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/borrow/trait.Borrow.html"title="trait core::borrow::Borrow">Borrow</a><Q> + ?<aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.equivalent-1"class="method trait-impl"><aclass="src rightside"href="../../src/equivalent/lib.rs.html#88">source</a><ahref="#method.equivalent-1"class="anchor">§</a><h4class="code-header">fn <ahref="../trait.Equivalent.html#tymethod.equivalent"class="fn">equivalent</a>(&self, key: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&K</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>Compare self to <code>key</code> and return <code>true</code> if they are equal.</div></details></div></details></div><scripttype="text/json"id="notable-traits-data">{"IntoKeys<K,V>":"<h3>Notabletraitsfor<code><aclass=\"struct\"href=\"struct.IntoKeys.html\"title=\"structindexmap::map::IntoKeys\">IntoKeys</a><K,V></code></h3><pre><code><divclass=\"where\">impl<K,V><aclass=\"trait\"href=\"https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html\"title=\"traitcore::iter::traits::iterator::Iterator\">Iterator</a>for<aclass=\"struct\"href=\"struct.IntoKeys.html\"title=\"structindexmap::map::IntoKeys\">IntoKeys</a><K,V></div><divclass=\"where\">type<ahref=\"https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\"class=\"associatedtype\">Item</a>=K;</div>","IntoValues<K,V>":"<h3>Notabletraitsfor<code><aclass=\"struct\"href=\"struct.IntoValues.html\"title=\"structindexmap::map::IntoValues\">IntoValues</a><K,V></code></h3><pre><code><divclass=\"where\">impl<K,V><aclass=\"trait\"href=\"https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html\"title=\"traitcore::iter::traits::iterator::Iterator\">Iterator</a>for<aclass=\"struct\"href=\"struct.IntoValues.html\"title=\"structindexmap::map::IntoValues\">IntoValues</a><K,V></div><divclass=\"where\">type<ahref=\"https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\"class=\"associatedtype\">Item</a>=V;</div>","Iter<'_,K,V>":"<h3>Notabletraitsfor<code><aclass=\"struct\"href=\"struct.Iter.html\"title=\"structindexmap::map::Iter\">Iter</a><'a,K,V></code></h3><pre><code><divclass=\"where\">impl<'a,K,V><aclass=\"trait\"href=\"https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html\"title=\"traitcore::iter::traits::iterator::Iterator\">Iterator</a>for<aclass=\"struct\"href=\"struct.Iter.html\"title=\"structindexmap::map::Iter\">Iter</a><'a,K,V></div><divclass=\"where\">type<ahref=\"https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\"class=\"associatedtype\">Item</a>=(<aclass=\"primitive\"href=\"https://doc.rust-lang.org/1.80.0/std/primitive.reference.html\">&'aK</a>,<aclass=\"primitive\"href=\"https://doc.rust-lang.org/1.80.0/std/primitive.reference.html\">&'aV</a>);</div>","IterMut<'_,K,V>":"<h3>Notabletraitsfor<code><aclass=\"struct\"href=\"struct.IterMut.html\"title=\"structindexmap::map::IterMut\">IterMut</a><'a,K,V></code></h3><pre><code><divclass=\"where\">impl<'a,K,V><aclass=\"trait\"href=\"https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html\"title=\"traitcore::iter::traits::iterator::Iterator\">Iterator</a>for<aclass=\"struct\"href=\"struct.IterMut.html\"title=\"structindexmap::map::IterMut\">IterMut</a><'a,K,V></div><divclass=\"where\">type<ahref=\"https://doc.rust-lang.org/1.80.0/core/iter/traits/iter