pub trait JoinableGrouped<'a, LIt, R, P, L> {
// Required methods
fn inner_join_grouped(
self,
rhs: impl Into<RHS<'a, R>>,
predicate: P,
) -> JoinedGrouped<'a, LIt, R, P>;
fn outer_join_grouped(
self,
rhs: impl Into<RHS<'a, R>>,
predicate: P,
) -> JoinedGrouped<'a, LIt, R, P>;
fn semi_join(
self,
rhs: impl Into<RHS<'a, R>>,
predicate: P,
) -> JoinedLeft<'a, LIt, R, P>;
fn anti_join(
self,
rhs: impl Into<RHS<'a, R>>,
predicate: P,
) -> JoinedLeft<'a, LIt, R, P>;
}Expand description
A trait allowing the joining of a left-hand side (LHS) and a right-hand side (RHS) dataset.
Results for inner_join_grouped and
outer_join_grouped are individual LHS records and a
Vec<R>, which can be empty for outer joins if no match is found.
Required Methods§
Sourcefn inner_join_grouped(
self,
rhs: impl Into<RHS<'a, R>>,
predicate: P,
) -> JoinedGrouped<'a, LIt, R, P>
fn inner_join_grouped( self, rhs: impl Into<RHS<'a, R>>, predicate: P, ) -> JoinedGrouped<'a, LIt, R, P>
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.
Like outer_join_grouped, this function returns a (L, Vec<&R>) with matching records from
RHS being collected. If multiple records from left match a given record from right,
right records may be returned multiple times.
Sourcefn outer_join_grouped(
self,
rhs: impl Into<RHS<'a, R>>,
predicate: P,
) -> JoinedGrouped<'a, LIt, R, P>
fn outer_join_grouped( self, rhs: impl Into<RHS<'a, R>>, predicate: P, ) -> JoinedGrouped<'a, LIt, R, P>
Joins LHS and RHS, keeping all records from left.
The specified predicate returns a std::cmp::Ordering comparing left and right records.
Like inner_join_grouped, this function returns a (L, Vec<&R>) with matching records from
RHS being collected. If multiple records from left match a given record from right,
right records may be returned multiple times.
Sourcefn semi_join(
self,
rhs: impl Into<RHS<'a, R>>,
predicate: P,
) -> JoinedLeft<'a, LIt, R, P>
fn semi_join( self, rhs: impl Into<RHS<'a, R>>, predicate: P, ) -> JoinedLeft<'a, LIt, R, P>
Joins LHS and RHS, keeping all records from left that have one or more matches in right.
The specified predicate returns a std::cmp::Ordering comparing left and right records.
Like anti_join, this function only returns left records.
Sourcefn anti_join(
self,
rhs: impl Into<RHS<'a, R>>,
predicate: P,
) -> JoinedLeft<'a, LIt, R, P>
fn anti_join( self, rhs: impl Into<RHS<'a, R>>, predicate: P, ) -> JoinedLeft<'a, LIt, R, P>
Joins LHS and RHS, keeping all records from left that have no matches in right.
The specified predicate returns a std::cmp::Ordering comparing left and right records.
Like semi_join, this function only returns left records.
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.