Skip to main content

TrustedLenExt

Trait TrustedLenExt 

Source
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§

Source

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.

Implementors§