polars_utils::itertools

Trait 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