Skip to main content

TrustedIter

Trait TrustedIter 

Source
pub unsafe trait TrustedIter: ExactSizeIterator { }
Expand description

A local marker type for iterators with a trusted length.

§Safety

Implementation must ensure that the implementation of ExactSizeIterator is such that that unsafe code can rely on the returned value.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl TrustedIter for IndexVecIntoIter

Source§

impl TrustedIter for Range<usize>

Source§

impl<'a, I, T> TrustedIter for Cloned<I>
where I: TrustedIter<Item = &'a T>, T: 'a + Clone,

Source§

impl<'a, I, T> TrustedIter for Copied<I>
where I: TrustedIter<Item = &'a T>, T: 'a + Copy,

Source§

impl<'a, T> TrustedIter for VectorIter<'a, T>
where T: Follow<'a>,

Available on crate feature flatbuffers only.
Source§

impl<I, U, F> TrustedIter for Map<I, F>
where I: TrustedIter, F: FnMut(I::Item) -> U,

Source§

impl<I> TrustedIter for Enumerate<I>
where I: TrustedIter,

Source§

impl<T, U> TrustedIter for Zip<T, U>
where T: TrustedIter, U: TrustedIter,

Source§

impl<T, const N: usize> TrustedIter for IntoIter<T, N>

Source§

impl<T> TrustedIter for IntoIter<T>

Source§

impl<T> TrustedIter for Iter<'_, T>

Implementors§