//! This module has a map which can be iterated in a deterministic order. See the [`IndexedMap`].
use crate::prelude::*;
-use alloc::vec::Vec;
use alloc::slice::Iter;
use core::hash::Hash;
-use core::cmp::Ord;
use core::ops::{Bound, RangeBounds};
/// A map which can be iterated in a deterministic order.
self.map.get_mut(key)
}
+ /// Fetches the key-value pair corresponding to the supplied key, if one exists.
+ pub fn get_key_value(&self, key: &K) -> Option<(&K, &V)> {
+ self.map.get_key_value(key)
+ }
+
#[inline]
/// Returns true if an element with the given `key` exists in the map.
pub fn contains_key(&self, key: &K) -> bool {