[−][src]Trait nom::lib::std::iter::TrustedLen
🔬 This is a nightly-only experimental API. (
trusted_len
)An iterator that reports an accurate length using size_hint.
The iterator reports a size hint where it is either exact
(lower bound is equal to upper bound), or the upper bound is None
.
The upper bound must only be None
if the actual iterator length is
larger than usize::MAX
. In that case, the lower bound must be
usize::MAX
, resulting in a .size_hint
of (usize::MAX, None)
.
The iterator must produce exactly the number of elements it reported or diverge before reaching the end.
Safety
This trait must only be implemented when the contract is upheld.
Consumers of this trait must inspect .size_hint
’s upper bound.
Implementations on Foreign Types
impl<'_, I> TrustedLen for &'_ mut I where
I: TrustedLen + ?Sized,
[src]
Loading content...
I: TrustedLen + ?Sized,
Implementors
impl TrustedLen for Range<i128>
[src]
impl TrustedLen for Range<i16>
[src]
impl TrustedLen for Range<i32>
[src]
impl TrustedLen for Range<i64>
[src]
impl TrustedLen for Range<i8>
[src]
impl TrustedLen for Range<isize>
[src]
impl TrustedLen for Range<u128>
[src]
impl TrustedLen for Range<u16>
[src]
impl TrustedLen for Range<u32>
[src]
impl TrustedLen for Range<u64>
[src]
impl TrustedLen for Range<u8>
[src]
impl TrustedLen for Range<usize>
[src]
impl TrustedLen for RangeInclusive<i128>
[src]
impl TrustedLen for RangeInclusive<i16>
[src]
impl TrustedLen for RangeInclusive<i32>
[src]
impl TrustedLen for RangeInclusive<i64>
[src]
impl TrustedLen for RangeInclusive<i8>
[src]
impl TrustedLen for RangeInclusive<isize>
[src]
impl TrustedLen for RangeInclusive<u128>
[src]
impl TrustedLen for RangeInclusive<u16>
[src]
impl TrustedLen for RangeInclusive<u32>
[src]
impl TrustedLen for RangeInclusive<u64>
[src]
impl TrustedLen for RangeInclusive<u8>
[src]
impl TrustedLen for RangeInclusive<usize>
[src]
impl<'_> TrustedLen for Bytes<'_>
[src]
impl<'_, A> TrustedLen for nom::lib::std::option::Iter<'_, A>
[src]
impl<'_, A> TrustedLen for nom::lib::std::option::IterMut<'_, A>
[src]
impl<'_, A> TrustedLen for nom::lib::std::result::Iter<'_, A>
[src]
impl<'_, A> TrustedLen for nom::lib::std::result::IterMut<'_, A>
[src]
impl<'_, T> TrustedLen for Chunks<'_, T>
[src]
impl<'_, T> TrustedLen for ChunksExact<'_, T>
[src]
impl<'_, T> TrustedLen for ChunksExactMut<'_, T>
[src]
impl<'_, T> TrustedLen for ChunksMut<'_, T>
[src]
impl<'_, T> TrustedLen for nom::lib::std::slice::Iter<'_, T>
[src]
impl<'_, T> TrustedLen for nom::lib::std::slice::IterMut<'_, T>
[src]
impl<'_, T> TrustedLen for RChunks<'_, T>
[src]
impl<'_, T> TrustedLen for RChunksExact<'_, T>
[src]
impl<'_, T> TrustedLen for RChunksExactMut<'_, T>
[src]
impl<'_, T> TrustedLen for RChunksMut<'_, T>
[src]
impl<'_, T> TrustedLen for Windows<'_, T>
[src]
impl<'a, I, T> TrustedLen for Cloned<I> where
I: TrustedLen<Item = &'a T>,
T: 'a + Clone,
[src]
I: TrustedLen<Item = &'a T>,
T: 'a + Clone,
impl<'a, I, T> TrustedLen for Copied<I> where
I: TrustedLen<Item = &'a T>,
T: 'a + Copy,
[src]
I: TrustedLen<Item = &'a T>,
T: 'a + Copy,
impl<A> TrustedLen for Repeat<A> where
A: Clone,
[src]
A: Clone,
impl<A> TrustedLen for RangeFrom<A> where
A: Step,
[src]
A: Step,
impl<A> TrustedLen for nom::lib::std::option::IntoIter<A>
[src]
impl<A> TrustedLen for nom::lib::std::result::IntoIter<A>
[src]
impl<A, B> TrustedLen for Chain<A, B> where
A: TrustedLen,
B: TrustedLen<Item = <A as Iterator>::Item>,
[src]
A: TrustedLen,
B: TrustedLen<Item = <A as Iterator>::Item>,
impl<A, B> TrustedLen for Zip<A, B> where
A: TrustedLen,
B: TrustedLen,
[src]
A: TrustedLen,
B: TrustedLen,
impl<A, F> TrustedLen for OnceWith<F> where
F: FnOnce() -> A,
[src]
F: FnOnce() -> A,
impl<A, F> TrustedLen for RepeatWith<F> where
F: FnMut() -> A,
[src]
F: FnMut() -> A,
impl<B, I, F> TrustedLen for Map<I, F> where
F: FnMut(<I as Iterator>::Item) -> B,
I: TrustedLen,
[src]
F: FnMut(<I as Iterator>::Item) -> B,
I: TrustedLen,
impl<I> TrustedLen for Enumerate<I> where
I: TrustedLen,
[src]
I: TrustedLen,
impl<I> TrustedLen for Rev<I> where
I: TrustedLen + DoubleEndedIterator,
[src]
I: TrustedLen + DoubleEndedIterator,
impl<I> TrustedLen for Take<I> where
I: TrustedLen,
[src]
I: TrustedLen,