pub trait HalfJoinState<Key, ValBuild, ValProbe> {
    // Required methods
    fn build(&mut self, k: Key, v: &ValBuild) -> bool;
    fn probe(
        &mut self,
        k: &Key,
        v: &ValProbe
    ) -> Option<(Key, ValProbe, ValBuild)>;
    fn pop_match(&mut self) -> Option<(Key, ValProbe, ValBuild)>;
    fn len(&self) -> usize;
    fn iter(&self) -> Iter<'_, Key, SmallVec<[ValBuild; 1]>>;
    fn full_probe(&self, k: &Key) -> Iter<'_, ValBuild>;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}

Required Methods§

source

fn build(&mut self, k: Key, v: &ValBuild) -> bool

Insert a key value pair into the join state, currently this is always inserting into a hash table If the key-value pair exists then it is implementation defined what happens, usually either two copies are stored or only one copy is stored.

source

fn probe(&mut self, k: &Key, v: &ValProbe) -> Option<(Key, ValProbe, ValBuild)>

This function does the actual joining part of the join. It looks up a key in the local join state and creates matches The first match is return directly to the caller, and any additional matches are stored internally to be retrieved later with pop_match

source

fn pop_match(&mut self) -> Option<(Key, ValProbe, ValBuild)>

If there are any stored matches from previous calls to probe then this function will remove them one at a time and return it.

source

fn len(&self) -> usize

source

fn iter(&self) -> Iter<'_, Key, SmallVec<[ValBuild; 1]>>

source

fn full_probe(&self, k: &Key) -> Iter<'_, ValBuild>

Provided Methods§

source

fn is_empty(&self) -> bool

Implementors§

source§

impl<Key, ValBuild, ValProbe> HalfJoinState<Key, ValBuild, ValProbe> for HalfMultisetJoinState<Key, ValBuild, ValProbe>
where Key: Clone + Eq + Hash, ValBuild: Clone, ValProbe: Clone,

source§

impl<Key, ValBuild, ValProbe> HalfJoinState<Key, ValBuild, ValProbe> for HalfSetJoinState<Key, ValBuild, ValProbe>
where Key: Clone + Eq + Hash, ValBuild: Clone + Eq, ValProbe: Clone,