Skip to main content

Iter

Trait Iter 

Source
pub trait Iter: Sized + Iterator {
    // Provided methods
    fn intersperse_(self, sep: Self::Item) -> impl Iterator<Item = Self::Item>
       where Self::Item: Clone { ... }
    fn try_flatten<I: IntoIterator, E>(
        self,
    ) -> impl Iterator<Item = Result<I::Item, E>>
       where Self: Iterator<Item = Result<I, E>> { ... }
    fn zip_longest<J: IntoIterator>(
        self,
        j: J,
    ) -> impl Iterator<Item = (Option<Self::Item>, Option<J::Item>)> { ... }
    fn eq_by_<J: Iterator>(
        self,
        j: J,
        cmp: impl FnMut(&Self::Item, &J::Item) -> bool,
    ) -> bool { ... }
}

Provided Methods§

Source

fn intersperse_(self, sep: Self::Item) -> impl Iterator<Item = Self::Item>
where Self::Item: Clone,

See https://doc.rust-lang.org/std/iter/struct.Intersperse.html

Source

fn try_flatten<I: IntoIterator, E>( self, ) -> impl Iterator<Item = Result<I::Item, E>>
where Self: Iterator<Item = Result<I, E>>,

Source

fn zip_longest<J: IntoIterator>( self, j: J, ) -> impl Iterator<Item = (Option<Self::Item>, Option<J::Item>)>

Walks self and j together to the end of the longer one: each item is a pair with at least one side present, and the shorter side is None past its end.

Source

fn eq_by_<J: Iterator>( self, j: J, cmp: impl FnMut(&Self::Item, &J::Item) -> bool, ) -> bool

See https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.eq_by

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<T: Sized + Iterator> Iter for T