Skip to main content

IteratorExt

Trait IteratorExt 

Source
pub trait IteratorExt<This>
where This: Iterator,
{ // Required methods fn skip_nth(self, position: usize) -> impl Iterator<Item = This::Item>; fn stop_if<Predicate>( self, predicate: Predicate, ) -> impl Iterator<Item = This::Item> where Predicate: FnMut(&This::Item) -> bool; }
Expand description

Iterator utility functions.

Required Methods§

Source

fn skip_nth(self, position: usize) -> impl Iterator<Item = This::Item>

Omits the item at one zero-based position.

Source

fn stop_if<Predicate>( self, predicate: Predicate, ) -> impl Iterator<Item = This::Item>
where Predicate: FnMut(&This::Item) -> bool,

Includes items through the first item satisfying predicate, then stops.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<This> IteratorExt<This> for This
where This: Iterator,

Iterator utility functions.