pub trait MapJoin<'a, K: 'a, V>: Iterator<Item = (&'a K, V)> + Sized {
// Provided methods
fn cons(self) -> Map<Self, fn((&'a K, V)) -> (&'a K, (V, ()))> { ... }
fn map_join<M>(self, rhs: &'a M) -> MapJoinIter<Self, &'a M> ⓘ
where M: Map<Key = K> { ... }
fn map_join_left<M>(self, rhs: &'a M) -> MapJoinLeftIter<Self, &'a M> ⓘ
where M: Map<Key = K> { ... }
fn map_join_left_excl<M>(
self,
rhs: &'a M,
) -> MapJoinLeftExclIter<Self, &'a M> ⓘ
where M: Map<Key = K> { ... }
unsafe fn map_join_mut<M>(
self,
rhs: &'a mut M,
) -> MapJoinIter<Self, &'a mut M> ⓘ
where M: MapMut<Key = K> { ... }
unsafe fn map_join_left_mut<M>(
self,
rhs: &'a mut M,
) -> MapJoinLeftIter<Self, &'a mut M> ⓘ
where M: MapMut<Key = K> { ... }
}Expand description
Iterator trait for joining with Maps.
Provided Methods§
Sourcefn cons(self) -> Map<Self, fn((&'a K, V)) -> (&'a K, (V, ()))>
fn cons(self) -> Map<Self, fn((&'a K, V)) -> (&'a K, (V, ()))>
Returns an iterator adaptor that wraps items as Cons, i.e. (key, (value, ()).
Useful for chaining with multiple joins where the resulting item will be a valid Cons.
Sourcefn map_join<M>(self, rhs: &'a M) -> MapJoinIter<Self, &'a M> ⓘwhere
M: Map<Key = K>,
fn map_join<M>(self, rhs: &'a M) -> MapJoinIter<Self, &'a M> ⓘwhere
M: Map<Key = K>,
Returns an iterator adaptor that inner joins this iterator with a Map.
Sourcefn map_join_left<M>(self, rhs: &'a M) -> MapJoinLeftIter<Self, &'a M> ⓘwhere
M: Map<Key = K>,
fn map_join_left<M>(self, rhs: &'a M) -> MapJoinLeftIter<Self, &'a M> ⓘwhere
M: Map<Key = K>,
Returns an iterator adaptor that left joins this iterator with a Map.
Sourcefn map_join_left_excl<M>(self, rhs: &'a M) -> MapJoinLeftExclIter<Self, &'a M> ⓘwhere
M: Map<Key = K>,
fn map_join_left_excl<M>(self, rhs: &'a M) -> MapJoinLeftExclIter<Self, &'a M> ⓘwhere
M: Map<Key = K>,
Returns an iterator adaptor that left exclusive joins this iterator with a Map.
The returned iterator will yield only the elements with keys not in the RHS map.
Sourceunsafe fn map_join_mut<M>(self, rhs: &'a mut M) -> MapJoinIter<Self, &'a mut M> ⓘwhere
M: MapMut<Key = K>,
unsafe fn map_join_mut<M>(self, rhs: &'a mut M) -> MapJoinIter<Self, &'a mut M> ⓘwhere
M: MapMut<Key = K>,
Inner joins with a MapMut.
§Safety
Self must be a map iterator that never returns duplicate keys. Otherwise, this method may potentially hand out multiple mutable references to the same RHS value!
Sourceunsafe fn map_join_left_mut<M>(
self,
rhs: &'a mut M,
) -> MapJoinLeftIter<Self, &'a mut M> ⓘwhere
M: MapMut<Key = K>,
unsafe fn map_join_left_mut<M>(
self,
rhs: &'a mut M,
) -> MapJoinLeftIter<Self, &'a mut M> ⓘwhere
M: MapMut<Key = K>,
Left joins with a MapMut.
§Safety
Self must be a map iterator that never returns duplicate keys. Otherwise, this method may potentially hand out multiple mutable references to the same RHS value!
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.