pub unsafe trait TrustedLen: Iterator { }
Expand description
An iterator of known, fixed size.
A trait denoting Rusts’ unstable TrustedLen.
This is re-defined here and implemented for some iterators until std::iter::TrustedLen
is stabilized.
§Safety
This trait must only be implemented when the contract is upheld. Consumers of this trait must inspect Iterator::size_hint()’s upper bound.
Trait Implementations§
impl<T> TrustedLen for &mut dyn TrustedLen<Item = T>
impl<T> TrustedLen for Box<dyn TrustedLen<Item = T> + '_>
Implementations on Foreign Types§
impl<'a, I, T> TrustedLen for Cloned<I>
impl<'a, I, T> TrustedLen for Copied<I>
impl<A, B> TrustedLen for Chain<A, B>
impl<A, B> TrustedLen for Zip<A, B>where
A: TrustedLen,
B: TrustedLen,
impl<A, F: FnMut() -> A> TrustedLen for RepeatWith<F>
impl<A: Clone> TrustedLen for Repeat<A>
impl<A: TrustedLen> TrustedLen for StepBy<A>
impl<A: TrustedLen> TrustedLen for Take<A>
impl<B, I: TrustedLen, T: FnMut(I::Item) -> B> TrustedLen for Map<I, T>
impl<I> TrustedLen for Enumerate<I>where
I: TrustedLen,
impl<I, St, F, B> TrustedLen for Scan<I, St, F>
impl<I: TrustedLen + DoubleEndedIterator> TrustedLen for Rev<I>
impl<K, V> TrustedLen for IntoIter<K, V>
impl<T> TrustedLen for Box<dyn TrustedLen<Item = T> + '_>
impl<T> TrustedLen for IntoIter<T>
impl<T> TrustedLen for Once<T>
impl<T> TrustedLen for Range<T>
impl<T> TrustedLen for RangeInclusive<T>where
RangeInclusive<T>: Iterator,
impl<T> TrustedLen for ChunksExact<'_, T>
impl<T> TrustedLen for Iter<'_, T>
impl<T> TrustedLen for Windows<'_, T>
Implementors§
impl TrustedLen for FastU32BitmapIter<'_>
impl TrustedLen for FastU56BitmapIter<'_>
impl TrustedLen for FastU64BitmapIter<'_>
impl TrustedLen for polars_arrow::bitmap::iterator::IntoIter
impl TrustedLen for TrueIdxIter<'_>
impl TrustedLen for BitmapIter<'_>
impl<'a, A: ArrayAccessor<'a> + ?Sized> TrustedLen for NonNullValuesIter<'a, A>
impl<'a, A: ArrayAccessor<'a>> TrustedLen for ArrayValuesIter<'a, A>
impl<I: Index> TrustedLen for IndexRange<I>
§Safety
A range is always of known length.