Skip to main content

ExtendedHashMap

Trait ExtendedHashMap 

Source
pub trait ExtendedHashMap<K, V> {
    // Required methods
    fn get_disjoint_entries<const N: usize>(
        &mut self,
        entries: [&K; N],
        default: impl FnMut(&K) -> V,
    ) -> Option<[&mut V; N]>;
    fn get_disjoint_two_entries(
        &mut self,
        left: &K,
        right: &K,
        left_default: impl FnMut(&K) -> V,
        right_default: impl FnMut(&V, &K) -> V,
    ) -> [Option<&mut V>; 2]
       where V: Clone;
}

Required Methods§

Source

fn get_disjoint_entries<const N: usize>( &mut self, entries: [&K; N], default: impl FnMut(&K) -> V, ) -> Option<[&mut V; N]>

Source

fn get_disjoint_two_entries( &mut self, left: &K, right: &K, left_default: impl FnMut(&K) -> V, right_default: impl FnMut(&V, &K) -> V, ) -> [Option<&mut V>; 2]
where V: Clone,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<K: Eq + Hash + ToOwned<Owned = K>, V, S: BuildHasher + Default> ExtendedHashMap<K, V> for HashMap<K, V, S>

Source§

fn get_disjoint_entries<const N: usize>( &mut self, entries: [&K; N], default: impl FnMut(&K) -> V, ) -> Option<[&mut V; N]>

Source§

fn get_disjoint_two_entries( &mut self, left: &K, right: &K, left_default: impl FnMut(&K) -> V, right_default: impl FnMut(&V, &K) -> V, ) -> [Option<&mut V>; 2]
where V: Clone,

Implementors§