Trait BTreeMapMultiMut

Source
pub trait BTreeMapMultiMut {
    type Value;
    type Key: Ord;

    // Required methods
    fn get_pair_mut<Q>(
        &mut self,
        k_1: &Q,
        k_2: &Q,
    ) -> Option<(&mut Self::Value, &mut Self::Value)>
       where Self::Key: Borrow<Q>,
             Q: Ord + ?Sized;
    fn pair_mut<Q>(
        &mut self,
        k_1: &Q,
        k_2: &Q,
    ) -> (&mut Self::Value, &mut Self::Value)
       where Self::Key: Borrow<Q>,
             Q: Ord + ?Sized;
    fn get_triple_mut<Q>(
        &mut self,
        k_1: &Q,
        k_2: &Q,
        k_3: &Q,
    ) -> Option<(&mut Self::Value, &mut Self::Value, &mut Self::Value)>
       where Self::Key: Borrow<Q>,
             Q: Ord + ?Sized;
    fn triple_mut<Q>(
        &mut self,
        k_1: &Q,
        k_2: &Q,
        k_3: &Q,
    ) -> (&mut Self::Value, &mut Self::Value, &mut Self::Value)
       where Self::Key: Borrow<Q>,
             Q: Ord + ?Sized;
    fn multi_mut<'a>(
        &'a mut self,
        buffer: &'a mut [*const Self::Value],
    ) -> BTreeMapMutWrapper<'_, Self::Key, Self::Value>;
    fn iter_multi_mut<'a, Q>(
        &'a mut self,
        k: &'a [&'a Q],
        buffer: &'a mut [*const Self::Value],
    ) -> BTreeMapMultiMutIter<'_, Q, Self::Key, Self::Value> 
       where Self::Key: Borrow<Q>,
             Q: Ord + ?Sized;
}
Expand description

Endows HashMap with extension methods that help getting multiple mutable references to the values contained in it. Runtime-checking is done to ensure that this is safe: the returned mutable references are guaranteed not to alias.

Required Associated Types§

Required Methods§

Source

fn get_pair_mut<Q>( &mut self, k_1: &Q, k_2: &Q, ) -> Option<(&mut Self::Value, &mut Self::Value)>
where Self::Key: Borrow<Q>, Q: Ord + ?Sized,

Source

fn pair_mut<Q>( &mut self, k_1: &Q, k_2: &Q, ) -> (&mut Self::Value, &mut Self::Value)
where Self::Key: Borrow<Q>, Q: Ord + ?Sized,

Source

fn get_triple_mut<Q>( &mut self, k_1: &Q, k_2: &Q, k_3: &Q, ) -> Option<(&mut Self::Value, &mut Self::Value, &mut Self::Value)>
where Self::Key: Borrow<Q>, Q: Ord + ?Sized,

Source

fn triple_mut<Q>( &mut self, k_1: &Q, k_2: &Q, k_3: &Q, ) -> (&mut Self::Value, &mut Self::Value, &mut Self::Value)
where Self::Key: Borrow<Q>, Q: Ord + ?Sized,

Source

fn multi_mut<'a>( &'a mut self, buffer: &'a mut [*const Self::Value], ) -> BTreeMapMutWrapper<'_, Self::Key, Self::Value>

Source

fn iter_multi_mut<'a, Q>( &'a mut self, k: &'a [&'a Q], buffer: &'a mut [*const Self::Value], ) -> BTreeMapMultiMutIter<'_, Q, Self::Key, Self::Value>
where Self::Key: Borrow<Q>, Q: Ord + ?Sized,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<K: Ord, V> BTreeMapMultiMut for BTreeMap<K, V>

Source§

type Value = V

Source§

type Key = K

Source§

fn get_pair_mut<Q>(&mut self, k_1: &Q, k_2: &Q) -> Option<(&mut V, &mut V)>
where K: Borrow<Q>, Q: Ord + ?Sized,

Source§

fn pair_mut<Q>(&mut self, k_1: &Q, k_2: &Q) -> (&mut V, &mut V)
where K: Borrow<Q>, Q: Ord + ?Sized,

Source§

fn get_triple_mut<Q>( &mut self, k_1: &Q, k_2: &Q, k_3: &Q, ) -> Option<(&mut V, &mut V, &mut V)>
where K: Borrow<Q>, Q: Ord + ?Sized,

Source§

fn triple_mut<Q>( &mut self, k_1: &Q, k_2: &Q, k_3: &Q, ) -> (&mut V, &mut V, &mut V)
where K: Borrow<Q>, Q: Ord + ?Sized,

Source§

fn multi_mut<'a>( &'a mut self, buffer: &'a mut [*const V], ) -> BTreeMapMutWrapper<'_, K, V>

Source§

fn iter_multi_mut<'a, Q>( &'a mut self, keys: &'a [&'a Q], buffer: &'a mut [*const V], ) -> BTreeMapMultiMutIter<'_, Q, K, V>
where K: Borrow<Q>, Q: Ord + ?Sized,

Implementors§