pub trait SetIterator<T>:
IntoIterator<Item = T>
+ SetInterface<T, T>
+ Sized {
type Iter<'a>: Iterator<Item = &'a T>
where Self: 'a,
T: 'a;
// Required method
fn iter<'a>(&'a self) -> Self::Iter<'a>;
// Provided methods
fn into_difference(self, other: Self) -> IntoDifference<Self, T> ⓘ { ... }
fn difference<'a>(&'a self, other: &'a Self) -> Difference<'a, Self, T> ⓘ { ... }
fn into_symmetric_difference(
self,
other: Self,
) -> IntoSymmetricDifference<Self, T> ⓘ { ... }
fn symmetric_difference<'a>(
&'a self,
other: &'a Self,
) -> SymmetricDifference<'a, Self, T> ⓘ { ... }
fn into_intersection(self, other: Self) -> IntoIntersection<Self, T> ⓘ { ... }
fn intersection<'a>(&'a self, other: &'a Self) -> Intersection<'a, Self, T> ⓘ { ... }
fn into_union(self, other: Self) -> IntoUnion<Self, T> ⓘ { ... }
fn union<'a>(&'a self, other: &'a Self) -> Union<'a, Self, T> ⓘ { ... }
fn is_subset(&self, other: &Self) -> bool { ... }
fn is_superset(&self, other: &Self) -> bool { ... }
}
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn into_difference(self, other: Self) -> IntoDifference<Self, T> ⓘ
fn into_difference(self, other: Self) -> IntoDifference<Self, T> ⓘ
Creates an owned iterator over all items that are in self
but not other
. (self \ other
)
Sourcefn difference<'a>(&'a self, other: &'a Self) -> Difference<'a, Self, T> ⓘ
fn difference<'a>(&'a self, other: &'a Self) -> Difference<'a, Self, T> ⓘ
Creates a borrowed iterator over all items that are in self
but not other
. (self \ other
)
Sourcefn into_symmetric_difference(
self,
other: Self,
) -> IntoSymmetricDifference<Self, T> ⓘ
fn into_symmetric_difference( self, other: Self, ) -> IntoSymmetricDifference<Self, T> ⓘ
Creates an owned iterator over all items that are in self
or other
but not both. (self △ other
)
Sourcefn symmetric_difference<'a>(
&'a self,
other: &'a Self,
) -> SymmetricDifference<'a, Self, T> ⓘ
fn symmetric_difference<'a>( &'a self, other: &'a Self, ) -> SymmetricDifference<'a, Self, T> ⓘ
Creates a borrowed iterator over all items that are in self
or other
but not both.
(self △ other
)
Sourcefn into_intersection(self, other: Self) -> IntoIntersection<Self, T> ⓘ
fn into_intersection(self, other: Self) -> IntoIntersection<Self, T> ⓘ
Creates an owned iterator over all items that are in both self
and other
. (self ∩ other
)
Sourcefn intersection<'a>(&'a self, other: &'a Self) -> Intersection<'a, Self, T> ⓘ
fn intersection<'a>(&'a self, other: &'a Self) -> Intersection<'a, Self, T> ⓘ
Creates a borrowed iterator over all items that are in both self
and other
. (self ∩ other
)
Sourcefn into_union(self, other: Self) -> IntoUnion<Self, T> ⓘ
fn into_union(self, other: Self) -> IntoUnion<Self, T> ⓘ
Creates an owned iterator over all items that are in either self
or other
. (self ∪ other
)
Sourcefn union<'a>(&'a self, other: &'a Self) -> Union<'a, Self, T> ⓘ
fn union<'a>(&'a self, other: &'a Self) -> Union<'a, Self, T> ⓘ
Creates a borrowed iterator over all items that are in either self
or other
. (self ∪ other
)
Sourcefn is_subset(&self, other: &Self) -> bool
fn is_subset(&self, other: &Self) -> bool
Returns true if other
contains all elements of self
. (self ⊆ other
)
Sourcefn is_superset(&self, other: &Self) -> bool
fn is_superset(&self, other: &Self) -> bool
Returns true if self
contains all elements of other
. (self ⊇ other
)
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.