Trait polars_utils::itertools::Itertools

source ·
pub trait Itertools: Iterator {
    // Provided methods
    fn collect_vec(self) -> Vec<Self::Item>
       where Self: Sized { ... }
    fn try_collect<T, U, E>(self) -> Result<U, E>
       where Self: Sized + Iterator<Item = Result<T, E>>,
             Result<U, E>: FromIterator<Result<T, E>> { ... }
    fn try_collect_vec<T, U, E>(self) -> Result<Vec<U>, E>
       where Self: Sized + Iterator<Item = Result<T, E>>,
             Result<Vec<U>, E>: FromIterator<Result<T, E>> { ... }
    fn enumerate_idx(self) -> EnumerateIdx<Self, IdxSize> 
       where Self: Sized { ... }
    fn enumerate_u32(self) -> EnumerateIdx<Self, u32> 
       where Self: Sized { ... }
    fn all_equal(self) -> bool
       where Self: Sized,
             Self::Item: PartialEq { ... }
    fn eq_by_<I, F>(self, other: I, eq: F) -> bool
       where Self: Sized,
             I: IntoIterator,
             F: FnMut(Self::Item, I::Item) -> bool { ... }
    fn partial_cmp_by_<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
       where Self: Sized,
             I: IntoIterator,
             F: FnMut(Self::Item, I::Item) -> Option<Ordering> { ... }
}
Expand description

Utility extension trait of iterator methods.

Provided Methods§

source

fn collect_vec(self) -> Vec<Self::Item>
where Self: Sized,

Equivalent to .collect::<Vec<_>>().

source

fn try_collect<T, U, E>(self) -> Result<U, E>
where Self: Sized + Iterator<Item = Result<T, E>>, Result<U, E>: FromIterator<Result<T, E>>,

Equivalent to .collect::<Result<_, _>>().

source

fn try_collect_vec<T, U, E>(self) -> Result<Vec<U>, E>
where Self: Sized + Iterator<Item = Result<T, E>>, Result<Vec<U>, E>: FromIterator<Result<T, E>>,

Equivalent to .collect::<Result<Vec<_>, _>>().

source

fn enumerate_idx(self) -> EnumerateIdx<Self, IdxSize>
where Self: Sized,

source

fn enumerate_u32(self) -> EnumerateIdx<Self, u32>
where Self: Sized,

source

fn all_equal(self) -> bool
where Self: Sized, Self::Item: PartialEq,

source

fn eq_by_<I, F>(self, other: I, eq: F) -> bool
where Self: Sized, I: IntoIterator, F: FnMut(Self::Item, I::Item) -> bool,

source

fn partial_cmp_by_<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
where Self: Sized, I: IntoIterator, F: FnMut(Self::Item, I::Item) -> Option<Ordering>,

Implementors§

source§

impl<T: Iterator + ?Sized> Itertools for T