Skip to main content

IteratorExt

Trait IteratorExt 

Source
pub trait IteratorExt: Iterator + Sized {
    // Provided method
    fn range(self) -> Option<RangeInclusive<Self::Item>>
       where Self::Item: Ord + Copy { ... }
}
Expand description

Extension methods on Iterator.

Provided Methods§

Source

fn range(self) -> Option<RangeInclusive<Self::Item>>
where Self::Item: Ord + Copy,

The inclusive range min..=max of the items, or None if the iterator is empty.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§