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.

Implementations on Foreign Types

Implementors

Safety: a range is always of known length