pub trait TrustedLenExt: Iterator + Sized {
// Provided method
unsafe fn trusted_len(self) -> TrustedLenAdapter<Self> ⓘ { ... }
}Expand description
Extension trait for wrapping any iterator in a TrustedLenAdapter.
Provided Methods§
Sourceunsafe fn trusted_len(self) -> TrustedLenAdapter<Self> ⓘ
unsafe fn trusted_len(self) -> TrustedLenAdapter<Self> ⓘ
Wraps this iterator in a TrustedLenAdapter.
§Safety
The caller must guarantee that the iterator does indeed have an exact length.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.