Struct rustc_trait_selection::traits::TraitAliasExpander
source · pub struct TraitAliasExpander<'tcx> {
tcx: TyCtxt<'tcx>,
stack: Vec<TraitAliasExpansionInfo<'tcx>>,
}
Expand description
“Trait alias expansion” is the process of expanding a sequence of trait
references into another sequence by transitively following all trait
aliases. e.g. If you have bounds like Foo + Send
, a trait alias
trait Foo = Bar + Sync;
, and another trait alias
trait Bar = Read + Write
, then the bounds would expand to
Read + Write + Sync + Send
.
Expansion is done via a DFS (depth-first search), and the visited
field
is used to avoid cycles.
Fields§
§tcx: TyCtxt<'tcx>
§stack: Vec<TraitAliasExpansionInfo<'tcx>>
Implementations§
source§impl<'tcx> TraitAliasExpander<'tcx>
impl<'tcx> TraitAliasExpander<'tcx>
sourcefn expand(&mut self, item: &TraitAliasExpansionInfo<'tcx>) -> bool
fn expand(&mut self, item: &TraitAliasExpansionInfo<'tcx>) -> bool
If item
is a trait alias and its predicate has not yet been visited, then expands item
to the definition, pushes the resulting expansion onto self.stack
, and returns false
.
Otherwise, immediately returns true
if item
is a regular trait, or false
if it is a
trait alias.
The return value indicates whether item
should be yielded to the user.
Trait Implementations§
source§impl<'tcx> Iterator for TraitAliasExpander<'tcx>
impl<'tcx> Iterator for TraitAliasExpander<'tcx>
source§type Item = TraitAliasExpansionInfo<'tcx>
type Item = TraitAliasExpansionInfo<'tcx>
source§fn size_hint(&self) -> (usize, Option<usize>)
fn size_hint(&self) -> (usize, Option<usize>)
source§fn next(&mut self) -> Option<TraitAliasExpansionInfo<'tcx>>
fn next(&mut self) -> Option<TraitAliasExpansionInfo<'tcx>>
source§fn next_chunk<const N: usize>(
&mut self,
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
fn next_chunk<const N: usize>(
&mut self,
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
iter_next_chunk
)N
values. Read more1.0.0 · source§fn count(self) -> usizewhere
Self: Sized,
fn count(self) -> usizewhere
Self: Sized,
1.0.0 · source§fn last(self) -> Option<Self::Item>where
Self: Sized,
fn last(self) -> Option<Self::Item>where
Self: Sized,
source§fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>
fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>
iter_advance_by
)n
elements. Read more1.0.0 · source§fn nth(&mut self, n: usize) -> Option<Self::Item>
fn nth(&mut self, n: usize) -> Option<Self::Item>
n
th element of the iterator. Read more1.28.0 · source§fn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
fn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
1.0.0 · source§fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
1.0.0 · source§fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>where
Self: Sized,
U: IntoIterator,
fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>where
Self: Sized,
U: IntoIterator,
source§fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
iter_intersperse
)separator
between adjacent items of the original iterator. Read more1.0.0 · source§fn map<B, F>(self, f: F) -> Map<Self, F>
fn map<B, F>(self, f: F) -> Map<Self, F>
1.0.0 · source§fn filter<P>(self, predicate: P) -> Filter<Self, P>
fn filter<P>(self, predicate: P) -> Filter<Self, P>
1.0.0 · source§fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
1.0.0 · source§fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
1.0.0 · source§fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
1.0.0 · source§fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
1.57.0 · source§fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
1.0.0 · source§fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
n
elements. Read more1.0.0 · source§fn take(self, n: usize) -> Take<Self>where
Self: Sized,
fn take(self, n: usize) -> Take<Self>where
Self: Sized,
n
elements, or fewer
if the underlying iterator ends sooner. Read more1.0.0 · source§fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
source§fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
iter_map_windows
)f
for each contiguous window of size N
over
self
and returns an iterator over the outputs of f
. Like slice::windows()
,
the windows during mapping overlap as well. Read more1.0.0 · source§fn inspect<F>(self, f: F) -> Inspect<Self, F>
fn inspect<F>(self, f: F) -> Inspect<Self, F>
1.0.0 · source§fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
source§fn collect_into<E>(self, collection: &mut E) -> &mut E
fn collect_into<E>(self, collection: &mut E) -> &mut E
iter_collect_into
)1.0.0 · source§fn partition<B, F>(self, f: F) -> (B, B)
fn partition<B, F>(self, f: F) -> (B, B)
source§fn is_partitioned<P>(self, predicate: P) -> bool
fn is_partitioned<P>(self, predicate: P) -> bool
iter_is_partitioned
)true
precede all those that return false
. Read more1.27.0 · source§fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
1.27.0 · source§fn try_for_each<F, R>(&mut self, f: F) -> R
fn try_for_each<F, R>(&mut self, f: F) -> R
1.0.0 · source§fn fold<B, F>(self, init: B, f: F) -> B
fn fold<B, F>(self, init: B, f: F) -> B
1.51.0 · source§fn reduce<F>(self, f: F) -> Option<Self::Item>
fn reduce<F>(self, f: F) -> Option<Self::Item>
source§fn try_reduce<R>(
&mut self,
f: impl FnMut(Self::Item, Self::Item) -> R,
) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
fn try_reduce<R>( &mut self, f: impl FnMut(Self::Item, Self::Item) -> R, ) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
iterator_try_reduce
)1.0.0 · source§fn all<F>(&mut self, f: F) -> bool
fn all<F>(&mut self, f: F) -> bool
1.0.0 · source§fn any<F>(&mut self, f: F) -> bool
fn any<F>(&mut self, f: F) -> bool
1.0.0 · source§fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
1.30.0 · source§fn find_map<B, F>(&mut self, f: F) -> Option<B>
fn find_map<B, F>(&mut self, f: F) -> Option<B>
source§fn try_find<R>(
&mut self,
f: impl FnMut(&Self::Item) -> R,
) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
fn try_find<R>( &mut self, f: impl FnMut(&Self::Item) -> R, ) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
try_find
)1.0.0 · source§fn position<P>(&mut self, predicate: P) -> Option<usize>
fn position<P>(&mut self, predicate: P) -> Option<usize>
1.6.0 · source§fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
1.15.0 · source§fn max_by<F>(self, compare: F) -> Option<Self::Item>
fn max_by<F>(self, compare: F) -> Option<Self::Item>
1.6.0 · source§fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
1.15.0 · source§fn min_by<F>(self, compare: F) -> Option<Self::Item>
fn min_by<F>(self, compare: F) -> Option<Self::Item>
1.0.0 · source§fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
1.36.0 · source§fn copied<'a, T>(self) -> Copied<Self>
fn copied<'a, T>(self) -> Copied<Self>
source§fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>where
Self: Sized,
fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>where
Self: Sized,
iter_array_chunks
)N
elements of the iterator at a time. Read more1.11.0 · source§fn product<P>(self) -> P
fn product<P>(self) -> P
source§fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
iter_order_by
)Iterator
with those
of another with respect to the specified comparison function. Read more1.5.0 · source§fn partial_cmp<I>(self, other: I) -> Option<Ordering>
fn partial_cmp<I>(self, other: I) -> Option<Ordering>
PartialOrd
elements of
this Iterator
with those of another. The comparison works like short-circuit
evaluation, returning a result without comparing the remaining elements.
As soon as an order can be determined, the evaluation stops and a result is returned. Read moresource§fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>where
Self: Sized,
I: IntoIterator,
F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,
fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>where
Self: Sized,
I: IntoIterator,
F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,
iter_order_by
)Iterator
with those
of another with respect to the specified comparison function. Read moresource§fn eq_by<I, F>(self, other: I, eq: F) -> bool
fn eq_by<I, F>(self, other: I, eq: F) -> bool
iter_order_by
)1.5.0 · source§fn lt<I>(self, other: I) -> bool
fn lt<I>(self, other: I) -> bool
Iterator
are lexicographically
less than those of another. Read more1.5.0 · source§fn le<I>(self, other: I) -> bool
fn le<I>(self, other: I) -> bool
Iterator
are lexicographically
less or equal to those of another. Read more1.5.0 · source§fn gt<I>(self, other: I) -> bool
fn gt<I>(self, other: I) -> bool
Iterator
are lexicographically
greater than those of another. Read more1.5.0 · source§fn ge<I>(self, other: I) -> bool
fn ge<I>(self, other: I) -> bool
Iterator
are lexicographically
greater than or equal to those of another. Read more1.82.0 · source§fn is_sorted_by<F>(self, compare: F) -> bool
fn is_sorted_by<F>(self, compare: F) -> bool
1.82.0 · source§fn is_sorted_by_key<F, K>(self, f: F) -> bool
fn is_sorted_by_key<F, K>(self, f: F) -> bool
Auto Trait Implementations§
impl<'tcx> Freeze for TraitAliasExpander<'tcx>
impl<'tcx> !RefUnwindSafe for TraitAliasExpander<'tcx>
impl<'tcx> !Send for TraitAliasExpander<'tcx>
impl<'tcx> !Sync for TraitAliasExpander<'tcx>
impl<'tcx> Unpin for TraitAliasExpander<'tcx>
impl<'tcx> !UnwindSafe for TraitAliasExpander<'tcx>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
source§impl<T> Filterable for T
impl<T> Filterable for T
source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<I> IntoIterator for Iwhere
I: Iterator,
impl<I> IntoIterator for Iwhere
I: Iterator,
source§impl<P> IntoQueryParam<P> for P
impl<P> IntoQueryParam<P> for P
fn into_query_param(self) -> P
source§impl<I> IteratorRandom for Iwhere
I: Iterator,
impl<I> IteratorRandom for Iwhere
I: Iterator,
source§fn choose<R>(self, rng: &mut R) -> Option<Self::Item>
fn choose<R>(self, rng: &mut R) -> Option<Self::Item>
source§fn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>
fn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>
source§impl<T> Itertools for T
impl<T> Itertools for T
source§fn interleave<J>(
self,
other: J,
) -> Interleave<Self, <J as IntoIterator>::IntoIter>
fn interleave<J>( self, other: J, ) -> Interleave<Self, <J as IntoIterator>::IntoIter>
source§fn interleave_shortest<J>(
self,
other: J,
) -> InterleaveShortest<Self, <J as IntoIterator>::IntoIter>
fn interleave_shortest<J>( self, other: J, ) -> InterleaveShortest<Self, <J as IntoIterator>::IntoIter>
source§fn intersperse(
self,
element: Self::Item,
) -> IntersperseWith<Self, IntersperseElementSimple<Self::Item>>
fn intersperse( self, element: Self::Item, ) -> IntersperseWith<Self, IntersperseElementSimple<Self::Item>>
source§fn intersperse_with<F>(self, element: F) -> IntersperseWith<Self, F>
fn intersperse_with<F>(self, element: F) -> IntersperseWith<Self, F>
source§fn zip_longest<J>(
self,
other: J,
) -> ZipLongest<Self, <J as IntoIterator>::IntoIter>where
J: IntoIterator,
Self: Sized,
fn zip_longest<J>(
self,
other: J,
) -> ZipLongest<Self, <J as IntoIterator>::IntoIter>where
J: IntoIterator,
Self: Sized,
source§fn zip_eq<J>(self, other: J) -> ZipEq<Self, <J as IntoIterator>::IntoIter>where
J: IntoIterator,
Self: Sized,
fn zip_eq<J>(self, other: J) -> ZipEq<Self, <J as IntoIterator>::IntoIter>where
J: IntoIterator,
Self: Sized,
source§fn batching<B, F>(self, f: F) -> Batching<Self, F>
fn batching<B, F>(self, f: F) -> Batching<Self, F>
source§fn group_by<K, F>(self, key: F) -> GroupBy<K, Self, F>
fn group_by<K, F>(self, key: F) -> GroupBy<K, Self, F>
source§fn chunks(self, size: usize) -> IntoChunks<Self>where
Self: Sized,
fn chunks(self, size: usize) -> IntoChunks<Self>where
Self: Sized,
source§fn tuple_windows<T>(self) -> TupleWindows<Self, T>where
Self: Sized + Iterator<Item = <T as TupleCollect>::Item>,
T: HomogeneousTuple,
<T as TupleCollect>::Item: Clone,
fn tuple_windows<T>(self) -> TupleWindows<Self, T>where
Self: Sized + Iterator<Item = <T as TupleCollect>::Item>,
T: HomogeneousTuple,
<T as TupleCollect>::Item: Clone,
source§fn circular_tuple_windows<T>(self) -> CircularTupleWindows<Self, T>where
Self: Sized + Clone + Iterator<Item = <T as TupleCollect>::Item> + ExactSizeIterator,
T: TupleCollect + Clone,
<T as TupleCollect>::Item: Clone,
fn circular_tuple_windows<T>(self) -> CircularTupleWindows<Self, T>where
Self: Sized + Clone + Iterator<Item = <T as TupleCollect>::Item> + ExactSizeIterator,
T: TupleCollect + Clone,
<T as TupleCollect>::Item: Clone,
source§fn tuples<T>(self) -> Tuples<Self, T>
fn tuples<T>(self) -> Tuples<Self, T>
source§fn tee(self) -> (Tee<Self>, Tee<Self>)
fn tee(self) -> (Tee<Self>, Tee<Self>)
source§fn step(self, n: usize) -> Step<Self>where
Self: Sized,
fn step(self, n: usize) -> Step<Self>where
Self: Sized,
n
elements in the base iterator
for each iteration. Read moresource§fn map_into<R>(self) -> MapSpecialCase<Self, MapSpecialCaseFnInto<R>>
fn map_into<R>(self) -> MapSpecialCase<Self, MapSpecialCaseFnInto<R>>
source§fn map_results<F, T, U, E>(
self,
f: F,
) -> MapSpecialCase<Self, MapSpecialCaseFnOk<F>>
fn map_results<F, T, U, E>( self, f: F, ) -> MapSpecialCase<Self, MapSpecialCaseFnOk<F>>
.map_ok()
.source§fn map_ok<F, T, U, E>(self, f: F) -> MapSpecialCase<Self, MapSpecialCaseFnOk<F>>
fn map_ok<F, T, U, E>(self, f: F) -> MapSpecialCase<Self, MapSpecialCaseFnOk<F>>
Result::Ok
value. Result::Err
values are
unchanged. Read moresource§fn filter_ok<F, T, E>(self, f: F) -> FilterOk<Self, F>
fn filter_ok<F, T, E>(self, f: F) -> FilterOk<Self, F>
Result::Ok
value with the provided closure. Result::Err
values are
unchanged. Read moresource§fn filter_map_ok<F, T, U, E>(self, f: F) -> FilterMapOk<Self, F>
fn filter_map_ok<F, T, U, E>(self, f: F) -> FilterMapOk<Self, F>
Result::Ok
value with the provided closure. Result::Err
values are unchanged. Read moresource§fn flatten_ok<T, E>(self) -> FlattenOk<Self, T, E>
fn flatten_ok<T, E>(self) -> FlattenOk<Self, T, E>
Result::Ok
value into
a series of Result::Ok
values. Result::Err
values are unchanged. Read moresource§fn process_results<F, T, E, R>(self, processor: F) -> Result<R, E>
fn process_results<F, T, E, R>(self, processor: F) -> Result<R, E>
Result
values instead. Read moresource§fn merge<J>(
self,
other: J,
) -> MergeBy<Self, <J as IntoIterator>::IntoIter, MergeLte>
fn merge<J>( self, other: J, ) -> MergeBy<Self, <J as IntoIterator>::IntoIter, MergeLte>
source§fn merge_by<J, F>(
self,
other: J,
is_first: F,
) -> MergeBy<Self, <J as IntoIterator>::IntoIter, F>
fn merge_by<J, F>( self, other: J, is_first: F, ) -> MergeBy<Self, <J as IntoIterator>::IntoIter, F>
source§fn merge_join_by<J, F, T>(
self,
other: J,
cmp_fn: F,
) -> MergeBy<Self, <J as IntoIterator>::IntoIter, MergeFuncLR<F, <F as FuncLR<Self::Item, <<J as IntoIterator>::IntoIter as Iterator>::Item>>::T>>
fn merge_join_by<J, F, T>( self, other: J, cmp_fn: F, ) -> MergeBy<Self, <J as IntoIterator>::IntoIter, MergeFuncLR<F, <F as FuncLR<Self::Item, <<J as IntoIterator>::IntoIter as Iterator>::Item>>::T>>
source§fn kmerge(self) -> KMergeBy<<Self::Item as IntoIterator>::IntoIter, KMergeByLt>
fn kmerge(self) -> KMergeBy<<Self::Item as IntoIterator>::IntoIter, KMergeByLt>
source§fn kmerge_by<F>(
self,
first: F,
) -> KMergeBy<<Self::Item as IntoIterator>::IntoIter, F>where
Self: Sized,
Self::Item: IntoIterator,
F: FnMut(&<Self::Item as IntoIterator>::Item, &<Self::Item as IntoIterator>::Item) -> bool,
fn kmerge_by<F>(
self,
first: F,
) -> KMergeBy<<Self::Item as IntoIterator>::IntoIter, F>where
Self: Sized,
Self::Item: IntoIterator,
F: FnMut(&<Self::Item as IntoIterator>::Item, &<Self::Item as IntoIterator>::Item) -> bool,
source§fn cartesian_product<J>(
self,
other: J,
) -> Product<Self, <J as IntoIterator>::IntoIter>
fn cartesian_product<J>( self, other: J, ) -> Product<Self, <J as IntoIterator>::IntoIter>
self
and J
. Read moresource§fn multi_cartesian_product(
self,
) -> MultiProduct<<Self::Item as IntoIterator>::IntoIter>where
Self: Sized,
Self::Item: IntoIterator,
<Self::Item as IntoIterator>::IntoIter: Clone,
<Self::Item as IntoIterator>::Item: Clone,
fn multi_cartesian_product(
self,
) -> MultiProduct<<Self::Item as IntoIterator>::IntoIter>where
Self: Sized,
Self::Item: IntoIterator,
<Self::Item as IntoIterator>::IntoIter: Clone,
<Self::Item as IntoIterator>::Item: Clone,
self
. Read moresource§fn coalesce<F>(self, f: F) -> CoalesceBy<Self, F, NoCount>
fn coalesce<F>(self, f: F) -> CoalesceBy<Self, F, NoCount>
source§fn dedup(self) -> CoalesceBy<Self, DedupPred2CoalescePred<DedupEq>, NoCount>
fn dedup(self) -> CoalesceBy<Self, DedupPred2CoalescePred<DedupEq>, NoCount>
source§fn dedup_by<Cmp>(
self,
cmp: Cmp,
) -> CoalesceBy<Self, DedupPred2CoalescePred<Cmp>, NoCount>
fn dedup_by<Cmp>( self, cmp: Cmp, ) -> CoalesceBy<Self, DedupPred2CoalescePred<Cmp>, NoCount>
source§fn dedup_with_count(
self,
) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<DedupEq>, WithCount>where
Self: Sized,
fn dedup_with_count(
self,
) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<DedupEq>, WithCount>where
Self: Sized,
source§fn dedup_by_with_count<Cmp>(
self,
cmp: Cmp,
) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<Cmp>, WithCount>
fn dedup_by_with_count<Cmp>( self, cmp: Cmp, ) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<Cmp>, WithCount>
source§fn duplicates(self) -> DuplicatesBy<Self, Self::Item, ById>
fn duplicates(self) -> DuplicatesBy<Self, Self::Item, ById>
source§fn duplicates_by<V, F>(self, f: F) -> DuplicatesBy<Self, V, ByFn<F>>
fn duplicates_by<V, F>(self, f: F) -> DuplicatesBy<Self, V, ByFn<F>>
source§fn unique(self) -> Unique<Self>
fn unique(self) -> Unique<Self>
source§fn unique_by<V, F>(self, f: F) -> UniqueBy<Self, V, F>
fn unique_by<V, F>(self, f: F) -> UniqueBy<Self, V, F>
source§fn peeking_take_while<F>(&mut self, accept: F) -> PeekingTakeWhile<'_, Self, F>
fn peeking_take_while<F>(&mut self, accept: F) -> PeekingTakeWhile<'_, Self, F>
accept
returns true
. Read moresource§fn take_while_ref<F>(&mut self, accept: F) -> TakeWhileRef<'_, Self, F>
fn take_while_ref<F>(&mut self, accept: F) -> TakeWhileRef<'_, Self, F>
Clone
-able iterator
to only pick off elements while the predicate accept
returns true
. Read moresource§fn take_while_inclusive<F>(self, accept: F) -> TakeWhileInclusive<Self, F>
fn take_while_inclusive<F>(self, accept: F) -> TakeWhileInclusive<Self, F>
true
, including the element for which the predicate
first returned false
. Read moresource§fn while_some<A>(self) -> WhileSome<Self>
fn while_some<A>(self) -> WhileSome<Self>
Option<A>
iterator elements
and produces A
. Stops on the first None
encountered. Read moresource§fn tuple_combinations<T>(self) -> TupleCombinations<Self, T>
fn tuple_combinations<T>(self) -> TupleCombinations<Self, T>
source§fn combinations(self, k: usize) -> Combinations<Self>
fn combinations(self, k: usize) -> Combinations<Self>
k
-length combinations of
the elements from an iterator. Read moresource§fn combinations_with_replacement(
self,
k: usize,
) -> CombinationsWithReplacement<Self>
fn combinations_with_replacement( self, k: usize, ) -> CombinationsWithReplacement<Self>
k
-length combinations of
the elements from an iterator, with replacement. Read moresource§fn permutations(self, k: usize) -> Permutations<Self>
fn permutations(self, k: usize) -> Permutations<Self>
source§fn powerset(self) -> Powerset<Self>
fn powerset(self) -> Powerset<Self>
source§fn pad_using<F>(self, min: usize, f: F) -> PadUsing<Self, F>
fn pad_using<F>(self, min: usize, f: F) -> PadUsing<Self, F>
min
by filling missing elements using a closure f
. Read moresource§fn with_position(self) -> WithPosition<Self>where
Self: Sized,
fn with_position(self) -> WithPosition<Self>where
Self: Sized,
Position
to
ease special-case handling of the first or last elements. Read moresource§fn positions<P>(self, predicate: P) -> Positions<Self, P>
fn positions<P>(self, predicate: P) -> Positions<Self, P>
source§fn update<F>(self, updater: F) -> Update<Self, F>
fn update<F>(self, updater: F) -> Update<Self, F>
source§fn next_tuple<T>(&mut self) -> Option<T>
fn next_tuple<T>(&mut self) -> Option<T>
source§fn collect_tuple<T>(self) -> Option<T>
fn collect_tuple<T>(self) -> Option<T>
source§fn find_position<P>(&mut self, pred: P) -> Option<(usize, Self::Item)>
fn find_position<P>(&mut self, pred: P) -> Option<(usize, Self::Item)>
source§fn find_or_last<P>(self, predicate: P) -> Option<Self::Item>
fn find_or_last<P>(self, predicate: P) -> Option<Self::Item>
source§fn find_or_first<P>(self, predicate: P) -> Option<Self::Item>
fn find_or_first<P>(self, predicate: P) -> Option<Self::Item>
source§fn contains<Q>(&mut self, query: &Q) -> bool
fn contains<Q>(&mut self, query: &Q) -> bool
true
if the given item is present in this iterator. Read moresource§fn all_equal_value(
&mut self,
) -> Result<Self::Item, Option<(Self::Item, Self::Item)>>
fn all_equal_value( &mut self, ) -> Result<Self::Item, Option<(Self::Item, Self::Item)>>
source§fn all_unique(&mut self) -> bool
fn all_unique(&mut self) -> bool
source§fn dropping(self, n: usize) -> Selfwhere
Self: Sized,
fn dropping(self, n: usize) -> Selfwhere
Self: Sized,
n
elements from the iterator eagerly,
and return the same iterator again. Read moresource§fn dropping_back(self, n: usize) -> Selfwhere
Self: Sized + DoubleEndedIterator,
fn dropping_back(self, n: usize) -> Selfwhere
Self: Sized + DoubleEndedIterator,
n
elements from the iterator eagerly,
and return the same iterator again. Read moresource§fn foreach<F>(self, f: F)
fn foreach<F>(self, f: F)
f
eagerly on each element of the iterator. Read moresource§fn collect_vec(self) -> Vec<Self::Item>where
Self: Sized,
fn collect_vec(self) -> Vec<Self::Item>where
Self: Sized,
.collect_vec()
is simply a type specialization of Iterator::collect
,
for convenience.source§fn try_collect<T, U, E>(self) -> Result<U, E>
fn try_collect<T, U, E>(self) -> Result<U, E>
source§fn set_from<'a, A, J>(&mut self, from: J) -> usize
fn set_from<'a, A, J>(&mut self, from: J) -> usize
self
from the from
iterator,
stopping at the shortest of the two iterators. Read moresource§fn join(&mut self, sep: &str) -> String
fn join(&mut self, sep: &str) -> String
sep
. Read moresource§fn format(self, sep: &str) -> Format<'_, Self>where
Self: Sized,
fn format(self, sep: &str) -> Format<'_, Self>where
Self: Sized,
sep
. Read moresource§fn format_with<F>(self, sep: &str, format: F) -> FormatWith<'_, Self, F>
fn format_with<F>(self, sep: &str, format: F) -> FormatWith<'_, Self, F>
sep
. Read moresource§fn fold_results<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
fn fold_results<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
.fold_ok()
.source§fn fold_ok<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
fn fold_ok<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
Result
values from an iterator. Read moresource§fn fold_options<A, B, F>(&mut self, start: B, f: F) -> Option<B>
fn fold_options<A, B, F>(&mut self, start: B, f: F) -> Option<B>
Option
values from an iterator. Read moresource§fn fold1<F>(self, f: F) -> Option<Self::Item>
fn fold1<F>(self, f: F) -> Option<Self::Item>
Iterator::reduce
insteadsource§fn tree_fold1<F>(self, f: F) -> Option<Self::Item>
fn tree_fold1<F>(self, f: F) -> Option<Self::Item>
source§fn fold_while<B, F>(&mut self, init: B, f: F) -> FoldWhile<B>
fn fold_while<B, F>(&mut self, init: B, f: F) -> FoldWhile<B>
source§fn sum1<S>(self) -> Option<S>
fn sum1<S>(self) -> Option<S>
source§fn product1<P>(self) -> Option<P>
fn product1<P>(self) -> Option<P>
source§fn sorted_unstable(self) -> IntoIter<Self::Item>
fn sorted_unstable(self) -> IntoIter<Self::Item>
source§fn sorted_unstable_by<F>(self, cmp: F) -> IntoIter<Self::Item>
fn sorted_unstable_by<F>(self, cmp: F) -> IntoIter<Self::Item>
source§fn sorted_unstable_by_key<K, F>(self, f: F) -> IntoIter<Self::Item>
fn sorted_unstable_by_key<K, F>(self, f: F) -> IntoIter<Self::Item>
source§fn sorted(self) -> IntoIter<Self::Item>
fn sorted(self) -> IntoIter<Self::Item>
source§fn sorted_by<F>(self, cmp: F) -> IntoIter<Self::Item>
fn sorted_by<F>(self, cmp: F) -> IntoIter<Self::Item>
source§fn sorted_by_key<K, F>(self, f: F) -> IntoIter<Self::Item>
fn sorted_by_key<K, F>(self, f: F) -> IntoIter<Self::Item>
source§fn sorted_by_cached_key<K, F>(self, f: F) -> IntoIter<Self::Item>
fn sorted_by_cached_key<K, F>(self, f: F) -> IntoIter<Self::Item>
source§fn k_smallest(self, k: usize) -> IntoIter<Self::Item>
fn k_smallest(self, k: usize) -> IntoIter<Self::Item>
source§fn partition_map<A, B, F, L, R>(self, predicate: F) -> (A, B)
fn partition_map<A, B, F, L, R>(self, predicate: F) -> (A, B)
Iterator::partition
, each partition may
have a distinct type. Read moresource§fn partition_result<A, B, T, E>(self) -> (A, B)
fn partition_result<A, B, T, E>(self) -> (A, B)
Result
s into one list of all the Ok
elements
and another list of all the Err
elements. Read moresource§fn into_group_map<K, V>(self) -> HashMap<K, Vec<V>>
fn into_group_map<K, V>(self) -> HashMap<K, Vec<V>>
HashMap
of keys mapped to Vec
s of values. Keys and values
are taken from (Key, Value)
tuple pairs yielded by the input iterator. Read moresource§fn into_group_map_by<K, V, F>(self, f: F) -> HashMap<K, Vec<V>>
fn into_group_map_by<K, V, F>(self, f: F) -> HashMap<K, Vec<V>>
Iterator
on a HashMap
. Keys mapped to Vec
s of values. The key is specified
in the closure. Read moresource§fn into_grouping_map<K, V>(self) -> GroupingMap<Self>
fn into_grouping_map<K, V>(self) -> GroupingMap<Self>
GroupingMap
to be used later with one of the efficient
group-and-fold operations it allows to perform. Read moresource§fn into_grouping_map_by<K, V, F>(
self,
key_mapper: F,
) -> GroupingMap<MapForGrouping<Self, F>>
fn into_grouping_map_by<K, V, F>( self, key_mapper: F, ) -> GroupingMap<MapForGrouping<Self, F>>
GroupingMap
to be used later with one of the efficient
group-and-fold operations it allows to perform. Read moresource§fn min_set_by<F>(self, compare: F) -> Vec<Self::Item>
fn min_set_by<F>(self, compare: F) -> Vec<Self::Item>
source§fn min_set_by_key<K, F>(self, key: F) -> Vec<Self::Item>
fn min_set_by_key<K, F>(self, key: F) -> Vec<Self::Item>
source§fn max_set_by<F>(self, compare: F) -> Vec<Self::Item>
fn max_set_by<F>(self, compare: F) -> Vec<Self::Item>
source§fn max_set_by_key<K, F>(self, key: F) -> Vec<Self::Item>
fn max_set_by_key<K, F>(self, key: F) -> Vec<Self::Item>
source§fn minmax(self) -> MinMaxResult<Self::Item>
fn minmax(self) -> MinMaxResult<Self::Item>
source§fn minmax_by_key<K, F>(self, key: F) -> MinMaxResult<Self::Item>
fn minmax_by_key<K, F>(self, key: F) -> MinMaxResult<Self::Item>
source§fn minmax_by<F>(self, compare: F) -> MinMaxResult<Self::Item>
fn minmax_by<F>(self, compare: F) -> MinMaxResult<Self::Item>
source§fn position_max(self) -> Option<usize>
fn position_max(self) -> Option<usize>
source§fn position_max_by_key<K, F>(self, key: F) -> Option<usize>
fn position_max_by_key<K, F>(self, key: F) -> Option<usize>
source§fn position_max_by<F>(self, compare: F) -> Option<usize>
fn position_max_by<F>(self, compare: F) -> Option<usize>
source§fn position_min(self) -> Option<usize>
fn position_min(self) -> Option<usize>
source§fn position_min_by_key<K, F>(self, key: F) -> Option<usize>
fn position_min_by_key<K, F>(self, key: F) -> Option<usize>
source§fn position_min_by<F>(self, compare: F) -> Option<usize>
fn position_min_by<F>(self, compare: F) -> Option<usize>
source§fn position_minmax(self) -> MinMaxResult<usize>
fn position_minmax(self) -> MinMaxResult<usize>
source§fn position_minmax_by_key<K, F>(self, key: F) -> MinMaxResult<usize>
fn position_minmax_by_key<K, F>(self, key: F) -> MinMaxResult<usize>
source§fn position_minmax_by<F>(self, compare: F) -> MinMaxResult<usize>
fn position_minmax_by<F>(self, compare: F) -> MinMaxResult<usize>
source§fn exactly_one(self) -> Result<Self::Item, ExactlyOneError<Self>>where
Self: Sized,
fn exactly_one(self) -> Result<Self::Item, ExactlyOneError<Self>>where
Self: Sized,
source§fn at_most_one(self) -> Result<Option<Self::Item>, ExactlyOneError<Self>>where
Self: Sized,
fn at_most_one(self) -> Result<Option<Self::Item>, ExactlyOneError<Self>>where
Self: Sized,
source§fn multipeek(self) -> MultiPeek<Self>where
Self: Sized,
fn multipeek(self) -> MultiPeek<Self>where
Self: Sized,
.next()
values without advancing the base iterator. Read moresource§fn counts(self) -> HashMap<Self::Item, usize>
fn counts(self) -> HashMap<Self::Item, usize>
HashMap
which
contains each item that appears in the iterator and the number
of times it appears. Read moresource§fn counts_by<K, F>(self, f: F) -> HashMap<K, usize>
fn counts_by<K, F>(self, f: F) -> HashMap<K, usize>
HashMap
which
contains each item that appears in the iterator and the number
of times it appears,
determining identity using a keying function. Read moresource§fn multiunzip<FromI>(self) -> FromIwhere
Self: Sized + MultiUnzip<FromI>,
fn multiunzip<FromI>(self) -> FromIwhere
Self: Sized + MultiUnzip<FromI>,
source§impl<T> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
source§impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
source§impl<I, T> UpcastFrom<I, T> for T
impl<I, T> UpcastFrom<I, T> for T
fn upcast_from(from: T, _tcx: I) -> T
source§impl<Tcx, T> Value<Tcx> for Twhere
Tcx: DepContext,
impl<Tcx, T> Value<Tcx> for Twhere
Tcx: DepContext,
default fn from_cycle_error( tcx: Tcx, cycle_error: &CycleError, _guar: ErrorGuaranteed, ) -> T
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> MaybeSendSync for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes