Trait sorted_iter::SortedIterator [−][src]
pub trait SortedIterator: Iterator + Sized {
fn union<J>(self, other: J) -> Union<Self, J>ⓘ
where
J: SortedIterator<Item = Self::Item>,
{ ... }
fn intersection<J>(self, other: J) -> Intersection<Self, J>ⓘNotable traits for Intersection<I, J>impl<K: Ord, I: Iterator<Item = K>, J: Iterator<Item = K>> Iterator for Intersection<I, J> type Item = K;
where
J: SortedIterator<Item = Self::Item>,
{ ... }
fn difference<J>(self, other: J) -> Difference<Self, J>ⓘNotable traits for Difference<I, J>impl<K: Ord, I: Iterator<Item = K>, J: Iterator<Item = K>> Iterator for Difference<I, J> type Item = K;
where
J: SortedIterator<Item = Self::Item>,
{ ... }
fn symmetric_difference<J>(self, other: J) -> SymmetricDifference<Self, J>ⓘNotable traits for SymmetricDifference<I, J>impl<K: Ord, I: Iterator<Item = K>, J: Iterator<Item = K>> Iterator for SymmetricDifference<I, J> type Item = K;
where
J: SortedIterator<Item = Self::Item>,
{ ... }
fn pairs(self) -> Pairs<Self>ⓘ { ... }
fn is_disjoint<J>(self, other: J) -> bool
where
J: SortedIterator<Item = Self::Item>,
Self::Item: Ord,
{ ... }
fn is_subset<J>(self, other: J) -> bool
where
J: SortedIterator<Item = Self::Item>,
Self::Item: Ord,
{ ... }
fn is_superset<J>(self, other: J) -> bool
where
J: SortedIterator<Item = Self::Item>,
Self::Item: Ord,
{ ... }
}Expand description
set operations for iterators where the items are sorted according to the natural order
Provided methods
Visits the values representing the union, i.e., all the values in self or other,
without duplicates.
fn intersection<J>(self, other: J) -> Intersection<Self, J>ⓘNotable traits for Intersection<I, J>impl<K: Ord, I: Iterator<Item = K>, J: Iterator<Item = K>> Iterator for Intersection<I, J> type Item = K; where
J: SortedIterator<Item = Self::Item>,
fn intersection<J>(self, other: J) -> Intersection<Self, J>ⓘNotable traits for Intersection<I, J>impl<K: Ord, I: Iterator<Item = K>, J: Iterator<Item = K>> Iterator for Intersection<I, J> type Item = K; where
J: SortedIterator<Item = Self::Item>,
impl<K: Ord, I: Iterator<Item = K>, J: Iterator<Item = K>> Iterator for Intersection<I, J> type Item = K;Visits the values representing the intersection, i.e., the values that are both in self
and other.
fn difference<J>(self, other: J) -> Difference<Self, J>ⓘNotable traits for Difference<I, J>impl<K: Ord, I: Iterator<Item = K>, J: Iterator<Item = K>> Iterator for Difference<I, J> type Item = K; where
J: SortedIterator<Item = Self::Item>,
fn difference<J>(self, other: J) -> Difference<Self, J>ⓘNotable traits for Difference<I, J>impl<K: Ord, I: Iterator<Item = K>, J: Iterator<Item = K>> Iterator for Difference<I, J> type Item = K; where
J: SortedIterator<Item = Self::Item>,
impl<K: Ord, I: Iterator<Item = K>, J: Iterator<Item = K>> Iterator for Difference<I, J> type Item = K;Visits the values representing the difference, i.e., the values that are in self but not
in other.
fn symmetric_difference<J>(self, other: J) -> SymmetricDifference<Self, J>ⓘNotable traits for SymmetricDifference<I, J>impl<K: Ord, I: Iterator<Item = K>, J: Iterator<Item = K>> Iterator for SymmetricDifference<I, J> type Item = K; where
J: SortedIterator<Item = Self::Item>,
fn symmetric_difference<J>(self, other: J) -> SymmetricDifference<Self, J>ⓘNotable traits for SymmetricDifference<I, J>impl<K: Ord, I: Iterator<Item = K>, J: Iterator<Item = K>> Iterator for SymmetricDifference<I, J> type Item = K; where
J: SortedIterator<Item = Self::Item>,
impl<K: Ord, I: Iterator<Item = K>, J: Iterator<Item = K>> Iterator for SymmetricDifference<I, J> type Item = K;Visits the values representing the symmetric difference, i.e., the values that are in
self or in other but not in both.
Creates an iterator that pairs each element of self with (). This transforms a
SortedIterator into a SortedPairIterator.
fn is_disjoint<J>(self, other: J) -> bool where
J: SortedIterator<Item = Self::Item>,
Self::Item: Ord,
fn is_disjoint<J>(self, other: J) -> bool where
J: SortedIterator<Item = Self::Item>,
Self::Item: Ord,
Returns true if self has no elements in common with other. This is equivalent to
checking for an empty intersection.
Returns true if this sorted iterator is a subset of another, i.e., other contains at
least all the values in self.
fn is_superset<J>(self, other: J) -> bool where
J: SortedIterator<Item = Self::Item>,
Self::Item: Ord,
fn is_superset<J>(self, other: J) -> bool where
J: SortedIterator<Item = Self::Item>,
Self::Item: Ord,
Returns true if this sorted iterator is a superset of another, i.e., self contains at
least all the values in other.