Trait vec_collections::AbstractVecMap[][src]

pub trait AbstractVecMap<K, V> {
    fn as_slice(&self) -> &[(K, V)];

    fn is_empty(&self) -> bool { ... }
fn iter(&self) -> VecMapIter<Iter<'_, (K, V)>> { ... }
fn get<Q>(&self, key: &Q) -> Option<&V>
    where
        K: Borrow<Q> + 'static,
        Q: Ord + ?Sized
, { ... }
fn outer_join<W, R, F, A>(
        &self,
        that: &impl AbstractVecMap<K, W>,
        f: F
    ) -> VecMap<A>
    where
        K: Ord + Clone,
        A: Array<Item = (K, R)>,
        F: Fn(OuterJoinArg<&K, &V, &W>) -> Option<R>
, { ... }
fn left_join<W, R, F, A>(
        &self,
        that: &impl AbstractVecMap<K, W>,
        f: F
    ) -> VecMap<A>
    where
        K: Ord + Clone,
        F: Fn(&K, &V, Option<&W>) -> Option<R>,
        A: Array<Item = (K, R)>
, { ... }
fn right_join<W, R, F, A>(
        &self,
        that: &impl AbstractVecMap<K, W>,
        f: F
    ) -> VecMap<A>
    where
        K: Ord + Clone,
        F: Fn(&K, Option<&V>, &W) -> Option<R>,
        A: Array<Item = (K, R)>
, { ... }
fn inner_join<W, R, F, A>(
        &self,
        that: &impl AbstractVecMap<K, W>,
        f: F
    ) -> VecMap<A>
    where
        K: Ord + Clone,
        F: Fn(&K, &V, &W) -> Option<R>,
        A: Array<Item = (K, R)>
, { ... } }
Expand description

An abstract vec map

this is implemented by VecMap and ArchivedVecMap, so they are interoperable.

Required methods

Provided methods

lookup of a mapping. Time complexity is O(log N). Binary search.

Perform an outer join with another VecMap, producing a new result

Implementors