Joinable

Trait Joinable 

Source
pub trait Joinable<'a, LIt, R, P, L> {
    // Required methods
    fn inner_join(
        self,
        rhs: impl Into<RHS<'a, R>>,
        predicate: P,
    ) -> JoinedEachInner<'a, LIt, R, P, L>;
    fn outer_join(
        self,
        rhs: impl Into<RHS<'a, R>>,
        predicate: P,
    ) -> JoinedEachOuter<'a, LIt, R, P, L>;
}
Expand description

A trait allowing the joining of a left-hand side (LHS) and a right-hand side (RHS) dataset. Results are yielded for pairs of values from LHS and RHS.

Required Methods§

Source

fn inner_join( self, rhs: impl Into<RHS<'a, R>>, predicate: P, ) -> JoinedEachInner<'a, LIt, R, P, L>

Joins LHS and RHS, keeping only records from left that have one or more matches in right.

The specified predicate returns a std::cmp::Ordering comparing left and right records.

Unlike Joinable::inner_join, this function returns one (&L, &R) for every match; that is, if a record, L has multiple matches in RHS, it will be yielded multiple times.

Source

fn outer_join( self, rhs: impl Into<RHS<'a, R>>, predicate: P, ) -> JoinedEachOuter<'a, LIt, R, P, L>

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.

Implementors§

Source§

impl<'a, LIt, R, P, L> Joinable<'a, LIt, R, P, L> for LIt
where LIt: Iterator<Item = &'a L>, L: 'a, R: 'a, P: Fn(&L, &R) -> Ordering,